:root {
  --ink: #1d2c29;
  --muted: #6f7e79;
  --line: #dfe7e3;
  --paper: #f3f6f4;
  --white: #ffffff;
  --forest: #1d5146;
  --forest-deep: #173831;
  --forest-soft: #e3f0eb;
  --lime: #f0c85c;
  --mint: #d9f1e6;
  --amber: #fff0cf;
  --blue: #e1edf8;
  --danger: #c6534a;
  --shadow: 0 12px 28px rgba(26, 52, 44, .06);
}

* { letter-spacing: 0; }
body { background: var(--paper); color: var(--ink); }
body { overflow-x: hidden; }

button, input, select, textarea { font-family: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(240, 200, 92, .55);
  outline-offset: 2px;
}

.sidebar {
  width: 232px;
  padding: 24px 16px 18px;
  background: var(--forest-deep);
  border-right: 1px solid rgba(255, 255, 255, .08);
}
.app-shell { grid-template-columns: 232px 1fr; }
.logo { padding: 0 8px 30px; }
.brand-mark { background: var(--lime); border-radius: 10px; box-shadow: none; }
.brand-mark.small { border-radius: 9px; }
.logo strong { font-size: 15px; }
.logo span { color: #9ab9ae; }
.sidebar nav { gap: 3px; }
.nav-item { border-radius: 7px; padding: 11px 12px; color: #a9c0b8; font-size: 12px; }
.nav-item:hover { background: rgba(255, 255, 255, .07); }
.nav-item.active { background: #f8fbf9; color: var(--forest-deep); box-shadow: none; }
.nav-icon { width: 26px; font-size: 16px; }
.security-chip { border-radius: 7px; background: rgba(255, 255, 255, .06); padding: 10px; }
.text-button { padding: 14px 10px 0; }

.content { padding: 30px 38px 54px; }
.topbar { margin-bottom: 24px; }
.eyebrow { color: #7b8b85; font-size: 9px; letter-spacing: 1.7px; }
.topbar h1 { font-size: 26px; letter-spacing: 0; }
.top-actions { gap: 8px; }
.clock { font-variant-numeric: tabular-nums; }
.primary, .secondary { border-radius: 7px; padding: 9px 13px; font-size: 12px; box-shadow: none; }
.primary { background: var(--forest); border-color: var(--forest); }
.primary:hover { background: #286457; transform: none; }
.secondary { border-color: var(--line); }
.secondary:hover { border-color: #aabdb5; background: #fbfdfc; }
.button-spark { color: var(--lime); }

.metrics { gap: 12px; margin-bottom: 12px; }
.metric-card { min-height: 142px; padding: 18px; border-radius: 8px; box-shadow: var(--shadow); }
.metric-card p { margin: 10px 0 4px; font-size: 11px; }
.metric-card strong { font-size: 29px; letter-spacing: 0; }
.metric-card.featured { background: var(--forest); }
.metric-card.featured strong { font-size: 38px; }
.metric-orbit { display: none; }
.metric-icon { width: 30px; height: 30px; border-radius: 7px; }
.metric-icon.mint { background: var(--mint); color: var(--forest); }
.metric-icon.amber { background: var(--amber); color: #8a691a; }
.metric-icon.blue { background: var(--blue); color: #486986; }

.panel, .mailbox-card, .manager-toolbar, .manager-table { border-radius: 8px; box-shadow: var(--shadow); }
.accounts-panel, .activity-panel { padding: 20px; }
.panel-head { margin-bottom: 13px; }
.panel-head h2, .section-toolbar h2 { font-size: 16px; }
.link-button, .icon-button { color: var(--forest); }
.account-row { grid-template-columns: 40px minmax(0, 1fr) 92px 92px minmax(170px, auto); gap: 11px; padding: 13px 3px; }
.avatar { width: 36px; height: 36px; border-radius: 8px; background: var(--forest-soft); color: var(--forest); }
.account-main strong { font-size: 12px; }
.account-main span { font-size: 10px; }
.badge { border-radius: 5px; padding: 4px 7px; font-size: 9px; }
.row-actions { gap: 5px; }
.mini-button { border-radius: 6px; padding: 6px 8px; font-size: 10px; }
.mini-button:hover { border-color: #9cafa4; }
.activity-item { padding: 9px 0 11px 20px; }
.activity-item strong { font-size: 11px; }
.activity-item p { font-size: 10px; }

.section-toolbar { margin: 5px 0 17px; }
.section-toolbar p { font-size: 11px; }
.mailbox-card { padding: 18px; }
.mailbox-head { padding-bottom: 13px; }
.mail-icon { width: 36px; height: 36px; border-radius: 8px; }
.mailbox-title strong { font-size: 13px; }
.mailbox-title span { font-size: 10px; }
.job-row { padding: 14px 18px; gap: 13px; font-size: 11px; }
.job-row.header { font-size: 9px; }
.job-log-button { font-size: 10px; }

.modal-backdrop { background: rgba(16, 38, 32, .58); backdrop-filter: blur(3px); }
.modal-card { width: min(540px, calc(100vw - 28px)); border-radius: 10px; padding: 24px; }
.modal-close { border-radius: 7px; }
.modal h2 { font-size: 20px; }
.modal .intro { font-size: 11px; margin-bottom: 19px; }
.form-grid { gap: 12px; }
.form-grid label { font-size: 10px; }
.form-grid input, .form-grid select, .form-grid textarea { border-radius: 7px; background: #fbfcfb; }
.settings-section { border-radius: 7px; }
.toast { border-radius: 7px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); }

.login-page { background: var(--forest-deep); }
.login-page:before, .ambient { display: none; }
.login-shell { grid-template-columns: minmax(360px, 1fr) 400px; gap: 8vw; max-width: 1080px; padding: 48px; }
.login-brand h1 { font-size: 48px; line-height: 1.12; letter-spacing: 0; margin: 18px 0; }
.login-brand h1 span { color: var(--lime); }
.login-copy { max-width: 480px; color: #b1c9c0; line-height: 1.75; font-size: 13px; }
.trust-row { gap: 20px; margin-top: 28px; color: #94b2a7; }
.trust-row span:before { color: var(--lime); }
.glass { background: #f8faf9; box-shadow: 0 24px 70px rgba(0, 0, 0, .22); }
.login-card { border-radius: 10px; padding: 31px; }
.login-card-head { color: var(--forest); }
.login-card h2 { font-size: 25px; margin: 26px 0 6px; }
.login-card>p { font-size: 11px; }
.login-card form { margin-top: 24px; }
.login-card label { font-size: 10px; }
.password-wrap input { border-radius: 7px; padding: 12px 56px 12px 12px; }
.reveal { border-radius: 5px; }
.wide { border-radius: 7px; margin-top: 9px; padding: 12px 14px; }
.login-note { font-size: 10px !important; }

.manager-metrics article { border-radius: 8px; box-shadow: none; }
.manager-toolbar { box-shadow: none; }
.redemption-state { border-radius: 4px; }
.export-button:not(:disabled) { color: var(--forest); border-color: #b9d8cc; background: #f2faf6; }
.mailbox-head > .row-actions { flex-wrap: wrap; justify-content: flex-end; }
.manager-row { grid-template-columns: minmax(220px, 1.35fr) 145px minmax(140px, 1fr) 170px 145px 90px 110px 70px; min-width: 1160px; }
.kick-state { display: inline-block; padding: 4px 7px; border-radius: 4px; font-size: 10px; }
.kick-state.not_kicked { background: #edf0ee; color: #647269; }
.kick-state.queued, .kick-state.kicking { background: #fff2c9; color: #8c6715; }
.kick-state.kicked { background: #def6e8; color: #26734c; }
.kick-state.failed { background: #ffe8e5; color: #a63f36; }
.manager-toolbar input[type="date"] { min-width: 145px; }

@media (max-width: 1100px) {
  .content { padding-inline: 26px; }
  .login-shell { gap: 5vw; }
}
@media (max-width: 760px) {
  .section-toolbar { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .section-toolbar > .row-actions { width: 100%; flex-wrap: wrap; }
  .mailbox-head { align-items: flex-start; flex-direction: column; }
  .mailbox-head > .row-actions { width: 100%; justify-content: flex-start; }
  .sidebar { width: auto; height: 68px; padding: 11px 14px; overflow: hidden; }
  .sidebar nav { min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: 0 0 42px; padding: 9px 7px; text-align: center; font-size: 0; }
  .nav-icon { width: auto; font-size: 19px; }
  .content { padding: 22px 14px 40px; }
  .topbar { margin-bottom: 20px; }
  .topbar h1 { font-size: 22px; }
  .account-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .row-actions { min-width: 0; }
  .login-shell { grid-template-columns: 1fr; padding: 22px; max-width: 500px; }
  .login-brand { display: none; }
}
@media (max-width: 450px) {
  .login-card { padding: 24px; }
  .top-actions { gap: 5px; }
}
