:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171a2c;
  background: #f6f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --primary: #5155d9;
  --primary-dark: #3b3fb9;
  --muted: #777b91;
  --line: #e8e9f1;
  --surface: #fff;
  --green: #14804a;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -.8px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--primary); color: #fff; font-size: 18px; }
.brand-mark-image { width: 36px; height: 36px; display: block; border-radius: 11px; object-fit: cover; }
.brand-dot { color: var(--primary); }
.secure-label { color: var(--muted); font-size: 12px; }
.secure-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); }
.auth-layout { min-height: calc(100vh - 148px); display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 70px; padding: 32px 0 60px; }
.welcome { padding: 16px 0; }
.eyebrow { margin: 0 0 12px; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -2px; }
.welcome h1 span, .dashboard-heading h1 span { color: var(--primary); }
.welcome-copy { max-width: 440px; margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.welcome-points { margin-top: 36px; color: #4e5266; font-size: 13px; }
.welcome-points p { margin: 13px 0; }
.welcome-points span { margin-right: 8px; color: var(--green); font-weight: 800; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 36px #2428540b; }
.auth-panel { padding: 28px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 25px; border-radius: 11px; background: #f4f4f9; }
.tab { border: 0; border-radius: 8px; padding: 11px 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 650; }
.tab.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px #171a2c12; }
label { display: block; margin: 0 0 15px; color: #44485b; font-size: 12px; font-weight: 650; }
input { display: block; width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid #dedfea; border-radius: 9px; outline: none; background: #fff; color: #171a2c; font-size: 14px; }
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #5155d91a; }
.name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 40px; border: 1px solid transparent; border-radius: 9px; padding: 10px 14px; cursor: pointer; font-size: 12px; font-weight: 700; transition: background .15s ease, transform .15s ease; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); }
.button.full { width: 100%; min-height: 46px; margin-top: 5px; }
.button.outline { border-color: #dcddec; background: #fff; color: #363a56; }
.button.quiet { background: transparent; color: var(--muted); }
.fine-print { margin: 18px 0 0; color: #9295a5; font-size: 10px; line-height: 1.6; }
.notice { padding: 12px 14px; border-radius: 9px; font-size: 12px; line-height: 1.55; }
.notice .button { margin: 12px 0 0; }
.notice.error { background: #fff0ef; color: #a1322a; }
.notice.info { background: #f1f2ff; color: #4e5299; }
.dashboard { padding: 36px 0 70px; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.dashboard-actions { display: flex; align-items: center; gap: 8px; }
.dashboard-actions #notification-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 5px; padding: 0 5px; border-radius: 99px; background: #fff0ef; color: #a1322a; }
.dashboard-heading h1 { font-size: 34px; letter-spacing: -1.2px; }
.dashboard-heading .muted { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 17px; }
.summary-card { position: relative; min-height: 190px; padding: 22px; }
.card-icon { position: absolute; top: 19px; right: 20px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #f0f0ff; color: var(--primary); font-weight: 800; }
.card-label { margin: 2px 0 8px; color: var(--muted); font-size: 11px; font-weight: 650; }
.metric { margin: 0; font-size: 30px; font-weight: 750; letter-spacing: -1px; }
.status-active { color: var(--green); }
.status-inactive { color: #9a6812; font-size: 22px; letter-spacing: -.4px; }
.card-foot { margin: 8px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.key-panel { padding: 23px; }
.admin-subscription-card { grid-column: 1 / -1; }
.application-create-form { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; align-items: center; gap: 8px; }
.application-create-form input { min-width: 150px; margin: 0; }
.application-create-form .admin-select { min-height: 40px; }
.application-selector-label { margin: 0 0 5px; color: var(--muted); }
.application-select { width: 100%; margin: 0 0 14px; }
.application-details { display: grid; gap: 10px; }
.application-meta { color: var(--muted); }
.application-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.application-event > .record-main { width: 100%; }
.application-event details { margin-top: 9px; }
.application-event details summary { cursor: pointer; color: var(--primary); font-size: 11px; font-weight: 700; }
.application-event-message { padding: 9px 0; border-top: 1px solid var(--line); }
.application-event-message:first-of-type { margin-top: 8px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.4px; }
.key-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fbfbfd; }
code { color: #323651; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.copy-button, .icon-button { border: 0; background: transparent; color: var(--primary); cursor: pointer; font-size: 11px; font-weight: 700; }
.key-warning { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.private-key-box { margin-top: 18px; padding: 15px; border: 1px solid #f0d295; border-radius: 11px; background: #fff9eb; }
.private-key-heading { display: flex; justify-content: space-between; gap: 12px; color: #815517; font-size: 12px; }
.private-key-value { display: block; margin: 12px 0; color: #47341a; }
.account-panel { margin-top: 17px; }
.account-form { display: flex; align-items: flex-end; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.account-form label { flex: 1; margin: 0; }
.record-list { display: grid; gap: 9px; margin-top: 14px; }
.record-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fbfbfd; }
.record-main { min-width: 0; }
.record-title { margin: 0; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.record-meta { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.record-status { flex: 0 0 auto; padding: 6px 9px; border-radius: 99px; background: #f1f2ff; color: #4e5299; font-size: 10px; font-weight: 750; }
.record-status.approved { background: #eaf7ef; color: #147244; }
.record-status.rejected { background: #fff0ef; color: #a1322a; }
.record-status.inconclusive { background: #fff6e5; color: #805b15; }
.review-detail { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfbfd; }
.review-detail img { display: block; max-width: min(100%, 640px); max-height: 520px; margin: 12px 0; border-radius: 8px; object-fit: contain; background: #eee; }
.review-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 14px 0; }
.review-fact { padding: 10px; border-radius: 8px; background: #fff; }
.review-fact span { display: block; color: var(--muted); font-size: 10px; }
.review-fact strong { display: block; margin-top: 4px; font-size: 12px; overflow-wrap: anywhere; }
.sms-review-details { margin: 12px 0; }
.sms-review-details summary { cursor: pointer; color: #42465e; font-size: 12px; font-weight: 700; }
.sms-review-body { margin: 8px 0 0; color: #323651; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.review-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.review-actions .button { min-width: 120px; }
.review-actions .approve { background: var(--green); color: #fff; }
.empty-state { padding: 16px; color: var(--muted); text-align: center; font-size: 12px; }
.admin-select { padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #363a56; font: inherit; font-size: 12px; }
.chart-title { margin: 23px 0 12px; font-size: 13px; }
.activity-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: 10px; min-height: 132px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfbfd; }
.activity-day { display: grid; grid-template-rows: 1fr auto auto; justify-items: center; align-items: end; gap: 6px; height: 106px; color: var(--muted); font-size: 9px; }
.activity-bar-track { display: flex; align-items: flex-end; width: 100%; height: 70px; border-radius: 5px; background: #f0f0f7; overflow: hidden; }
.activity-bar { width: 100%; min-height: 2px; border-radius: 5px 5px 0 0; background: var(--primary); }
.activity-hours { color: #42465e; font-size: 9px; font-weight: 700; }
.payment-shell { max-width: 760px; }
.payment-panel { margin: 70px auto 50px; padding: clamp(24px, 6vw, 48px); }
.payment-panel h1 { font-size: clamp(30px, 5vw, 42px); }
.payment-price { margin: 30px 0; font-size: 36px; font-weight: 800; letter-spacing: -1px; }
.payment-price span, .payment-price small { color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.payment-form { display: grid; gap: 14px; margin: 22px 0; }
.payment-form .button { width: 100%; min-height: 46px; }
.payment-preview { max-width: 100%; max-height: 360px; margin: 12px 0; border-radius: 10px; object-fit: contain; }
.payment-record { padding: 12px; margin-top: 9px; border: 1px solid var(--line); border-radius: 9px; }
.hidden { display: none !important; }
footer { padding: 20px 0 28px; color: #999cad; text-align: center; font-size: 10px; }
@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 520px); }
  .topbar { height: 68px; }
  .auth-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 22px; }
  .welcome { padding: 0; }
  .welcome h1 { font-size: 38px; }
  .welcome-points { display: none; }
  .welcome-copy { margin-top: 12px; font-size: 13px; }
  .auth-panel { padding: 20px; }
  .summary-grid { grid-template-columns: 1fr; gap: 12px; }
  .dashboard-heading { align-items: flex-start; }
  .dashboard-actions { align-items: flex-end; flex-direction: column-reverse; }
  .dashboard-heading h1 { font-size: 27px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .key-row { align-items: flex-start; }
  .account-form { align-items: stretch; flex-direction: column; }
  .application-create-form { grid-template-columns: 1fr; width: 100%; }
  .application-create-form input { width: 100%; }
  .record-row { align-items: flex-start; }
  .review-facts { grid-template-columns: 1fr; }
}
