
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700;800&display=swap');

:root {
    font-family: 'DM Sans', 'Noto Sans Devanagari', sans-serif;
    color: #202b40;
    background: #f5f7fb;
    font-synthesis: none;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'DM Sans', 'Noto Sans Devanagari', sans-serif;
}

button { font: inherit; cursor: pointer; }

.dashboard { min-height: 100vh; }

.dashboard > .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 245px;
    background: #172b4d;
    color: #fff;
    padding: 30px 18px 20px;
    display: flex;
    flex-direction: column;
    z-index: 5;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 38px; }
.brand-icon {
    width: 42px; height: 42px; border-radius: 13px;
    display: grid; place-items: center;
    background: #f4bc66; color: #172b4d;
    font-size: 24px; font-weight: 800;
}
.brand h2 { font-size: 20px; margin: 0 0 3px; }
.brand span { font-size: 9px; letter-spacing: 2px; color: #aebbd1; }

.nav-label { color: #8f9fba; font-size: 11px; padding: 0 12px 13px; }
.dashboard > .sidebar nav { display: grid; gap: 7px; }
.nav-item {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 14px; border-radius: 10px;
    color: #c3cee0; text-decoration: none; font-size: 13px;
    transition: .2s;
}
.nav-item:hover, .nav-item.active { background: #2b4266; color: #fff; }
.nav-item.active { box-shadow: inset 3px 0 #f4bc66; }
.dashboard > .sidebar .sidebar-footer {
    margin-top: auto; display: flex; align-items: center; gap: 10px;
    padding: 17px 9px 5px; border-top: 1px solid #344563; font-size: 12px;
}
.status-dot { width: 9px; height: 9px; background: #58d6a0; border-radius: 50%; }
.dashboard > .sidebar .sidebar-footer span { color: #aebbd1; font-size: 10px; }

.main { margin-left: 245px; padding: 35px 40px 22px; max-width: 1700px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 27px; }
.eyebrow { font-size: 11px; color: #8b96a8; margin-bottom: 7px; }
.topbar h1 { margin: 0; font-size: 28px; letter-spacing: -.7px; }
.wave { color: #e9a848; font-size: 22px; }
.topbar p, .section-heading p, .panel-heading p { color: #8b96a8; font-size: 12px; margin: 7px 0 0; }
.profile { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.profile span { color: #8b96a8; font-size: 11px; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: #e7edf9; color: #31558b; font-weight: 800; }

.welcome {
    display: flex; justify-content: space-between; align-items: center; gap: 20px;
    background: linear-gradient(110deg, #e4edff, #f4f1ff);
    border: 1px solid #e0e7f6; border-radius: 17px;
    padding: 26px 30px; margin-bottom: 30px; overflow: hidden;
}
.welcome-tag { display: inline-block; color: #526a99; font-size: 10px; background: #fff9; border-radius: 20px; padding: 7px 10px; }
.welcome h2 { font-size: 25px; margin: 13px 0 7px; }
.welcome p { color: #65738c; font-size: 12px; margin: 0; line-height: 1.7; }
.welcome-art { font-size: 61px; padding: 8px 18px; transform: rotate(-7deg); }

.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.section-heading h2, .panel-heading h2 { margin: 0; font-size: 16px; }
.date-chip { background: #fff; border: 1px solid #e8ebf2; padding: 8px 12px; border-radius: 9px; font-size: 11px; color: #59667d; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.stat-card, .panel { background: #fff; border: 1px solid #e9edf4; border-radius: 14px; }
.stat-card { padding: 19px 17px; min-width: 0; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: #778399; font-size: 11px; }
.stat-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; font-weight: 800; font-size: 15px; }
.blue { background: #e8f0ff; color: #4474ca; }
.purple { background: #f0eaff; color: #8a67d4; }
.orange { background: #fff0df; color: #db8b32; }
.green { background: #e2f8ef; color: #279b71; }
.stat-card h3 { font-size: 25px; margin: 17px 0 6px; letter-spacing: -.6px; }
.stat-card p { color: #a0a9b8; font-size: 10px; margin: 0; }

.lower-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 17px; margin-top: 24px; }
.panel { padding: 22px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 21px; }
.panel-heading h2 { font-size: 15px; }
.more { color: #9aa4b5; letter-spacing: 2px; }
.quick-actions { display: grid; gap: 10px; }
.action {
    display: flex; align-items: center; gap: 12px; text-align: left;
    padding: 12px; border: 1px solid #e9edf4; border-radius: 11px;
    background: #fff; color: #26354c; transition: .2s; min-width: 0;
}
.action:hover { border-color: #b7c9ec; transform: translateY(-1px); }
.action-primary { background: #f2f6ff; border-color: #e0e9fb; }
.action-symbol { display: grid; place-items: center; flex-shrink: 0; width: 37px; height: 37px; border-radius: 11px; background: #dfeaff; color: #3f6fbe; font-size: 21px; }
.green-bg { background: #e0f7ec; color: #279b71; }
.orange-bg { background: #fff0df; color: #d98a32; }
.action strong { display: block; font-size: 12px; }
.action small { display: block; margin-top: 4px; color: #8b96a8; font-size: 10px; }
.action .arrow { margin-left: auto; color: #8593a9; }
.empty-state { min-height: 205px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.empty-icon { width: 47px; height: 47px; display: grid; place-items: center; background: #f1f4fa; color: #7f91af; border-radius: 14px; font-size: 23px; margin-bottom: 13px; }
.empty-state strong { font-size: 12px; }
.empty-state p { color: #97a1b1; font-size: 11px; line-height: 1.8; }
.dashboard-activity-list { display: grid; }
.dashboard-activity-row { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid #edf0f5; }
.dashboard-activity-row:last-child { border-bottom: 0; }
.activity-sale-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: #e2f8ef; color: #279b71; font-weight: 800; }
.activity-sale-details { min-width: 0; }
.activity-sale-details strong, .activity-sale-details small { display: block; }
.activity-sale-details strong { font-size: 12px; }
.activity-sale-details small { margin-top: 4px; color: #8b96a8; font-size: 10px; }
.activity-sale-total { margin-left: auto; font-size: 12px; white-space: nowrap; }

.toast { position: fixed; bottom: 25px; right: 25px; background: #172b4d; color: white; border-radius: 10px; padding: 14px 18px; font-size: 12px; box-shadow: 0 8px 30px #172b4d33; z-index: 10; }
footer { text-align: center; margin-top: 29px; color: #a0a9b8; font-size: 9px; letter-spacing: 1.4px; }
footer span { color: #e9ae52; padding: 0 4px; }

@media (min-width: 1450px) {
    .main { padding-left: 55px; padding-right: 55px; margin-left: 245px; }
    .stats { gap: 20px; }
    .stat-card { padding: 24px; }
}

@media (max-width: 1100px) {
    .dashboard > .sidebar { width: 205px; }
    .main { margin-left: 205px; padding: 28px 22px; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lower-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
    .dashboard > .sidebar { position: static; width: 100%; padding: 15px; }
    .brand { padding: 0 4px 14px; }
    .dashboard > .sidebar nav { display: flex; overflow-x: auto; gap: 5px; }
    .dashboard > .sidebar .nav-label, .dashboard > .sidebar .sidebar-footer { display: none; }
    .nav-item { white-space: nowrap; padding: 10px; font-size: 11px; }
    .nav-item span { display: inline; }
    .main { margin-left: 0; padding: 22px 14px; }
    .topbar h1 { font-size: 23px; }
    .profile { font-size: 10px; }
    .profile .avatar { width: 34px; height: 34px; }
    .welcome { padding: 19px; }
    .welcome h2 { font-size: 22px; }
    .welcome-art { font-size: 40px; padding: 0; }
    .stats { gap: 10px; }
    .stat-card { padding: 14px 12px; }
    .stat-card h3 { font-size: 21px; }
    .stat-top { font-size: 10px; }
    .stat-icon { width: 27px; height: 27px; }
    .panel { padding: 16px; }
}

/* The dashboard owns a custom sidebar; the remaining pages use this shared layout. */
.page {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.page > .sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    flex: 0 0 250px;
    width: 250px;
    height: 100vh;
    padding: 30px 18px 20px;
    display: flex;
    flex-direction: column;
    color: #fff;
    background: #172b4d;
    z-index: 5;
}

.page > main {
    flex: 1 1 auto;
    min-width: 0;
}

.page > main > .content {
    padding: 30px 36px;
}

@media (max-width: 650px) {
    .page { display: block; }
    .page > .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 15px;
    }
    .page .nav-menu nav { display: flex; overflow-x: auto; gap: 5px; }
    .page .nav-menu .nav-section-title,
    .page .nav-menu .nav-footer { display: none; }
    .page .nav-menu nav .nav-item { white-space: nowrap; padding: 10px; }
    .page > main > .content { padding: 22px 14px; }
}

.products-page { max-width: 1400px; margin: 0 auto; }
.products-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 26px; }
.products-eyebrow { color: #8190a8; font-size: 10px; letter-spacing: 1.5px; margin: 0 0 8px; }
.products-header h1 { margin: 0; font-size: 27px; }
.products-header p:last-child { color: #8490a4; font-size: 12px; margin: 8px 0 0; }
.add-product-btn { background: #203b65; color: white; border: 0; border-radius: 10px; padding: 12px 16px; font-weight: 600; font-size: 12px; }
.add-product-btn:hover { background: #31558b; }
.products-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.product-summary-card { background: white; border: 1px solid #e9edf4; border-radius: 13px; padding: 19px; }
.product-summary-card span { display: block; color: #8390a4; font-size: 11px; margin-bottom: 12px; }
.product-summary-card strong { font-size: 25px; }
.products-panel { background: white; border: 1px solid #e9edf4; border-radius: 14px; padding: 20px; }
.product-search { width: 100%; max-width: 380px; padding: 12px 14px; border: 1px solid #e1e7f0; border-radius: 9px; font: inherit; font-size: 12px; margin-bottom: 20px; outline-color: #7798d1; }
.product-table-wrap { width: 100%; overflow-x: auto; }
.product-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; white-space: nowrap; }
.product-table th { background: #f7f9fc; color: #7e8ba1; font-weight: 600; padding: 13px 12px; }
.product-table td { padding: 15px 12px; border-bottom: 1px solid #edf0f5; }
.product-table td strong { font-weight: 600; }
.stock-tag, .archived-tag { display: inline-block; padding: 5px 8px; border-radius: 6px; font-size: 10px; }
.stock-ok { background: #e4f8ef; color: #21845d; }
.stock-low { background: #fff0df; color: #b76a17; }
.archived-tag { background: #edf0f5; color: #65738b; margin-left: 7px; }
.product-actions { display: flex; gap: 6px; }
.small-btn, .cancel-btn { background: white; color: #344a6b; border: 1px solid #dfe6f0; border-radius: 7px; padding: 7px 9px; font-size: 10px; }
.archive-btn { color: #a65e48; }
.products-empty { padding: 45px 10px; text-align: center; color: #8793a7; }
.products-empty div { font-size: 34px; margin-bottom: 12px; }
.products-empty strong { color: #34445d; font-size: 13px; }
.products-empty p { font-size: 11px; }
.product-modal-backdrop { position: fixed; inset: 0; background: #101d32a8; display: grid; place-items: center; padding: 16px; z-index: 100; overflow-y: auto; }
.product-modal { width: 100%; max-width: 540px; max-height: 92vh; overflow-y: auto; background: white; border-radius: 17px; padding: 25px; box-shadow: 0 20px 80px #0003; }
.modal-header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 22px; }
.modal-header h2 { margin: 0; font-size: 20px; }
.modal-header p { color: #8591a4; font-size: 12px; }
.modal-close { border: 0; background: #f0f3f8; border-radius: 8px; width: 32px; height: 32px; }
.product-modal label { display: block; color: #58677e; font-size: 11px; margin: 14px 0 7px; }
.product-modal input, .product-modal select { display: block; width: 100%; padding: 11px; border: 1px solid #dfe6f0; border-radius: 8px; font: inherit; font-size: 12px; background: white; }
.product-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.product-modal .validation-message, .product-modal .validation-errors { color: #b33b36; font-size: 11px; }
@media (max-width: 650px) {
    .products-header { align-items: start; }
    .products-header h1 { font-size: 22px; }
    .products-header .add-product-btn { padding: 10px; }
    .products-summary { gap: 8px; }
    .product-summary-card { padding: 12px; }
    .product-summary-card span { font-size: 10px; }
    .product-summary-card strong { font-size: 21px; }
    .products-panel { padding: 12px; }
    .product-modal { padding: 19px; }
}

.nav-menu {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #c3cee0;
}

.nav-section-title {
    color: #8f9fba;
    font-size: 11px;
    padding: 0 12px 13px;
}

.nav-menu nav {
    display: grid;
    gap: 7px;
}

.nav-menu .nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 10px;
    color: #c3cee0;
    text-decoration: none;
    font-size: 13px;
    transition: background .2s;
}

.nav-menu .nav-item:hover,
.nav-menu .nav-item.active {
    background: #2b4266;
    color: #fff;
}

.nav-menu .nav-item.active {
    box-shadow: inset 3px 0 #f4bc66;
}

.nav-icon {
    width: 18px;
    text-align: center;
}

.nav-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 17px 9px 5px;
    border-top: 1px solid #344563;
    font-size: 12px;
}

.nav-status-dot {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    background: #58d6a0;
    border-radius: 50%;
}

.nav-footer strong,
.nav-footer small {
    display: block;
}

.nav-logout {
    margin-left: auto;
    border: 1px solid #62738f;
    border-radius: 7px;
    padding: 6px 8px;
    color: #e5ebf5;
    background: transparent;
    font-size: 10px;
}

.nav-logout:hover { background: #2b4266; }

.nav-footer small {
    color: #aebbd1;
    font-size: 10px;
    margin-top: 4px;
}

.purchases-page { max-width: 1400px; margin: 0 auto; }
.purchases-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 24px; }
.purchases-eyebrow { color: #8190a8; font-size: 10px; letter-spacing: 1.5px; margin: 0 0 8px; }
.purchases-header h1 { margin: 0; font-size: 27px; }
.purchases-header p:last-child { color: #8490a4; font-size: 12px; margin: 8px 0 0; }
.purchase-secondary-btn, .purchase-primary-btn { border-radius: 9px; padding: 11px 15px; font-size: 12px; font-weight: 650; }
.purchase-secondary-btn { background: white; color: #344a6b; border: 1px solid #dfe6f0; }
.purchase-primary-btn { background: #203b65; color: white; border: 0; }
.purchase-primary-btn:hover { background: #31558b; }
.purchase-primary-btn:disabled { opacity: .5; cursor: not-allowed; }
.purchases-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.purchase-summary-card, .purchase-entry-panel, .purchase-history-panel { background: white; border: 1px solid #e9edf4; border-radius: 14px; }
.purchase-summary-card { padding: 18px 20px; }
.purchase-summary-card span { display: block; color: #8390a4; font-size: 11px; margin-bottom: 11px; }
.purchase-summary-card strong { font-size: 24px; }
.purchase-entry-panel, .purchase-history-panel { padding: 22px; margin-bottom: 20px; }
.purchase-panel-heading { margin-bottom: 20px; }
.purchase-panel-heading h2 { margin: 0; font-size: 17px; }
.purchase-panel-heading p { margin: 6px 0 0; color: #8490a4; font-size: 11px; }
.purchase-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.purchase-form-grid label { display: grid; gap: 7px; color: #58677e; font-size: 11px; }
.purchase-form-grid input, .purchase-form-grid select { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #dfe6f0; border-radius: 8px; background: white; color: #26354c; font: inherit; font-size: 12px; }
.purchase-form-grid small { color: #8793a7; font-size: 10px; }
.purchase-entry-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #edf0f5; color: #65738b; font-size: 12px; }
.purchase-entry-footer strong { margin-left: 8px; color: #202b40; font-size: 18px; }
.purchase-empty { padding: 30px 10px; text-align: center; color: #8793a7; font-size: 12px; }
.purchase-empty strong { color: #34445d; font-size: 13px; }
.purchase-empty p { margin: 7px 0 15px; }
.purchase-message { margin-bottom: 16px; padding: 12px 15px; border-radius: 9px; background: #e8f8ef; color: #21845d; font-size: 12px; }
.purchase-message-error { background: #fff0ef; color: #b42318; }
.purchase-table-wrap { overflow-x: auto; }
.purchase-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; white-space: nowrap; }
.purchase-table th { padding: 12px 10px; background: #f7f9fc; color: #7e8ba1; font-weight: 600; }
.purchase-table td { padding: 13px 10px; border-bottom: 1px solid #edf0f5; color: #526078; }
.purchase-table td strong { color: #34445d; }
@media (max-width: 650px) {
    .purchases-header { align-items: flex-start; }
    .purchases-header h1 { font-size: 22px; }
    .purchase-secondary-btn { padding: 9px 10px; white-space: nowrap; }
    .purchases-summary { gap: 8px; }
    .purchase-summary-card { padding: 12px; }
    .purchase-summary-card span { font-size: 10px; }
    .purchase-summary-card strong { font-size: 19px; }
    .purchase-entry-panel, .purchase-history-panel { padding: 15px; }
    .purchase-form-grid { grid-template-columns: 1fr; }
    .purchase-entry-footer { align-items: flex-start; flex-direction: column; }
    .purchase-entry-footer .purchase-primary-btn { width: 100%; }
}

.reports-page { max-width: 1400px; margin: 0 auto; }
.reports-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 22px; }
.reports-eyebrow { color: #8190a8; font-size: 10px; letter-spacing: 1.5px; margin: 0 0 8px; }
.reports-header h1 { margin: 0; font-size: 27px; }
.reports-header p:last-child { color: #8490a4; font-size: 12px; margin: 8px 0 0; }
.reports-link-btn { background: #203b65; color: #fff; border: 0; border-radius: 9px; padding: 11px 15px; font-size: 12px; font-weight: 650; }
.reports-filter-panel { display: flex; justify-content: space-between; align-items: end; gap: 18px; padding: 16px; margin-bottom: 16px; background: #fff; border: 1px solid #e9edf4; border-radius: 13px; }
.reports-date-fields { display: flex; gap: 12px; }
.reports-date-fields label { display: grid; gap: 6px; color: #718098; font-size: 10px; }
.reports-date-fields input { padding: 9px 10px; border: 1px solid #dfe6f0; border-radius: 8px; color: #34445d; font: inherit; font-size: 11px; }
.reports-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.reports-presets button { padding: 8px 11px; background: #f5f7fb; color: #526078; border: 1px solid #e7ebf2; border-radius: 8px; font-size: 10px; }
.reports-presets button:hover { background: #eaf0fb; color: #31558b; }
.reports-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.report-stat-card, .report-panel { min-width: 0; background: white; border: 1px solid #e9edf4; border-radius: 13px; }
.report-stat-card { padding: 17px; }
.report-stat-card > div { display: flex; justify-content: space-between; align-items: center; gap: 7px; color: #778399; font-size: 10px; }
.report-stat-card > strong { display: block; overflow-wrap: anywhere; margin-top: 15px; font-size: 22px; letter-spacing: -.4px; }
.report-stat-card > small { display: block; margin-top: 6px; color: #97a1b1; font-size: 9px; }
.report-stat-icon { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 9px; font-size: 13px; }
.report-blue { background: #e8f0ff; color: #4474ca; }
.report-orange { background: #fff0df; color: #db8b32; }
.report-green { background: #e2f8ef; color: #279b71; }
.report-purple { background: #f0eaff; color: #8a67d4; }
.reports-detail-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 15px; margin-bottom: 15px; }
.report-panel { padding: 18px; }
.report-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; }
.report-panel-heading h2 { margin: 0; font-size: 14px; }
.report-panel-heading p { margin: 5px 0 0; color: #8b96a8; font-size: 10px; }
.report-text-btn { flex-shrink: 0; border: 0; background: transparent; color: #31558b; font-size: 10px; font-weight: 650; }
.report-table-wrap { width: 100%; overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 10px; white-space: nowrap; }
.report-table th { padding: 10px 8px; background: #f7f9fc; color: #7e8ba1; font-weight: 600; }
.report-table td { padding: 11px 8px; border-bottom: 1px solid #edf0f5; color: #526078; }
.report-table td strong { color: #34445d; }
.report-stock-list { display: grid; }
.report-stock-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf0f5; }
.report-stock-row:last-child { border-bottom: 0; }
.report-stock-row strong, .report-stock-row small { display: block; }
.report-stock-row strong { color: #34445d; font-size: 11px; }
.report-stock-row small { margin-top: 4px; color: #8994a6; font-size: 9px; }
.report-stock-tag { padding: 5px 8px; border-radius: 6px; background: #fff0df; color: #b76a17; font-size: 10px; white-space: nowrap; }
.report-empty { padding: 24px 10px; color: #8793a7; font-size: 11px; text-align: center; }
.reports-error { margin-bottom: 16px; padding: 13px 15px; border-radius: 9px; background: #fff0ef; color: #b42318; font-size: 12px; }
.reports-payment-summary { margin-bottom: 16px; padding: 16px; background: #fff; border: 1px solid #e9edf4; border-radius: 13px; }
.reports-payment-heading h2 { margin: 0; font-size: 13px; }
.reports-payment-heading p { margin: 5px 0 13px; color: #8b96a8; font-size: 10px; }
.reports-payment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.reports-payment-grid article { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 9px; background: #f7f9fc; }
.reports-payment-grid span { color: #778399; font-size: 10px; }
.reports-payment-grid strong { color: #26354c; font-size: 14px; }
@media (max-width: 1000px) {
    .reports-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reports-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
    .reports-header { align-items: flex-start; }
    .reports-header h1 { font-size: 22px; }
    .reports-link-btn { padding: 9px 10px; white-space: nowrap; }
    .reports-filter-panel { align-items: stretch; flex-direction: column; }
    .reports-date-fields { display: grid; grid-template-columns: 1fr 1fr; }
    .reports-date-fields input { width: 100%; }
    .reports-presets button { flex: 1; }
    .report-stat-card { padding: 13px; }
    .report-stat-card > strong { font-size: 19px; }
    .report-panel { padding: 14px; }
}

.backup-page { max-width: 1100px; margin: 0 auto; }
.backup-header { margin-bottom: 22px; }
.backup-eyebrow { color: #8190a8; font-size: 10px; letter-spacing: 1.5px; margin: 0 0 8px; }
.backup-header h1 { margin: 0; font-size: 27px; }
.backup-header p { margin: 8px 0 0; color: #8490a4; font-size: 12px; }
.backup-message { margin-bottom: 16px; padding: 12px 15px; border-radius: 9px; background: #e8f8ef; color: #21845d; font-size: 12px; }
.backup-message-error { background: #fff0ef; color: #b42318; }
.backup-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.backup-summary article { padding: 17px; background: #fff; border: 1px solid #e9edf4; border-radius: 12px; }
.backup-summary span, .backup-summary strong { display: block; }
.backup-summary span { margin-bottom: 9px; color: #8390a4; font-size: 10px; }
.backup-summary strong { font-size: 22px; }
.backup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.backup-panel { min-width: 0; padding: 22px; background: #fff; border: 1px solid #e9edf4; border-radius: 14px; }
.backup-panel-icon { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 14px; border-radius: 12px; font-size: 21px; font-weight: 800; }
.backup-download-icon { background: #e8f0ff; color: #4474ca; }
.backup-restore-icon { background: #e2f8ef; color: #279b71; }
.backup-panel h2 { margin: 0; font-size: 16px; }
.backup-panel > p { min-height: 54px; margin: 8px 0 12px; color: #8390a4; font-size: 11px; line-height: 1.7; }
.backup-panel ul { padding-left: 18px; margin: 0 0 18px; color: #526078; font-size: 10px; line-height: 1.9; }
.backup-primary-btn, .backup-restore-btn { width: 100%; border: 0; border-radius: 9px; padding: 12px 14px; font-size: 11px; font-weight: 700; }
.backup-primary-btn { background: #203b65; color: white; }
.backup-primary-btn:hover { background: #31558b; }
.backup-primary-btn:disabled, .backup-restore-btn:disabled { opacity: .5; cursor: not-allowed; }
.backup-file-label { display: block; margin: 16px 0 7px; color: #58677e; font-size: 10px; }
.backup-panel input[type="file"] { width: 100%; padding: 9px; border: 1px solid #dfe6f0; border-radius: 8px; color: #526078; font-size: 10px; }
.backup-preview { display: grid; gap: 5px; margin-top: 13px; padding: 12px; border: 1px solid #ccebd9; border-radius: 9px; background: #f3fbf6; color: #4e6859; font-size: 10px; }
.backup-preview strong { color: #21845d; font-size: 11px; }
.backup-confirm-label { display: flex; align-items: flex-start; gap: 8px; margin: 13px 0; color: #59677e; font-size: 10px; line-height: 1.6; }
.backup-confirm-label input { flex: 0 0 auto; margin-top: 2px; accent-color: #31558b; }
.backup-restore-btn { background: #a54037; color: white; }
.backup-restore-btn:not(:disabled):hover { background: #8e332c; }
.backup-note { display: flex; gap: 10px; margin-top: 16px; padding: 13px 15px; border: 1px solid #f1e5c9; border-radius: 10px; background: #fffaf0; color: #776345; font-size: 10px; line-height: 1.7; }
.backup-note strong { flex: 0 0 auto; color: #9a6a1f; }
@media (max-width: 700px) {
    .backup-header h1 { font-size: 22px; }
    .backup-grid { grid-template-columns: 1fr; }
    .backup-summary { gap: 8px; }
    .backup-summary article { padding: 12px; }
    .backup-summary span { font-size: 9px; }
    .backup-summary strong { font-size: 19px; }
    .backup-panel { padding: 17px; }
    .backup-panel > p { min-height: 0; }
}

.billing-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px;
    color: #17233f;
}

.billing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.billing-header h1 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 750;
}

.billing-header p,
.billing-muted {
    color: #758198;
    font-size: 13px;
}

.billing-date {
    padding: 10px 14px;
    border: 1px solid #e2e7ef;
    border-radius: 10px;
    background: white;
}

.billing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 22px;
    align-items: start;
}

.billing-products,
.billing-cart,
.billing-history {
    background: #fff;
    border: 1px solid #e6eaf1;
    border-radius: 16px;
    padding: 22px;
    min-width: 0;
}

.billing-products h2,
.billing-cart h2,
.billing-history h2 {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 750;
}

.billing-search {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dce3ed;
    border-radius: 10px;
    background: white;
    color: #17233f;
    margin-bottom: 14px;
    box-sizing: border-box;
}

.billing-product-list {
    display: grid;
    gap: 10px;
}

.billing-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid #edf0f5;
    border-radius: 12px;
}

.billing-product strong,
.billing-cart-item strong {
    overflow-wrap: anywhere;
}

.billing-price {
    margin-top: 5px;
    font-weight: 750;
}

.billing-add,
.billing-checkout {
    background: #172b4d;
    color: white;
    border: 0;
    border-radius: 9px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 650;
}

.billing-add:disabled,
.billing-checkout:disabled,
.billing-quantity button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.billing-empty {
    padding: 20px 10px;
    color: #758198;
    font-size: 14px;
    text-align: center;
}

.billing-cart-item {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f5;
}

.billing-cart-info {
    min-width: 0;
}

.billing-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.billing-quantity button {
    width: 30px;
    height: 30px;
    border: 1px solid #dce3ed;
    background: white;
    border-radius: 8px;
    cursor: pointer;
}

.billing-line-total {
    grid-column: 1;
}

.billing-remove {
    grid-column: 2;
    justify-self: end;
    border: 0;
    background: transparent;
    color: #b42318;
    cursor: pointer;
}

.billing-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 22px 0;
    font-size: 16px;
}

.billing-total strong {
    font-size: 23px;
}

.billing-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 650;
    font-size: 14px;
}

.billing-checkout,
.billing-clear {
    width: 100%;
    padding: 13px;
    margin-top: 10px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.billing-clear {
    background: white;
    border: 1px solid #dce3ed;
    color: #17233f;
}

.billing-message {
    margin-bottom: 18px;
    padding: 13px 16px;
    border-radius: 10px;
    background: #eef4ff;
    color: #172b4d;
}

.billing-history {
    margin-top: 22px;
}

.billing-sale-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f5;
}

.billing-closeout { margin-top: 20px; padding: 18px 20px; background: #fff; border: 1px solid #e6eaf1; border-radius: 14px; }
.billing-closeout-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.billing-closeout-heading h2 { margin: 0; font-size: 16px; font-weight: 750; }
.billing-closeout-heading p { margin: 5px 0 0; color: #8490a4; font-size: 11px; }
.billing-closeout-total { color: #203b65; font-size: 20px; }
.billing-closeout-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.billing-closeout-grid > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px; background: #f7f9fc; border-radius: 9px; }
.billing-closeout-grid span { color: #778399; font-size: 11px; }
.billing-closeout-grid strong { color: #26354c; font-size: 14px; }
.billing-receipt-button { margin-left: auto; border: 1px solid #dfe6f0; border-radius: 7px; padding: 7px 10px; background: white; color: #31558b; font-size: 10px; font-weight: 650; }
.billing-receipt-button:hover { background: #f2f6ff; }
.receipt-print-area { display: none; }
.receipt-header { text-align: center; padding-bottom: 12px; border-bottom: 1px dashed #777; }
.receipt-header h1 { margin: 0; font-size: 21px; }
.receipt-header p { margin: 4px 0 0; font-size: 11px; }
.receipt-meta { display: grid; gap: 4px; padding: 11px 0; font-size: 10px; }
.receipt-items { border-top: 1px dashed #777; }
.receipt-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dotted #aaa; font-size: 10px; }
.receipt-item div, .receipt-item small { display: block; }
.receipt-item small { margin-top: 3px; font-size: 9px; }
.receipt-total { display: flex; justify-content: space-between; padding: 12px 0 5px; font-size: 13px; }
.receipt-payment { margin: 5px 0 16px; font-size: 10px; }
.receipt-print-area footer { margin-top: 18px; color: #333; font-size: 10px; letter-spacing: 0; }

@media print {
    @page { margin: 8mm; }
    body * { visibility: hidden !important; }
    .receipt-print-area, .receipt-print-area * { visibility: visible !important; }
    .receipt-print-area { display: block !important; position: absolute; left: 0; top: 0; width: 72mm; padding: 3mm; background: #fff; color: #111; box-shadow: none; font-family: Arial, sans-serif; }
}

@media (max-width: 800px) {
    .billing-page {
        padding: 16px;
    }

    .billing-layout {
        grid-template-columns: 1fr;
    }

    .billing-header {
        align-items: flex-start;
    }

    .billing-closeout { padding: 15px; }
    .billing-closeout-grid { gap: 7px; }
    .billing-closeout-grid > div { align-items: flex-start; flex-direction: column; padding: 10px; }
    .billing-closeout-grid strong { font-size: 12px; }
}
.billing-quantity-input {
  width: 4.5rem;
  min-width: 0;
  padding: .35rem .25rem;
  border: 1px solid #d8dde5;
  border-radius: .4rem;
  text-align: center;
  font: inherit;
}

.validation-message {
  color: #b42318;
  margin: .5rem 0;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #f5f7fb;
}

.login-card {
    width: min(100%, 420px);
    padding: 34px;
    background: #fff;
    border: 1px solid #e6eaf1;
    border-radius: 18px;
    box-shadow: 0 18px 48px #172b4d14;
}

.login-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #f4bc66;
    color: #172b4d;
    font-size: 25px;
    font-weight: 800;
}

.login-card h1 { margin: 18px 0 5px; font-size: 25px; }
.login-card > p, .login-card > small { color: #8490a4; font-size: 12px; }
.login-card form { display: grid; gap: 9px; margin-top: 22px; }
.login-card label { margin-top: 8px; color: #58677e; font-size: 12px; font-weight: 650; }
.login-card input { width: 100%; padding: 12px; border: 1px solid #dfe6f0; border-radius: 8px; font: inherit; }
.login-card form button { margin-top: 12px; padding: 12px; border: 0; border-radius: 9px; background: #203b65; color: white; font-weight: 700; }
.login-card form button:disabled { opacity: .6; }
.login-card .login-error { color: #b42318; font-size: 12px; }
.login-card > small { display: block; margin-top: 18px; }
.cloud-loading { min-height: 100vh; display: grid; place-items: center; color: #526a99; }
