/* KhataOS Tools & Editorial Design System - Modern Light Theme */

.tool-page {
    padding-top: 110px;
    padding-bottom: 70px;
}

.tool-hero {
    text-align: center;
    max-width: 860px;
    margin: 0 auto 40px auto;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EEF2FF;
    color: #4F46E5;
    border: 1px solid rgba(79, 70, 229, 0.25);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

.tool-hero h1 {
    font-size: 38px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 14px;
    color: #0F172A;
}

.tool-hero p {
    font-size: 16px;
    color: #475569;
    line-height: 1.6;
}

/* Tool Workspace Container */
.tool-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 34px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
    margin-bottom: 56px;
}

.tool-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 900px) {
    .tool-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    color: #0F172A;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: #FFFFFF;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-pill {
    padding: 8px 16px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 9999px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
}

.btn-pill:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.btn-pill.active {
    background: #4F46E5;
    border-color: #4F46E5;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

/* Output Cards */
.result-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 24px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #E2E8F0;
    font-size: 14px;
    color: #334155;
}

.result-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.result-row.total-row {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px dashed #CBD5E1;
    font-size: 18px;
    font-weight: 800;
    color: #0F172A;
}

.val-highlight {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: #059669;
}

.val-warning {
    color: #DC2626;
}

/* Editorial & Publisher Guide Typography (Veteran Voice) */
.editorial-section {
    max-width: 860px;
    margin: 0 auto;
    color: #334155;
    line-height: 1.8;
}

.editorial-section h2 {
    font-size: 26px;
    font-weight: 800;
    color: #0F172A;
    margin-top: 44px;
    margin-bottom: 16px;
    line-height: 1.3;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 10px;
}

.editorial-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1E293B;
    margin-top: 28px;
    margin-bottom: 12px;
}

.editorial-section p {
    margin-bottom: 18px;
    font-size: 15.5px;
    color: #475569;
}

.editorial-section ul, .editorial-section ol {
    margin-left: 24px;
    margin-bottom: 22px;
}

.editorial-section li {
    margin-bottom: 8px;
    font-size: 15px;
    color: #475569;
}

.editorial-table {
    width: 100%;
    border-collapse: collapse;
    margin: 26px 0;
    font-size: 14.5px;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.editorial-table th {
    background: #F8FAFC;
    color: #0F172A;
    padding: 13px 16px;
    text-align: left;
    font-weight: 800;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #CBD5E1;
}

.editorial-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #F1F5F9;
    color: #334155;
}

.editorial-table tr:hover {
    background: #F8FAFC;
}

.callout-box {
    background: #EEF2FF;
    border-left: 4px solid #4F46E5;
    padding: 18px 22px;
    border-radius: 0 12px 12px 0;
    margin: 26px 0;
    color: #1E293B;
}

.callout-box strong {
    color: #0F172A;
    display: block;
    margin-bottom: 6px;
    font-size: 15.5px;
}

.callout-warning {
    background: #FEF2F2;
    border-left-color: #EF4444;
    color: #7F1D1D;
}

.callout-warning strong {
    color: #991B1B;
}

.callout-tip {
    background: #ECFDF5;
    border-left-color: #10B981;
    color: #064E3B;
}

.callout-tip strong {
    color: #065F46;
}

.cta-banner {
    background: linear-gradient(135deg, #EEF2FF 0%, #ECFDF5 100%);
    border: 1px solid #C7D2FE;
    border-radius: 18px;
    padding: 34px;
    text-align: center;
    margin-top: 50px;
}

.cta-banner h3 {
    font-size: 22px;
    color: #0F172A;
    margin-bottom: 8px;
}

.cta-banner p {
    color: #475569;
    max-width: 580px;
    margin: 0 auto 18px auto;
    font-size: 15px;
}

/* Thermal & Invoice Paper Styling */
.receipt-paper {
    background: #FFFFFF;
    color: #0F172A;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 22px;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.08);
    max-width: 360px;
    margin: 0 auto;
}

.receipt-paper.a4-mode {
    font-family: 'Inter', sans-serif;
    max-width: 100%;
}

/* Responsive Breakpoints & Mobile Enhancements */
.grid-2-responsive {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    border-radius: 12px;
}

.tools-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 56px;
}

@media (max-width: 900px) {
    .tool-page {
        padding-top: 90px;
        padding-bottom: 50px;
    }
    .tool-hero {
        margin-bottom: 28px;
    }
    .tool-hero h1 {
        font-size: 30px;
    }
    .tool-card {
        padding: 22px 18px;
        border-radius: 16px;
        margin-bottom: 40px;
    }
}

@media (max-width: 640px) {
    .navbar {
        height: auto !important;
        padding: 10px 0 !important;
    }
    .navbar .container {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
        padding: 0 14px !important;
    }
    .navbar .logo {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .nav-links {
        display: flex !important;
        gap: 8px !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding-bottom: 4px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .nav-links a {
        font-size: 12.5px !important;
        padding: 5px 12px !important;
        background: #F1F5F9;
        border: 1px solid #E2E8F0;
        border-radius: 9999px;
        flex-shrink: 0;
        color: #334155;
    }
    .nav-links .btn-primary {
        display: none !important;
    }

    .tool-page {
        padding-top: 100px;
        padding-bottom: 36px;
    }
    .container {
        padding: 0 14px;
    }
    .tool-hero h1 {
        font-size: 24px;
        line-height: 1.25;
    }
    .tool-hero p {
        font-size: 14px;
    }
    .tool-card {
        padding: 16px 12px;
        border-radius: 14px;
        margin-bottom: 30px;
    }
    .grid-2-responsive {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .form-group {
        margin-bottom: 12px;
    }
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    .btn-pill {
        padding: 6px 12px;
        font-size: 12px;
    }
    .result-card {
        padding: 16px 12px;
    }
    .result-row {
        font-size: 13px;
        padding: 9px 0;
    }
    .val-highlight {
        font-size: 19px;
    }
    .editorial-section h2 {
        font-size: 21px;
        margin-top: 32px;
        margin-bottom: 12px;
    }
    .editorial-section h3 {
        font-size: 16.5px;
        margin-top: 22px;
        margin-bottom: 10px;
    }
    .editorial-section p, .editorial-section li {
        font-size: 14px;
        line-height: 1.65;
    }
    .callout-box {
        padding: 14px;
        margin: 18px 0;
    }
    .cta-banner {
        padding: 22px 14px;
        margin-top: 36px;
    }
    .cta-banner h3 {
        font-size: 19px;
    }
    .cta-banner p {
        font-size: 13px;
    }
    .receipt-paper {
        padding: 14px 10px;
    }
}

@media print {
    body * {
        visibility: hidden;
    }
    #printable-receipt, #printable-receipt * {
        visibility: visible;
    }
    #printable-receipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #fff;
        color: #000;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    .no-print {
        display: none !important;
    }
}

/* How-To Guides Design System - Modern Light */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748B;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #475569;
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb a:hover {
    color: #4F46E5;
}

.breadcrumb span.current {
    color: #4F46E5;
    font-weight: 700;
}

.guide-step {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.guide-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #4F46E5;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-step h3 {
    margin: 0;
    color: #0F172A;
    font-size: 18px;
    font-weight: 800;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.guide-card,
a.guide-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 18px !important;
    padding: 24px !important;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s !important;
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    color: #0F172A !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}

.guide-card:hover,
a.guide-card:hover {
    transform: translateY(-3px) !important;
    border-color: #4F46E5 !important;
    box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.08) !important;
}

a.guide-card,
a.guide-card:visited,
a.guide-card:hover,
a.guide-card:active,
a.guide-card * {
    text-decoration: none !important;
}

.guide-category-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 4px 9px !important;
    border-radius: 6px !important;
    margin-bottom: 12px !important;
    align-self: flex-start !important;
}

.badge-kirana { background: #EEF2FF !important; color: #4338CA !important; border: 1px solid #C7D2FE !important; }
.badge-restaurant { background: #FEF3C7 !important; color: #B45309 !important; border: 1px solid #FDE68A !important; }
.badge-medical { background: #ECFDF5 !important; color: #047857 !important; border: 1px solid #A7F3D0 !important; }
.badge-nonveg { background: #FEE2E2 !important; color: #B91C1C !important; border: 1px solid #FECACA !important; }
.badge-personal { background: #F3E8FF !important; color: #6D28D9 !important; border: 1px solid #DDD6FE !important; }

.guide-card h3,
a.guide-card h3 {
    color: #0F172A !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.35 !important;
}

.guide-card p,
a.guide-card p {
    color: #475569 !important;
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    margin: 0 0 16px 0 !important;
    flex-grow: 1 !important;
}

.guide-card-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 12px !important;
    color: #64748B !important;
    border-top: 1px solid #E2E8F0 !important;
    padding-top: 12px !important;
}

.guide-card-footer span.read-more {
    color: #4F46E5 !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.guide-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748B;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.guide-breadcrumbs a {
    color: #475569;
    text-decoration: none;
    transition: color 0.15s;
}

.guide-breadcrumbs a:hover {
    color: #4F46E5;
}

.guide-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EEF2FF;
    color: #4F46E5;
    border: 1px solid #C7D2FE;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.guide-content {
    color: #334155;
    font-size: 16px;
    line-height: 1.8;
}

.guide-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #0F172A;
    margin: 36px 0 14px 0;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 8px;
}

.guide-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #1E293B;
    margin: 22px 0 10px 0;
}

.guide-content p {
    margin-bottom: 16px;
    color: #475569;
    line-height: 1.7;
}

.guide-content strong {
    color: #0F172A;
    font-weight: 700;
}

.guide-content ul,
.guide-content ol {
    margin: 0 0 18px 22px;
    color: #475569;
}

.guide-content li {
    margin-bottom: 8px;
    line-height: 1.65;
}

.guide-content code {
    background: #F1F5F9;
    color: #4F46E5;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 13.5px;
    border: 1px solid #E2E8F0;
}

/* Callout Boxes */
.guide-callout {
    border-radius: 12px;
    padding: 18px 20px;
    margin: 24px 0;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
}

.guide-callout-title {
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-callout.info {
    background: #EEF2FF;
    border-color: #C7D2FE;
    color: #1E293B;
}

.guide-callout.info .guide-callout-title {
    color: #4338CA;
}

.guide-callout.warning {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #78350F;
}

.guide-callout.warning .guide-callout-title {
    color: #B45309;
}

.guide-callout.tip {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #064E3B;
}

.guide-callout.tip .guide-callout-title {
    color: #047857;
}

/* Numbered Steps */
.guide-step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #4F46E5;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-step-body {
    flex: 1;
}

.guide-step-body h3 {
    margin: 0 0 6px 0;
    color: #0F172A;
    font-size: 17px;
    font-weight: 800;
}

.guide-step-body p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}
