:root {
  --forest-950: #012d29;
  --forest-900: #083a35;
  --forest-800: #123f38;
  --forest-700: #1d5f54;
  --paper: #f0efe9;
  --paper-2: #ebe5dc;
  --ink: #1b2b29;
  --muted: #68756f;
  --line: rgba(19, 42, 38, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  font-family: Arial, "Segoe UI", sans-serif;
}

button, input {
  font: inherit;
}

#app {
  min-height: 100vh;
}

.auth {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  min-height: 100vh;
  background: var(--paper);
}

.auth-story {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 80px 42px 74px;
  background: linear-gradient(135deg, #022f2a 0%, #0a3d38 34%, #0e534b 100%);
}

.auth-story::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 14%, rgba(192, 232, 152, 0.12), transparent 20%);
}

.auth-story > * {
  position: relative;
  z-index: 1;
}

.auth-story .brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 182px;
  height: 58px;
  background: rgba(255,255,255,0.95);
  border-radius: 14px;
  box-shadow: 0 16px 32px rgba(0,0,0,0.12);
  text-decoration: none;
  margin-bottom: 54px;
  font-size: 0;
}

.auth-story .brand::before {
  content: "";
  display: block;
  width: 42px;
  height: 42px;
  margin-left: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d8ea4 0%, #0c2d3e 100%);
  clip-path: polygon(10% 0%, 100% 0%, 100% 100%, 10% 100%, 10% 62%, 32% 62%, 32% 38%, 10% 38%);
}

.auth-story .brand::after {
  content: "TZHUBS";
  position: absolute;
  font-size: 16px;
  letter-spacing: .2em;
  font-weight: 800;
  color: #112f36;
  transform: translateX(32px);
}

.auth-story .eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(214, 239, 175, 0.85);
  font-weight: 700;
}

.auth-story h1 {
  margin: 0;
  font-size: clamp(4rem, 6vw, 8rem);
  line-height: 0.85;
  letter-spacing: -0.08em;
  font-weight: 800;
  color: #f5f6f2;
}

.auth-story p {
  margin: 26px 0 0;
  max-width: 540px;
  font-size: 1.12rem;
  line-height: 1.5;
  color: rgba(244, 245, 240, 0.82);
}

.network-art {
  margin-top: 54px;
  width: min(100%, 620px);
  padding: 28px 22px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(10, 41, 37, 0.58), rgba(13, 55, 50, 0.18));
  border: 1px solid rgba(205, 232, 176, 0.18);
}

.network-art > span {
  display: block;
  margin-bottom: 18px;
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(214, 239, 175, 0.8);
}

.network-art b {
  display: block;
  text-align: center;
  font-size: 92px;
  line-height: 1;
  color: #d9efad;
  margin-bottom: 14px;
}

.network-art div {
  text-align: center;
  font-size: 17px;
  color: rgba(245, 247, 241, 0.9);
}

.auth-form {
  display: grid;
  place-items: center;
  padding: 42px 34px;
  background: linear-gradient(180deg, #f0eee8 0%, #ece6df 100%);
}

.auth-form > div {
  width: min(100%, 520px);
  padding: 36px 34px 30px;
  border-radius: 20px;
  background: rgba(255,255,255,0.54);
  box-shadow: 0 18px 42px rgba(18, 25, 23, 0.08);
  border: 1px solid rgba(27, 42, 38, 0.08);
}

.auth-form .eyebrow {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #4d796d;
  font-weight: 700;
}

.auth-form h2 {
  margin: 18px 0 12px;
  font-size: clamp(2.8rem, 3vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.08em;
  font-weight: 800;
  color: var(--ink);
}

.auth-form .muted {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1.02rem;
}

#auth-form {
  display: grid;
  gap: 18px;
}

#auth-form label {
  display: grid;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

#auth-form input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.6);
  color: var(--ink);
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#auth-form input::placeholder {
  color: #808d89;
}

#auth-form input:focus {
  outline: none;
  border-color: rgba(29, 101, 86, 0.58);
  box-shadow: 0 0 0 4px rgba(104, 187, 169, 0.12);
  transform: translateY(-1px);
}

.form-error {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
  color: #8c4139;
}

.primary {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #0e433a 0%, #123e37 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 14px 24px rgba(11, 58, 49, 0.22);
}

.primary:hover {
  transform: translateY(-1px);
}

.text-button {
  width: 100%;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
}

.hint {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(28, 46, 42, 0.08);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .auth {
    grid-template-columns: 1fr;
  }

  .auth-story {
    padding: 28px 22px 32px;
  }

  .auth-form {
    padding: 24px 18px 36px;
  }
}
/* Refined workspace and responsive sign-in */
.router-actions { display:flex; flex-wrap:wrap; gap:10px; margin:16px 0; }
.traffic-canvas { display:block; width:100%; height:180px; border-radius:10px; margin:18px 0; }
.traffic-values { display:flex; flex-wrap:wrap; gap:24px; margin:18px 0; font-size:13px; }
.traffic-values strong { display:block; font-size:22px; margin-top:8px; color:#236348; }
.danger-button { color:#922f2f; border:1px solid #e5b9b9; background:#fff4f4; box-shadow:none; }
.danger-button:hover { background:#fbe5e5; }
.setup-steps { display:flex; flex-wrap:wrap; gap:12px 28px; padding:16px 16px 16px 30px; font-size:12px; background:#edf3ee; border-radius:10px; }
#setup-script { font:12px/1.65 Consolas,monospace; white-space:pre; overflow:auto; min-height:240px; }
.setup-success { color:#205b3e; background:#eaf6ed; border-color:#b6d8bf; }
.hotspot-entry { display:grid; gap:8px; padding:16px 0; border-top:1px solid #e3e9e3; }
.hotspot-entry small { color:#657c6b; }
body { font-family: "Segoe UI", Arial, sans-serif; }
.primary { width: auto; height: auto; min-height: 42px; box-shadow: 0 4px 12px #123e3714; }
.auth { background: #f7f9f8; grid-template-columns: 1.1fr 1fr; }
.auth-story { padding: clamp(32px,5vw,80px); justify-content: space-between; background: radial-gradient(ellipse at 85% 70%,#16665b 0,transparent 55%),linear-gradient(145deg,#062e2b,#0c433d); }
.auth-story::before { background-image: linear-gradient(#ffffff04 1px,transparent 1px),linear-gradient(90deg,#ffffff04 1px,transparent 1px); background-size: 48px 48px; }
.auth-story .brand { margin-bottom: 48px; width: auto; height: auto; align-self: flex-start; background: transparent; box-shadow: none; font-size: 26px; color: white; gap: 10px; }
.auth-story .brand::before,.auth-story .brand::after { display: none; }
.auth-story h1 { font-size: clamp(38px,4.8vw,76px); line-height: 1.08; letter-spacing: -.055em; margin: 16px 0; }
.auth-story h1 em { font-style: normal; color: #c8eaa3; }
.auth-story p { font-size: 15px; line-height: 1.85; max-width: 470px; }
.auth-story > small { color: #b2ccc3; margin-top: 28px; }
.network-art { margin: 34px 0 12px; max-width: 480px; background: #ffffff06; border-color: #ffffff24; box-shadow: 0 20px 60px #001c2426; }
.network-art b { font-size: 68px; margin: 18px 0; }
.auth-features { display: flex; justify-content: space-around; gap: 8px; }
.auth-features span { font-size: 11px; background: #ffffff0a; border: 1px solid #ffffff14; border-radius: 20px; padding: 8px 12px; }
.auth-form { background: radial-gradient(ellipse at top right,#eaf1e5,transparent 65%),#f8faf8; padding: 48px 32px; }
.auth-form > div { max-width: 440px; padding: 36px; background: #ffffffd9; border: 1px solid #e5ebe6; border-radius: 24px; box-shadow: 0 24px 80px #163c3010; }
.auth-form h2 { font-size: 38px; letter-spacing: -1.5px; line-height: 1.15; }
.auth-form .muted { font-size: 14px; line-height: 1.7; }
#auth-form { gap: 12px; }
#auth-form label { margin: 5px 0; gap: 6px; font-size: 13px; }
#auth-form input { height: 50px; background: #fbfcfb; border-radius: 10px; font-size: 14px; margin-top: 4px; }
.auth-form .wide { width: 100%; min-height: 50px; font-size: 14px; }
.password-toggle { justify-self: end; background: transparent; color: #276658; font-size: 12px; padding: 4px; }
.auth-form .text-button { font-size: 13px; padding: 14px 10px; }
.auth-form .hint { background: transparent; border: 0; padding: 0; text-align: center; font-size: 11px; line-height: 1.8; }
button { transition: background-color .16s,box-shadow .16s,transform .16s; }
button:focus-visible,a:focus-visible { outline: 3px solid #77b8a5; outline-offset: 4px; }
button:disabled { opacity: .6; cursor: wait; }
.panel,.stats article { border-radius: 13px; box-shadow: 0 4px 18px #18301b04; }
.page-heading > .primary { flex-shrink: 0; }
@media(max-width:980px) { .auth { grid-template-columns: 1fr 1fr; }.auth-story { padding: 36px 26px; }.auth-form { padding: 32px 22px; }.auth-form > div { padding: 28px 22px; }.auth-story h1 { font-size: 42px; }.auth-features { flex-wrap: wrap; } }
@media(max-width:680px) { .auth { grid-template-columns: 1fr; }.auth-story { min-height: auto; padding: 28px; }.auth-story .brand { margin-bottom: 20px; }.auth-story > div { margin-top: 0; }.auth-story h1 { font-size: 36px; }.auth-story .eyebrow { font-size: 9px; letter-spacing: .15em; }.auth-story p,.network-art,.auth-story > small { display: none; }.auth-form { padding: 26px 18px 40px; }.auth-form > div { max-width: 440px; }.auth-form h2 { font-size: 32px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition: none !important; animation: none !important; } }

/* Light workspace theme */
:root {
  --ui-bg: #f6f8f7;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f1f6f3;
  --ui-border: #dfe9e4;
  --ui-text: #17352d;
  --ui-muted: #71817a;
  --ui-accent: #237a63;
  --ui-accent-soft: #dff2e8;
  --ui-lime: #cdeba4;
  --ui-shadow: 0 12px 32px rgba(27, 65, 51, .07);
}

body {
  background: var(--ui-bg);
  color: var(--ui-text);
}

.shell {
  background: var(--ui-bg);
}

.sidebar {
  width: 264px;
  background: rgba(255,255,255,.94);
  color: var(--ui-muted);
  border-right: 1px solid var(--ui-border);
  box-shadow: 8px 0 28px rgba(35, 78, 60, .04);
  padding: 28px 18px 0;
}

.sidebar .brand {
  color: var(--ui-text);
  padding: 0 12px;
}

.workspace {
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  margin: 28px 0 26px;
  padding: 11px 10px;
}

.workspace-icon {
  background: var(--ui-lime);
  color: var(--ui-text);
  border-radius: 10px;
}

.workspace strong { color: var(--ui-text); }
.workspace small { color: var(--ui-muted); }
.nav-label { color: #91a199; }

.nav-item {
  color: #5d746a;
  border-radius: 11px;
  padding: 12px 13px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav-item:hover {
  background: #eef7f2;
  color: var(--ui-text);
  transform: translateX(2px);
}

.nav-item.selected,
.nav-item.selected:hover {
  background: var(--ui-accent-soft);
  color: var(--ui-text);
  box-shadow: inset 3px 0 0 var(--ui-accent);
}

.nav-item small {
  background: #e4f0ea;
  color: var(--ui-accent);
}

.engine {
  background: #f7fbf8;
  border-color: var(--ui-border);
  border-radius: 14px;
}

.engine strong { color: var(--ui-text); }
.engine small { color: var(--ui-muted); }
.profile { background: #fff !important; border-top-color: var(--ui-border); }
.profile strong { color: var(--ui-text); }
.profile small { color: var(--ui-muted); }
.logout-button { background: #edf7f1; border-color: #d5e9de; color: #2b6c59; }

.main {
  background: var(--ui-bg);
}

.topbar {
  min-height: 66px;
  background: rgba(255,255,255,.82);
  color: var(--ui-muted);
  border-bottom: 1px solid var(--ui-border);
  backdrop-filter: blur(14px);
}

.topbar strong { color: var(--ui-text); }
.page-heading h1, .panel h2, .plan-card h2 { color: var(--ui-text); }
.page-heading p, .panel-heading p, .muted, .subtle-note { color: var(--ui-muted); }
.eyebrow { color: var(--ui-accent); }

.panel,
.stats article,
.notice,
.plan-card,
.router-card,
.usage-panel,
.automation-panel {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  box-shadow: var(--ui-shadow);
}

.stats article:hover,
.panel:hover {
  box-shadow: 0 16px 36px rgba(27, 65, 51, .1);
}

.notice {
  background: #f1f8f4;
  border-color: #d7eae0;
}

.notice-icon {
  background: var(--ui-accent-soft);
  color: var(--ui-accent);
}

.primary {
  background: linear-gradient(135deg, #277d67, #1d6a57);
  border-radius: 11px;
  box-shadow: 0 8px 18px rgba(35, 122, 99, .18);
}

.primary:hover {
  box-shadow: 0 12px 24px rgba(35, 122, 99, .25);
}

.secondary,
.manage-button,
.text-button,
.tabs button {
  border-color: var(--ui-border);
  background: #fff;
  color: #42665a;
  border-radius: 10px;
}

.secondary:hover,
.manage-button:hover,
.text-button:hover,
.tabs button:hover,
.tabs button.chosen {
  background: var(--ui-accent-soft);
  border-color: #bfe1cf;
  color: var(--ui-text);
}

input,
select,
textarea {
  background: #fbfdfc;
  border-color: var(--ui-border);
  color: var(--ui-text);
  border-radius: 10px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #79bda4;
  box-shadow: 0 0 0 4px rgba(91, 181, 145, .13);
}

.table-wrap {
  border-color: var(--ui-border);
  border-radius: 12px;
}

table th {
  background: #f7faf8;
  color: #7b8c85;
}

table td {
  border-top-color: #edf2ef;
}

.pill.active,
.pill.synced {
  background: #e2f4e9;
  color: #287052;
}

.pill.neutral {
  background: #eef3f0;
  color: #657970;
}

#modal {
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(18, 48, 36, .18);
}

#modal::backdrop {
  background: rgba(18, 44, 35, .2);
  backdrop-filter: blur(4px);
}

.dialog-heading { border-bottom-color: var(--ui-border); }

.invoice-logo {
  max-height: 54px;
  max-width: 220px;
  object-fit: contain;
  margin-bottom: 8px;
  display: block;
}

.pdf-invoice-style {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  padding: 16px 20px 24px;
  border-radius: 6px;
}

.pdf-stamp {
  position: absolute;
  top: 24px;
  left: -48px;
  width: 180px;
  text-align: center;
  transform: rotate(-40deg);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 5px 0;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  text-transform: uppercase;
}

.pdf-stamp.unpaid {
  background: #d9534f;
}

.pdf-stamp.paid {
  background: #27ae60;
}

.pdf-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-left: 28px;
}

.pdf-company-info {
  text-align: right;
  font-size: 13px;
  color: #555555;
  line-height: 1.4;
}

.pdf-company-name {
  font-size: 17px;
  font-weight: bold;
  color: #111111;
  margin-bottom: 4px;
}

.pdf-banner {
  background: #eeeeee;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.pdf-banner h2 {
  font-size: 18px;
  margin: 0 0 4px 0;
  color: #111111;
}

.pdf-date-line {
  font-size: 13px;
  color: #444444;
}

.pdf-bill-to {
  margin-bottom: 20px;
  font-size: 13px;
  color: #444444;
  line-height: 1.5;
}

.pdf-bill-title {
  font-weight: bold;
  font-size: 14px;
  color: #111111;
  margin-bottom: 4px;
}

.pdf-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.pdf-table th {
  background: #eeeeee;
  border: 1px solid #dcdcdc;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: bold;
  color: #222222;
  text-align: left;
}

.pdf-table td {
  border: 1px solid #e5e5e5;
  padding: 11px 14px;
  font-size: 13px;
  color: #333333;
}

.pdf-total-row {
  background: #eeeeee;
  font-weight: bold;
  color: #111111;
}

.pdf-ledger {
  margin-top: 20px;
}

.pdf-ledger-title {
  font-size: 14px;
  font-weight: bold;
  color: #111111;
  margin-bottom: 8px;
}

.pdf-footer-note {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #eeeeee;
  font-size: 11px;
  color: #888888;
  text-align: center;
}

.pdf-payment-section {
  margin-top: 20px;
  border-top: 1px solid #eeeeee;
  padding-top: 16px;
}

.pdf-payment-title {
  font-size: 14px;
  font-weight: bold;
  color: #111111;
  margin-bottom: 10px;
}

.pdf-payment-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pdf-payment-card {
  flex: 1;
  min-width: 220px;
  background: #fafbf9;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 14px;
}

.pdf-payment-card h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #173c30;
}

.pdf-payment-card div {
  font-size: 12px;
  color: #444444;
  line-height: 1.6;
}

.pdf-payment-qr {
  max-width: 110px;
  max-height: 110px;
  margin-top: 8px;
  display: block;
}

.logo-preview-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f7faf8;
  border: 1px dashed var(--ui-border);
  border-radius: 10px;
  margin: 10px 0;
}

.logo-preview-img {
  max-height: 50px;
  max-width: 140px;
  object-fit: contain;
}

.invoice-actions-group {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.invoice-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .sidebar, .topbar, footer, .page-heading, .stats, .notice, .dialog-actions, #close-modal, #cancel-modal, .no-print, .table-wrap, .panel-heading {
    display: none !important;
  }
  #modal {
    position: static !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Light authentication page */
.auth {
  grid-template-columns: 1fr 1fr;
  background: #f7faf8;
}

.auth-story {
  justify-content: center;
  align-items: flex-start;
  padding: clamp(34px, 6vw, 88px);
  background:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.72), transparent 24%),
    linear-gradient(145deg, #dcefe5 0%, #c8e7d8 55%, #b8dccd 100%);
  color: var(--ui-text);
}

.auth-story::before {
  background: radial-gradient(circle at 85% 78%, rgba(255,255,255,.42), transparent 25%);
}

.auth-story .brand {
  align-self: flex-start;
  margin: 0 0 clamp(54px, 10vh, 120px);
  background: rgba(255,255,255,.88);
  box-shadow: 0 14px 30px rgba(37, 92, 70, .12);
}

.auth-story .eyebrow {
  color: #34705d;
}

.auth-story h1 {
  max-width: 620px;
  color: #173d32;
  font-size: clamp(3.5rem, 6vw, 7rem);
  line-height: .92;
}

.auth-story h1 em {
  color: #2f8b6d;
}

.auth-story p {
  color: #4f7265;
}

.auth-story > small {
  color: #5b7c6d;
}

.auth-form {
  min-height: 100vh;
  padding: clamp(24px, 5vw, 72px);
  background:
    radial-gradient(circle at 84% 8%, rgba(216,239,220,.7), transparent 30%),
    #fbfcfa;
}

.auth-form > div {
  width: min(100%, 500px);
  background: rgba(255,255,255,.84);
  border: 1px solid #e0ebe5;
  box-shadow: 0 18px 50px rgba(28, 67, 50, .08);
}

.auth-form h2 {
  color: #17352d;
}

.auth-form .muted {
  color: #72827b;
}

#auth-form input {
  background: #fbfdfc;
  border-color: #dce8e1;
}

.auth-form .hint {
  color: #718079;
  background: #f4f8f5;
  border-color: #e2ece6;
}

@media (max-width: 980px) {
  .auth {
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: 430px;
  }

  .auth-form {
    min-height: auto;
  }
}

/* Compact sign-in layout */
.auth-story {
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px;
}

.auth-story .brand {
  align-self: center;
  margin: 0;
  color: #173d32;
  transform: scale(1.04);
  transition: transform .25s ease, box-shadow .25s ease;
}

.auth-story .brand > span {
  color: #173d32;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .08em;
}

.auth-story .brand:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 92, 70, .18);
}

.auth-story > div {
  display: none;
}

.auth-story > small {
  display: none;
}

.auth-story .brand::before {
  width: 44px;
  height: 44px;
}

.auth-story .brand::after {
  letter-spacing: .12em;
  transform: translateX(34px);
}

.auth-form {
  min-height: 100vh;
  padding: 28px;
}

.auth-form > div {
  width: min(100%, 390px);
  padding: 28px;
  border-radius: 18px;
}

.auth-form .eyebrow,
.auth-form .muted,
.auth-form .hint {
  display: none;
}

.auth-form h2 {
  margin: 0 0 24px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  text-align: center;
}

#auth-form {
  gap: 13px;
}

#auth-form label {
  gap: 7px;
  font-size: 12px;
}

#auth-form input {
  height: 46px;
}

.auth-form .text-button {
  margin-top: 12px;
  border: 0;
  color: #357a66;
  font-size: 12px;
}

.password-toggle {
  color: #357a66;
}

@media (max-width: 980px) {
  .auth-story {
    min-height: 190px;
  }

  .auth-form {
    min-height: calc(100vh - 190px);
  }
}

/* Reference-inspired login treatment */
.auth {
  grid-template-columns: minmax(280px, .78fr) minmax(420px, 1.22fr);
  gap: 0;
  padding: 0;
  background: #f7f6f2;
}

.auth-story {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.7), transparent 27%),
    linear-gradient(145deg, #dff1e8 0%, #c9e8da 100%);
}

.auth-story::before {
  background: radial-gradient(circle at 78% 78%, rgba(255,255,255,.5), transparent 30%);
}

.auth-story .brand {
  width: 180px;
  height: 180px;
  margin: 0;
  flex-direction: column;
  gap: 12px;
  border-radius: 42px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 24px 60px rgba(55, 117, 91, .12);
  transform: none;
}

.auth-story .brand:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 70px rgba(55, 117, 91, .2);
}

.auth-story .brand::before {
  width: 58px;
  height: 58px;
  margin: 0;
  border-radius: 17px;
  background: linear-gradient(145deg, #287d6b, #125044);
  box-shadow: 0 10px 20px rgba(20, 91, 73, .2);
}

.auth-story .brand::after {
  position: static;
  transform: none;
  color: #173d32;
  font-size: 17px;
  letter-spacing: .12em;
}

.auth-story .brand > span {
  display: none;
}

.auth-form {
  min-height: 100vh;
  place-items: center;
  padding: 40px clamp(28px, 7vw, 110px);
  background: #f7f6f2;
}

.auth-form > div {
  width: min(100%, 560px);
  padding: 52px 48px 44px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid #ecebe7;
  box-shadow: 0 24px 70px rgba(36, 48, 42, .1);
}

.auth-form h2 {
  margin: 0 0 12px;
  font-size: clamp(2.7rem, 4vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.075em;
  color: #142b25;
}

.auth-form .muted {
  display: block;
  margin: 0 0 30px;
  color: #78817d;
  font-size: 1.05rem;
}

.auth-form .eyebrow {
  display: none;
}

#auth-form {
  gap: 18px;
}

#auth-form label {
  gap: 9px;
  color: #24352f;
  font-size: 13px;
}

#auth-form input {
  height: 58px;
  border-radius: 15px;
  border: 1px solid #cbd4cf;
  background: #fff;
  padding: 0 17px;
  font-size: 1rem;
}

#auth-form input:focus {
  border-color: #287d6b;
  box-shadow: 0 0 0 4px rgba(40, 125, 107, .13);
}

.password-toggle {
  color: #287d6b;
  font-size: 13px;
  font-weight: 600;
}

.primary {
  height: 58px;
  border-radius: 15px;
  background: #287d6b;
  box-shadow: 0 12px 22px rgba(40, 125, 107, .2);
  font-size: 1rem;
}

.auth-form .text-button {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #d4ddd8;
  border-radius: 15px;
  color: #287d6b;
  background: #fff;
}

.auth-form .hint {
  display: none;
}

/* Keep lower navigation visible above the account controls */
.sidebar {
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar nav {
  flex: 0 1 auto;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 22px;
  flex-shrink: 0;
}

.sidebar .profile {
  position: static;
  width: 100%;
  margin-top: 16px;
  padding: 14px 4px 18px;
  border-top: 1px solid var(--ui-border);
  background: #fff !important;
}

.sidebar .profile > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.sidebar .profile .logout-button {
  white-space: nowrap;
}

.plan-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #edf2ef;
}

.plan-actions button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.plan-actions .secondary {
  background: #f2faf6;
  border: 1px solid #cfe6da;
  color: #276c59;
}

.plan-actions .secondary:hover {
  background: #dff2e8;
}

.plan-actions .danger-button {
  border: 1px solid #efc8c8;
  background: #fff7f7;
  color: #a34848;
}

.plan-actions .danger-button:hover {
  background: #fdeaea;
}

.edit-link {
  display: inline-grid;
  place-items: center;
  margin-top: 5px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #cfe6da;
  border-radius: 7px;
  background: #f2faf6;
  color: #287d6b;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.edit-link:hover { text-decoration: underline; }

.action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-width: 245px;
}

.action-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #d7e3dd;
  border-radius: 8px;
  background: #f7fbf8;
  color: #356d5b;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.action-button:hover { transform: translateY(-1px); }
.action-button.block:hover { background: #fff6dc; border-color: #ead69a; color: #866719; }
.action-button.extend:hover { background: #e4f5ea; border-color: #bfe1cf; color: #236c51; }
.action-button.terminate { color: #a34848; border-color: #efc8c8; background: #fff8f8; }
.action-button.terminate:hover { background: #fdeaea; }
.action-button.graph { color: #3375a1; background: #f1f7fc; border-color: #cbdfea; }
.action-button.graph:hover { background: #e2f0fa; }

@media (max-width: 900px) {
  .action-buttons { justify-content: flex-start; min-width: 0; flex-wrap: wrap; }
}

@media (max-width: 980px) {
  .auth {
    grid-template-columns: 1fr;
    min-height: 100vh;
    padding: 14px;
    background: #f7f6f2;
  }

  .auth-story {
    min-height: 190px;
    border-radius: 28px 28px 0 0;
    padding: 24px;
  }

  .auth-story .brand {
    width: 132px;
    height: 132px;
    border-radius: 32px;
  }

  .auth-story .brand::before {
    width: 44px;
    height: 44px;
  }

  .auth-form {
    min-height: auto;
    padding: 0;
    background: transparent;
  }

  .auth-form > div {
    width: 100%;
    border-radius: 0 0 28px 28px;
    box-shadow: 0 16px 36px rgba(36, 48, 42, .08);
    padding: 34px 24px 30px;
  }
}
.payment-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.payment-actions > button { height:40px; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:10px 14px; margin:0; border-radius:9px; font-size:12px; font-weight:600; line-height:18px; white-space:nowrap; box-shadow:none; }
.payment-actions > button.danger-button { border:1px solid #e5b9b9; background:#fff4f4; color:#922f2f; }
.withdrawal-filter { padding:0 24px 16px; }
.withdrawal-filter label { max-width:280px; margin:0; }
