/*
 * Gujarat Jantri Valuation Calculator — Web styles
 * Mobile-first redesign. SVG stroke icons (no emoji).
 * Brand: deep navy + royal blue gradient, soft neutral background.
 */

:root {
    --navy: #12356b;
    --navy-2: #1d4f9e;
    --blue: #2563eb;
    --blue-soft: #eaf1fe;
    --green: #15803d;
    --green-soft: #eefaf1;
    --red: #dc2626;
    --red-soft: #fdf0f0;
    --purple: #6d28d9;
    --purple-soft: #f1ecfd;
    --amber: #b45309;
    --amber-soft: #fef7e8;
    --text: #101828;
    --text-soft: #344054;
    --text-muted: #667085;
    --border: #e4e8ef;
    --bg: #f4f6fa;
    --card: #ffffff;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 6px rgba(16, 24, 40, 0.06);
    --grad: linear-gradient(120deg, var(--navy), var(--navy-2));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

.hidden { display: none !important; }

/* ── SVG icons ── */
.icon {
    width: 1.15em;
    height: 1.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.2em;
    flex-shrink: 0;
}
.icon-sm { width: 0.95em; height: 0.95em; vertical-align: -0.12em; }

/* ── Header ── */
.site-header {
    background: var(--grad);
    color: #fff;
    padding: 16px 0;
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-header h1 { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }

.header-subtitle { font-size: 0.78rem; color: rgba(255,255,255,0.75); margin-top: 2px; }

.header-right { display: flex; align-items: center; gap: 10px; }

.header-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.82rem;
}
.header-link:hover { color: #fff; text-decoration: underline; }

.settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 0.84rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    margin-left: auto;
}
.settings-btn:hover { background: rgba(255,255,255,0.22); }

@media (min-width: 720px) {
    .header-inner { flex-direction: row; align-items: center; justify-content: space-between; }
    .site-header h1 { font-size: 1.3rem; }
    .settings-btn { margin-left: 0; }
}

/* ── Layout ── */
.content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 12px 110px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.two-col { display: grid; grid-template-columns: 1fr; gap: 16px; }

@media (min-width: 900px) {
    .content { padding: 24px 20px 110px; gap: 22px; }
    .two-col { grid-template-columns: 1fr 1fr; gap: 22px; }
}

/* ── Ad slots (invisible until AdSense code is added) ── */
.ad-slot:empty { display: none; }
.ad-slot { text-align: center; min-height: 50px; }

/* ── Info banner ── */
.info-banner {
    display: flex;
    gap: 12px;
    background: var(--blue-soft);
    border: 1px solid #cddcfb;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.info-banner-icon { color: var(--blue); width: 1.4em; height: 1.4em; margin-top: 2px; }
.info-banner-title { font-weight: 600; color: var(--navy); font-size: 0.92rem; }
.info-banner-text { font-size: 0.82rem; color: var(--text-soft); margin-top: 2px; }

/* ── Form sections ── */
.form-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}

@media (min-width: 900px) {
    .form-section { padding: 22px; }
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 14px;
}

.title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--blue-soft);
    color: var(--navy-2);
    flex-shrink: 0;
}
.title-icon .icon { width: 18px; height: 18px; vertical-align: 0; }

.step-badge {
    background: var(--amber-soft);
    color: var(--amber);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.section-title-row .section-title { margin-bottom: 0; }

.multiplier-badge {
    background: var(--navy);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    margin-left: auto;
}

.jantri-info {
    background: #f7f9fd;
    border: 1px dashed #cddcfb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.8rem;
    color: var(--text-soft);
    margin-bottom: 14px;
}

.sub-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--navy);
    margin: 16px 0 10px;
}

/* ── Fields ── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }

.field label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-soft);
}
.field label .icon-sm { color: var(--text-muted); }

.field input, .field select, .field textarea {
    font-family: inherit;
    font-size: 16px; /* prevents iOS zoom on focus */
    padding: 11px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    width: 100%;
    min-height: 48px;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.field textarea { min-height: 72px; resize: vertical; }

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

input.input-error { border-color: var(--red) !important; background: var(--red-soft) !important; }
input.input-warning { border-color: #f59e0b !important; background: #fffbeb !important; }

.field-row { display: grid; grid-template-columns: 1fr; gap: 0 14px; }

@media (min-width: 560px) {
    .field-row { grid-template-columns: 1fr 1fr; }
    .field-row.five { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
    .field-row.three { grid-template-columns: repeat(3, 1fr); }
    .field-row.five { grid-template-columns: repeat(5, 1fr); }
}

.form-note { font-size: 0.76rem; color: var(--text-muted); margin: 2px 0 10px; }

/* Hide native number spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ── Rate cards ── */
.rate-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 4px;
}

@media (min-width: 720px) {
    .rate-cards { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

.rate-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    user-select: none;
    background: #fff;
}
.rate-card:hover { border-color: var(--blue); }
.rate-card:active { transform: scale(0.99); }

.rate-card.selected {
    border-color: var(--blue);
    background: var(--blue-soft);
}

.rate-card-header { display: flex; align-items: center; gap: 8px; }

.rate-radio {
    width: 17px; height: 17px;
    border: 2px solid #98a2b3;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    background: #fff;
}
.rate-card.selected .rate-radio { border-color: var(--blue); }
.rate-card.selected .rate-radio::after {
    content: '';
    position: absolute;
    inset: 2.5px;
    background: var(--blue);
    border-radius: 50%;
}

.rate-card-label { font-size: 0.83rem; font-weight: 600; color: var(--text-soft); }

.rate-card-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-top: 8px;
}

/* ── Display boxes (auto-calculated values) ── */
.display-box {
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.93rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    word-break: break-word;
}
.display-box.blue { background: var(--blue-soft); color: var(--navy); }
.display-box.green { background: var(--green-soft); color: var(--green); }
.display-box.red { background: var(--red-soft); color: var(--red); }
.display-box.purple { background: var(--purple-soft); color: var(--purple); }

.final-valuation-box {
    background: var(--grad);
    color: #fff;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    margin-top: 10px;
}

/* ── Checkboxes / radios ── */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-soft);
    cursor: pointer;
    font-weight: 500;
    min-height: 32px;
}
.checkbox-label.big { font-weight: 700; color: var(--navy); font-size: 0.93rem; }
.checkbox-label input, .radio-option input {
    width: 19px; height: 19px;
    accent-color: var(--blue);
    cursor: pointer;
    flex-shrink: 0;
}

.check-heading { margin-top: 16px; }

.radio-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0 10px;
}
@media (min-width: 720px) {
    .radio-row { flex-direction: row; align-items: center; gap: 16px; }
}
.radio-row-label { font-weight: 600; color: var(--text-soft); font-size: 0.85rem; }
.radio-option {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.87rem;
    color: var(--text-soft);
    cursor: pointer;
    min-height: 30px;
}

/* ── Parking ── */
.parking-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    background: #fafbfd;
}
.parking-formula { font-size: 0.75rem; color: var(--text-muted); margin: 6px 0 10px; }

/* ── Ghasaro ── */
.ghasaro-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
@media (min-width: 720px) {
    .ghasaro-row { flex-direction: row; align-items: center; gap: 20px; }
}
.ghasaro-inputs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ghasaro-inputs input {
    width: 96px;
    padding: 9px 11px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px;
    min-height: 44px;
}
.ghasaro-inputs input:focus { outline: none; border-color: var(--blue); }
.inline-label { font-size: 0.83rem; font-weight: 500; color: var(--text-soft); }
.ghasaro-pct { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.ghasaro-amount { font-size: 0.83rem; color: var(--red); font-weight: 700; }

/* ── Floors ── */
.floor-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 12px;
    background: #fafbfd;
}
.floor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.floor-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
}
.floor-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid #f6c6c6;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.76rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.floor-remove-btn:hover { background: #fbdcdc; }

.floor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.floor-grid .field { margin-bottom: 6px; }
@media (min-width: 900px) {
    .floor-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

.floor-ghasaro-row { display: flex; align-items: center; gap: 8px; }
.floor-ghasaro-row input {
    width: 76px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px;
}
.floor-ghasaro-row input:focus { outline: none; border-color: var(--blue); }

.add-floor-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    background: var(--blue-soft);
    color: var(--navy-2);
    border: 2px dashed #9dbdf5;
    border-radius: var(--radius-sm);
    padding: 13px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 4px;
    min-height: 48px;
}
.add-floor-btn:hover { background: #dbe8fc; }

/* ── Buttons ── */
.action-row { display: flex; gap: 12px; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--grad);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 28px;
    font-size: 0.98rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    min-height: 50px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(18, 53, 107, 0.25);
}
@media (min-width: 720px) {
    .btn-primary { width: auto; }
}
.btn-primary:hover { filter: brightness(1.12); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary.full { width: 100%; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #eef1f6;
    color: var(--text-soft);
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 8px;
    min-height: 46px;
}
.btn-secondary:hover { background: #e0e5ed; }
.btn-secondary.full { width: 100%; }

/* ── Step 2 disabled state ── */
.step-disabled { opacity: 0.55; pointer-events: none; }

/* ── Total after depreciation card ── */
.total-card {
    background: var(--grad);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #fff;
    margin-bottom: 16px;
}
.total-card-tag { font-size: 0.8rem; color: rgba(255,255,255,0.8); font-weight: 500; }
.total-card-value { font-size: 1.6rem; font-weight: 700; margin: 2px 0; word-break: break-word; }
.total-card-hint { font-size: 0.7rem; color: rgba(255,255,255,0.6); }
.total-card-icon { width: 44px; height: 44px; color: rgba(255,255,255,0.25); stroke-width: 1.5; }

.round-field { max-width: 460px; }

/* ── Results ── */
.results-placeholder {
    text-align: center;
    padding: 44px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.placeholder-icon {
    width: 52px; height: 52px;
    color: #c3cad6;
    stroke-width: 1.4;
    display: block;
    margin: 0 auto 12px;
}

.result-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
@media (min-width: 720px) {
    .result-cards { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

.result-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    background: #fafbfd;
}
.result-card.wide { grid-column: 1 / -1; }
.result-card-header { font-size: 0.76rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.result-card-value { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin: 4px 0; word-break: break-word; }
.result-card-value.negative { color: var(--red); }
.result-card-note { font-size: 0.72rem; color: var(--text-muted); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; margin-bottom: 14px; -webkit-overflow-scrolling: touch; }

.summary-table, .charges-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 420px;
}

.summary-table th, .charges-table th {
    background: #f7f9fc;
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: var(--text-soft);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.summary-table td, .charges-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.charges-table td:first-child .icon { color: var(--text-muted); margin-right: 6px; }

.summary-table .num, .charges-table .num { text-align: right; white-space: nowrap; }

.summary-table .highlight-row td {
    background: var(--blue-soft);
    color: var(--navy);
    font-weight: 700;
}

.charges-table .del-col { width: 36px; }
.charges-table:not(.has-custom) .del-col { display: none; }

.charge-amount-input {
    border: 1px solid transparent;
    background: transparent;
    font-family: inherit;
    font-size: 0.85rem;
    text-align: right;
    width: 120px;
    padding: 5px 7px;
    border-radius: 7px;
    color: var(--text);
}
.charge-amount-input:hover { border-color: var(--border); }
.charge-amount-input:focus { outline: none; border-color: var(--blue); background: #fff; }

.charge-name-input {
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.85rem;
    padding: 7px 9px;
    border-radius: 7px;
    width: 100%;
    min-width: 130px;
}
.charge-name-input:focus { outline: none; border-color: var(--blue); }

.charge-del-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--red-soft);
    color: var(--red);
    cursor: pointer;
}
.charge-del-btn:hover { background: #fbdcdc; }
.charge-del-btn .icon { width: 14px; height: 14px; }

.charges-table .grand-row td {
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
}

.add-custom-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: 1.5px dashed var(--blue);
    color: var(--blue);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 16px;
    min-height: 44px;
}
.add-custom-btn:hover { background: var(--blue-soft); }

/* ── Grand total card ── */
.grand-total-card {
    background: var(--grad);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #fff;
    margin-bottom: 18px;
}
.grand-total-label { font-size: 0.76rem; font-weight: 600; color: rgba(255,255,255,0.8); letter-spacing: 0.3px; }
.grand-total-value { font-size: 1.8rem; font-weight: 700; word-break: break-word; }
.grand-total-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    flex-shrink: 0;
}
.grand-total-icon .icon { width: 26px; height: 26px; }

/* ── Documents checklist ── */
.doc-checklist {
    border: 1.5px solid #b9cdf1;
    border-radius: var(--radius-sm);
    background: #fbfcfe;
    padding: 16px;
}
.doc-checklist-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Sans Gujarati', 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy-2);
    margin-bottom: 10px;
}
.doc-btn-row { display: flex; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.doc-btn {
    font-family: 'Noto Sans Gujarati', 'Poppins', sans-serif;
    background: var(--blue-soft);
    color: var(--navy-2);
    border: 1px solid #9dbdf5;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    min-height: 40px;
}
.doc-btn:hover { background: #dbe8fc; }

.doc-list { display: flex; flex-direction: column; gap: 2px; }
.doc-item {
    font-family: 'Noto Sans Gujarati', 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 6px;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
}
.doc-item:hover { background: var(--blue-soft); }
.doc-item input { width: 19px; height: 19px; accent-color: var(--navy-2); flex-shrink: 0; }
.doc-item.custom { justify-content: space-between; }
.doc-item.custom label { display: flex; align-items: center; gap: 9px; cursor: pointer; flex: 1; }

.doc-del-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--red-soft);
    color: var(--red);
    cursor: pointer;
    flex-shrink: 0;
}
.doc-del-btn:hover { background: #fbdcdc; }
.doc-del-btn .icon { width: 13px; height: 13px; }

.doc-add-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.doc-add-row input {
    font-family: 'Noto Sans Gujarati', 'Poppins', sans-serif;
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    min-height: 44px;
}
.doc-add-row input:focus { outline: none; border-color: var(--blue); }
.doc-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Noto Sans Gujarati', 'Poppins', sans-serif;
    background: var(--navy-2);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
}
.doc-add-btn:hover { background: var(--navy); }

/* ── Footer ── */
.page-footer { text-align: center; padding: 8px 0 16px; }
.footer-note { font-size: 0.78rem; color: var(--text-muted); }
.footer-links, .footer-nav { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; line-height: 1.9; }
.footer-links a, .footer-nav a { color: var(--blue); text-decoration: none; }
.footer-links a:hover, .footer-nav a:hover { text-decoration: underline; }

/* ── Bottom bar ── */
.bottom-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 14px rgba(16, 24, 40, 0.08);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 50;
}

.bottom-bar-right { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; }

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: var(--red);
    border: 1.5px solid #f6c6c6;
    border-radius: var(--radius-sm);
    padding: 11px 16px;
    font-size: 0.86rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    min-height: 46px;
}
.btn-reset:hover { background: var(--red-soft); }

.btn-export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 11px 18px;
    font-size: 0.86rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    min-height: 46px;
}
.btn-export:hover:not(:disabled) { background: #1d4ed8; }
.btn-export:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Settings drawer ── */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, 0.5);
    z-index: 90;
}

.settings-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 380px;
    max-width: 94vw;
    background: #fff;
    box-shadow: -6px 0 28px rgba(16, 24, 40, 0.22);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
}
.settings-drawer.open { transform: translateX(0); }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.drawer-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    color: var(--navy);
}

.drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
}
.drawer-close:hover { background: var(--bg); }

.drawer-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.drawer-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 0.83rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-soft);
    cursor: pointer;
    min-height: 44px;
}
.drawer-tab.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.drawer-subtitle { font-size: 0.76rem; color: var(--text-muted); margin-bottom: 14px; }
.drawer-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text);
    margin: 14px 0 8px;
}
.drawer-note { font-size: 0.73rem; color: var(--text-muted); margin-bottom: 6px; }

.drawer-footer {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.drawer-footer-title { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.drawer-footer a { font-size: 0.78rem; color: var(--blue); text-decoration: none; }
.drawer-footer a:hover { text-decoration: underline; }

/* ── Toasts ── */
.toast-container {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
@media (min-width: 560px) {
    .toast-container { left: auto; right: 16px; top: 16px; max-width: 420px; }
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 6px 20px rgba(16, 24, 40, 0.25);
    cursor: pointer;
    animation: toast-in 0.25s ease;
    pointer-events: auto;
}
.toast .icon { margin-top: 2px; }
.toast-out { opacity: 0; transition: opacity 0.3s; }

@keyframes toast-in {
    from { transform: translateY(-8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.toast-info { background: var(--navy); }
.toast-success { background: var(--green); }
.toast-warning { background: #c2710c; }
.toast-error { background: var(--red); }

/* ── Content pages (about, privacy, etc.) ── */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}
.page-content h2 { color: var(--navy); font-size: 1.25rem; margin: 24px 0 10px; }
.page-content h3 { color: var(--navy); font-size: 1.02rem; margin: 18px 0 8px; }
.page-content p, .page-content li { font-size: 0.92rem; color: var(--text-soft); margin-bottom: 10px; }
.page-content ul, .page-content ol { padding-left: 22px; margin-bottom: 12px; }
.page-content table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.86rem; }
.page-content table th, .page-content table td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.page-content table th { background: #f7f9fc; }
.page-content a { color: var(--blue); }
.back-link { display: inline-block; margin-bottom: 14px; font-size: 0.88rem; color: var(--blue); text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* ── Print report ── */
#printReport { display: none; }

@media print {
    body { background: #fff; }
    #appRoot, .toast-container, .settings-drawer, .drawer-overlay { display: none !important; }

    #printReport {
        display: block;
        font-family: 'Poppins', 'Segoe UI', sans-serif;
        color: #000;
        font-size: 12px;
        line-height: 1.45;
    }

    .pr-header { text-align: center; border-bottom: 2px solid #12356b; padding-bottom: 10px; margin-bottom: 14px; }
    .pr-header h1 { font-size: 18px; color: #12356b; margin-bottom: 2px; }
    .pr-header p { font-size: 11px; color: #444; }
    .pr-date { margin-top: 4px; }

    #printReport h3 {
        font-size: 13px;
        color: #12356b;
        margin: 14px 0 6px;
        border-bottom: 1px solid #cbd5e1;
        padding-bottom: 3px;
    }

    .pr-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
    .pr-table td, .pr-table th {
        border: 1px solid #94a3b8;
        padding: 5px 8px;
        font-size: 11.5px;
        vertical-align: top;
    }
    .pr-table th { background: #eaf1fe; text-align: left; font-weight: 600; }
    .pr-key { width: 32%; font-weight: 600; background: #f7f9fc; }
    .pr-num { text-align: right; white-space: nowrap; }
    .pr-highlight td { background: #eaf1fe; font-weight: 700; }
    .pr-grand td { background: #12356b; color: #fff; font-weight: 700; }

    .pr-docs { list-style: none; padding-left: 4px; margin: 4px 0; }
    .pr-docs li { padding: 2px 0; font-size: 11.5px; }
    .pr-gujarati { font-family: 'Noto Sans Gujarati', 'Shruti', sans-serif; }

    .pr-disclaimer {
        margin-top: 16px;
        font-size: 10px;
        color: #555;
        border-top: 1px solid #cbd5e1;
        padding-top: 6px;
    }
}

/* ── Jantri rate lookup ── */
.lookup-box { margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--border); }
.lookup-box .btn-secondary { margin-top: 0; }
.lookup-status {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    line-height: 1.45;
    background: var(--blue-soft);
    color: var(--navy);
}
.lookup-status.lookup-success { background: var(--green-soft); color: var(--green); }
.lookup-status.lookup-warning { background: var(--amber-soft); color: var(--amber); }
.lookup-status.lookup-error { background: var(--red-soft); color: var(--red); }
.lookup-status select {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    font-family: inherit;
    font-size: 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
}
.lookup-status .btn-secondary { margin-top: 8px; width: 100%; }
@media print { .lookup-box { display: none; } }
