:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --ink: #172033;
    --muted: #687187;
    --border: #dfe4ee;
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --success: #16803b;
    --danger: #b42318;
    --warning: #a15c00;
    --shadow: 0 18px 45px rgba(31, 42, 68, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.site-header { min-height: 72px; padding: 14px max(22px, calc((100vw - 1380px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 22px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 850; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: white; font-size: .86rem; letter-spacing: .02em; }
nav { display: flex; align-items: center; gap: 18px; color: #4f5870; font-size: .91rem; font-weight: 700; }
nav > a:not(.button):hover { color: var(--primary); }
.page-shell { max-width: 1420px; margin: 0 auto; padding: 42px 24px 72px; }
footer { max-width: 1420px; margin: 0 auto; border-top: 1px solid var(--border); padding: 24px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .85rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.2rem, 4.8vw, 4.7rem); line-height: 1.04; letter-spacing: -.055em; margin-bottom: 18px; }
h2 { font-size: 1.62rem; line-height: 1.2; letter-spacing: -.025em; margin-bottom: 8px; }
h3 { margin-bottom: 8px; }
.lead { max-width: 760px; color: var(--muted); font-size: 1.14rem; }
.eyebrow { display: inline-block; margin-bottom: 10px; color: var(--primary); text-transform: uppercase; letter-spacing: .13em; font-size: .72rem; font-weight: 900; }
.card, .hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 12px 17px; background: var(--primary); color: white; font-weight: 800; line-height: 1.1; transition: .18s ease; }
.button:hover { background: var(--primary-dark); transform: translateY(-1px); }
.button-secondary { background: #eceeff; color: var(--primary-dark); }
.button-secondary:hover { background: #dde0ff; }
.button-ghost { background: transparent; color: var(--primary); border: 1px solid #cfd3ff; }
.button-ghost:hover { background: #f2f3ff; }
.button-danger { background: var(--danger); }
.button-danger:hover { background: #8f1c14; }
.button-small { padding: 9px 12px; font-size: .84rem; border-radius: 9px; }
.button-tiny { padding: 7px 9px; font-size: .75rem; border-radius: 8px; white-space: nowrap; }
.button-cluster { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.button-cluster.vertical { align-items: stretch; flex-direction: column; }
.hero { min-height: 585px; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(340px,.72fr); gap: 60px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-card { padding: 17px; }
.flow-step { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; padding: 19px; border-bottom: 1px solid var(--border); }
.flow-step:last-child { border-bottom: 0; }
.flow-step strong { color: var(--primary); font-size: 1.18rem; }
.flow-step span { font-weight: 750; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.feature-card { padding: 25px; border: 1px solid var(--border); background: white; border-radius: 18px; }
.feature-card p { color: var(--muted); margin-bottom: 0; }
.feature-card .icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 17px; border-radius: 13px; background: #eef0ff; color: var(--primary); font-weight: 900; }
.form-layout { display: grid; grid-template-columns: minmax(0,1fr) 315px; gap: 26px; align-items: start; }
.form-card, .detail-card, .dashboard-card, .action-card { padding: 30px; }
.section-heading { margin-bottom: 24px; }
.section-heading p { color: var(--muted); margin-bottom: 0; }
.section-heading h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 9px; }
.row-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.form-grid .full { grid-column: 1/-1; }
.stack-form { display: grid; gap: 17px; }
.compact-form { gap: 14px; }
label { display: grid; gap: 7px; font-size: .9rem; font-weight: 750; }
input, textarea, select { width: 100%; border: 1px solid #cbd3e1; background: white; color: var(--ink); border-radius: 10px; padding: 11px 12px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,.1); }
textarea { resize: vertical; }
input[type=file] { background: #fafbfe; padding: 8px; }
small { color: var(--muted); font-weight: 500; }
.checkbox-row { grid-template-columns: 20px 1fr; align-items: start; padding: 15px; border: 1px solid #e0e3ff; border-radius: 12px; background: #f8f8ff; }
.checkbox-row input { width: 18px; margin-top: 4px; }
.form-actions { display: flex; justify-content: flex-end; }
.side-note { position: sticky; top: 94px; border-radius: 20px; background: #1d2741; color: white; padding: 27px; }
.side-note p, .side-note li { color: #cbd2e4; }
.clean-list { padding-left: 20px; }
.clean-list li { margin: 11px 0; }
.privacy-note { border-top: 1px solid rgba(255,255,255,.15); padding-top: 17px; margin-top: 20px; font-size: .86rem; }
.warning-note { background: #452d12; }
.payment-panel { display: grid; grid-template-columns: minmax(0,1fr) 240px; gap: 20px; padding: 21px; margin-bottom: 24px; border: 1px solid #e1e4ff; border-radius: 17px; background: #f7f8ff; }
.bank-details { display: grid; gap: 12px; }
.bank-details div { display: grid; grid-template-columns: 135px 1fr; gap: 12px; }
.bank-details span { color: var(--muted); }
.upi-card { display: flex; flex-direction: column; justify-content: center; min-height: 170px; padding: 20px; border-radius: 15px; border: 1px solid var(--border); background: white; text-align: center; }
.upi-card strong { font-size: 1.3rem; color: var(--primary); overflow-wrap: anywhere; }
.success-card { max-width: 680px; margin: 70px auto; padding: 54px; text-align: center; }
.success-icon { width: 72px; height: 72px; margin: 0 auto 21px; display: grid; place-items: center; border-radius: 50%; background: #dcfce7; color: var(--success); font-size: 1.9rem; font-weight: 900; }
.success-card h1 { font-size: 3rem; }
.success-card p { color: var(--muted); font-size: 1.06rem; }
.error-card .success-icon { background: #fee2e2; color: var(--danger); font-size: 1rem; }
.auth-card { max-width: 500px; margin: 55px auto; padding: 37px; }
.auth-card h1 { font-size: 2.55rem; margin-bottom: 10px; }
.auth-card > p { color: var(--muted); }
.security-note { margin-top: 20px; padding: 14px; border-radius: 10px; background: #fff8e6; color: #73500a; font-size: .86rem; }
code { padding: 4px 7px; border-radius: 6px; background: rgba(255,255,255,.8); }
.dashboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 26px; }
.dashboard-heading h1 { font-size: clamp(2.25rem,4vw,3.6rem); margin-bottom: 7px; }
.dashboard-heading p { color: var(--muted); margin: 0; }
.wallet-card { min-width: 285px; display: grid; padding: 21px 24px; border-radius: 18px; background: #18213a; color: white; }
.wallet-card span, .wallet-card small { color: #bcc5db; }
.wallet-card strong { font-size: 2.1rem; line-height: 1.25; }
.money-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.admin-stats { grid-template-columns: repeat(6,minmax(0,1fr)); }
.money-stat { display: grid; gap: 2px; padding: 19px; border: 1px solid var(--border); border-radius: 16px; background: white; }
.money-stat span { color: var(--muted); font-size: .8rem; }
.money-stat strong { font-size: 1.55rem; overflow-wrap: anywhere; }
.money-stat.negative strong { color: var(--danger); }
.money-stat.paid strong { color: var(--success); }
.money-stat.highlight { border-color: #adb3ff; background: #f5f6ff; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 22px; }
.stats-grid.seven { grid-template-columns: repeat(7,minmax(0,1fr)); }
.stat { display: grid; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: white; }
.stat span { color: var(--muted); font-size: .76rem; }
.stat strong { font-size: 1.48rem; }
.dashboard-card { margin-bottom: 24px; }
.table-card { margin-bottom: 24px; overflow: hidden; }
.table-card > .section-heading { padding: 25px 27px 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: 14px 15px; border-bottom: 1px solid var(--border); vertical-align: middle; text-align: left; }
th { background: #fafbfe; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .065em; white-space: nowrap; }
tbody tr:hover { background: #fcfcff; }
.cell-sub { display: block; margin-top: 4px; max-width: 300px; line-height: 1.4; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.text-link, .back-link { color: var(--primary); font-weight: 800; }
.back-link { display: inline-block; margin-bottom: 10px; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.status { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; background: #edf0f5; color: #596275; font-size: .7rem; font-weight: 850; white-space: nowrap; }
.large-status { padding: 9px 13px; font-size: .8rem; }
.status-payment_pending, .status-pending_verification { background: #fef3c7; color: #92400e; }
.status-verified, .status-active, .status-completed { background: #dcfce7; color: #166534; }
.status-rejected, .status-blocked, .status-returned, .status-cancelled { background: #fee2e2; color: #991b1b; }
.status-inactive { background: #eef0f5; color: #4b5563; }
.status-order_confirmed { background: #e0e7ff; color: #3730a3; }
.status-packed { background: #ede9fe; color: #5b21b6; }
.status-shipped { background: #cffafe; color: #155e75; }
.status-out_for_delivery { background: #e0f2fe; color: #075985; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin-bottom: 24px; }
.details-list { display: grid; margin: 0; }
.details-list div { display: grid; grid-template-columns: 145px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.details-list div:last-child { border-bottom: 0; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.document-links { display: grid; gap: 9px; margin-bottom: 17px; }
.document-links a { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.document-links a:hover { border-color: var(--primary); }
.credential-banner { margin-bottom: 22px; padding: 17px; border: 1px solid #a7f3d0; border-radius: 13px; background: #ecfdf5; color: #065f46; }
.action-card { margin-bottom: 24px; }
.action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.action-grid > * { padding: 18px; border: 1px solid var(--border); border-radius: 13px; }
.filter-bar { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; padding: 17px; border: 1px solid var(--border); border-radius: 15px; background: white; }
.filter-bar label { min-width: 220px; }
.filter-bar.wide label:first-of-type { min-width: 300px; flex: 1; }
.two-column { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; }
.order-management-table { min-width: 1260px; }
.order-update-form { display: grid; grid-template-columns: repeat(2,minmax(140px,1fr)); gap: 7px; min-width: 390px; }
.order-update-form button { grid-column: 1/-1; }
.period-picker-list { display: grid; gap: 9px; max-height: 520px; overflow: auto; }
.period-pick { display: grid; gap: 2px; padding: 13px; border: 1px solid var(--border); border-radius: 11px; background: white; color: var(--ink); text-align: left; }
.period-pick:hover, .period-pick.selected { border-color: var(--primary); background: #f7f7ff; }
.period-pick span { font-weight: 800; }
.period-pick strong { color: var(--primary); }
.settings-layout { display: grid; gap: 22px; }
.flash-stack { display: grid; gap: 9px; margin-bottom: 20px; }
.flash { padding: 13px 15px; border: 1px solid; border-radius: 11px; }
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.invoice-actions { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.invoice-actions h1 { font-size: 2.5rem; margin: 0; }
.invoice-paper { max-width: 980px; margin: 0 auto 25px; padding: 52px; background: white; border: 1px solid var(--border); box-shadow: var(--shadow); }
.invoice-head { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 25px; border-bottom: 2px solid var(--ink); }
.invoice-head h2 { font-size: 1.85rem; margin-bottom: 8px; }
.invoice-head p { margin-bottom: 5px; color: var(--muted); }
.invoice-title { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.invoice-title > strong { font-size: 2.2rem; letter-spacing: .08em; }
.invoice-title span { font-weight: 850; }
.invoice-title small { margin-top: 5px; }
.invoice-parties { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; padding: 28px 0; }
.invoice-parties p { margin-bottom: 0; }
.invoice-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 900; }
.invoice-table { border: 1px solid var(--ink); }
.invoice-table th, .invoice-table td { border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.invoice-table th:last-child, .invoice-table td:last-child { border-right: 0; }
.invoice-summary { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding-top: 26px; }
.invoice-summary dl { margin: 0; }
.invoice-summary dl div { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; }
.invoice-summary .total { margin-top: 5px; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 1.25rem; font-weight: 900; }
.invoice-foot { margin-top: 70px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
.history-card { max-width: 980px; margin: 0 auto; padding: 28px; }
.timeline { display: grid; gap: 14px; }
.timeline-item { display: grid; grid-template-columns: 16px 1fr; gap: 12px; }
.timeline-item > span { width: 11px; height: 11px; margin-top: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px #eceeff; }
.timeline-item div { display: grid; }
.timeline-item p { margin: 5px 0 0; }
@media (max-width: 1150px) {
    .admin-stats, .stats-grid.seven { grid-template-columns: repeat(3,1fr); }
    .money-grid { grid-template-columns: repeat(3,1fr); }
    .two-column { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .hero, .form-layout, .detail-grid, .invoice-parties, .invoice-summary { grid-template-columns: 1fr; }
    .hero { min-height: auto; gap: 30px; }
    .feature-grid { grid-template-columns: 1fr; }
    .side-note { position: static; }
    .payment-panel { grid-template-columns: 1fr; }
    .money-grid, .admin-stats { grid-template-columns: repeat(2,1fr); }
    .stats-grid, .stats-grid.seven { grid-template-columns: repeat(2,1fr); }
    .action-grid { grid-template-columns: 1fr; }
    .invoice-summary { gap: 10px; }
}
@media (max-width: 720px) {
    .site-header { align-items: flex-start; padding: 13px 16px; }
    .brand > span:last-child { display: none; }
    nav { justify-content: flex-end; flex-wrap: wrap; gap: 9px 12px; font-size: .79rem; }
    .page-shell { padding: 28px 14px 55px; }
    .form-grid, .money-grid, .admin-stats, .stats-grid, .stats-grid.seven { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
    .form-card, .detail-card, .dashboard-card, .action-card { padding: 21px; }
    .dashboard-heading, .row-heading, .invoice-actions { align-items: flex-start; flex-direction: column; }
    .wallet-card { width: 100%; }
    .bank-details div, .details-list div { grid-template-columns: 1fr; gap: 2px; }
    .invoice-paper { padding: 25px 18px; }
    .invoice-head { flex-direction: column; }
    .invoice-title { align-items: flex-start; text-align: left; }
    footer { flex-direction: column; }
}
@media print {
    @page { size: A4; margin: 10mm; }
    body { background: white; }
    .no-print { display: none !important; }
    .page-shell { max-width: none; padding: 0; }
    .invoice-paper { max-width: none; margin: 0; padding: 8mm; border: 0; box-shadow: none; }
    .invoice-foot { margin-top: 35mm; }
}
