:root {
  color-scheme: light;
  --paper: #f4f6f2;
  --surface: #ffffff;
  --ink: #1c2823;
  --muted: #718078;
  --line: #dfe5df;
  --green: #19705d;
  --green-dark: #105745;
  --green-soft: #e5f0eb;
  --coral: #d66b54;
  --gold: #d29b40;
  --sidebar: #1c2925;
  --sidebar-muted: #a5b1aa;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-frame { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; width: 238px; height: 100vh; padding: 25px 17px 17px; background: var(--sidebar); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: inherit; text-decoration: none; font-size: 18px; font-weight: 750; }
.brand-light { margin-left: 4px; color: #a5b8ad; font-size: 13px; font-weight: 500; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 8px; background: var(--green); color: #fff; font-size: 17px; font-weight: 800; }
.sidebar-caption { margin: 49px 10px 13px; color: #85948c; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; padding: 0 11px; border: 0; border-radius: 5px; background: transparent; color: var(--sidebar-muted); text-align: left; font-size: 13px; }
.nav-item:hover { background: #263630; color: #fff; }
.nav-item.is-active { background: #30433b; color: #fff; }
.nav-item.is-active .nav-symbol { color: #a6d8c3; }
.nav-symbol { display: grid; width: 20px; place-items: center; color: #91a39a; font-size: 17px; }
.sidebar-bottom { margin-top: auto; }
.support-block { display: flex; align-items: center; gap: 10px; padding: 14px 10px; border-top: 1px solid #38453f; }
.support-mark { display: grid; flex: 0 0 26px; width: 26px; height: 26px; place-items: center; border: 1px solid #75847b; border-radius: 50%; color: #d4ded8; font-weight: 650; }
.support-block strong, .support-block span:not(.support-mark) { display: block; }
.support-block strong { font-size: 12px; font-weight: 600; }
.support-block div span { margin-top: 2px; color: #a5b1aa; font-size: 10px; }
.support-link { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 24px; padding: 9px 7px; color: #d5e0d9; text-decoration: none; font-size: 11px; }
.support-link:hover { color: #a6d8c3; }
.sidebar-footer { padding: 15px 8px 0; border-top: 1px solid #38453f; color: #8e9b93; font-size: 10px; }
.sidebar-footer span { color: #65746b; }

.main-area { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 65px; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.7); }
.crumb { display: flex; align-items: center; gap: 9px; color: #849087; font-size: 11px; }
.crumb strong { color: #35433b; font-weight: 600; }
.crumb-sep { color: #c3ccc5; }
.profile-menu { display: flex; align-items: center; gap: 11px; font-size: 12px; }
.profile-name { color: #4b5a51; }
.profile-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #dcebe3; color: var(--green-dark); font-size: 12px; font-weight: 700; }
.demo-badge { padding: 4px 7px; border: 1px solid #e3c78f; border-radius: 3px; color: #946819; font-size: 9px; font-weight: 700; letter-spacing: .5px; }
.dashboard { width: min(100%, 1160px); margin: 0 auto; padding: 37px 42px 0; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .7px; }
.eyebrow-dot { width: 4px; height: 4px; border-radius: 50%; background: #b3c1b7; }
h1, h2, p { margin-top: 0; }
.page-heading h1 { margin: 0 0 4px; font-size: 28px; font-weight: 700; line-height: 1.2; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 12px; }
.icon-button { display: grid; flex: 0 0 35px; width: 35px; height: 35px; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: #67766e; font-size: 19px; }
.icon-button:hover { border-color: #9fb9aa; color: var(--green); }
.refresh-button { margin-top: 6px; }

.status-panel { display: flex; justify-content: space-between; gap: 28px; min-height: 164px; padding: 23px 27px; border: 1px solid #d9e4dd; border-left: 4px solid var(--green); background: var(--surface); }
.status-label { display: flex; align-items: center; gap: 8px; color: #5b6c62; font-size: 11px; font-weight: 600; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #39936f; box-shadow: 0 0 0 4px #e4f2e9; }
.status-panel.is-expired { border-left-color: var(--coral); }
.status-panel.is-expired .status-dot { background: var(--coral); box-shadow: 0 0 0 4px #f8e7e2; }
.status-main h2 { margin: 12px 0 5px; font-size: 22px; font-weight: 680; line-height: 1.2; }
.status-main p { margin: 0; color: var(--muted); font-size: 12px; }
.status-side { display: flex; flex: 0 0 225px; flex-direction: column; justify-content: center; padding-left: 25px; border-left: 1px solid var(--line); }
.side-label, .metric-label { color: #7b8981; font-size: 9px; font-weight: 750; letter-spacing: .7px; }
.status-side strong { margin-top: 6px; font-size: 15px; font-weight: 650; }
.days-left { margin-top: 3px; color: var(--muted); font-size: 10px; }

.metrics-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 19px; border-block: 1px solid var(--line); background: rgba(255,255,255,.36); }
.metric-block { display: flex; min-height: 118px; flex-direction: column; align-items: flex-start; padding: 17px 22px 15px 0; }
.metric-block + .metric-block { padding-left: 22px; border-left: 1px solid var(--line); }
.metric-value { margin-top: 8px; font-size: 19px; font-weight: 680; line-height: 1.2; }
.metric-note { margin-top: 4px; color: var(--muted); font-size: 10px; }
.text-action { margin-top: 6px; padding: 0; border: 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 650; }
.text-action:hover { color: var(--green-dark); }
.traffic-progress-wrap { width: 100%; height: 4px; margin-top: 10px; overflow: hidden; border-radius: 4px; background: #e2e8e3; }
.traffic-progress { width: 0; height: 100%; background: var(--green); }

.section-block { margin-top: 30px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { margin: 0; font-size: 18px; font-weight: 680; line-height: 1.25; }
.section-copy { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.action-list { border-top: 1px solid var(--line); }
.action-row { display: flex; align-items: center; width: 100%; min-height: 68px; gap: 14px; padding: 10px 3px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.action-row:hover .action-arrow { transform: translateX(3px); color: var(--green); }
.action-icon { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 6px; font-size: 18px; }
.connection-icon { background: #e1eee7; color: var(--green); }
.renew-icon { background: #f5e9d4; color: #9e7127; }
.action-copy { display: grid; gap: 2px; }
.action-copy strong { font-size: 12px; font-weight: 650; }
.action-copy small { color: var(--muted); font-size: 10px; }
.action-arrow { margin-left: auto; color: #8f9c93; transition: transform .16s; }

.view-panel { animation: fade-in .18s ease-out; }
@keyframes fade-in { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.connection-view, .plans-view { padding-top: 8px; }
.subscription-row { display: flex; align-items: end; gap: 12px; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.subscription-url-wrap { position: relative; display: grid; flex: 1; min-width: 0; gap: 7px; }
.subscription-input { width: 100%; height: 42px; padding: 0 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #f7f8f6; color: #4d5a52; font-size: 11px; text-overflow: ellipsis; }
.subscription-masked { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border: 1px dashed #c8d2cb; border-radius: 4px; color: var(--muted); font-size: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 0 15px; border: 1px solid transparent; border-radius: 4px; text-decoration: none; font-size: 11px; font-weight: 650; transition: background .15s, border-color .15s, color .15s; }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover { background: var(--green-dark); }
.button-outline { border-color: #cad5cd; background: transparent; color: #344239; }
.button-outline:hover { border-color: #93b3a0; background: #f4f8f5; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.connection-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; border-block: 1px solid var(--line); }
.connection-facts > div { display: flex; gap: 12px; padding: 17px 15px 17px 0; }
.connection-facts > div + div { padding-left: 15px; border-left: 1px solid var(--line); }
.fact-index { color: var(--green); font-size: 10px; font-weight: 750; }
.connection-facts strong, .connection-facts small { display: block; }
.connection-facts strong { font-size: 11px; font-weight: 650; }
.connection-facts small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.plans-grid { display: grid; border-top: 1px solid var(--line); }
.plan-row { display: grid; grid-template-columns: minmax(130px, 1fr) 140px 112px; align-items: center; gap: 20px; min-height: 83px; padding: 13px 18px; border: 1px solid var(--line); border-top: 0; background: var(--surface); }
.plan-featured { background: #f0f5f1; }
.plan-duration strong, .plan-duration span, .plan-price strong, .plan-price span { display: block; }
.plan-duration strong { font-size: 13px; font-weight: 680; }
.plan-duration span, .plan-price span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.plan-price strong { font-size: 16px; font-weight: 720; }
.plan-button { display: flex; align-items: center; justify-content: space-between; min-height: 37px; padding: 0 11px; border: 1px solid #b9c9bf; border-radius: 4px; background: transparent; color: var(--green-dark); font-size: 10px; font-weight: 700; }
.plan-button:hover { border-color: var(--green); background: var(--green); color: #fff; }
.initial-offer { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--gold); background: #f8f3e8; color: #6f6044; font-size: 10px; }
.initial-offer strong { color: #4b3c20; }

.loading-state { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: calc(100vh - 65px); color: var(--muted); font-size: 12px; }
.loader { width: 17px; height: 17px; border: 2px solid #c9d8cf; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { display: grid; justify-items: center; width: min(480px, calc(100% - 40px)); margin: 12vh auto; padding: 40px 25px; text-align: center; }
.error-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #e5c8b5; border-radius: 50%; color: var(--coral); font-size: 18px; }
.error-state h1 { margin: 18px 0 6px; font-size: 20px; }
.error-state p { max-width: 320px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.error-state .button + .button { margin-top: 8px; }
.page-footer { display: flex; justify-content: space-between; margin-top: 45px; padding: 16px 0 22px; border-top: 1px solid var(--line); color: #849087; font-size: 10px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 5; max-width: min(360px, calc(100vw - 32px)); padding: 11px 14px; transform: translateY(12px); border: 1px solid #c8d7ce; border-radius: 5px; background: #fff; box-shadow: 0 8px 26px #1c29251a; color: var(--ink); font-size: 11px; opacity: 0; pointer-events: none; transition: .18s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }

.login-view { display: grid; min-height: 100vh; place-items: center; padding: 25px; background: var(--paper); }
.login-shell { width: min(100%, 430px); padding: 35px; border: 1px solid var(--line); background: var(--surface); }
.login-shell .brand { color: var(--ink); }
.login-rule { height: 1px; margin: 26px 0 37px; background: var(--line); }
.login-shell h1 { margin: 0; font-size: 30px; line-height: 1.15; }
.login-copy { max-width: 340px; margin: 15px 0 22px; color: var(--muted); font-size: 12px; }
.login-help { margin: 14px 0 0; color: var(--muted); font-size: 10px; }
.demo-entry { display: grid; gap: 10px; margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); color: #8b7444; font-size: 10px; }
.login-footer { margin: 34px 0 0; color: #8c9890; font-size: 10px; }
:focus-visible { outline: 3px solid #e9a58e; outline-offset: 2px; }

@media (max-width: 900px) {
  .app-frame { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { width: 190px; padding-inline: 13px; }
  .topbar { padding-inline: 25px; }
  .dashboard { padding-inline: 25px; }
  .plan-row { grid-template-columns: minmax(120px, 1fr) 115px 100px; gap: 12px; }
}
@media (max-width: 650px) {
  .app-frame { display: block; padding-bottom: 59px; }
  .sidebar { position: fixed; inset: auto 0 0; z-index: 4; width: auto; height: 59px; padding: 0 7px; border-top: 1px solid #3b4942; }
  .sidebar-brand, .sidebar-caption, .sidebar-bottom { display: none; }
  .side-nav { display: grid; grid-template-columns: repeat(3, 1fr); height: 100%; gap: 3px; }
  .nav-item { justify-content: center; flex-direction: column; gap: 0; min-height: 0; padding: 3px 2px; border-radius: 3px; font-size: 9px; }
  .nav-symbol { height: 23px; font-size: 16px; }
  .topbar { height: 56px; padding-inline: 16px; }
  .crumb { font-size: 10px; }
  .profile-menu { gap: 7px; }
  .profile-name { max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  .profile-avatar { width: 27px; height: 27px; }
  .dashboard { padding: 27px 16px 0; }
  .page-heading { margin-bottom: 18px; }
  .page-heading h1 { font-size: 24px; }
  .status-panel { flex-direction: column; gap: 19px; min-height: 0; padding: 18px; }
  .status-main h2 { font-size: 19px; }
  .status-side { flex: auto; padding: 14px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .status-side strong { font-size: 14px; }
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .metric-block { min-height: 101px; padding: 14px 12px 12px 0; }
  .metric-block + .metric-block { padding-left: 12px; }
  .metric-block:nth-child(3) { grid-column: span 2; border-top: 1px solid var(--line); border-left: 0; }
  .metric-value { font-size: 17px; }
  .section-block { margin-top: 26px; }
  .section-heading h2 { font-size: 17px; }
  .subscription-row { align-items: stretch; flex-direction: column; padding: 13px; }
  .copy-button { width: 100%; }
  .connection-facts { grid-template-columns: 1fr; }
  .connection-facts > div { padding: 13px 3px; }
  .connection-facts > div + div { padding-left: 3px; border-top: 1px solid var(--line); border-left: 0; }
  .plan-row { grid-template-columns: minmax(100px,1fr) auto; gap: 4px 12px; padding: 13px 12px; }
  .plan-price { grid-column: 1; grid-row: 2; }
  .plan-button { grid-column: 2; grid-row: 1 / span 2; width: 88px; }
  .page-footer { margin-top: 30px; font-size: 9px; }
  .loading-state { min-height: calc(100vh - 115px); }
}
@media (max-width: 380px) {
  .dashboard { padding-inline: 12px; }
  .status-panel { padding: 15px; }
  .plan-row { gap: 3px 8px; padding-inline: 9px; }
  .plan-button { width: 78px; padding-inline: 8px; }
  .initial-offer { line-height: 1.6; }
}
