@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/plus-jakarta-sans-400.ttf) format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/plus-jakarta-sans-500.ttf) format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/plus-jakarta-sans-600.ttf) format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/plus-jakarta-sans-700.ttf) format('truetype');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/plus-jakarta-sans-800.ttf) format('truetype');
}

:root {
  font-size: 93.75%;
  color-scheme: light;
  --canvas: #f7f7f2;
  --surface: #ffffff;
  --surface-soft: #f2f4ed;
  --ink: #0e2820;
  --ink-soft: #536159;
  --muted: #626f65;
  --line: #e3e8df;
  --forest: #0e2820;
  --forest-2: #28483a;
  --lime: #d8f486;
  --lime-dark: #9dbb5d;
  --red: #b6494e;
  --red-soft: #fbebea;
  --amber: #a66b22;
  --amber-soft: #fbf3e3;
  --green: #46724a;
  --green-soft: #e9f2dc;
  --shadow: 0 10px 30px rgba(29, 50, 40, .055);
  font-family: 'Plus Jakarta Sans', Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { font-size: 1rem; line-height: 1.55; margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.boot-screen { display: grid; place-items: center; align-content: center; gap: 14px; min-height: 100vh; color: var(--ink-soft); font-size: 1.125rem; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--lime); color: var(--forest); font: 800 1.625rem/1 'Plus Jakarta Sans', sans-serif; }
.boot-logo { display: block; width: min(150px, 60vw); height: auto; }

.admin-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: 280px; padding: 24px 15px 18px; overflow: hidden; background: var(--forest); color: #f7f8f1; }
.brand { flex: none; display: flex; align-items: center; gap: 11px; padding: 3px 12px 26px; }
.brand-logo { display: block; width: 96px; height: 48px; flex: none; padding: 5px 6px; border-radius: 9px; background: #fff; object-fit: contain; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font: 800 1.125rem/1.1 'Plus Jakarta Sans', sans-serif; letter-spacing: .11em; }
.brand-copy span { color: #aebbb0; font-size: 0.875rem; letter-spacing: .16em; }
.brand-admin-tag { display: inline-flex; align-items: center; padding: 5px 7px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; color: #d8f486; font-size: 0.875rem; font-weight: 700; letter-spacing: .13em; }
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #6d8375 transparent; }
.nav-group { margin-top: 18px; }
.nav-heading { padding: 0 12px 7px; color: #b4c5b9; font-size: 0.875rem; font-weight: 700; letter-spacing: .16em; }
.nav-link { line-height: 1.4; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; margin: 2px 0; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: #c5cfc8; text-align: left; font-size: 1rem; transition: background .16s ease, color .16s ease; }
.nav-link:hover { background: rgba(255,255,255,.07); color: white; }
.nav-link.active { background: #d8f486; color: #20372d; font-weight: 700; }
.nav-icon { display: grid; width: 16px; place-items: center; color: inherit; opacity: .9; }
.sidebar-bottom { flex: none; display: grid; gap: 13px; margin-top: auto; padding: 16px 9px 0; }
.sidebar-footnote { padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; color: #b8c5bc; font-size: 0.875rem; line-height: 1.55; }
.sidebar-footnote strong { display: block; margin-bottom: 3px; color: #eef3ec; font-size: 1rem; }
.profile-mini { display: flex; align-items: center; gap: 9px; padding: 9px 7px 0; border-top: 1px solid rgba(255,255,255,.12); }
.avatar { display: grid; flex: none; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #e9f2dc; color: var(--forest); font-size: 1rem; font-weight: 700; }
.profile-text { min-width: 0; flex: 1; }
.profile-text strong, .profile-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-text strong { font-size: 1rem; }
.profile-text span { margin-top: 3px; color: #aab8ae; font-size: 0.875rem; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.sidebar .icon-button { border-color: transparent; background: transparent; color: #c5cfc8; }

.main { min-height: 100vh; margin-left: 280px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 80px; padding: 0 34px; border-bottom: 1px solid rgba(28,51,42,.07); background: rgba(247,247,242,.92); backdrop-filter: blur(14px); }
.crumbs { color: var(--muted); font-size: 1rem; }
.crumbs strong { color: var(--ink); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.env-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-size: 0.875rem; }
.env-dot { width: 7px; height: 7px; border-radius: 50%; background: #69a36d; }
.mobile-menu { display: none; }
.page { width: min(1460px, 100%); margin: 0 auto; padding: 33px 34px 56px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.eyebrow { margin-bottom: 8px; color: #70836e; font-size: 0.875rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font: 700 clamp(1.75rem, 3vw, 2.25rem)/1.2 'Plus Jakarta Sans', sans-serif; letter-spacing: -.045em; }
.page-heading p { margin-bottom: 0; color: var(--ink-soft); font-size: 1rem; }
.heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 1rem; font-weight: 600; transition: transform .14s ease, box-shadow .14s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(28,51,42,.09); }
.btn-primary { border-color: var(--forest); background: var(--forest); color: #fff; }
.btn-lime { border-color: var(--lime); background: var(--lime); color: var(--forest); }
.btn-danger { border-color: #efcfcc; background: var(--red-soft); color: var(--red); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-soft); }
.btn:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.select, .input { min-height: 46px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: none; background: white; color: var(--ink); font-size: 1rem; }
.input::placeholder { color: #9aa49b; }
.select:focus, .input:focus { border-color: #9dbb5d; box-shadow: 0 0 0 3px rgba(157,187,93,.16); }
.field { display: grid; gap: 6px; color: var(--ink-soft); font-size: 0.875rem; font-weight: 600; }
.field input, .field select { width: 100%; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters .input { width: min(280px, 100%); }

.grid { display: grid; gap: 20px; }
.metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 15px; }
.metric-card, .card { border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
.metric-card { position: relative; min-height: 150px; padding: 22px; overflow: hidden; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--ink-soft); font-size: 0.875rem; font-weight: 600; }
.metric-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; background: var(--surface-soft); color: var(--forest-2); }
.metric-value { margin-top: 12px; font: 700 2rem/1.15 'Plus Jakarta Sans', sans-serif; letter-spacing: -.045em; }
.metric-foot { margin-top: 6px; color: var(--muted); font-size: 0.875rem; }
.metric-unavailable { color: #9a8c78; font-size: 0.9375rem; font-weight: 600; }
.two-col { grid-template-columns: minmax(0, 1.55fr) minmax(260px, .85fr); align-items: start; }
.card { padding: 24px; min-width: 0; }
.card + .card { margin-top: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.card-title { margin: 0; font: 700 1.125rem/1.3 'Plus Jakarta Sans', sans-serif; }
.card-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 0.875rem; }
.card-action { color: var(--forest-2); font-size: 0.875rem; font-weight: 700; }
.chart-wrap { min-height: 210px; }
.chart-bars { display: flex; align-items: flex-end; gap: 7px; height: 170px; padding: 11px 2px 0; border-bottom: 1px solid var(--line); }
.chart-bar-col { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 7px; min-width: 0; }
.chart-bar { width: min(22px, 72%); min-height: 3px; border-radius: 5px 5px 2px 2px; background: #b9ce8e; transition: height .25s ease; }
.chart-bar-col:nth-child(3n) .chart-bar { background: #0e2820; }
.chart-label { color: #8b968e; font-size: 0.875rem; white-space: nowrap; }
.chart-value { color: var(--ink-soft); font-size: 0.875rem; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 12px; color: var(--ink-soft); font-size: 0.875rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 3px; background: var(--forest); }
.legend span + span i { background: #b9ce8e; }
.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #eff1ec; }
.activity-item:last-child { border-bottom: 0; }
.activity-symbol { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 1rem; }
.activity-copy strong { display: block; overflow: hidden; font-size: 0.875rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.875rem; }
.activity-time { color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 4px 8px; border-radius: 999px; background: var(--surface-soft); color: var(--ink-soft); font-size: 0.875rem; font-weight: 700; white-space: nowrap; }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-gray { background: #eff1ed; color: #69756c; }
.table-card { padding: 0; overflow: hidden; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 16px 18px; border-bottom: 1px solid var(--line); background: #fafbf8; color: #626f65; font-size: 0.875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
td { padding: 18px; border-bottom: 1px solid #eef0eb; color: #445249; font-size: 1rem; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfdf9; }
.table-primary { color: var(--ink); font-weight: 700; }
.table-secondary { display: block; margin-top: 3px; color: var(--muted); font-size: 0.875rem; font-weight: 400; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.875rem; }
.table-link { color: var(--forest-2); font-weight: 700; }
.table-link:hover { text-decoration: underline; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.pagination-actions { display: flex; gap: 6px; }
.pagination .btn { min-height: 40px; padding: 0 12px; font-size: 0.875rem; }
.empty, .loading, .error-state { display: grid; min-height: 160px; place-items: center; align-content: center; gap: 8px; padding: 28px; color: var(--muted); text-align: center; font-size: 1rem; }
.empty-icon { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 2px; border-radius: 12px; background: var(--surface-soft); color: #728853; font-size: 1rem; }
.empty strong { color: var(--ink); font-size: 1rem; }
.error-state { color: var(--red); }
.error-state strong { color: #8e3036; }
.skeleton { position: relative; min-height: 100px; overflow: hidden; border-radius: 11px; background: #ecefe7; }
.skeleton::after { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); content: ''; transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.status-card { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.status-light { width: 9px; height: 9px; flex: none; border-radius: 50%; background: #68a36d; box-shadow: 0 0 0 4px #e9f2dc; }
.status-light.warning { background: #cf943f; box-shadow: 0 0 0 4px #fbf3e3; }
.status-light.offline { background: #9ba29b; box-shadow: 0 0 0 4px #eff1ed; }
.status-card strong { display: block; font-size: 1rem; }
.status-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.875rem; }
.detail-grid { grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); align-items: start; }
.kv-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.kv { padding: 11px 0; border-bottom: 1px solid #eff1ec; }
.kv span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.875rem; }
.kv strong { overflow-wrap: anywhere; font-size: 0.875rem; font-weight: 600; }
.metric-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-stat { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mini-stat span { display: block; color: var(--muted); font-size: 0.875rem; }
.mini-stat strong { display: block; margin-top: 8px; font: 700 1.125rem/1 'Plus Jakarta Sans', sans-serif; }
.notice { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid #e5eadb; border-radius: 11px; background: #f4f7ed; color: var(--ink-soft); font-size: 0.875rem; line-height: 1.6; }
.notice strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 1rem; }
.notice-icon { color: #708941; font-size: 1.125rem; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-copy strong { display: block; font-size: 1rem; }
.toggle-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.toggle { position: relative; width: 43px; height: 25px; flex: none; border: 0; border-radius: 99px; background: #cfd6cc; transition: background .18s ease; }
.toggle::after { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; content: ''; box-shadow: 0 1px 3px rgba(0,0,0,.14); transition: transform .18s ease; }
.toggle.on { background: #758f4a; }
.toggle.on::after { transform: translateX(18px); }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: rgba(15,30,22,.45); backdrop-filter: blur(3px); }
.modal { width: min(480px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 22px 70px rgba(0,0,0,.2); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font: 700 1.0625rem 'Plus Jakarta Sans', sans-serif; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 0.875rem; }
.form-stack { display: grid; gap: 13px; }
.permission-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; max-height: 190px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.check-row { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 0.875rem; }
.check-row input { accent-color: var(--forest-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { max-width: min(390px, calc(100vw - 40px)); padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--forest); color: white; box-shadow: var(--shadow); font-size: 1rem; animation: toast-in .18s ease-out; }
.toast.error { border-color: #ebbab7; background: #8e3036; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } }

.login-page { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); background: var(--canvas); }
.login-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 36px 48px; overflow: hidden; background: var(--forest); color: white; }
.login-brand-panel::before, .login-brand-panel::after { position: absolute; width: 350px; height: 350px; border: 1px solid rgba(216,244,134,.15); border-radius: 50%; content: ''; }
.login-brand-panel::before { right: -100px; bottom: -95px; box-shadow: 0 0 0 38px rgba(216,244,134,.035), 0 0 0 78px rgba(216,244,134,.025); }
.login-brand-panel::after { right: 60px; bottom: 140px; width: 120px; height: 120px; border-color: rgba(216,244,134,.3); background: radial-gradient(circle, rgba(216,244,134,.24), transparent 68%); }
.login-brand-panel .brand { position: relative; z-index: 2; padding: 0; }
.login-brand-panel .brand-admin-tag { color: #d8f486; }
.login-hero-copy { position: relative; z-index: 2; max-width: 470px; margin: auto 0; padding: 70px 0; }
.login-hero-copy .eyebrow { color: var(--lime); }
.login-hero-copy h1 { max-width: 440px; margin: 0 0 18px; font-size: clamp(35px, 5vw, 56px); letter-spacing: -.06em; }
.login-hero-copy p { max-width: 370px; color: #bac8be; font-size: 1.125rem; line-height: 1.7; }
.login-foot { position: relative; z-index: 2; color: #91a397; font-size: 0.875rem; }
.login-form-panel { display: grid; place-items: center; padding: 32px; }
.login-form { width: min(365px, 100%); }
.login-logo { display: block; width: min(154px, 60vw); height: auto; margin-bottom: 26px; }
.login-form h2 { margin: 0 0 7px; font: 700 1.5rem 'Plus Jakarta Sans', sans-serif; letter-spacing: -.04em; }
.login-form > p { margin-bottom: 24px; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.login-form .field { margin-bottom: 13px; }
.login-form .input { min-height: 48px; font-size: 1rem; }
.login-form .btn { width: 100%; min-height: 48px; margin-top: 5px; }
.login-error { min-height: 18px; margin: 0 0 8px; color: var(--red); font-size: 0.875rem; }
.login-security { display: flex; justify-content: center; gap: 6px; margin-top: 16px; color: #8a968d; font-size: 0.875rem; }

.plan-notice { margin-bottom: 14px; }
.plan-form { display: grid; gap: 14px; }
.plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.message-limit-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.message-limit-plan { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); min-width: 0; }
.message-limit-plan .field { font-weight: 700; }
.message-limit-plan h3 { margin: 0 0 18px; font-size: 1.05rem; font-weight: 800; }
.message-limit-plan .field + .field { margin-top: 18px; }
.message-limit-protection { max-width: 360px; margin-top: 22px; }
@media (max-width: 1100px) { .message-limit-plans { grid-template-columns: 1fr; } }
.plan-card .card-head { margin-bottom: 17px; }
.plan-cycles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan-cycle { margin-bottom: 14px; display: grid; align-content: start; gap: 12px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fcfdf9; }
.plan-cycle-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; color: var(--ink); font-size: 0.875rem; }
.plan-cycle .field { min-width: 0; }
.plan-cycle .input { min-width: 0; }
.plan-cycle .input:disabled { background: #f4f5f1; color: var(--ink-soft); opacity: 1; }
.plan-hint { min-height: 28px; color: var(--muted); font-size: 0.875rem; line-height: 1.5; overflow-wrap: anywhere; }
.plan-hint code { color: var(--forest-2); }
.plan-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 20px; }

@media (max-width: 1080px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page { padding-inline: 25px; }
  .topbar { padding-inline: 25px; }
}
@media (max-width: 900px) {
  .sidebar { width: 280px; transform: translateX(-101%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(0,0,0,.16); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { min-height: 60px; padding-inline: 15px; }
  .mobile-menu { display: grid; }
  .crumbs { margin-right: auto; margin-left: 11px; }
  .env-badge { display: none; }
  .page { padding: 24px 15px 40px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 19px; }
  .heading-actions { width: 100%; }
  .two-col, .detail-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr; }
  .plan-cycles { grid-template-columns: 1fr; }
  .pagination { gap: 12px; flex-wrap: wrap; }
  .card { padding: 20px; }
  .table-card { padding: 0; }
  .login-page { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; padding: 25px; }
  .metric-card { min-height: 130px; padding: 18px; }
  .metric-value { font-size: 1.75rem; }
}
@media (max-width: 420px) {
  .metrics-grid { gap: 9px; }
  .metric-top { font-size: 0.875rem; }
  .metric-icon { width: 25px; height: 25px; }
  .status-grid { grid-template-columns: 1fr; }
  .kv-list { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: 1fr; }
  .filters .input { width: 100%; }
  .permission-list { grid-template-columns: 1fr; }
  .plan-cycles { grid-template-columns: 1fr; }
}

/* Clear keyboard focus and room for larger labels. */
:focus-visible { outline: 3px solid var(--lime-dark); outline-offset: 3px; }
.card-subtitle, .plan-hint, .page-heading p { line-height: 1.65; }
.card-head, .plan-cycle-head { flex-wrap: wrap; }
.field { gap: 8px; }
.select, .input { min-width: 0; max-width: 100%; }
table { min-width: 860px; }
.table-link.mono, .table-primary, .table-secondary { white-space: nowrap; }
@media (max-width: 420px) { .metrics-grid { grid-template-columns: 1fr; } .page { padding-inline: 16px; } }

.visibility-input { display:flex; align-items:center; gap:8px; min-width:0; }
.visibility-input .input { flex:1; min-width:0; }
.visibility-button { flex:none; min-width:78px; font-size:.875rem; }

/* Mony operations design system */
:root { --forest: #0e2820; --forest-2: #244c3a; --lime: #d1f75b; --canvas: #f3f5f4; --surface-soft: #eef3ef; --line: #e1e8e4; --shadow: 0 4px 20px rgba(14,40,32,.045); }
.sidebar { background: linear-gradient(165deg, #153b2e 0%, #0e2820 55%); border-right: 1px solid #244638; }
.mony-wordmark { color: white; font-size: 36px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.mony-wordmark > span { color: var(--lime); }
.brand-admin-tag { color: var(--lime); font-size: 10px; letter-spacing: .12em; border-radius: 6px; }
.nav-heading { font-size: 10px; color: #8da99b; }
.nav-link { font-size: 13px; min-height: 42px; border-radius: 10px; }
.nav-link.active { background: var(--lime); color: var(--forest); box-shadow: 0 3px 12px #0002; }
.topbar { background: #ffffffeb; min-height: 72px; }
.mobile-brand, .mobile-refresh, .bottom-nav { display: none; }
.page { padding-top: 30px; }
.eyebrow { font-size: 10px; letter-spacing: .14em; }
h1 { font-size: clamp(25px, 2.4vw, 34px); }
.metric-card { min-height: 156px; border-radius: 16px; padding: 20px; }
.metric-top { font-size: 12px; gap: 6px; }
.metric-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: #edf4e5; font-size: 18px; }
.metric-card:nth-child(3n+2) .metric-icon { background: #eaf0fa; color: #4d6d9b; }
.metric-value { font-size: clamp(22px, 2.2vw, 32px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-foot { font-size: 11px; line-height: 1.6; }
.metric-warning { border-color: #ebd8a8; background: #fffcf4; }
.metric-warning .metric-icon { background: #fbefcf; color: #9c6c18; }
.metric-warning .metric-value { color: #9c6c18; }
.metric-danger .metric-icon { background: var(--red-soft); color: var(--red); }
.card { border-radius: 16px; }
.card-title { font-size: 15px; }
.card-subtitle, .card-action { font-size: 12px; }
.sync-bar { display: flex; gap: 12px; align-items: center; padding: 16px 20px; margin: 20px 0; border: 1px solid #d9e5d9; background: #ebf2e8; border-radius: 12px; }
.sync-bar strong, .sync-bar div > span { display: block; }
.sync-bar strong { font-size: 12px; }
.sync-bar div > span { font-size: 11px; color: var(--ink-soft); margin-top: 3px; }
.sync-symbol { font-size: 23px; color: #608348; }
.sync-badge { flex: none; margin-left: auto; display: inline-flex; gap: 6px; align-items: center; padding: 5px 9px; background: white; border-radius: 20px; font-size: 10px; font-weight: 700; }
.sync-badge i { width: 6px; height: 6px; background: #5d913d; border-radius: 50%; }
.sync-bar.pending { background: #fff8e9; border-color: #ecdcb8; }
.pending .sync-badge i { background: #bd8726; }
.quick-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.quick-links a { display: flex; gap: 16px; padding: 9px 14px; background: white; border: 1px solid var(--line); border-radius: 24px; font-size: 12px; font-weight: 600; }
.quick-links a:hover { border-color: #a2bd8a; }
.chart-bars { height: 200px; gap: 8px; padding-top: 35px; }
.chart-bar-col { position: relative; border: 0; padding: 0; background: transparent; font: inherit; cursor: pointer; }
.bar-pair { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 120px; width: 100%; }
.chart-bar, .chart-bar-col:nth-child(3n) .chart-bar { display: block; width: min(20px, 36%); min-height: 0; background: var(--forest); border-radius: 5px 5px 0 0; }
.chart-bar.secondary, .chart-bar-col:nth-child(3n) .chart-bar.secondary { background: #b2ce89; }
.today .chart-bar, .today:nth-child(3n) .chart-bar { background: var(--lime); }
.today .chart-label { color: var(--forest); font-weight: 800; }
.chart-label { font-size: 10px; }
.chart-tooltip { position: absolute; top: -23px; left: 50%; transform: translateX(-50%); padding: 5px 8px; border-radius: 6px; background: var(--forest); color: white; font-size: 10px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.chart-bar-col:hover .chart-tooltip, .chart-bar-col:focus-visible .chart-tooltip { opacity: 1; }
.legend { font-size: 11px; }
.activity-item { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; font: inherit; padding: 14px 0; }
.activity-item:hover { background: #fafbf9; }
.activity-symbol { border-radius: 50%; width: 30px; height: 30px; }
.activity-copy strong { font-size: 12px; }
.activity-copy .incident-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.incident-tags .pill { font-size: 9px; padding: 3px 7px; }
.activity-time { display: block; font-size: 10px; margin-top: 6px; }
.incident-arrow { color: #83968b; }
.incident-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }
.incident-footer .btn { font-size: 11px; }
.incident-footer > span { font-size: 9px; color: var(--muted); }
.incident-notice { margin-top: 18px; }
.sheet-links { display: grid; gap: 8px; }
.sheet-links a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px; background: var(--surface-soft); border-radius: 10px; }
.sheet-links a span:last-child { margin-left: auto; }
@media (max-width: 900px) {
  .mobile-menu, .crumbs { display: none; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; }
  .mobile-brand .mony-wordmark { font-size: 29px; color: var(--forest); }
  .mobile-brand .brand-admin-tag { color: var(--forest); border-color: var(--line); background: #eff5e9; }
  .mobile-refresh { display: grid; width: 44px; height: 44px; }
  .topbar { min-height: 68px; }
  .page { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .bottom-nav { display: flex; justify-content: space-around; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: #fffffff5; border-top: 1px solid var(--line); backdrop-filter: blur(16px); }
  .bottom-link { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 50px; flex: 1; border: 0; border-radius: 10px; background: transparent; color: #6c7e73; font-size: 10px; }
  .bottom-link > span { font-size: 21px; line-height: 1.2; }
  .bottom-link.active { background: #eff6dd; color: var(--forest); font-weight: 800; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-card { min-height: 142px; padding: 15px; }
  .metric-top { font-size: 10px; }
  .metric-icon { width: 27px; height: 27px; font-size: 15px; }
  .metric-value { font-size: 25px; }
  .metric-foot { font-size: 10px; }
  .sync-bar { padding: 12px; flex-wrap: wrap; }
  .sync-bar > div { flex: 1; min-width: 170px; }
  .sync-badge { margin-left: 33px; }
  .page-heading .heading-actions:has([data-action="refresh"]) { display: none; }
  .chart-bars { gap: 4px; }
  .card-head { gap: 8px; }
  .activity-list { gap: 8px; }
  .activity-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 85dvh; border-radius: 22px 22px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .toast-region { bottom: calc(88px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.profile-button { border: 0; width: 44px; height: 44px; }

@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/assets/material-symbols-rounded.ttf) format('truetype');
}

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
}

.material-symbols-rounded { display: inline-block; flex-shrink: 0; font-family: 'Material Symbols Rounded'; font-weight: 400; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; vertical-align: middle; }
.nav-icon { width: 20px; }
.metric-icon .material-symbols-rounded { font-size: 21px; }
.empty-icon .material-symbols-rounded { font-size: 24px; }
.btn .material-symbols-rounded, .card-action .material-symbols-rounded, .table-link .material-symbols-rounded, .quick-links .material-symbols-rounded { font-size: 18px; }
.bottom-link > span .material-symbols-rounded { font-size: 23px; }
@media (max-width: 900px) { .metric-icon .material-symbols-rounded { font-size: 18px; } }

.connection-card { align-items: flex-start; }
.connection-symbol { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; }
.connection-gray { color: #657b70; background: #eef3ef; }
.connection-green { color: var(--green); background: var(--green-soft); }
.connection-red { color: var(--red); background: var(--red-soft); }
.connection-card .pill { display: inline-flex; margin-top: 7px; font-size: 10px; }
.connection-card div > span:last-child { font-size: 12px; line-height: 1.6; }

.nav-group > .nav-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:44px; margin:0; padding:10px 8px; border:0; border-radius:6px; background:transparent; text-align:left; cursor:pointer; }
.nav-group > .nav-heading:hover { background:rgba(255,255,255,.05); }
.nav-group > .nav-heading:focus { outline:none; box-shadow:none; }
.nav-group > .nav-heading:focus-visible { outline:2px solid #d8f486; outline-offset:2px; }
.nav-items[hidden] { display:none; }
.nav-chevron { display:flex; flex:none; transition:transform .18s ease; }
.nav-chevron .material-symbols-rounded { font-size:20px; }
.nav-group.expanded .nav-chevron { transform:rotate(180deg); }

.global-search { display:flex; align-items:center; gap:10px; width:min(440px,50%); padding:10px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-soft); color:var(--muted); cursor:pointer; text-align:left; font:inherit; }
.global-search kbd { margin-left:auto; font-size:11px; border:1px solid var(--line); border-radius:4px; padding:2px 5px; }
.service-button { cursor:pointer; border:1px solid var(--line); background:var(--surface-soft); }
.service-button .material-symbols-rounded { font-size:19px; }
.profile-menu { display:grid; gap:12px; }
.profile-menu > .pill { justify-self:start; }
.logout-button { color:#b42318; border-color:#f0cbc6; }
.global-search-form { display:grid; gap:10px; margin-bottom:20px; }
@media(max-width:900px) { .global-search { width:44px; height:44px; padding:10px; border:0; background:transparent; } .global-search > span:not(.material-symbols-rounded), .global-search kbd { display:none; } .service-button { display:none; } .topbar { gap:10px; } .topbar-right { margin-left:auto; } }

.nav-items { overflow:hidden; }
.nav-chevron { transition:transform .56s cubic-bezier(.34,1.15,.64,1); }
@media (prefers-reduced-motion:reduce) { .nav-chevron { transition:none; } }

.nav-group > .nav-heading { font-weight:800; font-size:calc(10px + 1pt); }

.nav-heading-label { display:flex; align-items:center; gap:8px; min-width:0; }
.nav-heading-icon { display:flex; flex:none; }
.nav-heading-icon .material-symbols-rounded { font-size:18px; }

.nav-group .nav-items { padding-left:12px; }
.nav-group > .nav-heading { color:#edf3ef; }

.sidebar-nav > .nav-link[data-route="overview"]:not(.active) { color:#edf3ef; }

.overview-updated { font-size:12px; color:var(--muted); }
.overview-primary .metric-card { min-height:145px; }
.overview-primary .metric-card:last-child .metric-value { color:#326648; }
.overview-primary.has-failures .metric-card:last-child .metric-value { color:#a84a24; }
.overview-today { display:grid; grid-template-columns:1.1fr repeat(4,1fr); align-items:center; gap:16px; padding:20px 24px; margin-bottom:18px; }
.overview-today > div { display:grid; gap:5px; }
.overview-today strong { font-size:22px; font-variant-numeric:tabular-nums; }
.overview-today span { font-size:12px; color:var(--muted); }
.overview-today-label strong { font-size:15px; }
.overview-attention { display:grid; gap:10px; margin-bottom:16px; }
.overview-alert { display:flex; align-items:center; gap:14px; padding:16px 20px; background:#fffaf0; border:1px solid #e9dfc4; border-radius:12px; }
.overview-alert.warning { background:#fff5f2; border-color:#efd6cd; }
.overview-alert > .material-symbols-rounded { color:#9c6c18; flex:none; }
.overview-alert > div { display:grid; gap:5px; flex:1; }
.overview-alert strong { font-size:14px; }
.overview-alert span:not(.material-symbols-rounded) { font-size:12px; color:var(--muted); }
.overview-clear { display:flex; align-items:center; gap:10px; padding:12px 0; color:#326648; font-size:13px; }
.overview-business { display:flex; align-items:center; gap:24px; flex-wrap:wrap; padding:8px 0 16px; color:var(--muted); font-size:13px; }
.overview-business strong { color:var(--forest); }
.overview-business > a { margin-left:auto; }
@media(max-width:900px) { .overview-today { grid-template-columns:repeat(2,minmax(0,1fr)); padding:18px; } .overview-today-label { grid-column:1/-1; } .overview-alert { flex-wrap:wrap; padding:15px; } .overview-alert .card-action { margin-left:38px; } .overview-updated { display:none; } .overview-business { gap:12px; } }
