.admin-body {
  --ink: #18243a;
  --muted: #55647b;
  --line: #e5eaf2;
  --blue: #284fdb;
  --shadow: 0 2px 4px #172d4e06;
  min-height: 100vh;
  background: #f4f6fb;
  color: var(--ink);
}
.admin-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 27px 14px; background: #14213a; color: white; }
.admin-brand { display: flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 750; line-height: 1.4; }
.admin-sidebar .admin-brand { margin: 0 10px 34px; }
.admin-mark { flex: 0 0 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; background: #4168f1; color: white; font-size: 21px; }
.admin-brand small { display: block; margin-top: 2px; color: #acbbd5; font-size: 11px; font-weight: 500; }
.admin-nav { display: grid; gap: 5px; }
.admin-nav a { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 13px; border-radius: 8px; color: #bfcde3; font-size: 14px; white-space: nowrap; }
.admin-nav a:hover { background: #1e3151; color: white; }
.admin-nav a[aria-current] { background: #2849a0; color: white; font-weight: 700; }
.admin-icon { width: 18px; height: 18px; display: inline-block; position: relative; flex: 0 0 18px; }
.admin-icon::before, .admin-icon::after { position: absolute; box-sizing: border-box; }
.icon-dashboard::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: currentColor; left: 2px; top: 2px; box-shadow: 8px 0, 0 8px, 8px 8px; }
.icon-message::before { content: ""; inset: 2px 1px 4px; border: 1.5px solid; border-radius: 4px; }
.icon-message::after { content: ""; left: 4px; bottom: 2px; width: 5px; height: 5px; border-left: 1.5px solid; border-bottom: 1.5px solid; transform: skewY(-35deg); }
.icon-order::before, .icon-receipt::before { content: ""; inset: 1px 3px; border: 1.5px solid; border-radius: 2px; }
.icon-order::after, .icon-receipt::after { content: ""; left: 6px; top: 6px; width: 6px; height: 1.5px; background: currentColor; box-shadow: 0 4px; }
.icon-receipt::before { border-radius: 2px 2px 4px 4px; }
.icon-wallet::before { content: ""; inset: 4px 1px 3px; border: 1.5px solid; border-radius: 3px; }
.icon-wallet::after { content: ""; right: 3px; top: 8px; width: 3px; height: 3px; border-radius: 1px; background: currentColor; }
.icon-complaint::before { content: ""; inset: 1px; border: 1.5px solid; border-radius: 50%; }
.icon-complaint::after { content: "!"; inset: 0; text-align: center; font-size: 12px; line-height: 18px; font-weight: 750; }
.icon-services::before { content: ""; inset: 1px 4px 7px; border: 1.5px solid; border-radius: 2px; transform: rotate(45deg); }
.icon-services::after { content: ""; inset: 7px 4px 1px; border-right: 1.5px solid; border-bottom: 1.5px solid; border-radius: 2px; transform: rotate(45deg); }
.admin-top { position: sticky; top: 0; z-index: 2; min-height: 62px; padding: 8px clamp(18px, 2.25vw, 36px); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: white; border-bottom: 1px solid var(--line); }
.admin-breadcrumb, .admin-account { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.admin-breadcrumb strong { color: var(--ink); font-weight: 700; }
.admin-breadcrumb a:hover { color: var(--blue); }
.admin-account { flex-shrink: 0; }
.admin-account-label { color: var(--ink); font-weight: 650; }
.admin-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #eaf0ff; color: #264dbb; font-weight: 750; }
.admin-demo { margin-right: 8px; padding: 4px 8px; border-radius: 5px; color: #535f79; background: #eef2f8; font-size: 12px; }
.admin-logout { margin-left: 5px; border-left: 1px solid var(--line); padding-left: 14px; }
.admin-logout .text-button { font-size: 13px; }
.admin-main { max-width: 1580px; margin: 0 auto; padding: 28px clamp(18px, 2.25vw, 36px) 36px; }
.admin-page-title { margin-bottom: 22px; }
.admin-page-title.split { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.admin-page-title h1 { font-size: 28px; letter-spacing: -.025em; }
.admin-page-title p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.admin-body .button { border-radius: 8px; }
.admin-body .button.primary { background: var(--blue); box-shadow: none; }
.admin-body .button.primary:hover { background: #2144c0; }
.admin-body .button.secondary { color: var(--ink); border-color: #d5deec; background: white; }
.admin-body .button.secondary:hover { background: #f5f7fc; }
.admin-quick-action span { font-size: 18px; line-height: 1; }
.admin-card { min-width: 0; padding: 20px; margin-bottom: 18px; }
.admin-body .card { border-color: var(--line); border-radius: 12px; }
.admin-card h2 { font-size: 17px; }
.admin-card p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.admin-card > h2 + form { margin-top: 15px; }
.admin-card-heading, .inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-card-heading { justify-content: space-between; margin-bottom: 15px; }
.admin-card-heading p { margin-top: 4px; }
.admin-body .text-link { font-size: 13px; font-weight: 650; }
.admin-body .text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.admin-card .form-stack button, .admin-card.form-stack button { justify-self: start; }
.admin-body input:not([type=checkbox]):not([type=radio]), .admin-body select, .admin-body textarea { border-color: #d5deec; border-radius: 8px; font-size: 14px; }
.admin-body .inline-form input, .admin-body .inline-form select { width: auto; max-width: 100%; }
.inline-form input[type="search"] { min-width: min(250px, 100%); }
.admin-card .facts > div { grid-template-columns: 100px minmax(0, 1fr); padding-block: 12px; }
.admin-card .facts > div:first-child { border-top: 0; }
.admin-card .timeline { padding: 10px 0 0; }
.admin-card .timeline time { white-space: nowrap; }
.admin-card .prepared-sms { margin-top: 16px; }
.import-panel { display: grid; gap: 12px; justify-items: start; }
.import-panel p { margin-top: 5px; }
.order-identity output { background: #f3f6fd; padding: 6px 10px; border-radius: 5px; }
.complaint-description { white-space: pre-wrap; }
.complaint-evidence { display: inline-block; max-width: 100%; }
.complaint-evidence img { display: block; max-width: min(100%, 720px); max-height: 560px; width: auto; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; margin-bottom: 18px; }
.admin-grid > .admin-card { margin-bottom: 0; }
.admin-filters, .admin-pagination { padding: 14px 20px; }
.admin-filters { border-bottom: 1px solid var(--line); }
.admin-pagination { justify-content: flex-end; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.admin-table-card { padding: 0; overflow: hidden; }
.admin-table-card > .admin-card-heading { margin: 0; padding: 16px 20px; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; min-width: 690px; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.admin-table th:first-child, .admin-table td:first-child { padding-left: 20px; }
.admin-table th:last-child, .admin-table td:last-child { padding-right: 20px; }
.admin-table th { background: #f6f8fc; color: #52627c; white-space: nowrap; font-size: 12px; font-weight: 700; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #fafbfe; }
.admin-table td.empty { padding-block: 30px; }
.admin-table td small { display: block; margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.admin-order-number { font: 12px ui-monospace, "SF Mono", Consolas, monospace; overflow-wrap: anywhere; }
.admin-body .text-link.admin-order-number { font-size: 12px; }
.admin-company { min-width: 100px; overflow-wrap: anywhere; }
.admin-amount, .admin-time, .admin-payment-mode { white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin-time { color: var(--muted); }
.admin-trade-number { max-width: 250px; }
.detail-payments .admin-table { min-width: 470px; }
.verify-form { display: grid; gap: 6px; justify-items: start; }

.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.admin-metric { padding: 14px 16px 16px; min-width: 0; }
a.admin-metric:hover { border-color: #b5c7fc; box-shadow: 0 4px 14px #345ac416; }
.metric-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 650; }
.metric-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; flex: 0 0 32px; }
.tone-blue { color: #2d55c9; background: #edf2ff; }
.tone-amber { color: #855109; background: #fff2da; }
.tone-violet { color: #6c45ad; background: #f2ebfd; }
.tone-green { color: #197056; background: #e5f6ed; }
.admin-metric strong { display: block; margin-top: 6px; font-size: clamp(23px, 2.25vw, 32px); font-weight: 750; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.admin-metric small { margin-left: 6px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(235px, 1fr); gap: 18px; margin-bottom: 18px; }
.dashboard-grid .admin-card { margin-bottom: 0; }
.income-card { scroll-margin-top: 76px; }
.income-periods { display: inline-flex; gap: 2px; padding: 3px; border-radius: 7px; background: #f0f3f9; }
.income-periods a { padding: 5px 9px; color: var(--muted); font-size: 12px; font-weight: 650; border-radius: 5px; }
.income-periods a[aria-current] { background: white; box-shadow: 0 1px 3px #172d4e22; color: var(--blue); }
.income-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; }
.income-summary dt { color: var(--muted); font-size: 12px; line-height: 1.4; }
.income-summary dd { margin: 4px 0 0; font-size: clamp(15px, 1.5vw, 21px); font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.income-summary > div:first-child dd { color: var(--blue); }
.income-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; margin: 0; font-variant-numeric: tabular-nums; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; height: 145px; margin-top: -6px; font-size: 11px; color: var(--muted); }
.chart-plot { position: relative; }
.chart-bars, .chart-dates { display: flex; margin: 0; padding: 0; list-style: none; }
.chart-bars { height: 134px; border-bottom: 1px solid #dce4f1; background: linear-gradient(to bottom, #e7edf6 1px, transparent 1px) repeat-y 0 0 / 100% 33.333%; }
.chart-bars li, .chart-dates span { flex: 1 1 0; min-width: 0; text-align: center; }
.chart-bars li { display: flex; align-items: end; justify-content: center; }
.chart-bars li:hover { background: #eef2fc80; }
.chart-bar { display: block; width: min(65%, 37px); border-radius: 4px 4px 0 0; background: linear-gradient(#5379f4, #2f56e5); }
.chart-dates { margin-top: 7px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.chart-empty { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; }
.queue-list { list-style: none; padding: 0; margin: 0; }
.queue-list li { border-top: 1px solid var(--line); }
.queue-list a { display: grid; grid-template-columns: 1fr auto 12px; align-items: center; gap: 10px; min-height: 47px; padding: 7px 4px; font-size: 14px; }
.queue-list a:hover { background: #f8faff; }
.queue-status { display: flex; align-items: center; gap: 9px; }
.queue-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c68a20; }
.queue-status.progress-in_progress::before { background: #4569e8; }
.queue-status.progress-reported::before { background: #1a8966; }
.queue-status.progress-report_failed::before { background: #c14a51; }
.queue-list strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.queue-arrow { color: #687994; font-size: 18px; text-align: right; }

.admin-login { display: grid; grid-template-columns: minmax(360px, 44%) minmax(0, 1fr); min-height: 100vh; background: white; }
.login-brand-panel { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center; min-height: 520px; padding: 90px clamp(34px, 6vw, 100px); color: white; background: radial-gradient(ellipse at 100% 85%, #29499f, transparent 68%), #14213a; }
.login-brand-panel .admin-brand { position: absolute; top: 40px; left: clamp(34px, 6vw, 100px); font-size: 18px; }
.login-brand-title { font-size: clamp(34px, 4.15vw, 66px); line-height: 1.18; font-weight: 790; letter-spacing: -.035em; }
.login-graphic { position: absolute; z-index: -1; width: 550px; height: 550px; bottom: -355px; right: -220px; border: 1px solid #9caff451; border-radius: 50%; box-shadow: 0 0 0 56px #819cf321, 0 0 0 112px #819cf315, 0 0 0 168px #819cf30c; }
.login-graphic i { position: absolute; width: 8px; height: 8px; background: #92aaff; border-radius: 50%; }
.login-graphic i:nth-child(1) { top: -4px; left: 50%; }
.login-graphic i:nth-child(2) { top: 50px; left: 14px; opacity: .7; }
.login-graphic i:nth-child(3) { top: 126px; left: 30px; opacity: .5; }
.login-content { display: grid; place-items: center; padding: 30px; }
.login-panel { width: min(100%, 374px); }
.login-panel h1 { font-size: 29px; margin-bottom: 27px; }
.login-panel .form-stack { gap: 17px; }
.login-panel .form-stack label { gap: 7px; }
.admin-body .login-panel input, .login-panel .button { min-height: 46px; }
.login-panel .button { margin-top: 5px; }
.login-preview { padding: 10px 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-radius: 7px; background: #f2f5fb; color: var(--muted); font-size: 12px; }
.login-preview code { color: var(--ink); user-select: all; }

@media (max-width: 1050px) {
  .admin-shell { grid-template-columns: 188px minmax(0, 1fr); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .admin-shell { display: block; }
  .admin-sidebar { position: relative; height: auto; padding: 12px; }
  .admin-sidebar .admin-brand { margin: 0 0 9px; }
  .admin-nav { display: flex; overflow-x: auto; }
  .admin-nav a { min-height: 38px; padding-inline: 9px; }
  .admin-top { position: relative; min-height: 48px; padding-inline: 12px; }
  .admin-breadcrumb-root, .admin-breadcrumb-root + span, .admin-account-label, .admin-avatar { display: none; }
  .admin-main { padding: 18px 12px 26px; }
  .admin-page-title h1 { font-size: 24px; }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-metrics, .income-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metrics { gap: 10px; }
  .admin-login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .login-brand-panel { min-height: 0; padding: 22px; }
  .login-brand-panel .admin-brand { position: static; }
  .login-brand-title { display: none; }
}
