:root {
  color-scheme: light;
  --ink: #18211c;
  --ink-soft: #2d3a33;
  --muted: #59685f;
  --soft-muted: #68766e;
  --line: #deddd5;
  --line-strong: #cfd5cf;
  --surface: #fffefa;
  --canvas: #f3f1eb;
  --green: #2d7a52;
  --green-deep: #1f5d3d;
  --green-soft: #eaf3ed;
  --gold-soft: #fbf1d9;
  --danger: #a53e36;
  --danger-soft: #fcecea;
  --shadow-sm: 0 8px 22px rgba(28, 39, 33, .055);
  --shadow-md: 0 18px 46px rgba(28, 39, 33, .075);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
svg { display: block; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid rgba(45, 122, 82, .28);
  outline-offset: 3px;
}

.app-body { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 252px;
  flex-direction: column;
  padding: 24px 16px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 254, 250, .96);
  box-shadow: 6px 0 30px rgba(37, 48, 42, .025);
}
.brand {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid #ebe8df;
  border-radius: var(--radius-sm);
  text-align: center;
}
.brand-logo { display: block; width: 132px; max-width: 100%; height: auto; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 3px; }
.brand-copy small {
  color: var(--soft-muted);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.3;
  text-transform: uppercase;
}
.brand-copy strong { color: var(--ink-soft); font-size: .78rem; letter-spacing: -.01em; white-space: nowrap; }
nav { display: flex; flex-direction: column; gap: 5px; margin-top: 25px; }
nav a, .out {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
nav a::before {
  position: absolute;
  left: -16px;
  width: 3px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: transparent;
  content: "";
}
nav a:hover { background: #f1f4f0; color: var(--green-deep); transform: translateX(1px); }
nav a.on { background: var(--green-soft); color: var(--green-deep); }
nav a.on::before { background: var(--green); }
.nav-icon { width: 19px; height: 19px; flex: 0 0 auto; fill: currentColor; }
.sidebar-footer { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.environment-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #dce8df;
  border-radius: var(--radius-sm);
  background: #f7faf7;
  color: #446451;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .025em;
}
.environment-label i { width: 7px; height: 7px; border-radius: 50%; background: #36a368; box-shadow: 0 0 0 4px rgba(54, 163, 104, .11); }
.out { color: var(--soft-muted); }
.out:hover { background: #f4f2ed; color: var(--ink-soft); }

.app-main {
  width: calc(100% - 252px);
  min-height: 100vh;
  margin-left: 252px;
  padding: 46px clamp(24px, 4vw, 64px) 64px;
}
.content-shell { width: min(100%, 1440px); margin: 0 auto; }
h1, h2, h3 { color: var(--ink); font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; }
h1 { margin: 0 0 10px; font-size: clamp(2rem, 3vw, 2.5rem); letter-spacing: -.045em; line-height: 1.08; }
h2 { letter-spacing: -.03em; }
.lead { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.62; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow, .settings-kicker {
  margin: 0 0 8px;
  color: #4c6f5b;
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.page-chip, .period-badge {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid #d5e3da;
  border-radius: 999px;
  background: #f7faf7;
  color: #356349;
  font-size: .78rem;
  font-weight: 750;
  white-space: nowrap;
}
.page-chip i, .period-badge span { width: 7px; height: 7px; border-radius: 50%; background: #38a869; box-shadow: 0 0 0 4px rgba(56, 168, 105, .12); }
.page-chip.neutral { border-color: #e3dfd2; background: #faf8f2; color: #665f50; }
.page-chip.neutral i { background: #aa8133; box-shadow: 0 0 0 4px rgba(170, 129, 51, .12); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card, .stat { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.card { padding: 26px; }
.stat { padding: 24px; }
.stat.ok { border-color: #b9d7c4; background: linear-gradient(145deg, #fff 0%, #f7fbf8 100%); }
.stat.bad { border-color: #e5c0ba; background: linear-gradient(145deg, #fff 0%, #fff9f8 100%); }
.stat h2 { margin: 0 0 10px; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.label { margin: 0 0 6px; font-size: 1.18rem; font-weight: 750; }
.mono { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; word-break: break-all; }
.hint { color: var(--muted); font-size: .84rem; line-height: 1.55; }
.flash { margin: 0 0 22px; padding: 12px 15px; border: 1px solid #b9d7c4; border-radius: var(--radius-sm); background: var(--green-soft); color: var(--green-deep); font-size: .88rem; font-weight: 650; }
.err { min-height: 1px; color: var(--danger); font-size: .85rem; font-weight: 650; }
label { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: .88rem; font-weight: 650; }
input {
  width: 100%;
  min-height: 44px;
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fbfcfa;
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:hover { border-color: #b9c4bc; }
input:focus { border-color: #6cac86; background: #fff; box-shadow: 0 0 0 4px rgba(45, 122, 82, .1); outline: none; }
.mono-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; letter-spacing: -.01em; }
button {
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(24, 33, 28, .12);
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
button:hover { border-color: #2d3e34; background: #2d3e34; box-shadow: 0 7px 18px rgba(24, 33, 28, .16); transform: translateY(-1px); }
button:active { box-shadow: none; transform: translateY(0); }
button:disabled { cursor: wait; opacity: .62; transform: none; }
button.ghost { border-color: #d8ded9; background: #f1f4f1; color: var(--ink-soft); box-shadow: none; }
button.ghost:hover { border-color: #cbd4cd; background: #e8eee9; }
button.danger-ghost { border-color: #e4c3bf; background: #fff9f8; color: var(--danger); box-shadow: none; }
button.danger-ghost:hover { border-color: #d8aba5; background: var(--danger-soft); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.settings-card { max-width: 980px; padding: clamp(22px, 3vw, 34px); }
.settings-heading { max-width: 780px; }
.settings-heading h2 { margin: 0 0 8px; font-size: 1.48rem; }
.settings-heading p:last-child { margin: 0 0 22px; color: var(--muted); line-height: 1.58; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.delivery-status { display: flex; align-items: center; gap: 9px; margin: 0 0 24px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .85rem; font-weight: 700; }
.delivery-status span { margin: 0; }
.delivery-status.ready { border: 1px solid #b9d7c4; background: var(--green-soft); color: var(--green-deep); }
.delivery-status.pending { border: 1px solid #ead7a3; background: #fff8e8; color: #72591c; }
.config-status { max-width: none; }
.form-note { margin: 4px 0 0; padding: 14px 16px; border-left: 3px solid #bda164; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: #faf7ef; color: var(--muted); font-size: .83rem; line-height: 1.55; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; }

.operation-card { max-width: 1040px; padding: clamp(22px, 3vw, 34px); }
.operation-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 22px; }
.operation-panel { min-width: 0; }
.operation-aside { padding: 21px; border: 1px solid #e4e0d6; border-radius: var(--radius-md); background: #f8f6f0; }
.operation-aside h2 { margin: 0 0 14px; font-size: 1rem; }
.operation-aside ol { margin: 0; padding-left: 21px; }
.operation-aside li { margin: 0 0 12px; padding-left: 4px; color: var(--muted); font-size: .83rem; line-height: 1.5; }
.operation-aside li:last-child { margin-bottom: 0; }
.status-card { position: relative; overflow: hidden; margin: 0 0 18px; padding: 21px; border-radius: var(--radius-md); }
.status-card::after { position: absolute; inset: 0 0 0 auto; width: 4px; background: #d6ddd8; content: ""; }
.status-card.ok::after { background: #43a66d; }
.status-card.bad::after { background: #bd5b51; }
.status-card .label { display: flex; align-items: center; gap: 9px; }
.status-card .label::before { width: 9px; height: 9px; border-radius: 50%; background: #8b9690; content: ""; }
.status-card.ok .label::before { background: #35a168; box-shadow: 0 0 0 5px rgba(53, 161, 104, .11); }
.status-card.bad .label::before { background: #bd5b51; box-shadow: 0 0 0 5px rgba(189, 91, 81, .1); }
.status-card p:last-child { margin-bottom: 0; color: var(--muted); }
.pair-message { min-height: 20px; margin: 12px 0 0; color: var(--green-deep); font-size: .84rem; font-weight: 650; }
.qr { display: flex; width: min(100%, 310px); aspect-ratio: 1; align-items: center; justify-content: center; margin: 20px 0 0; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-sm); }
.qr[hidden] { display: none; }
.qr svg { width: 100%; height: 100%; }

.login-body {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 48px 28px 72px;
  background: radial-gradient(circle at 17% 20%, rgba(74, 116, 91, .07), transparent 28%), radial-gradient(circle at 82% 78%, rgba(170, 129, 51, .06), transparent 28%), var(--canvas);
}
.login-body::before, .login-body::after { position: fixed; width: 390px; height: 390px; border: 1px solid rgba(81, 102, 90, .14); border-radius: 50%; content: ""; pointer-events: none; }
.login-body::before { top: -220px; right: -115px; }
.login-body::after { bottom: -250px; left: -155px; width: 460px; height: 460px; }
.login-shell { position: relative; z-index: 1; display: grid; width: min(100%, 980px); grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); align-items: center; gap: clamp(44px, 7vw, 88px); }
.login-intro { padding: 12px 0; }
.login-logo { display: block; width: min(100%, 340px); height: auto; margin-bottom: 64px; }
.login-eyebrow, .login-kicker { margin: 0 0 14px; color: #4c6f5b; font-size: .72rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.login-intro h1 { max-width: 560px; margin: 0 0 20px; font-size: clamp(3.1rem, 5.2vw, 5rem); letter-spacing: -.065em; line-height: .9; }
.login-description { max-width: 520px; margin: 0; color: var(--muted); font-size: 1.03rem; line-height: 1.6; }
.login-product { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; color: #355c45; font-size: .78rem; font-weight: 750; }
.login-product::before { width: 22px; height: 1px; background: #8fae99; content: ""; }
.login { padding: 30px; border-color: #dcdad2; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow-md); }
.login-heading h2 { margin: 0 0 8px; font-size: 1.55rem; }
.login-heading > p:last-child { margin: 0 0 27px; color: var(--muted); }
.login label { color: var(--ink-soft); font-size: .88rem; font-weight: 650; }
.login input { min-height: 48px; margin-bottom: 16px; background: #fff; }
.login button { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: space-between; }
.login-flash { margin-bottom: 18px; }
.login-note { margin: 17px 0 0; color: var(--soft-muted); font-size: .75rem; text-align: center; }
.login-footer { position: fixed; bottom: 24px; left: 50%; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; transform: translateX(-50%); white-space: nowrap; }

.dashboard-toolbar { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; padding: 16px 18px; }
.toolbar-copy { display: flex; flex-direction: column; gap: 4px; margin-right: auto; }
.toolbar-copy strong { font-size: .9rem; }
.toolbar-copy span { color: var(--muted); font-size: .77rem; }
.period-links { display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-sm); background: #edf1ed; }
.period-link { min-width: 60px; padding: 8px 10px; border-radius: 7px; color: var(--muted); font-size: .78rem; font-weight: 750; text-align: center; }
.period-link:hover, .period-link.selected { background: #fff; color: var(--green-deep); box-shadow: 0 2px 7px rgba(36, 45, 40, .08); }
.custom-period { display: flex; align-items: center; gap: 7px; }
.custom-period label { margin: 0; color: var(--muted); font-size: .75rem; font-weight: 700; }
.custom-period input { width: 137px; min-height: 40px; margin: 0; padding: 8px 10px; font-size: .78rem; }
.custom-period button { min-height: 40px; padding: 9px 13px; font-size: .78rem; }
.dashboard-warning { margin: -6px 0 20px; padding: 11px 14px; border: 1px solid #ead7a3; border-radius: var(--radius-sm); background: #fff8e8; color: #72591c; font-size: .83rem; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric-card { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.metric-card:hover { border-color: #cbd3cc; box-shadow: 0 12px 30px rgba(36, 45, 40, .075); transform: translateY(-2px); }
.metric-card.metric-primary { border-color: #b8d7c3; background: linear-gradient(145deg, #fff 0%, #f2f8f4 100%); }
.metric-icon { display: grid; width: 34px; height: 34px; place-items: center; margin-bottom: 18px; border-radius: var(--radius-sm); background: #e5f3e9; color: #237347; }
.metric-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.metric-icon.mint { background: #e3f4ef; color: #217c69; }
.metric-icon.gold { background: var(--gold-soft); color: #8a641a; }
.metric-icon.coral { background: #fae9e5; color: #a64939; }
.metric-icon.blue { background: #e7eff8; color: #356b9e; }
.metric-icon.purple { background: #eee9f7; color: #69549a; }
.metric-card p { margin: 0 0 7px; color: var(--muted); font-size: .79rem; font-weight: 750; }
.metric-card > strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: clamp(1.72rem, 3vw, 2.2rem); letter-spacing: -.05em; line-height: 1; }
.metric-card > strong.metric-money { font-size: clamp(1.42rem, 2.4vw, 1.95rem); }
.metric-card > span { display: block; color: var(--soft-muted); font-size: .72rem; line-height: 1.4; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 20px; margin-bottom: 20px; }
.activity-card, .quick-summary, .daily-card { padding: 25px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: 1.22rem; }
.section-heading .eyebrow { margin-bottom: 7px; }
.legend { display: flex; align-items: center; gap: 6px; color: var(--soft-muted); font-size: .71rem; white-space: nowrap; }
.legend i { display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 3px; }
.legend i:first-child { margin-left: 0; }
.legend-people { background: #45a86e; }
.legend-payments { background: #d5a947; }
.bar-chart { display: flex; min-height: 202px; align-items: flex-end; gap: 8px; overflow-x: auto; padding: 4px 0 10px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 46px, rgba(101, 119, 108, .08) 47px); scrollbar-color: #c9d4cc transparent; scrollbar-width: thin; }
.bar-column { display: flex; min-width: 30px; height: 188px; flex: 1 0 30px; flex-direction: column; align-items: center; justify-content: flex-end; gap: 9px; }
.bars { display: flex; width: 100%; height: 155px; align-items: flex-end; justify-content: center; gap: 4px; border-bottom: 1px solid #dfe5df; }
.bar { position: relative; width: min(13px, 42%); min-height: 2px; border-radius: 5px 5px 2px 2px; transition: opacity .15s ease; }
.bar:hover { opacity: .78; }
.people-bar { background: linear-gradient(180deg, #68c18b, #359d62); }
.payment-bar { background: linear-gradient(180deg, #edc76f, #c89835); }
.bar span { position: absolute; right: 50%; bottom: calc(100% + 4px); color: var(--muted); font-size: .63rem; font-weight: 750; transform: translateX(50%); }
.bar-column small { color: var(--soft-muted); font-size: .65rem; }
.funnel-row { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; color: var(--muted); font-size: .82rem; }
.funnel-row strong { color: var(--ink); font-size: 1rem; }
.funnel-track { height: 8px; margin: 0 0 19px; overflow: hidden; border-radius: 999px; background: #e7ede8; }
.funnel-track span { display: block; height: 100%; border-radius: inherit; background: #4dad72; }
.funnel-track.payment-track span { background: #d8aa42; }
.funnel-track.agenda-track span { background: #806bb2; }
.funnel-note { margin: 26px 0 0; color: var(--soft-muted); font-size: .72rem; line-height: 1.5; }
.table-heading { align-items: center; margin-bottom: 16px; }
.table-note { color: var(--soft-muted); font-size: .72rem; }
.table-wrap { overflow-x: auto; border: 1px solid #ecece6; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .79rem; }
th { position: sticky; top: 0; padding: 11px 12px; background: #f7f7f3; color: var(--soft-muted); font-size: .67rem; font-weight: 800; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 12px; border-top: 1px solid #ecefe9; color: #4d5b53; white-space: nowrap; }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #fafbf8; }
th:not(:first-child), td:not(:first-child) { text-align: right; }
td:first-child { color: var(--ink-soft); }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #c7d0c9; vertical-align: middle; }
.status-dot.active { background: #d8a337; box-shadow: 0 0 0 3px rgba(216, 163, 55, .13); }
.dashboard-footnote { display: flex; align-items: flex-start; gap: 9px; margin: 18px 2px 0; color: var(--soft-muted); font-size: .74rem; line-height: 1.55; }
.footnote-mark { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; border: 1px solid #c5d2c9; border-radius: 50%; color: #4e6d59; font-size: .64rem; font-weight: 800; }

@media (max-width: 1080px) {
  .app-main { padding-inline: 30px; }
  .dashboard-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .toolbar-copy { flex: 1 1 100%; }
  .dashboard-columns, .operation-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: sticky; top: 0; display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; padding: 11px 14px 0; border-right: 0; border-bottom: 1px solid var(--line); box-shadow: 0 8px 24px rgba(32, 45, 37, .07); }
  .brand { min-height: 44px; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 0; border: 0; text-align: left; }
  .brand-logo { width: 112px; }
  .brand-copy { align-items: flex-start; }
  .brand-copy small { display: none; }
  .brand-copy strong { font-size: .72rem; }
  nav { grid-column: 1 / -1; flex-direction: row; gap: 5px; margin: 10px -14px 0; padding: 0 14px 9px; overflow-x: auto; scrollbar-color: #c9d4cc transparent; scrollbar-width: thin; }
  nav::-webkit-scrollbar { height: 3px; }
  nav::-webkit-scrollbar-thumb { border-radius: 999px; background: #c9d4cc; }
  nav a { min-width: max-content; min-height: 40px; padding: 8px 10px; font-size: .8rem; }
  nav a::before { display: none; }
  .nav-icon { width: 17px; height: 17px; }
  .sidebar-footer { grid-column: 2; grid-row: 1; align-self: center; margin: 0; }
  .environment-label { display: none; }
  .out { min-height: 40px; padding: 8px 10px; }
  .out span { display: none; }
  .app-main { width: 100%; margin-left: 0; padding: 28px 18px 46px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 13px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .metric-card { padding: 17px; }
  .metric-icon { margin-bottom: 14px; }
  .custom-period { width: 100%; flex-wrap: wrap; }
  .custom-period input { flex: 1 1 120px; width: auto; }
  .custom-period button { flex: 0 0 auto; }
  .period-links { flex: 1; justify-content: space-between; }
  .period-link { flex: 1; }
  .activity-card, .quick-summary, .daily-card { padding: 19px; }
  .section-heading { flex-direction: column; gap: 10px; }
  .table-heading { align-items: flex-start; }
  .table-note { white-space: normal; }
  .settings-grid { grid-template-columns: 1fr; gap: 0; }
  .login-body { overflow: auto; padding: 28px 20px 74px; }
  .login-shell { grid-template-columns: 1fr; gap: 30px; }
  .login-intro { padding: 0; text-align: center; }
  .login-logo { width: min(100%, 245px); margin: 0 auto 28px; }
  .login-intro h1 { max-width: none; font-size: clamp(2.55rem, 13vw, 3.65rem); }
  .login-description { margin: 0 auto; font-size: .95rem; }
  .login-product { justify-content: center; }
  .login { padding: 24px; }
}
@media (max-width: 480px) {
  .brand-copy { display: none; }
  .page-chip, .period-badge { white-space: normal; }
  .metric-grid { grid-template-columns: 1fr; }
  .dashboard-toolbar { padding: 14px; }
  .period-links { width: 100%; }
  .custom-period label { flex: 0 0 26px; }
  .custom-period input { flex: 1 1 calc(100% - 38px); }
  .custom-period button { width: 100%; }
  .operation-aside { padding: 18px; }
  .button-row, .form-actions { align-items: stretch; flex-direction: column; }
  .button-row button, .form-actions button { width: 100%; }
  .login-body::before, .login-body::after { opacity: .65; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
