:root {
  color-scheme: light;
  --nav: #081426; --ink: #152840; --muted: #63758a; --line: #e1e8ef;
  --canvas: #f3f6fa; --accent: #007e91; --cyan: #2bd3e3;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--canvas); color: var(--ink); -webkit-font-smoothing: antialiased; }
button,input,select { font: inherit; }
button,a,input,select { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button:disabled { opacity: .55; cursor: wait; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #0797b0; outline-offset: 4px; }
.skip { position: fixed; top: -60px; left: 20px; z-index: 100; background: white; padding: 10px; }
.skip:focus { top: 10px; }
.brand { display: block; text-decoration: none !important; }
.brand-logo { display: block; width: 100%; height: auto; object-fit: contain; }
.brand-caption { display: block; color: #94acc2; font-size: 10px; letter-spacing: 2px; margin-top: 16px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--nav); padding: 30px 18px 24px; display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.sidebar>.brand { width: 176px; margin: 0 auto; }
.sidebar-label { font-size: 9px; letter-spacing: 1.9px; color: #a0b4ca; text-align: center; margin-top: 15px; }
.nav-caption { font-size: 9px; font-weight: 600; letter-spacing: 1.6px; color: #91a4bb; margin: 36px 14px 12px; }
nav a { display: flex; align-items: center; gap: 12px; min-height: 49px; padding: 12px 14px; margin: 5px 0; color: #b5c4d7; border-radius: 9px; font-size: 13px; font-weight: 500; line-height: 1.4; border: 1px solid transparent; transition: background .15s; }
nav a:hover { background: #14273b; color: white; text-decoration: none; }
nav a.active { color: #e8feff; background: #123144; border-color: #245368; box-shadow: inset 3px 0 var(--cyan); }
.nav-icon { flex: 0 0 19px; display: flex; color: #96aec7; }
.nav-icon svg { width: 19px; height: 19px; }
nav a.active .nav-icon { color: #5ae5ef; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #233449; padding: 23px 12px 0; display: flex; gap: 12px; color: #c8d7e6; font-size: 12px; }
.sidebar-bottom small { display: block; color: #96abc2; font-size: 11px; }
.read-only-dot,.brand-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); flex-shrink: 0; }
.read-only-dot { margin-top: 8px; box-shadow: 0 0 0 4px #2bd3e312; }
.shell { margin-left: 248px; }
.topbar { min-height: 82px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 40px; gap: 20px; }
.store-caption { display: block; font-size: 9px; letter-spacing: 1.4px; font-weight: 600; color: var(--muted); }
.store-context strong { font-size: 14px; font-weight: 650; }
.environment { font-size: 10px; font-weight: 600; color: #806012; background: #fff7df; border: 1px solid #eee0b7; border-radius: 20px; padding: 4px 10px; white-space: nowrap; }
.environment.production { background: #eaf6fa; color: #186479; border-color: #cae6ed; }
.topbar-right { display: flex; gap: 18px; align-items: center; margin-left: auto; }
.user-name { font-size: 12px; color: var(--muted); }
main { padding: 38px 40px 24px; max-width: 1600px; margin: auto; }
.eyebrow { font-size: 10px; letter-spacing: 1.8px; font-weight: 650; color: var(--accent); }
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: clamp(27px,2.4vw,34px); letter-spacing: -1.1px; line-height: 1.25; margin: 8px 0 10px; font-weight: 650; }
h2 { font-size: 16px; letter-spacing: -.3px; font-weight: 650; margin-bottom: 0; }
h3 { font-size: 14px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.page-heading { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading p { font-size: 13px; margin-bottom: 0; }
.refresh-controls { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; max-width: 340px; }
.auto { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.auto input { accent-color: var(--accent); width: 14px; height: 14px; }
.updated-at { font-size: 11px; color: var(--muted); flex-basis: 100%; text-align: right; }
.button { border: 1px solid #d8e2eb; background: white; color: var(--ink); min-height: 42px; padding: 10px 16px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; font-weight: 600; font-size: 13px; text-decoration: none !important; transition: background .15s, border-color .15s; }
.button:hover { border-color: #9ab8c8; background: #eef7fa; }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover { background: #006a7c; }
.button.small { padding: 8px 13px; min-height: 36px; font-size: 12px; }
.button.ghost { background: transparent; }
.link-button { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 600; }
.notice { padding: 14px 18px; background: #fffbf1; border: 1px solid #efdfb9; border-left: 3px solid #dca342; border-radius: 9px; font-size: 12px; margin-bottom: 20px; color: #7b5916; line-height: 1.7; }
.notice.neutral { background: #edf5f9; border-color: #d7e7ef; border-left-color: #8caebf; color: #486476; }
.notice.error,#page-error { background: #fff2f3; color: #963346; border: 1px solid #efc7cb; padding: 15px 18px; border-radius: 9px; margin-bottom: 18px; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; margin-bottom: 26px; }
.metric { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 22px; box-shadow: 0 3px 8px #182d4503; }
.metric-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.metric strong { display: block; font-size: 34px; font-weight: 600; letter-spacing: -1.3px; line-height: 1.4; margin: 10px 0 16px; font-variant-numeric: tabular-nums; }
.metric-rule { display: block; width: 26px; height: 3px; background: #4fbdcb; border-radius: 2px; }
.grid-main { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,1fr); gap: 24px; align-items: start; margin-bottom: 24px; }
.stack { display: grid; gap: 24px; }
.panel { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; margin-bottom: 24px; box-shadow: 0 4px 14px #18364f03; }
.stack .panel,.grid-main .panel { margin-bottom: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid #edf1f5; }
.panel-body { padding: 22px 24px; }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
th { font-size: 11px; font-weight: 600; color: var(--muted); padding: 13px 16px; background: #f6f9fb; white-space: nowrap; }
td { padding: 16px; border-top: 1px solid #edf1f5; vertical-align: middle; }
tbody tr:hover { background: #f6fbfc; }
.badge { display: inline-flex; align-items: center; border-radius: 6px; font-size: 11px; line-height: 1.4; padding: 5px 8px; font-weight: 500; white-space: nowrap; }
.badge.good { background: #eaf5ef; color: #246445; }
.badge.warn { background: #fff3d9; color: #82550d; }
.badge.bad { background: #fdeced; color: #a53747; }
.badge.neutral { background: #eef2f6; color: #57687c; }
.badge.blue { background: #e9f3fb; color: #306585; }
.activity { padding: 24px 0; border-top: 1px solid #edf1f5; }
.activity:first-child { border-top: 0; padding-top: 0; }
.activity p { color: var(--muted); font-size: 13px; }
.data-line { display: flex; justify-content: space-between; gap: 24px; padding: 10px 0; font-size: 13px; border-bottom: 1px solid #f0f3f6; }
.data-line:last-child { border-bottom: 0; }
.data-line span:first-child { color: var(--muted); }
.data-line strong { font-size: 13px; text-align: right; font-weight: 600; overflow-wrap: anywhere; max-width: 58%; font-variant-numeric: tabular-nums; }
.quota-summary { padding: 0 0 15px; }
.quota-summary>div { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.quota-summary strong { font-size: 36px; font-weight: 600; letter-spacing: -1.3px; line-height: 1.4; }
.quota-summary>div>span { color: var(--muted); font-size: 12px; }
progress { appearance: none; width: 100%; height: 5px; border: 0; border-radius: 6px; display: block; margin: 18px 0 0; background: #eaf0f4; }
progress::-webkit-progress-bar { background: #eaf0f4; border-radius: 6px; }
progress::-webkit-progress-value { background: #1697aa; border-radius: 6px; }
progress::-moz-progress-bar { background: #1697aa; border-radius: 6px; }
.empty { padding: 28px 12px; text-align: center; }
.empty-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #7395ab; background: #f0f6f9; margin-bottom: 14px; }
.empty-icon svg { width: 21px; height: 21px; }
.empty p { font-size: 13px; color: var(--muted); max-width: 420px; margin: 0 auto; }
.filters { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 20px 24px; background: white; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 155px; }
.field:first-child { flex: 1; }
.field label { font-size: 11px; font-weight: 600; color: var(--muted); }
input:not([type=checkbox]),select { border: 1px solid #d8e2eb; border-radius: 9px; padding: 11px 13px; background: #fcfdfe; color: var(--ink); min-height: 44px; font-size: 13px; width: 100%; }
input::placeholder { color: #7b8c9e; }
input:focus,select:focus { border-color: #299daf; background: white; }
.pagination { padding-top: 18px; display: flex; gap: 12px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.pagination div { display: flex; gap: 8px; }
details { margin-top: 16px; }
summary { cursor: pointer; font-size: 12px; color: var(--accent); }
.technical { font: 12px/1.7 ui-monospace,monospace; overflow-wrap: anywhere; white-space: normal; background: #f5f8fa; padding: 15px; border-radius: 9px; }
.page-footer { margin-top: 34px; padding: 22px 0 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 15px; font-size: 10px; color: var(--muted); }
.mobile-only { display: none; }
.icon-button { border: 0; background: none; font-size: 24px; color: var(--ink); min-width: 44px; min-height: 44px; padding: 8px; }
.nav-backdrop { position: fixed; inset: 0; z-index: 35; border: 0; background: #03122288; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--nav); }
.login-brand { position: relative; overflow: hidden; padding: 44px clamp(36px,6vw,96px); display: flex; flex-direction: column; color: white; background: radial-gradient(ellipse at 100% 100%,#12394a 0,transparent 55%),var(--nav); }
.login-brand:after { content: ''; position: absolute; width: 380px; height: 380px; border: 1px solid #39c8df1a; border-radius: 50%; right: -225px; bottom: -130px; box-shadow: 0 0 0 65px #39c8df05,0 0 0 130px #39c8df04; pointer-events: none; }
.login-brand>.brand { width: 190px; max-width: 100%; position: relative; z-index: 1; }
.login-brand .brand-logo { border: 0; }
.login-message { margin: auto 0; padding: 64px 0 60px; z-index: 1; }
.login-message h1 { font-size: clamp(38px,4.2vw,66px); line-height: 1.12; font-weight: 550; letter-spacing: -2.5px; margin: 24px 0; }
.login-message h1 span { color: #53dce8; }
.login-message .eyebrow { color: #81c7d3; font-size: 10px; }
.login-message p { color: #a8bbce; font-size: 14px; line-height: 1.9; }
.login-features { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.login-features span { font-size: 11px; color: #b9cedd; padding: 6px 11px; border: 1px solid #2b4255; border-radius: 6px; background: #18334744; }
.login-brand>small { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #98afc5; }
.login-form { display: grid; place-items: center; padding: 48px; background: #f6f9fb; }
.login-box { width: 100%; max-width: 416px; padding: 38px; background: white; border: 1px solid #e2eaf0; border-radius: 18px; box-shadow: 0 16px 60px #142a4510; }
.login-emblem { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #e7f6f8; border: 1px solid #d2ecf0; color: var(--accent); font-size: 24px; margin-bottom: 28px; }
.login-box .eyebrow { font-size: 9px; letter-spacing: 1.4px; }
.login-box h2 { font-size: 25px; letter-spacing: -.8px; line-height: 1.3; margin: 10px 0 12px; }
.login-box>p { font-size: 13px; }
.login-box form { margin-top: 28px; }
.login-box label { display: block; font-size: 12px; font-weight: 600; margin: 20px 0 8px; }
.login-box input { font-size: 14px; min-height: 48px; }
.login-box .button { width: 100%; font-size: 13px; min-height: 48px; justify-content: space-between; margin-top: 12px; background: #0c7285; }
.login-box .button:hover { background: #085e70; }
.login-note { font-size: 11px !important; color: var(--muted); text-align: center; margin: 25px 0 0; line-height: 1.8; padding-top: 22px; border-top: 1px solid #edf1f5; }
.form-error { font-size: 12px; color: #a12c43; margin: 15px 0 0; }
@media(max-width:1200px) {
  .sidebar { width: 226px; padding: 26px 14px 22px; }.shell { margin-left: 226px; }
  .topbar { padding: 0 28px; }main { padding: 30px 28px; }
  .grid-main { grid-template-columns: 1fr; }.stack { grid-template-columns: 1fr 1fr; }
  .metric { padding: 18px; }.metric strong { font-size: 30px; }
  .login-form { padding: 32px; }.login-box { padding: 30px; }
}
@media(max-width:760px) {
  .sidebar { visibility: hidden; transform: translateX(-100%); width: 260px; padding-top: 24px; box-shadow: 10px 0 40px #11223820; }
  .sidebar.open { visibility: visible; transform: translateX(0); }.sidebar>.brand { width: 144px; margin-left: 14px; }
  .sidebar-label { text-align: left; margin-left: 14px; }.shell { margin-left: 0; }
  .mobile-only { display: block; }#menu-close { position: absolute; right: 6px; top: 14px; color: #c9e3ef; }
  .nav-open { overflow: hidden; }.topbar { min-height: 74px; padding: 0 12px; gap: 9px; }
  .topbar-right { gap: 0; }.user-name { display: none; }.store-context strong { font-size: 12px; }
  .environment { font-size: 9px; padding: 3px 7px; }.store-caption { font-size: 8px; }
  main { padding: 24px 16px; }.page-heading { display: block; }.page-heading h1 { font-size: 27px; }
  .refresh-controls { max-width: none; justify-content: flex-start; margin-top: 18px; gap: 12px; }
  .updated-at { text-align: left; }.metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .metric { padding: 16px; }.metric-label { font-size: 11px; }.metric strong { font-size: 29px; margin-bottom: 10px; }
  .stack { grid-template-columns: 1fr; }.panel-head,.panel-body { padding: 18px; }
  .page-footer { flex-direction: column; gap: 6px; }.filters { padding: 16px; gap: 12px; }
  .field { flex: 1; min-width: 120px; }.field:first-child { flex-basis: 100%; }
  .pagination { flex-wrap: wrap; }.data-line { gap: 12px; font-size: 12px; }.data-line strong { font-size: 12px; }
  .login-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }.login-brand { padding: 24px; }
  .login-brand>.brand { width: 142px; }.login-brand .brand-caption { font-size: 8px; letter-spacing: 1px; margin-top: 10px; }
  .login-message,.login-brand>small,.login-brand:after { display: none; }.login-form { padding: 28px 20px; }
  .login-box { padding: 26px; max-width: 400px; }.login-emblem { margin-bottom: 22px; }
}
@media(prefers-reduced-motion:reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Equal space for cycle summaries; keep dates readable inside the scroll area. */
.cycle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cycle-history td:first-child { min-width: 150px; white-space: nowrap; }
.cycle-history table { min-width: 440px; }
@media (max-width: 1100px) { .cycle-grid { grid-template-columns: 1fr; } }
