:root {
  color-scheme: light;
  --blue: #2385f4;
  --blue-strong: #126bd0;
  --blue-soft: #eaf5ff;
  --blue-pale: #f5faff;
  --navy: #13253f;
  --text: #172338;
  --muted: #68778d;
  --line: #dce9f7;
  --panel: rgba(255, 255, 255, .92);
  --success: #168b65;
  --warning: #c97814;
  --danger: #d84d5d;
  --shadow: 0 18px 55px rgba(41, 109, 177, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f4f9ff; }
body { margin: 0; min-height: 100vh; color: var(--text); background: linear-gradient(140deg, #f8fbff 0%, #edf7ff 54%, #f9fcff 100%); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.ambient { position: fixed; z-index: -1; border-radius: 999px; filter: blur(4px); pointer-events: none; }
.ambient-one { width: 38rem; height: 38rem; right: -14rem; top: -15rem; background: radial-gradient(circle, rgba(84, 180, 255, .24), transparent 68%); }
.ambient-two { width: 34rem; height: 34rem; left: 12%; bottom: -22rem; background: radial-gradient(circle, rgba(98, 221, 255, .18), transparent 68%); }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 460px); padding: 38px; border: 1px solid rgba(184, 218, 249, .82); border-radius: 30px; background: rgba(255,255,255,.88); box-shadow: 0 28px 80px rgba(46, 112, 177, .17); backdrop-filter: blur(18px); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup strong, .brand-lockup small { display: block; }
.brand-lockup strong { font-size: 17px; letter-spacing: -.01em; }
.brand-lockup small { color: var(--muted); margin-top: 2px; }
.brand-mark { width: 86px; height: 48px; object-fit: contain; object-position: center; mix-blend-mode: multiply; }
.login-copy { margin: 46px 0 28px; }
.eyebrow { color: var(--blue-strong); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
.login-copy h1 { margin: 8px 0 10px; font-size: clamp(30px, 7vw, 42px); line-height: 1.08; letter-spacing: -.045em; }
.login-copy p { color: var(--muted); line-height: 1.65; }
.form-stack, .modal-card { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: #43536b; font-size: 13px; font-weight: 700; }
label small, .image-field small { color: var(--muted); font-weight: 500; line-height: 1.5; }
input, select, textarea { width: 100%; color: var(--text); background: #fbfdff; border: 1px solid #cfe2f5; border-radius: 13px; outline: none; padding: 12px 14px; transition: border-color .2s, box-shadow .2s, background .2s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #64adf5; background: white; box-shadow: 0 0 0 4px rgba(35,133,244,.1); }
.button { min-height: 43px; padding: 10px 18px; border: 0; border-radius: 13px; cursor: pointer; font-weight: 750; transition: transform .18s, box-shadow .18s, background .18s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .58; cursor: wait; transform: none; }
.button.primary { color: white; background: linear-gradient(135deg, #3b9bff, #1777e5); box-shadow: 0 10px 24px rgba(35,133,244,.22); }
.button.primary:hover { box-shadow: 0 13px 29px rgba(35,133,244,.3); }
.button.ghost { color: #31638f; background: #eef7ff; border: 1px solid #d1e7fa; }
.button.light { color: #1769bb; background: white; box-shadow: 0 10px 25px rgba(28,102,176,.14); }
.button.danger { color: #b33645; background: #fff0f1; border: 1px solid #ffcbd1; }
.button.danger:hover { background: #ffe3e6; box-shadow: 0 10px 22px rgba(189, 63, 76, .14); }
.wide { width: 100%; }
.back-link { display: block; margin-top: 22px; color: #56728f; text-align: center; text-decoration: none; font-size: 13px; }
.form-error { min-height: 18px; margin: -4px 0 0; color: var(--danger); font-size: 13px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 248px; padding: 26px 20px 20px; display: flex; flex-direction: column; background: rgba(248,252,255,.88); border-right: 1px solid rgba(203,225,246,.86); backdrop-filter: blur(17px); }
.sidebar-brand { padding: 0 8px; }
.nav-list { display: grid; gap: 7px; margin-top: 48px; }
.nav-button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 11px 14px; color: #587088; background: transparent; border: 0; border-radius: 14px; cursor: pointer; text-align: left; font-weight: 700; transition: color .2s, background .2s, transform .2s; }
.nav-button:hover { color: var(--blue-strong); background: #edf7ff; transform: translateX(2px); }
.nav-button.active { color: #126bc9; background: linear-gradient(115deg, #dcefff, #eef8ff); box-shadow: inset 0 0 0 1px #d2e9fc; }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.cashier-link { padding: 11px; color: var(--blue-strong); text-align: center; font-size: 13px; font-weight: 750; text-decoration: none; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 15; top: 0; min-height: 88px; padding: 16px clamp(20px, 3vw, 42px); display: flex; align-items: center; gap: 18px; background: rgba(247,251,255,.79); border-bottom: 1px solid rgba(204,226,247,.7); backdrop-filter: blur(18px); }
.topbar h1 { margin: 3px 0 0; font-size: 24px; letter-spacing: -.035em; }
.menu-button { display: none; }
.user-menu { margin-left: auto; }
.user-button { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; color: var(--text); background: rgba(255,255,255,.75); border: 1px solid #d8e9f8; border-radius: 15px; cursor: pointer; }
.user-button span strong, .user-button span small { display: block; text-align: left; }
.user-button span small { margin-top: 2px; color: var(--muted); font-size: 11px; text-transform: capitalize; }
.user-avatar { width: 36px; height: 36px; display: grid !important; place-items: center; color: white; border-radius: 11px; background: linear-gradient(145deg, #67bcff, #2385f4); font-weight: 800; }
.content-view { display: none; padding: 34px clamp(20px, 3vw, 42px) 54px; animation: content-in .32s ease both; }
.content-view.active-view { display: block; }
.hero-panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(26px, 4vw, 42px); color: white; border-radius: 25px; background: linear-gradient(120deg, #1983ed 0%, #51adfa 58%, #84d7ff 100%); box-shadow: 0 22px 48px rgba(31,128,221,.21); }
.hero-panel::after { content: ""; position: absolute; right: -5%; bottom: -90%; width: 350px; height: 350px; border: 55px solid rgba(255,255,255,.12); border-radius: 50%; }
.hero-panel > * { position: relative; z-index: 1; }
.hero-panel .eyebrow { color: rgba(255,255,255,.78); }
.hero-panel h2 { max-width: 670px; margin: 8px 0; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -.045em; }
.hero-panel p { margin: 0; color: rgba(255,255,255,.82); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.metric-card { min-width: 0; padding: 21px; background: var(--panel); border: 1px solid #deebf7; border-radius: 19px; box-shadow: 0 12px 35px rgba(60,112,164,.07); transition: transform .2s, box-shadow .2s; }
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-card strong { display: block; margin: 10px 0 4px; font-size: clamp(22px, 2vw, 30px); letter-spacing: -.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-card small { color: #8a98a9; }
.metric-accent { width: 34px; height: 4px; margin-bottom: 15px; border-radius: 10px; background: linear-gradient(90deg, var(--blue), #77cffb); }
.dashboard-grid, .report-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 18px; margin-top: 18px; }
.panel { background: var(--panel); border: 1px solid #dceaf7; border-radius: 21px; box-shadow: 0 14px 38px rgba(54,111,165,.07); }
.panel-heading { padding: 22px 22px 15px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-heading h3 { margin: 4px 0 0; font-size: 19px; letter-spacing: -.025em; }
.text-button { color: var(--blue-strong); background: none; border: 0; cursor: pointer; font-weight: 750; }
.attention-list, .rank-list { display: grid; padding: 0 22px 20px; }
.attention-item, .rank-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 13px 0; border-top: 1px solid #edf2f7; }
.product-thumb { width: 44px; height: 44px; display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; border-radius: 12px; background: linear-gradient(145deg, #f6f9fc, #edf4fa); }
.product-thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-thumb span { color: #89a0b8; font-size: 11px; font-weight: 800; }
.attention-item strong, .rank-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.attention-item small, .rank-item small { color: var(--muted); }
.stock-pill, .status-pill { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.stock-pill.warning, .status-pill.pending { color: #a76410; background: #fff2df; }
.stock-pill.danger, .status-pill.inactive, .status-pill.void { color: #bd3f4c; background: #ffebee; }
.stock-pill.ok, .status-pill.active, .status-pill.paid { color: #147657; background: #e3f7ef; }
.performance-block { min-height: 190px; padding: 4px 22px 22px; display: grid; align-content: center; }
.performance-value { font-size: clamp(30px, 4vw, 46px); font-weight: 850; letter-spacing: -.055em; }
.performance-row { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.performance-row div { padding: 12px; border-radius: 13px; background: #f3f9ff; }
.performance-row strong, .performance-row small { display: block; }
.performance-row strong { margin-bottom: 4px; }
.performance-row small { color: var(--muted); }

.section-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.section-toolbar h2 { margin: 5px 0 7px; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.045em; }
.section-toolbar p { margin: 0; color: var(--muted); }
.filter-bar { display: grid; grid-template-columns: minmax(260px, 1fr) 220px 180px; gap: 13px; margin: 25px 0 16px; padding: 16px; background: rgba(255,255,255,.78); border: 1px solid #deebf7; border-radius: 19px; }
.filter-bar label { gap: 5px; }
.filter-bar label > span, .date-filter label > span { padding-left: 3px; color: #7c8ca0; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.transaction-filter { grid-template-columns: minmax(280px, 1fr) 170px 170px auto; align-items: end; }
.filter-actions { display: flex; gap: 8px; }
.filter-actions .button { min-height: 44px; }
.transaction-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.transaction-summary > div { min-width: 0; padding: 14px 16px; background: rgba(255,255,255,.84); border: 1px solid #deebf7; border-radius: 13px; }
.transaction-summary span, .transaction-summary strong { display: block; }
.transaction-summary span { color: var(--muted); font-size: 11px; }
.transaction-summary strong { margin-top: 5px; color: var(--text); font-size: 20px; font-variant-numeric: tabular-nums; }
.transaction-summary-total { background: linear-gradient(125deg, #e7f4ff, #f5fbff) !important; border-color: #cbe5fb !important; }
.transaction-summary-total strong { color: var(--blue-strong); }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 14px 18px; color: #789; background: #f6faff; border-bottom: 1px solid #e4edf6; font-size: 10px; letter-spacing: .075em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 18px; border-bottom: 1px solid #edf2f7; font-size: 13px; vertical-align: middle; }
tbody tr { transition: background .18s; }
tbody tr:hover { background: #f8fbff; }
tbody tr:last-child td { border-bottom: 0; }
.product-cell { min-width: 235px; display: flex; align-items: center; gap: 12px; }
.product-cell strong, .product-cell small { display: block; }
.product-cell small { margin-top: 3px; color: var(--muted); }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.action-group { display: flex; justify-content: flex-end; gap: 7px; }
.mini-button { min-width: 60px; padding: 7px 9px; color: #246bae; background: #edf7ff; border: 1px solid #d6eafc; border-radius: 9px; cursor: pointer; font-size: 11px; font-weight: 750; }
.mini-button:disabled { opacity: .48; cursor: not-allowed; }
.mini-button.stock { color: #11755c; background: #eaf9f3; border-color: #d4f0e6; }
.empty-state { padding: 60px 20px; text-align: center; }
.empty-state p { margin: 7px 0 0; color: var(--muted); }
.transaction-table { min-width: 1040px; }
.transaction-row { cursor: pointer; }
.transaction-row:focus { outline: 2px solid #64adf5; outline-offset: -2px; background: #f1f8ff; }
.transaction-time { min-width: 205px; }
.transaction-time strong, .transaction-time small, .transaction-table td > strong, .transaction-table td > small { display: block; }
.transaction-time small, .transaction-table td > small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.transaction-items { width: min(28vw, 390px); overflow: hidden; color: #415875; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.table-footer { min-height: 66px; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); background: #fbfdff; border-top: 1px solid #e6eff7; font-size: 12px; }
.pagination { display: flex; gap: 8px; }

.report-heading { align-items: center; }
.date-filter { display: flex; align-items: end; gap: 9px; padding: 10px; background: white; border: 1px solid #dce9f7; border-radius: 17px; }
.date-filter label { gap: 4px; }
.date-filter input { min-width: 145px; padding: 9px 10px; }
.report-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.report-note { margin: 13px 4px 0; color: var(--muted); font-size: 12px; }
.chart-panel { min-width: 0; }
.bar-chart { height: 275px; padding: 18px 22px 23px; display: flex; align-items: end; gap: 9px; overflow-x: auto; }
.bar-column { min-width: 38px; flex: 1 0 38px; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 7px; }
.bar-value { color: #55718d; font-size: 9px; white-space: nowrap; }
.bar-track { width: min(34px, 80%); min-height: 4px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #68c2ff, #2385f4); box-shadow: 0 8px 16px rgba(35,133,244,.2); animation: grow-bar .6s ease both; }
.bar-label { color: #8191a3; font-size: 10px; white-space: nowrap; }
.rank-number { width: 28px; height: 28px; display: grid; place-items: center; color: var(--blue-strong); background: #eaf5ff; border-radius: 9px; font-weight: 850; font-size: 11px; }
.rank-money { color: var(--blue-strong); font-weight: 800; white-space: nowrap; }
.recent-panel { margin-top: 18px; }
.skeleton-block { background: linear-gradient(100deg, transparent 20%, rgba(225,239,251,.7) 40%, transparent 60%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }

.modal { width: min(760px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; color: var(--text); background: transparent; border: 0; overflow: visible; }
.modal::backdrop { background: rgba(19,37,63,.42); backdrop-filter: blur(5px); }
.small-modal { width: min(500px, calc(100% - 28px)); }
.transaction-modal { width: min(1040px, calc(100% - 28px)); }
.modal-card { max-height: calc(100vh - 28px); overflow-y: auto; padding: 27px; background: #fff; border: 1px solid #dce9f7; border-radius: 23px; box-shadow: 0 28px 90px rgba(20,52,87,.26); }
.modal[open] .modal-card { animation: modal-in .24s ease both; }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 4px; }
.modal-heading h2 { margin: 5px 0 0; font-size: 26px; letter-spacing: -.035em; }
.modal-heading p { margin: 5px 0 0; color: var(--muted); }
.close-button { padding: 8px 10px; color: #6d7e91; background: #f1f6fa; border: 0; border-radius: 10px; cursor: pointer; font-size: 11px; font-weight: 750; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.catalog-only-hidden { display: none !important; }
.purchase-form { margin-top: 24px; padding: 22px; }
.purchase-lines-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.purchase-lines-heading h3 { margin: 4px 0 0; font-size: 19px; }
.button.secondary { color: #1769bb; background: #edf7ff; border: 1px solid #cee7fb; }
.purchase-items { display: grid; gap: 9px; }
.purchase-line { display: grid; grid-template-columns: minmax(220px, 1fr) 130px 160px 150px 42px; align-items: end; gap: 10px; padding: 13px; background: #f7fbff; border: 1px solid #e0edf8; border-radius: 13px; }
.purchase-line .line-subtotal { padding: 11px 0; color: var(--blue-strong); font-size: 14px; font-weight: 800; white-space: nowrap; }
.purchase-remove { min-width: 38px; min-height: 42px; padding: 8px; color: #b94450; background: #fff0f1; border: 1px solid #ffdadd; border-radius: 10px; cursor: pointer; font-weight: 800; }
.purchase-total { display: flex; align-items: center; justify-content: space-between; padding: 16px; color: #285e95; background: linear-gradient(120deg, #e9f5ff, #f8fcff); border: 1px solid #d2e9fb; border-radius: 14px; }
.purchase-total strong { color: var(--blue-strong); font-size: 22px; }
.history-heading { margin-top: 34px; }
.purchase-filter { grid-template-columns: minmax(280px, 1fr) 170px 170px auto; align-items: end; }
.purchase-table { min-width: 900px; }
.check-label { display: flex; align-items: center; gap: 9px; align-self: end; min-height: 44px; }
.check-label input { width: 18px; height: 18px; }
.image-field { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 16px; padding: 13px; background: #f6faff; border: 1px solid #e1edf7; border-radius: 16px; }
.image-preview { width: 100px; height: 100px; display: grid; place-items: center; overflow: hidden; color: #91a3b6; background: white; border: 1px dashed #c9deef; border-radius: 13px; font-size: 11px; text-align: center; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.transaction-detail-content { display: grid; gap: 18px; min-height: 180px; }
.detail-loading { min-height: 180px; display: grid; place-items: center; color: var(--muted); background: linear-gradient(100deg, #f8fbff, #edf7ff, #f8fbff); border-radius: 17px; animation: shimmer 1.2s infinite; }
.transaction-detail-meta { display: grid; grid-template-columns: 1.4fr .8fr .9fr 1fr; gap: 10px; }
.transaction-detail-meta article { min-width: 0; padding: 14px; background: #f5faff; border: 1px solid #e1edf8; border-radius: 14px; }
.transaction-detail-meta span, .transaction-detail-meta small { color: var(--muted); font-size: 11px; }
.transaction-detail-meta strong, .transaction-detail-meta small { display: block; margin-top: 5px; }
.transaction-detail-meta strong { overflow-wrap: anywhere; }
.status-pill.completed { color: #147657; background: #e3f7ef; }
.void-transaction-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .9fr) auto; align-items: end; gap: 14px; padding: 17px; border: 1px solid #ffd5da; background: linear-gradient(135deg, #fff9fa, #fff1f2); border-radius: 12px; }
.void-transaction-panel h3 { margin: 4px 0 5px; font-size: 16px; }
.void-transaction-panel p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.void-transaction-panel label { display: grid; gap: 6px; color: #5c7187; font-size: 12px; font-weight: 700; }
.void-transaction-panel textarea { min-height: 74px; resize: vertical; }
.void-transaction-panel.completed { display: block; border-color: #ffd8dc; }
.detail-table-wrap { overflow-x: auto; border: 1px solid #e1ebf5; border-radius: 16px; }
.detail-table { min-width: 790px; }
.detail-table td:first-child { min-width: 230px; }
.detail-table td:first-child strong, .detail-table td:first-child small { display: block; }
.detail-table td:first-child small { margin-top: 4px; color: var(--muted); }
.detail-table .profit { color: var(--success); font-weight: 750; }
.transaction-totals { margin-left: auto; width: min(100%, 500px); display: grid; gap: 8px; }
.transaction-totals div { display: flex; justify-content: space-between; gap: 18px; padding: 8px 12px; color: var(--muted); border-radius: 10px; }
.transaction-totals strong { color: var(--text); }
.transaction-totals .grand-total { padding: 13px 14px; color: #1769bb; background: linear-gradient(120deg, #e7f4ff, #f3faff); border: 1px solid #d3eafb; font-size: 16px; }
.transaction-totals .grand-total strong { color: var(--blue-strong); }
.toast { position: fixed; z-index: 50; right: 26px; top: 102px; max-width: min(390px, calc(100vw - 32px)); padding: 13px 16px; color: white; background: #183d65; border-radius: 13px; box-shadow: 0 15px 40px rgba(22,58,96,.24); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #b83e4c; }

/* Application dashboard refresh: blue-to-white workspace with a precise, lightweight hierarchy. */
:root {
  --blue: #2787ef;
  --blue-strong: #176fd0;
  --blue-soft: #eaf5ff;
  --blue-pale: #f8fbff;
  --text: #172235;
  --muted: #708096;
  --line: #dce9f7;
  --panel: rgba(255, 255, 255, .95);
  --shadow: 0 14px 34px rgba(35, 100, 168, .08);
}

html { background: #f7fbff; }
body {
  background-color: #f7fbff;
  background-image:
    linear-gradient(rgba(101, 171, 228, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 171, 228, .075) 1px, transparent 1px),
    radial-gradient(circle at 88% 0%, rgba(91, 187, 255, .24), transparent 30rem),
    linear-gradient(135deg, #fbfdff 0%, #edf8ff 57%, #f9fcff 100%);
  background-size: 40px 40px, 40px 40px, auto, auto;
}
.ambient { display: none; }
.app-shell { grid-template-columns: 278px minmax(0, 1fr); }
.sidebar {
  width: 278px;
  padding: 30px 18px 18px;
  background: rgba(255, 255, 255, .96);
  border-right: 1px solid #e1edf7;
  box-shadow: 8px 0 30px rgba(48, 109, 168, .035);
  backdrop-filter: blur(16px);
}
.sidebar-brand { padding: 4px 8px 10px; }
.brand-mark { width: 54px; height: 54px; padding: 5px; object-fit: contain; border-radius: 14px; background: linear-gradient(145deg, #e7f5ff, #fff); box-shadow: 0 9px 20px rgba(49, 136, 220, .13); }
.brand-lockup { gap: 12px; }
.brand-lockup strong { font-size: 16px; letter-spacing: -.025em; }
.brand-lockup small { font-size: 12px; }
.nav-list { gap: 5px; margin-top: 37px; }
.nav-button {
  position: relative;
  min-height: 42px;
  padding: 10px 13px 10px 17px;
  border-radius: 10px;
  font-size: 13px;
}
.nav-button::before { content: ""; width: 7px; height: 7px; margin-right: 12px; border: 2px solid #8aa2bc; border-radius: 3px; transform: rotate(45deg); transition: border-color .2s, background .2s; }
.nav-button:hover { background: #f2f8ff; transform: translateX(3px); }
.nav-button.active { color: var(--blue-strong); background: linear-gradient(100deg, #e5f4ff, #f5faff); box-shadow: inset 0 0 0 1px #cbe8fb; }
.nav-button.active::before { border-color: var(--blue); background: var(--blue); box-shadow: 0 0 0 4px rgba(39,135,239,.1); }
.sidebar-footer { padding: 8px 2px 0; }
.cashier-link { border-radius: 10px; background: #f2f8ff; }
.workspace { grid-column: 2; }
.topbar {
  min-height: 80px;
  padding: 14px clamp(18px, 2vw, 30px);
  background: rgba(255, 255, 255, .76);
  border-bottom: 1px solid rgba(218, 233, 246, .86);
  box-shadow: 0 4px 18px rgba(44, 108, 161, .025);
}
.topbar h1 { font-size: 23px; }
.content-view { max-width: none; margin: 0; padding: 28px clamp(16px, 2vw, 30px) 50px; }
.hero-panel { padding: clamp(25px, 3.2vw, 38px); color: var(--text); border: 1px solid #cfe8fb; border-radius: 15px; background: linear-gradient(115deg, rgba(255,255,255,.98), #edf8ff 52%, #d7f0ff 100%); box-shadow: var(--shadow); }
.hero-panel::before { content: ""; position: absolute; inset: 0; opacity: .75; background: linear-gradient(90deg, transparent 0 64%, rgba(67, 164, 239, .06) 64% 65%, transparent 65%); }
.hero-panel::after { right: -1%; bottom: -138%; width: 310px; height: 310px; border-color: rgba(50, 151, 231, .12); }
.hero-panel .eyebrow { color: var(--blue-strong); }
.hero-panel p { color: #5e7894; }
.button { min-height: 41px; border-radius: 9px; font-size: 13px; }
.button.primary { background: linear-gradient(135deg, #50aaff, #1670d5); box-shadow: 0 9px 18px rgba(35, 126, 226, .22); }
.button.secondary, .button.ghost { border-radius: 9px; background: #f2f8ff; border-color: #d5e9f9; }
.button.light { border-radius: 9px; color: #146bc6; border: 1px solid #cfe7fa; box-shadow: 0 8px 18px rgba(48,126,194,.1); }
.user-button { border-radius: 10px; background: #fff; }
.user-avatar { border-radius: 9px; background: linear-gradient(145deg, #72c0ff, #277ee0); }
.metric-grid { gap: 13px; margin-top: 16px; }
.metric-card, .panel { border-radius: 14px; box-shadow: var(--shadow); }
.metric-card { padding: 18px; border-color: #dbeaf6; }
.metric-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(35,100,168,.13); }
.metric-accent { width: 28px; height: 3px; margin-bottom: 12px; border-radius: 3px; }
.dashboard-grid, .report-grid { gap: 14px; margin-top: 14px; }
.panel-heading { padding: 19px 20px 13px; }
.attention-list, .rank-list { padding: 0 20px 17px; }
.filter-bar { margin: 20px 0 14px; padding: 13px; border-radius: 14px; box-shadow: 0 9px 24px rgba(41,105,159,.045); }
input, select, textarea { border-radius: 9px; background: rgba(255,255,255,.88); }
th { background: #f5faff; }
.table-footer { background: #fbfdff; }
.purchase-form { margin-top: 19px; padding: 19px; border-radius: 14px; }
.purchase-line, .purchase-total, .image-field, .transaction-detail-meta article { border-radius: 10px; }
.date-filter { border-radius: 12px; box-shadow: 0 8px 22px rgba(41,105,159,.04); }
.transaction-summary > div { border-radius: 10px; }
.modal-card { border-radius: 15px; }
.toast { border-radius: 10px; }

/* Calmer typography: preserve hierarchy without the heavy black appearance. */
body { color: #2a3b4f; font-weight: 420; }
h1, h2, h3 { color: #2b4057; font-weight: 600; }
.topbar h1, .section-toolbar h2, .hero-panel h2 { font-weight: 620; }
.brand-lockup strong, .nav-button, .button, .metric-card strong, .panel-heading h3 { font-weight: 650; }
.metric-card strong, .performance-value { color: #29415a; }
.attention-item strong, .rank-item strong, .product-cell strong, .transaction-table td > strong { font-weight: 620; }

@keyframes content-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes grow-bar { from { height: 4px !important; opacity: .3; } }
@keyframes shimmer { to { background-position: -200% 0; } }
.motion-in { animation: content-in .55s cubic-bezier(.2,.7,.2,1) both; }

/* Topbar menjadi satu-satunya judul halaman; area konten cukup menampilkan konteks/count. */
.content-view > .section-toolbar > div:first-child .eyebrow,
.content-view > .section-toolbar > div:first-child h2 {
  display: none;
}

/* Calmer, consistent typography across admin pages. */
body { font-weight: 400; }
h1, h2, h3, .topbar h1, .section-toolbar h2, .hero-panel h2,
.brand-lockup strong, .nav-button, .button, .metric-card strong,
.panel-heading h3, .product-cell strong, .transaction-table td > strong {
  font-weight: 500;
}
.eyebrow, label > span, th { font-weight: 500; }

/* Table content uses one calm weight; hierarchy comes from color and spacing. */
.transaction-table td,
.transaction-table td strong,
.transaction-table td small,
.transaction-table td .transaction-items,
.product-table td,
.product-table td strong,
.product-table td small {
  font-weight: 400;
}
.workspace table td,
.workspace table td strong,
.workspace table td small {
  font-weight: 400;
}

/* Final typography normalization for every admin form, table, and panel. */
.workspace,
.workspace * {
  font-weight: 400 !important;
}
.workspace h1,
.workspace h2,
.workspace h3,
.workspace .topbar h1 {
  font-weight: 400 !important;
}
.workspace .button,
.workspace .nav-button,
.workspace .mini-button {
  font-weight: 500 !important;
}

/* Subtle button highlight without changing the calm visual hierarchy. */
.button,
.mini-button,
.text-button,
.nav-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.button::after,
.mini-button::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -75%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.46), transparent);
  transform: skewX(-18deg);
  transition: left .42s ease;
  pointer-events: none;
  z-index: -1;
}
.button:hover,
.mini-button:hover,
.text-button:hover,
.nav-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(36, 116, 201, .14);
}
.button:hover::after,
.mini-button:hover::after { left: 125%; }
.button:active,
.mini-button:active,
.text-button:active,
.nav-button:active { transform: translateY(0); }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid, .report-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: minmax(220px, 1fr) 190px 160px; }
  .transaction-filter { grid-template-columns: minmax(240px, 1fr) 160px 160px; }
  .purchase-filter { grid-template-columns: minmax(240px, 1fr) 160px 160px; }
  .transaction-filter .filter-actions { grid-column: span 2; }
  .transaction-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .transaction-detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .void-transaction-panel { grid-template-columns: 1fr; }
  .report-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { width: min(290px, 82vw); transform: translateX(-105%); transition: transform .25s ease; box-shadow: 24px 0 60px rgba(27,61,96,.16); }
  .sidebar.open { transform: translateX(0); }
  .workspace { width: 100%; }
  .menu-button { display: block; padding: 8px 10px; color: var(--blue-strong); background: #eaf5ff; border: 1px solid #d8ebfb; border-radius: 10px; font-size: 11px; font-weight: 800; }
  .topbar { min-height: 76px; }
  .topbar h1 { font-size: 20px; }
  .user-button > span:not(.user-avatar) { display: none; }
  .content-view { padding-top: 22px; }
  .hero-panel { align-items: flex-start; flex-direction: column; }
  .section-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; }
  .filter-bar { grid-template-columns: 1fr; }
  .transaction-filter { grid-template-columns: 1fr; }
  .purchase-filter { grid-template-columns: 1fr; }
  .transaction-filter .filter-actions { grid-column: auto; }
  .transaction-summary { grid-template-columns: 1fr; }
  .filter-actions .button { flex: 1; }
  .table-footer { align-items: stretch; flex-direction: column; }
  .pagination { display: grid; grid-template-columns: 1fr 1fr; }
  .transaction-detail-meta { grid-template-columns: 1fr; }
  .transaction-items { width: 260px; }
  .date-filter { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .date-filter .button { grid-column: span 1; }
  .date-filter .button:first-of-type { grid-column: 1 / 2; }
  .date-filter input { min-width: 0; }
  .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .purchase-line { grid-template-columns: 1fr 1fr; }
  .purchase-line .line-subtotal { padding: 4px 0; }
  .image-field { grid-template-columns: 86px 1fr; }
  .image-preview { width: 80px; height: 80px; }
  .login-card { padding: 28px 23px; }
}

@media (max-width: 450px) {
  .metric-grid, .report-metrics { grid-template-columns: 1fr; }
  .performance-row { grid-template-columns: 1fr; }
  .modal-card { padding: 21px 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
