/* KhataOS Tools & Editorial Design System */

.tool-page {
    padding-top: 120px;
    padding-bottom: 80px;
}

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

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(107, 70, 193, 0.18);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

.tool-hero h1 {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #ffffff;
}

.tool-hero p {
    font-size: 17px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Tool Workspace Container */
.tool-card {
    background: rgba(18, 24, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
    margin-bottom: 64px;
}

.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: #e2e8f0;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: #0d1322;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
    background: #111827;
}

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

.btn-pill {
    padding: 8px 18px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
}

.btn-pill:hover {
    background: #334155;
    color: #ffffff;
}

.btn-pill.active {
    background: #8b5cf6;
    border-color: #a855f7;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.35);
}

/* Output Cards */
.result-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 14px;
}

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

.result-row.total-row {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px dashed rgba(255, 255, 255, 0.15);
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

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

.val-warning {
    color: #f87171;
}

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

.editorial-section h2 {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 48px;
    margin-bottom: 18px;
    line-height: 1.3;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.editorial-section h3 {
    font-size: 21px;
    font-weight: 700;
    color: #f1f5f9;
    margin-top: 32px;
    margin-bottom: 14px;
}

.editorial-section p {
    margin-bottom: 20px;
    font-size: 16px;
}

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

.editorial-section li {
    margin-bottom: 10px;
    font-size: 15.5px;
}

.editorial-table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 14.5px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.editorial-table th {
    background: #1e293b;
    color: #ffffff;
    padding: 14px 18px;
    text-align: left;
    font-weight: 800;
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.editorial-table td {
    padding: 13px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.editorial-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.callout-box {
    background: rgba(107, 70, 193, 0.12);
    border-left: 4px solid #8b5cf6;
    padding: 20px 24px;
    border-radius: 0 12px 12px 0;
    margin: 28px 0;
    color: #e2e8f0;
}

.callout-box strong {
    color: #ffffff;
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.callout-warning {
    background: rgba(239, 68, 68, 0.12);
    border-left-color: #ef4444;
}

.callout-tip {
    background: rgba(16, 185, 129, 0.12);
    border-left-color: #10b981;
}

.cta-banner {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.25) 0%, rgba(16, 185, 129, 0.2) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 18px;
    padding: 36px;
    text-align: center;
    margin-top: 56px;
}

.cta-banner h3 {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 10px;
}

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

/* Thermal & Invoice Paper Styling */
.receipt-paper {
    background: #ffffff;
    color: #0f172a;
    border-radius: 10px;
    padding: 24px;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    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: 64px;
}


@media (max-width: 900px) {
    .tool-page {
        padding-top: 100px;
        padding-bottom: 60px;
    }
    .tool-hero {
        margin-bottom: 32px;
    }
    .tool-hero h1 {
        font-size: 32px;
    }
    .tool-card {
        padding: 24px 20px;
        border-radius: 16px;
        margin-bottom: 48px;
    }
}

@media (max-width: 640px) {
    /* Mobile App-Style Navbar */
    .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: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 9999px;
        flex-shrink: 0;
    }
    .nav-links .btn-primary {
        display: none !important;
    }

    .tool-page {
        padding-top: 110px;
        padding-bottom: 40px;
    }
    .container {
        padding: 0 14px;
    }
    .tool-hero h1 {
        font-size: 26px;
        line-height: 1.25;
    }
    .tool-hero p {
        font-size: 14.5px;
    }
    .tool-card {
        padding: 18px 14px;
        border-radius: 14px;
        margin-bottom: 36px;
    }
    .grid-2-responsive {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .form-group {
        margin-bottom: 14px;
    }
    .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: 10px 0;
    }
    .val-highlight {
        font-size: 19px;
    }
    .editorial-section h2 {
        font-size: 22px;
        margin-top: 36px;
        margin-bottom: 14px;
    }
    .editorial-section h3 {
        font-size: 17px;
        margin-top: 24px;
        margin-bottom: 10px;
    }
    .editorial-section p, .editorial-section li {
        font-size: 14.5px;
        line-height: 1.65;
    }
    .callout-box {
        padding: 16px;
        margin: 20px 0;
    }
    .cta-banner {
        padding: 24px 16px;
        margin-top: 40px;
    }
    .cta-banner h3 {
        font-size: 20px;
    }
    .cta-banner p {
        font-size: 13.5px;
    }
    .receipt-paper {
        padding: 16px 12px;
    }
}

@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 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

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

.breadcrumb a:hover {
    color: #a855f7;
}

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

.guide-step {
    background: rgba(18, 24, 38, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    backdrop-filter: blur(8px);
}

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

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    color: #ffffff;
    font-weight: 900;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

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

.guide-card,
a.guide-card {
    background: rgba(18, 24, 38, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    padding: 26px !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: #f8fafc !important;
    cursor: pointer !important;
}

.guide-card:hover,
a.guide-card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(168, 85, 247, 0.4) !important;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35) !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: 11.5px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    margin-bottom: 14px !important;
    align-self: flex-start !important;
}

.badge-kirana { background: rgba(59, 130, 246, 0.15) !important; color: #60a5fa !important; border: 1px solid rgba(59, 130, 246, 0.3) !important; }
.badge-restaurant { background: rgba(249, 115, 22, 0.15) !important; color: #fb923c !important; border: 1px solid rgba(249, 115, 22, 0.3) !important; }
.badge-medical { background: rgba(16, 185, 129, 0.15) !important; color: #34d399 !important; border: 1px solid rgba(16, 185, 129, 0.3) !important; }
.badge-nonveg { background: rgba(239, 68, 68, 0.15) !important; color: #f87171 !important; border: 1px solid rgba(239, 68, 68, 0.3) !important; }
.badge-personal { background: rgba(168, 85, 247, 0.15) !important; color: #c084fc !important; border: 1px solid rgba(168, 85, 247, 0.3) !important; }

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

.guide-card p,
a.guide-card p {
    color: #94a3b8 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin: 0 0 18px 0 !important;
    flex-grow: 1 !important;
}

.guide-card-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 12.5px !important;
    color: #64748b !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-top: 14px !important;
}

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

/* ── App Store Download Button ───────────────────────── */
.btn-appstore {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 12px 24px !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    border-radius: 14px !important;
    transition: transform 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s !important;
}

.btn-appstore:hover {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
    color: #ffffff !important;
}

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

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

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

.guide-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(168, 85, 247, 0.14);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 5px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

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

.guide-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin: 40px 0 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.guide-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 24px 0 12px 0;
}

.guide-content p {
    margin-bottom: 18px;
    color: #94a3b8;
    line-height: 1.75;
}

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

.guide-content ul,
.guide-content ol {
    margin: 0 0 20px 24px;
    color: #94a3b8;
}

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

.guide-content code {
    background: rgba(255, 255, 255, 0.08);
    color: #c084fc;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 14px;
}

/* Callout Boxes */
.guide-callout {
    border-radius: 14px;
    padding: 20px 24px;
    margin: 28px 0;
    backdrop-filter: blur(8px);
}

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

.guide-callout.info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #cbd5e1;
}

.guide-callout.info .guide-callout-title {
    color: #60a5fa;
}

.guide-callout.warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #cbd5e1;
}

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

.guide-callout.tip {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #cbd5e1;
}

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

/* Numbered Steps */
.guide-step {
    display: flex;
    gap: 18px;
    background: rgba(18, 24, 38, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.guide-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    color: #ffffff;
    font-weight: 900;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35);
}

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

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

.guide-step-body p {
    margin: 0;
    color: #94a3b8;
    font-size: 14.5px;
    line-height: 1.65;
}




