:root {
  --page: #edf0eb;
  --page-2: #e2e8e0;
  --glass: rgba(255,255,255,.66);
  --glass-strong: rgba(255,255,255,.9);
  --surface: rgba(255,255,255,.82);
  --surface-solid: #fbfcfa;
  --ink: #171a16;
  --muted: #667064;
  --quiet: #91998f;
  --line: rgba(29,39,27,.1);
  --line-strong: rgba(29,39,27,.17);
  --sage: #61745b;
  --sage-soft: #dce7d8;
  --blue: #1975e6;
  --red: #c93b3b;
  --amber: #a76912;
  --shadow: 0 30px 100px rgba(43,56,40,.14);
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
}
html[data-theme="dark"] {
  --page: #111410;
  --page-2: #171c16;
  --glass: rgba(26,30,25,.72);
  --glass-strong: rgba(30,35,29,.94);
  --surface: rgba(31,36,30,.84);
  --surface-solid: #20251f;
  --ink: #f1f4ef;
  --muted: #b5beb2;
  --quiet: #818a7f;
  --line: rgba(239,244,236,.1);
  --line-strong: rgba(239,244,236,.18);
  --sage: #a9c2a2;
  --sage-soft: rgba(120,156,111,.2);
  --blue: #6aabff;
  --red: #ff8585;
  --amber: #e6b15f;
  --shadow: 0 32px 110px rgba(0,0,0,.32);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --page: #111410; --page-2: #171c16; --glass: rgba(26,30,25,.72); --glass-strong: rgba(30,35,29,.94);
    --surface: rgba(31,36,30,.84); --surface-solid: #20251f; --ink: #f1f4ef; --muted: #b5beb2;
    --quiet: #818a7f; --line: rgba(239,244,236,.1); --line-strong: rgba(239,244,236,.18);
    --sage: #a9c2a2; --sage-soft: rgba(120,156,111,.2); --blue: #6aabff; --red: #ff8585;
    --amber: #e6b15f; --shadow: 0 32px 110px rgba(0,0,0,.32); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100svh; margin: 0; overflow-x: hidden; background: linear-gradient(145deg,var(--page),var(--page-2)); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.ambient span { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .65; animation: drift 18s ease-in-out infinite alternate; }
.ambient span:nth-child(1) { top: -26vw; left: -15vw; width: 62vw; height: 62vw; background: radial-gradient(circle,rgba(181,210,173,.62),transparent 67%); }
.ambient span:nth-child(2) { right: -24vw; bottom: -34vw; width: 70vw; height: 70vw; background: radial-gradient(circle,rgba(180,202,235,.55),transparent 68%); animation-delay: -8s; }
.ambient span:nth-child(3) { top: 23%; right: 8%; width: 27vw; height: 27vw; background: radial-gradient(circle,rgba(255,255,255,.8),transparent 68%); animation-delay: -4s; }
@keyframes drift { to { transform: translate3d(3vw,-2vw,0) scale(1.08); } }

.account-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 248px minmax(0,1fr);
  grid-template-rows: 76px minmax(0,1fr);
  width: min(1480px,calc(100% - 36px));
  min-height: calc(100svh - 36px);
  margin: 18px auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 30px;
  background: var(--glass);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.76);
  backdrop-filter: blur(34px) saturate(1.18);
  animation: shell-in .7s var(--ease) both;
}
@keyframes shell-in { from { opacity: 0; transform: translateY(12px) scale(.99); } }
.topbar { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.22); backdrop-filter: blur(24px); }
.topbar-start, .topbar-end, .cmine-brand, .sync-state { display: flex; align-items: center; }
.topbar-start { gap: 10px; }
.topbar-end { gap: 10px; }
.cmine-brand { gap: 11px; color: inherit; text-decoration: none; }
.cmine-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--glass-strong); box-shadow: 0 8px 22px rgba(58,72,54,.1); color: var(--sage); font: 600 17px/1 ui-serif,Georgia,serif; }
.cmine-brand strong { display: block; font-size: 14px; letter-spacing: -.02em; }
.cmine-brand small { display: block; margin-top: 3px; color: var(--quiet); font-size: 7px; font-weight: 700; letter-spacing: .09em; }
.sync-state { gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 9px; }
.sync-state i, .live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #73a967; box-shadow: 0 0 0 4px rgba(115,169,103,.11); }
.icon-button, .avatar-button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.38); color: var(--muted); cursor: pointer; transition: .18s ease; }
.icon-button:hover, .avatar-button:hover { border-color: var(--line-strong); background: var(--glass-strong); color: var(--ink); transform: translateY(-1px); }
.nav-toggle { display: none; font-size: 15px; }
.avatar-button { border-radius: 50%; background: linear-gradient(145deg,#667b60,#95aa8e); color: white; font-size: 10px; font-weight: 750; }
.popover-wrap { position: relative; }
.popover { position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; width: 250px; padding: 9px; border: 1px solid var(--line); border-radius: 18px; background: var(--glass-strong); box-shadow: 0 24px 70px rgba(28,37,26,.18); backdrop-filter: blur(25px); animation: pop-in .25s var(--ease) both; }
.popover[hidden] { display: none; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.user-summary { display: flex; gap: 10px; align-items: center; padding: 8px 8px 13px; border-bottom: 1px solid var(--line); }
.user-summary > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(145deg,#667b60,#95aa8e); color: white; font-size: 10px; font-weight: 750; }
.user-summary strong, .user-summary small { display: block; }
.user-summary strong { font-size: 11px; }.user-summary small { margin-top: 3px; color: var(--quiet); font-size: 8px; }
.user-popover button, .user-popover a { display: flex; width: 100%; padding: 10px 9px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; text-decoration: none; }
.user-popover button:hover, .user-popover a:hover { background: var(--sage-soft); color: var(--ink); }

.sidebar { grid-row: 2; display: flex; flex-direction: column; min-width: 0; padding: 22px 14px 16px; border-right: 1px solid var(--line); background: rgba(255,255,255,.13); }
.primary-nav { display: grid; gap: 4px; }
.primary-nav p { margin: 17px 12px 7px; color: var(--quiet); font-size: 8px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.primary-nav p:first-child { margin-top: 0; }
.primary-nav button { display: grid; grid-template-columns: 30px 1fr auto; gap: 7px; align-items: center; width: 100%; min-height: 43px; padding: 6px 10px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; transition: background .18s ease,color .18s ease,transform .18s ease; }
.primary-nav button:hover { background: rgba(255,255,255,.34); color: var(--ink); }
.primary-nav button.is-active { background: var(--glass-strong); box-shadow: 0 8px 22px rgba(44,57,40,.08); color: var(--ink); }
.primary-nav button.is-active::before { position: absolute; left: 0; width: 3px; height: 21px; border-radius: 0 3px 3px 0; background: var(--sage); content: ""; }
.primary-nav button { position: relative; }
.primary-nav button > span:nth-child(2) { font-size: 10px; font-weight: 620; }
.primary-nav button b { padding: 3px 7px; border-radius: 999px; background: var(--sage-soft); color: var(--sage); font-size: 7px; font-weight: 750; }
.nav-icon { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid transparent; border-radius: 9px; color: var(--quiet); font-size: 13px; }
.is-active .nav-icon { border-color: var(--line); background: var(--surface); color: var(--sage); }
.sidebar-foot { display: grid; gap: 4px; margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.sidebar-foot a { display: flex; justify-content: space-between; padding: 8px 4px; color: var(--quiet); font-size: 9px; text-decoration: none; }
.sidebar-foot a:hover { color: var(--ink); }
.sidebar-foot .signout-link { color: var(--red); }

.workspace { min-width: 0; max-height: calc(100svh - 112px); overflow: auto; padding: clamp(28px,4vw,56px); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.view { display: none; width: min(1080px,100%); margin: 0 auto; }
.view.is-active { display: block; animation: view-in .42s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateX(12px); } }
.page-heading { display: flex; gap: 30px; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.eyebrow, .panel-kicker { color: var(--sage); font-size: 8px; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.page-heading h1 { margin: 9px 0 8px; font-size: clamp(2.2rem,4.2vw,4.5rem); font-weight: 570; letter-spacing: -.065em; line-height: .96; }
.page-heading p { max-width: 650px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.quiet-button, .text-button, .link-button { border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 10px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.quiet-button { padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.3); color: var(--muted); }
.quiet-button:hover { background: var(--glass-strong); color: var(--ink); }
.text-button { padding: 0; }.text-button:hover { color: var(--ink); }

.identity-hero, .panel, .settings-card, .app-card, .subscription-card {
  border: 1px solid rgba(255,255,255,.62);
  background: var(--surface);
  box-shadow: 0 16px 50px rgba(43,55,40,.075), inset 0 1px 0 rgba(255,255,255,.62);
  backdrop-filter: blur(20px);
}
.identity-hero { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding: 25px 28px; border-radius: 23px; }
.identity-person { display: flex; gap: 17px; align-items: center; }
.hero-avatar { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: linear-gradient(145deg,#61745b,#9caf96); box-shadow: 0 12px 30px rgba(62,83,56,.2); color: white; font-size: 18px; font-weight: 730; }
.hero-avatar > span { position: absolute; right: -1px; bottom: 1px; display: grid; place-items: center; width: 20px; height: 20px; border: 3px solid var(--surface-solid); border-radius: 50%; background: #6ea865; font-size: 8px; }
.identity-person h2 { margin: 0; font-size: 22px; font-weight: 620; letter-spacing: -.035em; }
.identity-person p { margin: 4px 0 9px; color: var(--muted); font-size: 10px; }
.status-row { display: flex; flex-wrap: wrap; gap: 6px; }
.status-pill, .large-status, .live-badge { display: inline-flex; gap: 6px; align-items: center; width: max-content; padding: 5px 8px; border-radius: 999px; background: var(--sage-soft); color: var(--sage); font-size: 7px; font-weight: 720; }
.status-pill.success { background: rgba(93,160,86,.12); color: #56864f; }
.status-pill.attention { background: rgba(196,132,36,.12); color: var(--amber); }
.identity-id { display: grid; grid-template-columns: auto auto; gap: 4px 13px; align-items: center; min-width: 210px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.28); }
.identity-id small { grid-column: 1/-1; color: var(--quiet); font-size: 7px; font-weight: 730; letter-spacing: .12em; }
.identity-id strong { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 9px; font-weight: 560; }
.identity-id button { border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 8px; }

.overview-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 15px; margin-top: 15px; }
.panel { min-width: 0; padding: 23px; border-radius: 20px; }
.panel-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.panel-head h2, .compact-panel h2, .danger-zone h2 { margin: 6px 0 0; font-size: 18px; font-weight: 620; letter-spacing: -.035em; }
.security-score { display: grid; grid-template-columns: 102px 1fr; gap: 23px; align-items: center; margin-top: 23px; }
.score-ring { --score: 88; position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(#739b6b calc(var(--score) * 1%),rgba(111,126,106,.12) 0); }
.score-ring::after { position: absolute; inset: 8px; border-radius: 50%; background: var(--surface-solid); content: ""; }
.score-ring strong, .score-ring small { position: relative; z-index: 1; }
.score-ring strong { margin-top: 10px; font-size: 24px; letter-spacing: -.05em; }.score-ring small { margin-top: -18px; color: var(--quiet); font-size: 7px; }
.security-score p { margin: 0 0 13px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.security-score ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.security-score li { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 9px; }
.security-score li i { width: 6px; height: 6px; border-radius: 50%; background: #70a269; }.security-score li.advice i { background: var(--amber); }
.current-session { position: relative; overflow: hidden; }
.live-badge { background: rgba(93,160,86,.11); color: #56864f; }
.device-visual { position: relative; display: grid; place-items: center; height: 95px; margin: 12px 0 4px; }
.device-screen { width: 116px; height: 72px; border: 3px solid #465046; border-radius: 8px; background: linear-gradient(145deg,#263127,#6e8b68); box-shadow: inset 0 0 0 2px rgba(255,255,255,.07); }
.device-base { position: absolute; bottom: 8px; width: 142px; height: 7px; border-radius: 3px 3px 8px 8px; background: #697168; }
.current-session > p { margin: 8px 0 3px; color: var(--muted); font-size: 9px; text-align: center; }.current-session > small { display: block; margin-bottom: 13px; color: var(--quiet); font-size: 8px; text-align: center; }
.current-session > .text-button { display: block; margin: auto; }
.products-panel, .activity-panel { min-height: 275px; }
.product-list { display: grid; margin-top: 17px; }
.product-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.product-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: white; font: 600 16px ui-serif,Georgia,serif; box-shadow: 0 8px 20px rgba(45,55,44,.14); }
.product-mark.harmony { background: linear-gradient(145deg,#263028,#708269); }.product-mark.fit { background: linear-gradient(145deg,#2d5191,#6e9ce7); }
.product-row strong, .product-row small { display: block; }.product-row strong { font-size: 10px; }.product-row small { margin-top: 4px; color: var(--quiet); font-size: 8px; }
.product-state { color: var(--quiet); font-size: 8px; }
.activity-list { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.activity-list li { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.activity-list i { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #73a967; box-shadow: 0 0 0 4px rgba(115,169,103,.09); }
.activity-list strong, .activity-list small { display: block; }.activity-list strong { font-size: 9px; }.activity-list small { margin-top: 3px; color: var(--quiet); font-size: 8px; }

.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 15px; align-items: start; }
.profile-editor { padding: 30px; }
.profile-photo { display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 28px; border-radius: 50%; background: linear-gradient(145deg,#61745b,#9caf96); color: white; font-size: 25px; font-weight: 700; }
.profile-photo button { margin-top: 118px; position: absolute; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-solid); color: var(--blue); cursor: pointer; font-size: 8px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.field-wide { grid-column: 1/-1; }
.field-grid label > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; font-weight: 650; }
.field-grid input, .field-grid select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: rgba(255,255,255,.35); color: var(--ink); font-size: 10px; }
.field-grid input:focus, .field-grid select:focus { border-color: rgba(25,117,230,.38); box-shadow: 0 0 0 4px rgba(25,117,230,.08); }
.field-grid input:disabled { color: var(--quiet); cursor: not-allowed; }
.field-grid label small { display: block; margin-top: 6px; color: var(--quiet); font-size: 8px; }
.input-prefix { display: grid; grid-template-columns: 34px 1fr; }.input-prefix b { display: grid; place-items: center; border: 1px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; color: var(--quiet); font-size: 11px; }.input-prefix input { border-radius: 0 12px 12px 0; }
.form-actions, .card-actions { display: flex; gap: 8px; align-items: center; margin-top: 24px; }
.primary-button, .secondary-button, .danger-button { min-height: 38px; padding: 0 14px; border-radius: 11px; cursor: pointer; font-size: 9px; font-weight: 680; transition: .18s ease; }
.primary-button { border: 0; background: #20251f; color: white; box-shadow: 0 9px 22px rgba(31,38,29,.17); }
.primary-button:hover { transform: translateY(-1px); background: #30372e; }
.secondary-button { border: 1px solid var(--line); background: rgba(255,255,255,.3); color: var(--ink); }
.secondary-button:hover { border-color: var(--line-strong); background: var(--glass-strong); }
.compact-panel p, .danger-zone p { margin: 13px 0 20px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.large-status { flex: 0 0 auto; padding: 8px 11px; font-size: 9px; }.large-status i { width: 7px; height: 7px; border-radius: 50%; background: #6da565; }

.settings-stack { display: grid; gap: 11px; }
.settings-card { display: grid; grid-template-columns: 46px 1fr auto; gap: 15px; align-items: center; padding: 19px 21px; border-radius: 17px; }
.setting-icon, .provider-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; font-size: 15px; font-weight: 750; }
.setting-icon.blue { background: rgba(34,120,225,.11); color: var(--blue); }.setting-icon.green { background: rgba(91,158,82,.12); color: #57904e; }.setting-icon.amber { background: rgba(190,129,37,.13); color: var(--amber); }.setting-icon.neutral { background: rgba(117,124,114,.11); color: var(--muted); }
.setting-copy h2 { margin: 0; font-size: 13px; font-weight: 620; }.setting-copy p { margin: 4px 0; color: var(--muted); font-size: 9px; line-height: 1.55; }.setting-copy small { color: var(--quiet); font-size: 8px; }
.inline-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }.inline-list span, .scope-list span { padding: 5px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--quiet); font-size: 7px; }
.session-panel { padding-block: 6px; }
.session-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 15px; align-items: center; min-height: 88px; padding: 14px 5px; border-top: 1px solid var(--line); transition: opacity .25s ease,transform .25s ease; }
.session-row:first-child { border-top: 0; }.session-row.is-removing { opacity: 0; transform: translateX(12px); }
.device-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: var(--sage-soft); color: var(--sage); font-size: 17px; }
.session-row strong { font-size: 11px; }.session-row p { margin: 4px 0; color: var(--muted); font-size: 9px; }.session-row small { color: var(--quiet); font-size: 8px; }
.danger-link { padding: 7px 9px; border: 0; background: transparent; color: var(--red); cursor: pointer; font-size: 8px; }
.danger-link:hover { text-decoration: underline; }
.danger-button { border: 0; background: var(--red); color: white; }.danger-button:hover { filter: brightness(.94); transform: translateY(-1px); }
.danger-button.subtle { border: 1px solid rgba(201,59,59,.15); background: rgba(201,59,59,.07); color: var(--red); }
.privacy-note { display: flex; gap: 11px; align-items: flex-start; margin-top: 15px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; color: var(--quiet); }
.privacy-note > span { color: var(--sage); }.privacy-note p { margin: 0; font-size: 8px; line-height: 1.65; }.privacy-note strong { color: var(--muted); }
.provider-mark.google { background: #fff; border: 1px solid var(--line); color: #3178df; }.provider-mark.github { background: #20231f; color: white; font-size: 9px; }.provider-mark.password { background: var(--sage-soft); color: var(--sage); }
.add-connection { display: grid; grid-template-columns: 43px 1fr; gap: 15px; align-items: center; padding: 19px 21px; border: 1px dashed var(--line-strong); border-radius: 17px; background: rgba(255,255,255,.18); color: var(--muted); cursor: pointer; text-align: left; }
.add-connection:hover { background: rgba(255,255,255,.34); color: var(--ink); }.add-connection > span { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: var(--sage-soft); color: var(--sage); font-size: 20px; }.add-connection strong, .add-connection small { display: block; }.add-connection strong { font-size: 11px; }.add-connection small { margin-top: 4px; color: var(--quiet); font-size: 8px; }

.app-grid, .subscription-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.app-card, .subscription-card { padding: 23px; border-radius: 20px; }
.app-card-head { display: grid; grid-template-columns: 48px 1fr auto; gap: 13px; align-items: center; }.app-card-head h2, .subscription-card h2 { margin: 0; font-size: 16px; letter-spacing: -.03em; }.app-card-head p { margin: 4px 0 0; color: var(--quiet); font-size: 8px; }
.scope-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.app-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--quiet); font-size: 8px; }
.card-actions { justify-content: space-between; margin-top: 21px; }
.subscription-card { position: relative; display: grid; grid-template-columns: 48px 1fr auto; gap: 13px; align-items: start; overflow: hidden; }
.subscription-card.featured::before { position: absolute; top: -80px; right: -55px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle,rgba(115,157,106,.16),transparent 66%); content: ""; }
.subscription-card > p, .subscription-card div > p { color: var(--muted); font-size: 9px; }.subscription-card dl { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 0; padding: 14px 0; border-block: 1px solid var(--line); }.subscription-card dl div { display: grid; gap: 4px; }.subscription-card dt { color: var(--quiet); font-size: 7px; }.subscription-card dd { margin: 0; font-size: 9px; }.subscription-card > button { grid-column: 1/-1; }
.privacy-control { padding-block: 7px; }.privacy-row { display: grid; grid-template-columns: 47px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }.privacy-row:first-child { border-top: 0; }.privacy-row h2 { margin: 0; font-size: 12px; }.privacy-row p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }.danger-zone { border-color: rgba(201,59,59,.13); background: linear-gradient(155deg,rgba(201,59,59,.035),transparent 55%),var(--surface); }.danger-zone .panel-kicker { color: var(--red); }

.confirm-dialog { width: min(410px,calc(100% - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 24px; background: var(--glass-strong); color: var(--ink); box-shadow: 0 34px 110px rgba(24,31,22,.28); backdrop-filter: blur(30px); }
.confirm-dialog::backdrop { background: rgba(18,24,17,.38); backdrop-filter: blur(7px); }
.confirm-dialog form { padding: 30px; text-align: center; }.dialog-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 17px; background: rgba(201,59,59,.09); color: var(--red); font-size: 20px; font-weight: 750; }.confirm-dialog h2 { margin: 8px 0 10px; font-size: 20px; }.confirm-dialog p { margin: 0 auto 24px; color: var(--muted); font-size: 10px; line-height: 1.65; }.confirm-dialog form > div:last-child { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: min(360px,calc(100% - 32px)); padding: 12px 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(27,31,26,.93); box-shadow: 0 18px 55px rgba(0,0,0,.2); color: white; font-size: 9px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s var(--ease); }.toast.is-visible { opacity: 1; transform: none; }
.mobile-scrim { display: none; }

@media (max-width: 980px) {
  .account-shell { grid-template-columns: 220px minmax(0,1fr); }
  .overview-grid, .app-grid, .subscription-grid { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .compact-panel, .danger-zone { order: -1; }
}
@media (max-width: 720px) {
  .account-shell { display: block; width: 100%; min-height: 100svh; margin: 0; border: 0; border-radius: 0; }
  .topbar { position: sticky; top: 0; z-index: 25; height: 68px; padding: 0 13px; }
  .cmine-brand small, .sync-state { display: none; }
  .nav-toggle { display: grid; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 45; width: min(286px,86vw); padding: 88px 15px 20px; border-right: 1px solid var(--line); background: var(--glass-strong); box-shadow: 24px 0 70px rgba(22,29,20,.2); transform: translateX(-105%); transition: transform .32s var(--ease); backdrop-filter: blur(30px); }
  .sidebar.is-open { transform: none; }
  .mobile-scrim { position: fixed; inset: 0; z-index: 40; display: block; background: rgba(17,23,16,.34); opacity: 0; pointer-events: none; transition: opacity .25s ease; backdrop-filter: blur(4px); }
  .mobile-scrim.is-visible { opacity: 1; pointer-events: auto; }
  .workspace { max-height: none; padding: 30px 15px 64px; overflow: visible; }
  .page-heading { display: grid; align-items: start; }
  .page-heading .quiet-button, .page-heading .large-status { justify-self: start; }
  .page-heading h1 { font-size: clamp(2.5rem,13vw,4rem); }
  .identity-hero { display: grid; }
  .identity-id { width: 100%; }
  .overview-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .settings-card, .privacy-row { grid-template-columns: 43px 1fr; align-items: start; }
  .settings-card > button, .privacy-row > button { grid-column: 2; justify-self: start; }
  .app-card-head { grid-template-columns: 48px 1fr; }.app-card-head > .status-pill { grid-column: 2; }
  .session-row { grid-template-columns: 44px 1fr; }.session-row > .status-pill, .session-row > button { grid-column: 2; justify-self: start; }
}
@media (max-width: 420px) {
  .topbar-end { gap: 6px; }
  .cmine-mark { width: 36px; height: 36px; }
  .identity-person { align-items: flex-start; }
  .hero-avatar { width: 58px; height: 58px; }
  .security-score { grid-template-columns: 1fr; }
  .score-ring { margin: auto; }
  .subscription-card { grid-template-columns: 45px 1fr; }.subscription-card > .status-pill { grid-column: 2; }
  .form-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Server-rendering adaptations to the design template.
 *
 * The template is a single-page demo: navigation is <button data-view> and the
 * views are all present at once. We render one page per URL, so navigation has
 * to be real <a href> links — bookmarkable, openable in a new tab, and working
 * without JavaScript.
 *
 * Everything below exists only to bridge that difference. It mirrors the
 * template's own rules onto anchors; it does not invent new visual decisions.
 * If you find yourself adding a *look* here, it belongs in the template
 * instead, so both stay in sync.
 */

/* ── navigation: the template styles buttons, we emit links ─────────── */
.primary-nav a {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 43px;
  padding: 6px 10px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.primary-nav a:hover { background: rgba(255,255,255,.34); color: var(--ink); }
.primary-nav a.is-active { background: var(--glass-strong); box-shadow: 0 8px 22px rgba(44,57,40,.08); color: var(--ink); }
.primary-nav a.is-active::before {
  position: absolute; left: 0; width: 3px; height: 21px;
  border-radius: 0 3px 3px 0; background: var(--sage); content: "";
}

/* Same for the card / settings actions that are links rather than buttons. */
a.primary-button, a.secondary-button, a.quiet-button, a.text-button { text-decoration: none; }
a.secondary-button, a.primary-button { display: inline-flex; align-items: center; justify-content: center; }

/* Forms that submit a single action are laid out like a button in the card. */
.settings-card form, .status-row form, .product-row form { display: contents; }

/* ── server-rendered feedback ───────────────────────────────────────── */
/* The template shows results through a JS toast; a form POST + redirect has
   to state the outcome in the page itself. */
.flash {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 18px; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--glass); font-size: 13px;
}
.flash.ok { border-color: rgba(109,126,102,.4); }
.flash.err { border-color: rgba(163,86,78,.45); color: #7d3b34; }
@media (prefers-color-scheme: dark) { .flash.err { color: #e8a79f; } }
.flash::before { content: "✓"; opacity: .7; }
.flash.err::before { content: "!"; }

/* Long values (ids, tokens, recovery codes) must not blow out a panel. */
.mono-block {
  margin: 0; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 13px;
  background: rgba(255,255,255,.4);
  font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}

/* The template's tables are decorative; ours carry real data. */
.panel table { width: 100%; border-collapse: collapse; font-size: 13px; }
.panel th, .panel td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.panel th { color: var(--quiet); font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.panel tr:last-child td { border-bottom: 0; }

/* Utility echoes so page bodies can stay declarative. */
.stack { display: grid; gap: 12px; }
.muted-note { color: var(--quiet); font-size: 12px; }

/* ── sign-in forms ──────────────────────────────────────────────────────
 * The template's only form is a single email field with an inline arrow
 * (.field-row). Ours carry two or three fields plus a labelled submit, so
 * these rules dress those controls in the template's own tokens rather than
 * misusing .field-row for a shape it wasn't drawn for. */
.auth-stage .input {
  width: 100%; margin-bottom: 11px; padding: 13px 15px;
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--glass); color: var(--ink); font: inherit; font-size: 15px;
}
.auth-stage .input:focus { outline: 2px solid var(--sage); outline-offset: 1px; }
.auth-stage .split { display: grid; grid-template-columns: 88px 1fr; gap: 8px; }
.auth-stage .btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 48px; margin-top: 4px; padding: 13px 18px;
  border: 0; border-radius: 14px; background: var(--ink);
  /* --page, not --surface-solid: the sign-in sheet (styles.css) doesn't
     define the latter, so the declaration was dropped and the label
     inherited --ink — black text on a black button. --page is the ground
     colour in both themes, so it stays readable either way. */
  color: var(--page);
  font: inherit; font-size: 15px; font-weight: 640; cursor: pointer;
}
.auth-stage .btn-secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 46px; padding: 13px 18px;
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--glass); color: var(--ink); font: inherit; font-size: 15px; text-decoration: none;
}
.auth-stage .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 16px; padding: 4px; border-radius: 15px; background: rgba(29,39,27,.05); }
.auth-stage .tabs a { padding: 10px; border-radius: 11px; color: var(--muted); font-size: 14px; text-align: center; text-decoration: none; }
.auth-stage .tabs a.active { background: var(--glass-strong); color: var(--ink); font-weight: 640; }
.auth-stage .hint, .auth-stage .sub { color: var(--quiet); font-size: 13.5px; }
.auth-stage .sub { margin-bottom: 18px; font-size: 14px; }
.auth-stage .err, .auth-stage .ok { margin-bottom: 14px; padding: 11px 14px; border-radius: 14px; font-size: 13px; }
.auth-stage .err { border: 1px solid rgba(178,58,48,.32); color: var(--red); }
.auth-stage .ok { border: 1px solid rgba(97,116,91,.36); color: var(--sage); }

/* ── admin & developer portal ───────────────────────────────────────────
 * Internal surfaces. They deliberately stay plain — the design template
 * covers the end-user account centre, and inventing a third look for tools
 * only staff see would be effort spent in the wrong place. These few rules
 * keep them legible inside the account chrome. */
.wide-card { padding: 22px 24px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.btn, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 10px 18px; border-radius: 13px;
  font: inherit; font-size: 13.5px; font-weight: 620; cursor: pointer; text-decoration: none;
}
/* Fallback matters: this same file is bundled into BOTH sheets, and
   styles.css (sign-in) never defines --surface-solid. Without the
   fallback the declaration is invalid there and the label inherits
   --ink — black text on a black button. */
.btn { border: 0; background: var(--ink); color: var(--surface-solid, var(--page)); }
.btn-secondary { border: 1px solid var(--line-strong); background: var(--glass); color: var(--ink); }
.btn-secondary.danger { color: var(--red); border-color: rgba(178,58,48,.35); }
.input { width: 100%; margin-bottom: 10px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--glass); color: var(--ink); font: inherit; }
.hint { color: var(--quiet); font-size: 12.5px; }
.err, .ok { margin-bottom: 14px; padding: 11px 14px; border-radius: 14px; font-size: 13px; }
.err { border: 1px solid rgba(178,58,48,.32); color: var(--red); }
.ok { border: 1px solid rgba(97,116,91,.36); color: var(--sage); }
.badge { padding: 3px 9px; border-radius: 999px; background: rgba(29,39,27,.06); color: var(--muted); font-size: 11px; }
.badge-green { background: var(--sage-soft); color: var(--sage); }
.badge-amber { background: rgba(196,138,42,.15); color: var(--amber); }
.badge-red { background: rgba(178,58,48,.14); color: var(--red); }
.row-title { font-size: 14px; font-weight: 620; }
.attention-panel { border-color: rgba(196,138,42,.4); }
.link-button { border: 0; background: none; color: var(--quiet); cursor: pointer; font: inherit; }
.link-button:hover { color: var(--red); }
