/* Devi Technical Services — Bill Generator Styles */

/* ─────────────────────────────────────────────────────────────────
   RESET & TOKENS
───────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #C62828;
    --primary-dk: #8E0000;
    --primary-lt: #FFF5F5;
    --bg: #F5F5F4;
    --surface: #FFFFFF;
    --border: #D1D5DB;
    --text: #111827;
    --muted: #6B7280;
    --success: #16A34A;
    --warn: #D97706;
    --radius: 10px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────────
   PROGRESS OVERLAY
───────────────────────────────────────────────────────────────── */
#pdf-progress {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    z-index: 20000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#pdf-progress.active {
    display: flex;
}

.progress-card {
    background: #1e293b;
    border-radius: 16px;
    padding: 40px 48px;
    text-align: center;
    color: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.progress-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid rgba(255, 255, 255, .15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.progress-msg {
    font-size: 16px;
    font-weight: 700;
}

.progress-sub {
    font-size: 13px;
    color: #94a3b8;
}

/* ─────────────────────────────────────────────────────────────────
   NAV
───────────────────────────────────────────────────────────────── */
nav {
    background: #1e293b;
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand i {
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-style: normal;
    font-weight: 700;
    font-size: 13px;
}

.nav-brand span {
    opacity: .6;
    font-weight: 400;
    font-size: 13px;
    margin-left: 2px;
}

.nav-tabs {
    display: flex;
    gap: 8px;
}

.nav-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, .8);
    cursor: pointer;
    border-radius: 6px;
    transition: all .2s;
    user-select: none;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.nav-tab.active {
    background: #fff;
    color: var(--primary);
}

/* ─────────────────────────────────────────────────────────────────
   PAGE & SECTIONS
───────────────────────────────────────────────────────────────── */
.page {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn .3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─────────────────────────────────────────────────────────────────
   CARD
───────────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.card-hd {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-lt);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ─────────────────────────────────────────────────────────────────
   FORM GRID & FIELDS
───────────────────────────────────────────────────────────────── */
.fg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.fg.full {
    grid-template-columns: 1fr;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.required-star {
    color: var(--primary);
}

.field input,
.field select,
.field textarea {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all .2s;
    background: #FAFAFA;
    color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-lt);
}

.field textarea {
    resize: vertical;
    min-height: 80px;
}

/* Invalid state */
.field.invalid>input,
.field.invalid>select,
.field.invalid>textarea {
    border-color: #EF4444;
    background: #FFF8F8;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .15);
}

.field-error {
    display: block;
    font-size: 12px;
    color: #DC2626;
    font-weight: 600;
    min-height: 16px;
    animation: fadeIn .15s ease-out;
}

/* ─────────────────────────────────────────────────────────────────
   ITEMS TABLE (form)
───────────────────────────────────────────────────────────────── */
.items-table-wrapper {
    overflow-x: auto;
}

.items-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.items-table th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 0 12px 8px;
    text-align: left;
    white-space: nowrap;
}

.items-table th.r {
    text-align: right;
}

.items-table td {
    padding: 0 8px;
    vertical-align: top;
}

.items-table input,
.items-table select,
.items-table textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color .15s;
}

.items-table textarea {
    resize: vertical;
    min-height: 50px;
    line-height: 1.4;
}

.items-table input:focus,
.items-table select:focus,
.items-table textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-lt);
}

.items-table .num {
    text-align: right;
}

.items-table .row-total {
    text-align: right;
    font-weight: 700;
    font-size: 14px;
    padding-top: 12px;
    min-width: 100px;
    white-space: nowrap;
}

.btn-remove {
    background: #FEE2E2;
    border: none;
    font-size: 16px;
    color: var(--primary);
    cursor: pointer;
    padding: 6px 11px;
    border-radius: 8px;
    margin-top: 4px;
    transition: all .2s;
    line-height: 1;
}

.btn-remove:hover {
    background: var(--primary);
    color: #fff;
}

.btn-add-row {
    margin-top: 16px;
    background: #fff;
    color: var(--primary);
    border: 2px dashed var(--primary);
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all .2s;
    font-family: inherit;
}

.btn-add-row:hover {
    background: var(--primary-lt);
    transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all .2s;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(198, 40, 40, .3);
}

.btn-primary:hover {
    background: var(--primary-dk);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(198, 40, 40, .4);
}

.btn-outline {
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-lt);
    transform: translateY(-2px);
}

.btn:disabled,
.btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
    justify-content: center;
}

/* ─────────────────────────────────────────────────────────────────
   CSV UPLOAD SECTION
───────────────────────────────────────────────────────────────── */
.drop-zone {
    border: 3px dashed var(--border);
    border-radius: 16px;
    padding: 56px 40px;
    text-align: center;
    cursor: pointer;
    transition: all .3s;
    background: #FDFDFD;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-lt);
    transform: scale(1.01);
}

.drop-icon-container {
    width: 80px;
    height: 80px;
    background: var(--primary-lt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-icon {
    font-size: 38px;
}

.drop-main {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.drop-sub {
    font-size: 13px;
    color: var(--muted);
}

#file-input {
    display: none;
}

.notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--primary-lt);
    border: 1px solid #FECACA;
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 20px;
    font-size: 13px;
    color: #7F1D1D;
    font-weight: 500;
}

.error-box {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    background: #FEE2E2;
    color: #B91C1C;
    border-radius: 8px;
    font-size: 14px;
    border-left: 4px solid #DC2626;
    animation: fadeIn .2s ease-out;
}

/* ─────────────────────────────────────────────────────────────────
   CSV PREVIEW TABLE
───────────────────────────────────────────────────────────────── */
.csv-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    background: #F9FAFB;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.csv-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.csv-meta-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.csv-meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.csv-table-scroll {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.csv-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.csv-preview-table thead {
    background: #F3F4F6;
    position: sticky;
    top: 0;
}

.csv-preview-table th {
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    border-bottom: 2px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.csv-preview-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
    color: var(--text);
}

.csv-preview-table tbody tr:last-child td {
    border-bottom: none;
}

.csv-preview-table tbody tr:hover {
    background: #F9FAFB;
}

.csv-preview-table tbody tr:nth-child(even) {
    background: #FAFAFA;
}

.csv-preview-table tbody tr:nth-child(even):hover {
    background: #F3F4F6;
}

/* Alignment helpers */
.csv-preview-table td.num,
.csv-preview-table th.num {
    text-align: right;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-ok {
    background: #DCFCE7;
    color: #15803D;
}

.badge-warn {
    background: #FEF3C7;
    color: #92400E;
}

.badge-error {
    background: #FEE2E2;
    color: #B91C1C;
}

.csv-badge {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.csv-validation-msg {
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
    padding: 10px 14px;
    background: #F9FAFB;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.csv-validation-msg.has-warnings {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #92400E;
}

.csv-validation-msg.has-errors {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #B91C1C;
}

/* ─────────────────────────────────────────────────────────────────
   PREVIEW ACTION BAR
───────────────────────────────────────────────────────────────── */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    background: #374151;
    padding: 16px 24px;
    border-radius: 12px;
    color: #fff;
}

.action-info {
    font-size: 14px;
}

.action-info strong {
    color: #FCA311;
}

/* ─────────────────────────────────────────────────────────────────
   INVOICE PREVIEW RENDER
───────────────────────────────────────────────────────────────── */
.preview-scroll {
    overflow-x: auto;
    background: #E5E7EB;
    padding: 40px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
}

/* Wrapper that holds the fixed-width render */
.preview-scale-wrapper {
    flex-shrink: 0;
}

#invoice-render {
    width: 700px;
    min-height: 1100px;
    background: #fff;
    font-family: 'Times New Roman', serif;
    font-size: 14px;
    color: #000;
    border: 2px solid #000;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

/* ─────────────────────────────────────────────────────────────────
   BILL RENDER ELEMENTS
───────────────────────────────────────────────────────────────── */
.bill-header {
    text-align: center;
    padding: 20px 16px 14px;
    border-bottom: 2px solid #000;
}

.bill-company {
    font-size: 30px;
    font-weight: 900;
    color: #C62828;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.15;
    margin-bottom: 6px;
}

.bill-address {
    font-size: 11.5px;
    color: #000;
    text-transform: uppercase;
    line-height: 1.45;
}

.bill-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    padding: 8px 10px;
    border-bottom: 2px solid #000;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.bill-meta-receiver {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 2px solid #000;
}

.bill-section-left {
    padding: 10px 16px;
    border-right: 2px solid #000;
}

.bill-section-right {
    padding: 10px 16px;
}

.bill-meta-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 12.5px;
}

.bill-label-bold {
    font-weight: 700;
    min-width: 85px;
    flex-shrink: 0;
}

.bill-receiver-title {
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 6px;
    font-size: 13px;
}

/* Items table */
.bill-items {
    border-collapse: collapse;
    width: 100%;
    flex-grow: 1;
}

.bill-items th {
    border: 1px solid #000;
    padding: 8px 5px;
    font-size: 11.5px;
    font-weight: 700;
    text-align: left;
    background: #f0f0f0;
    text-transform: uppercase;
    white-space: nowrap;
}

.bill-items th.th-no,
.bill-items th.th-name {
    text-align: left;
}

.bill-items th.th-r {
    text-align: right;
}

.bill-items td {
    border: 1px solid #000;
    padding: 7px 5px;
    font-size: 12px;
    vertical-align: top;
    line-height: 1.35;
}

.bill-items td.no {
    text-align: left;
    width: 30px;
}

.bill-items td.name {
    text-align: left;
    word-break: break-word;
}

.bill-items td.c {
    text-align: center;
}

.bill-items td.r {
    text-align: right;
    white-space: nowrap;
}

.bill-grand-row td {
    border: 1px solid #000;
    border-top: 2.5px solid #000;
    padding: 9px 7px;
    font-size: 13px;
    font-weight: 700;
    background: #fafafa;
}

.bill-grand-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bill-grand-label {
    font-weight: 700;
}

.bill-grand-amount {
    min-width: 90px;
    text-align: right;
    white-space: nowrap;
}

.bill-amount-words {
    border: 1.5px solid #000;
    border-top: 0;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: #f9f9f9;
}

.bill-words-text {
    flex: 1;
    font-size: 12.5px;
    line-height: 1.45;
    word-break: break-word;
}

.bill-total-final {
    font-size: 15px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.bill-bank-section {
    border: 1.5px solid #000;
    border-top: 2px solid #000;
    padding: 12px 16px;
    text-align: center;
    color: #C62828;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
    word-break: break-word;
}

.bill-footer {
    display: flex;
    border-top: 1.5px solid #000;
    flex-grow: 0;
}

.bill-footer-left {
    flex: 1;
    padding: 16px;
    font-size: 12px;
    display: flex;
    align-items: flex-end;
    color: #555;
}

.bill-footer-right {
    flex: 1;
    padding: 16px;
    text-align: center;
    border-left: 1.5px solid #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.bill-footer-right .for-label {
    font-size: 13px;
    font-weight: 700;
}

.bill-footer-right img {
    max-height: 56px;
    object-fit: contain;
}

.bill-footer-right .sig-label {
    font-size: 11.5px;
    font-weight: 700;
    border-top: 1px solid #000;
    padding-top: 4px;
    width: 85%;
}

/* ─────────────────────────────────────────────────────────────────
   TOAST
───────────────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: #fff;
    padding: 13px 26px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: all .3s;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .2);
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─────────────────────────────────────────────────────────────────
   SECURITY GATE
───────────────────────────────────────────────────────────────── */
#security-gate {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0f172a;
    z-index: 10000;
    color: #fff;
}

.gate-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e293b;
    padding: 36px 28px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6);
    width: calc(100% - 48px);
    max-width: 360px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gate-logo {
    width: 52px;
    height: 52px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
    margin: 0 auto 16px;
}

.gate-card h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.gate-card>p {
    color: #94a3b8;
    margin-bottom: 22px;
    font-size: 14px;
}

.gate-card input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1.5px solid #334155;
    background: #0f172a;
    color: #fff;
    margin-bottom: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color .2s;
}

.gate-card input:focus {
    outline: none;
    border-color: var(--primary);
}

.gate-card button {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}

.gate-card button:hover {
    background: var(--primary-dk);
}

#gate-error {
    display: none;
    color: #F87171;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    animation: fadeIn .2s ease-out;
}

/* ─────────────────────────────────────────────────────────────────
   RESPONSIVE — TABLET / MOBILE
───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    nav {
        height: auto;
        padding: 14px 16px;
        flex-direction: column;
        gap: 12px;
        position: static;
        /* unstick nav on mobile to save space */
    }

    .nav-brand {
        font-size: 15px;
    }

    .nav-tabs {
        width: 100%;
        justify-content: stretch;
    }

    .nav-tab {
        flex: 1;
        text-align: center;
        padding: 9px 4px;
        font-size: 12px;
    }

    .page {
        margin: 16px auto;
        padding: 0 10px;
    }

    .card {
        padding: 20px 14px;
    }

    .fg {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .items-table-wrapper {
        overflow-x: auto;
        margin: 0 -14px;
        padding: 0 14px;
        width: calc(100% + 28px);
    }

    .items-table {
        min-width: 640px;
    }

    .drop-zone {
        padding: 36px 20px;
    }

    .drop-icon-container {
        width: 60px;
        height: 60px;
    }

    .drop-main {
        font-size: 16px;
    }

    .action-bar {
        padding: 14px 16px;
        flex-direction: column;
        text-align: center;
    }

    .action-bar .btn {
        width: 100%;
        justify-content: center;
    }

    /* Mobile preview: scale the 700px render to fit viewport */
    .preview-scroll {
        padding: 16px 0;
        justify-content: flex-start;
        border-radius: 8px;
    }

    .preview-scale-wrapper {
        /* Scale the fixed 700px render to 90vw */
        transform-origin: top left;
        transform: scale(var(--preview-scale, 0.45));
        /* The height of the container must compensate for the scale */
        height: calc(1100px * var(--preview-scale, 0.45));
        width: calc(700px * var(--preview-scale, 0.45));
        overflow: visible;
    }

    #invoice-render {
        width: 700px;
        min-width: 700px;
    }

    .csv-meta-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gate-card {
        padding: 28px 20px;
    }

    .gate-card h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .csv-meta-grid {
        grid-template-columns: 1fr;
    }

    .progress-card {
        padding: 32px 24px;
    }

    .gate-card {
        padding: 28px 16px;
        border-radius: 12px;
    }

    .gate-card h2 {
        font-size: 18px;
    }
}