/* Apple-style design system: SF Pro (Inter fallback), #f5f5f7 canvas, white rounded cards, frosted nav. */
:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --bg: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --hair: rgba(0, 0, 0, 0.08);
  --hair-2: #e8e8ed;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #0066cc;
  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 28px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.04), 0 16px 44px rgba(0, 0, 0, 0.09);

  /* Status colors for the tracker (each always paired with a text label) */
  --s-closed: #0071e3;
  --s-inProgress: #ff9f0a;
  --s-ongoing: #30b0c7;
  --s-notStarted: #c7c7cc;
  --s-toDiscuss: #af52de;
  --s-late: #ff6961;
  --good: #1f9d3a;
  --warn: #c76a00;
  --bad: #d70015;
  --fn: #0071e3;
  --mn: #ff9f0a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; letter-spacing: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: 52px;
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.nav-inner {
  max-width: 1180px; height: 100%; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6); color: #fff; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  font-size: 13px; color: var(--ink); opacity: 0.8; padding: 6px 12px; border-radius: 999px; letter-spacing: -0.01em;
}
.nav-links a:hover { opacity: 1; text-decoration: none; background: rgba(0, 0, 0, 0.04); }
.nav-links a[aria-current="page"] { opacity: 1; background: rgba(0, 0, 0, 0.06); font-weight: 500; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-2); }
.role-pill { padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.05); font-size: 12px; color: var(--ink-2); }
.link-btn { background: none; border: 0; color: var(--link); cursor: pointer; padding: 6px 4px; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 0 22px 120px; }
.hero { padding: 72px 0 44px; text-align: center; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--ink-2); margin: 0 0 10px; letter-spacing: -0.01em; }
.eyebrow .accent { color: #bf4800; }
.headline {
  font-size: clamp(40px, 6vw, 64px); line-height: 1.06; font-weight: 700; letter-spacing: -0.035em; margin: 0;
}
.headline .grad {
  background: linear-gradient(90deg, #0071e3 0%, #5e5ce6 50%, #bf5af2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subhead { font-size: 21px; line-height: 1.38; color: var(--ink-2); margin: 16px auto 0; max-width: 760px; letter-spacing: -0.015em; font-weight: 400; }
.meta-line { margin-top: 18px; font-size: 14px; color: var(--ink-3); }

.section { margin-top: 84px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.section-title { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; margin: 0; }
.section-sub { font-size: 19px; color: var(--ink-2); margin: 8px 0 0; letter-spacing: -0.012em; max-width: 720px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card.lift:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-title { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 4px; }
.card-sub { font-size: 15px; color: var(--ink-2); margin: 0 0 22px; }

/* ---------- Hero summary (ring + tiles) ---------- */
.summary { display: grid; grid-template-columns: 360px 1fr; gap: 20px; }
@media (max-width: 960px) { .summary { grid-template-columns: 1fr; } }
.ring-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 36px 28px; }
.ring { position: relative; width: 230px; height: 230px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; }
.ring-value { font-size: 56px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.ring-label { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.ring-arc { transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
.ring-caption { margin-top: 18px; font-size: 15px; color: var(--ink-2); max-width: 260px; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 680px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { padding: 24px; display: flex; flex-direction: column; justify-content: space-between; min-height: 142px; }
.tile-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.tile-value { font-size: 48px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-top: 18px; }
.tile-foot { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

/* ---------- Charts ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 18px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .sw { width: 12px; height: 12px; border-radius: 4px; }

.hbars { display: flex; flex-direction: column; gap: 16px; }
.hbar-row { display: grid; grid-template-columns: 200px 1fr 56px; align-items: center; gap: 16px; }
@media (max-width: 680px) { .hbar-row { grid-template-columns: 1fr 48px; } .hbar-row .hbar-name { grid-column: 1 / -1; } }
.hbar-name { font-size: 15px; font-weight: 500; letter-spacing: -0.015em; }
.hbar-name small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }
.hbar-track { display: flex; gap: 2px; height: 14px; border-radius: 7px; background: #f0f0f3; overflow: hidden; }
.hbar-seg { height: 100%; min-width: 3px; transition: flex-grow 1s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s; cursor: default; }
.hbar-seg:first-child { border-radius: 7px 0 0 7px; }
.hbar-seg:last-child { border-radius: 0 7px 7px 0; }
.hbar-seg:only-child { border-radius: 7px; }
.hbar-seg:hover { filter: brightness(1.08) saturate(1.1); }
.hbar-val { font-size: 15px; font-weight: 600; text-align: right; color: var(--ink); }
.hbar-val small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }

.columns { display: flex; align-items: flex-end; gap: 18px; height: 240px; padding-top: 12px; border-bottom: 1px solid var(--hair-2); }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 8px; }
.col-stack { width: 100%; max-width: 64px; display: flex; flex-direction: column-reverse; gap: 2px; }
.col-seg { width: 100%; transition: height 1s cubic-bezier(0.22, 1, 0.36, 1); }
.col-stack .col-seg:last-child { border-radius: 8px 8px 0 0; }
.col-total { font-size: 15px; font-weight: 600; }
.col-labels { display: flex; gap: 18px; margin-top: 10px; }
.col-labels div { flex: 1; text-align: center; font-size: 13px; color: var(--ink-2); line-height: 1.25; }

.tooltip {
  position: fixed; z-index: 100; pointer-events: none; padding: 10px 14px; border-radius: 12px;
  background: rgba(29, 29, 31, 0.92); color: #fff; font-size: 13px; line-height: 1.4; max-width: 300px;
  backdrop-filter: blur(10px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18); opacity: 0; transition: opacity 0.12s;
}
.tooltip.show { opacity: 1; }
.tooltip b { font-weight: 600; }

/* ---------- Validations ---------- */
.val-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.val-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.val-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.val-no { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
.val-name { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin: 2px 0 0; }
.val-stage { font-size: 13px; color: var(--ink-3); }
.score { display: grid; grid-template-columns: 34px 1fr 46px; align-items: center; gap: 10px; font-size: 13px; }
.score-k { font-weight: 600; color: var(--ink-2); }
.score-track { height: 8px; border-radius: 4px; background: #f0f0f3; overflow: hidden; }
.score-fill { height: 100%; border-radius: 4px; transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
.score-v { text-align: right; font-weight: 600; }
.score-group-label { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.val-status { font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--hair-2); padding-top: 12px; white-space: pre-line; }
.val-status b { color: var(--ink); font-weight: 600; }
.no-score { font-size: 14px; color: var(--ink-3); padding: 6px 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill.vizuara { background: rgba(94, 92, 230, 0.1); color: #4b49c7; }
.pill.ops { background: rgba(255, 159, 10, 0.14); color: #a35a00; }
.pill.neutral { background: rgba(0, 0, 0, 0.05); color: var(--ink-2); }
.pill.good { background: rgba(52, 199, 89, 0.14); color: #1b7c33; }
.pill.bad { background: rgba(255, 59, 48, 0.1); color: #c4141f; }
.pill.warn { background: rgba(255, 159, 10, 0.14); color: #a35a00; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 14px 0; border-top: 1px solid var(--hair-2); }
.list-item:first-child { border-top: 0; padding-top: 0; }
.li-title { font-size: 15px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.35; }
.li-meta { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.empty { font-size: 15px; color: var(--ink-3); padding: 18px 0; text-align: center; }

/* ---------- Table ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search {
  flex: 1; min-width: 220px; height: 40px; border-radius: 999px; border: 1px solid var(--hair-2); background: #fff;
  padding: 0 16px 0 40px; font: inherit; font-size: 15px; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5.5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 15px center;
}
.search:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15); }
.segmented { display: inline-flex; padding: 3px; background: rgba(118, 118, 128, 0.12); border-radius: 10px; gap: 2px; flex-wrap: wrap; }
.segmented button {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 0 12px 12px; white-space: nowrap; letter-spacing: 0; }
table.data td { padding: 14px 12px; border-top: 1px solid var(--hair-2); vertical-align: top; }
table.data tr.row { cursor: pointer; transition: background 0.15s; }
table.data tr.row:hover td { background: #fafafc; }
table.data td.id { font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
table.data td.title { font-weight: 500; min-width: 280px; }
table.data tr.detail td { border-top: 0; padding-top: 0; color: var(--ink-2); font-size: 13px; white-space: pre-line; }
.status-cell { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.count-note { font-size: 13px; color: var(--ink-3); margin-top: 14px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 18px;
  border-radius: 999px; border: 0; background: var(--blue); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s; white-space: nowrap;
}
.btn:hover { background: var(--blue-hover); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.secondary { background: rgba(0, 0, 0, 0.05); color: var(--ink); }
.btn.secondary:hover { background: rgba(0, 0, 0, 0.08); }
.btn.danger { background: rgba(255, 59, 48, 0.1); color: #c4141f; }
.btn.danger:hover { background: rgba(255, 59, 48, 0.16); }
.btn.small { height: 30px; padding: 0 14px; font-size: 13px; }
.input {
  height: 40px; border-radius: 12px; border: 1px solid var(--hair-2); padding: 0 14px; font: inherit; font-size: 15px; background: #fff; outline: none;
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px); z-index: 200; opacity: 0;
  background: rgba(29, 29, 31, 0.92); color: #fff; padding: 12px 20px; border-radius: 14px; font-size: 14px;
  backdrop-filter: blur(10px); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: min(560px, calc(100vw - 40px));
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: rgba(196, 20, 31, 0.95); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

.loading { display: grid; place-items: center; min-height: 60vh; color: var(--ink-3); font-size: 15px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #e5e5ea; border-top-color: var(--ink-3); animation: spin 0.9s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer { text-align: center; font-size: 12px; color: var(--ink-3); padding: 48px 0 0; border-top: 1px solid var(--hair-2); margin-top: 96px; }
details.more summary { cursor: pointer; color: var(--link); font-size: 15px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }

/* ---------- Brand in nav ---------- */
.brand-sub { font-size: 13px; font-weight: 500; color: var(--ink-2); padding-left: 10px; border-left: 1px solid var(--hair-2); line-height: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Home ---------- */
.home-hero { padding-top: 80px; }
.hero-logo { height: 56px; width: auto; display: block; margin: 0 auto; }
.hero-tag { font-size: 13px; letter-spacing: 0.22em; color: var(--ink-2); margin: 14px 0 34px; font-weight: 500; }
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .panels { grid-template-columns: 1fr; } }
.panel-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 52px 36px 40px; border-radius: var(--radius-lg); overflow: hidden; color: inherit; min-height: 620px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s;
}
.panel-tile:hover { text-decoration: none; transform: scale(1.012); }
.panel-tile.dark { background: radial-gradient(120% 80% at 50% 0%, #2a2a3a 0%, #111114 55%, #000 100%); color: #f5f5f7; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18); }
.panel-tile.light { background: #fff; box-shadow: var(--shadow); }
.panel-tile.light:hover { box-shadow: var(--shadow-hover); }
.pt-eyebrow { font-size: 14px; font-weight: 600; margin: 0 0 8px; color: #bf4800; letter-spacing: -0.01em; }
.dark .pt-eyebrow { color: #a5a3ff; }
.pt-title { font-size: 44px; line-height: 1.08; font-weight: 700; letter-spacing: -0.035em; margin: 0; }
.pt-sub { font-size: 17px; color: var(--ink-2); margin: 12px auto 0; max-width: 420px; }
.dark .pt-sub { color: #a1a1a6; }
.pt-ring { margin: 34px 0 30px; }
.dark .ring-label { color: #a1a1a6; }
.pt-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: 440px; gap: 8px; }
.pt-stat-v { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.pt-stat-l { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.dark .pt-stat-l { color: #a1a1a6; }
.pt-cta { margin-top: auto; padding-top: 34px; font-size: 17px; color: var(--link); display: inline-flex; align-items: center; gap: 4px; }
.dark .pt-cta { color: #2997ff; }
.panel-tile:hover .pt-cta { text-decoration: underline; }

/* ---------- Vizuara page ---------- */
.ws-card { position: relative; }
.ws-count { position: absolute; top: 26px; right: 26px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.tl-item { display: grid; grid-template-columns: 22px 1fr; gap: 12px; position: relative; }
.tl-item:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 24px; bottom: -16px; width: 2px; background: var(--hair-2); }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1; }
.tl-dot.good { background: #34c759; }
.tl-dot.warn { background: #ff9f0a; }
.tl-dot.bad { background: #ff3b30; }
.tl-detail { font-size: 13px; color: var(--ink-2); margin-top: 4px; line-height: 1.45; }
.asks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.asks li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--hair-2); align-items: start; }
.asks li:first-child { border-top: 0; padding-top: 0; }
.ask-n { width: 28px; height: 28px; border-radius: 50%; background: rgba(94, 92, 230, 0.1); color: #4b49c7; display: grid; place-items: center; font-size: 13px; font-weight: 600; }

/* ---------- Login ---------- */
.login-body { min-height: 100vh; background: #fbfbfd; overflow-x: hidden; }
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; animation: drift 22s ease-in-out infinite alternate; }
.aurora .a1 { width: 620px; height: 620px; background: #7ab8ff; top: -180px; left: -120px; }
.aurora .a2 { width: 560px; height: 560px; background: #c9a7ff; bottom: -200px; right: -100px; animation-delay: -7s; }
.aurora .a3 { width: 420px; height: 420px; background: #ffd29a; top: 40%; left: 55%; opacity: 0.4; animation-delay: -14s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(60px, 40px) scale(1.12); } }
.login-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; }
.login-card {
  width: 100%; max-width: 440px; text-align: center; padding: 48px 40px 36px; border-radius: 32px;
  background: rgba(255, 255, 255, 0.72); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.8); box-shadow: 0 30px 80px rgba(30, 40, 90, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
.login-logo { height: 40px; width: auto; display: block; margin: 0 auto; }
.login-tag { font-size: 11px; letter-spacing: 0.24em; color: var(--ink-2); margin: 10px 0 30px; font-weight: 500; }
.login-title { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; margin: 0; line-height: 1.1; }
.login-sub { font-size: 15px; color: var(--ink-2); margin: 8px 0 28px; }
.role-seg {
  --thumb-x: 0%; position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px;
  background: rgba(118, 118, 128, 0.12);
}
.role-seg::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 9px; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04); transform: translateX(var(--thumb-x));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.role-seg button { position: relative; z-index: 1; border: 0; background: transparent; padding: 9px 10px; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; border-radius: 9px; }
.role-seg button[aria-pressed="false"] { color: var(--ink-2); }
.role-hint { font-size: 14px; color: var(--ink-2); margin: -10px 0 22px; min-height: 18px; }
.pw-field { position: relative; }
.pw-field input {
  width: 100%; height: 54px; border-radius: 14px; border: 1px solid #d2d2d7; background: rgba(255, 255, 255, 0.9);
  padding: 0 62px 0 18px; font: inherit; font-size: 17px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.pw-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.18); }
.pw-submit {
  position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--blue);
  display: grid; place-items: center; cursor: pointer; transition: background 0.2s, opacity 0.2s, transform 0.15s;
}
.pw-submit:hover { background: var(--blue-hover); }
.pw-submit:disabled { opacity: 0.3; cursor: default; }
.login-form.busy .pw-submit { animation: pulse 1s ease-in-out infinite; }
.login-form.success .pw-field input { border-color: #34c759; box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.18); }
@keyframes pulse { 50% { transform: scale(0.9); } }
.login-form.shake { animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.login-error { min-height: 20px; margin: 12px 0 0; font-size: 13px; color: #d70015; }
.login-foot { margin-top: 26px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* ---------- Editor ---------- */
.page.wide { max-width: 1400px; }
.editor-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 48px 0 24px; flex-wrap: wrap; }
.editor-head .eyebrow { color: #bf4800; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.save-bar {
  position: sticky; top: 52px; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; margin: 0 -16px 18px; border-radius: 16px; background: rgba(245, 245, 247, 0.82);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); transition: box-shadow 0.3s;
}
.save-bar.dirty { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07); background: rgba(255, 255, 255, 0.86); }
.save-state { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.save-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.name-input { height: 36px; width: 180px; border-radius: 999px; font-size: 14px; }
.sheet-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.sheet-tabs button {
  flex: none; border: 0; background: rgba(0, 0, 0, 0.04); color: var(--ink); padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background 0.2s;
}
.sheet-tabs button:hover { background: rgba(0, 0, 0, 0.08); }
.sheet-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.tab-count { font-size: 11px; opacity: 0.6; }
.row-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.row-tools-label { font-size: 13px; color: var(--ink-3); margin-right: auto; }
.grid-wrap { padding: 0; overflow: auto; max-height: calc(100vh - 230px); }
.sheet-grid { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.sheet-grid th, .sheet-grid td { border-right: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); }
.sheet-grid thead th { position: sticky; top: 0; z-index: 3; background: #f9f9fb; font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 6px 8px; }
.sheet-grid th.corner { left: 0; z-index: 4; }
.sheet-grid th.rn {
  position: sticky; left: 0; z-index: 2; background: #f9f9fb; font-size: 11px; color: var(--ink-3); font-weight: 500; padding: 0 10px;
  cursor: pointer; text-align: right; min-width: 44px; user-select: none;
}
.sheet-grid th.rn:hover { background: #eef0f4; color: var(--ink); }
.sheet-grid td { padding: 8px 10px; min-width: 120px; max-width: 360px; vertical-align: top; white-space: pre-wrap; word-break: break-word; outline: none; background: #fff; line-height: 1.4; }
.sheet-grid td:focus { box-shadow: inset 0 0 0 2px var(--blue); background: #fff; position: relative; z-index: 1; }
.sheet-grid tr.hdr td { font-weight: 600; background: #f4f6fa; position: sticky; top: 27px; z-index: 2; }
.sheet-grid tr.sel td, .sheet-grid tr.sel th.rn { background: rgba(0, 113, 227, 0.07); }
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.28); backdrop-filter: blur(6px); animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: 100%; max-width: 560px; max-height: 84vh; overflow: auto; background: #fff; border-radius: 24px; padding: 32px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25); animation: rise 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.sheet-list { list-style: none; padding: 0; margin: 0 0 16px; border-radius: 14px; background: #f5f5f7; }
.sheet-list li { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 14px; border-top: 1px solid var(--hair-2); }
.sheet-list li:first-child { border-top: 0; }
.sheet-list li span:last-child { color: var(--ink-3); }
.preview-ok, .preview-warn { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 8px 0; }
.preview-ok { color: #1b7c33; }
.preview-warn { color: #a35a00; }
.history-list { max-height: 50vh; overflow: auto; }

/* ---------- Fixes after visual review ---------- */
.list-item > .pill { align-self: start; }
.ring-label { max-width: 70%; margin-left: auto; margin-right: auto; line-height: 1.3; }
.more-row { text-align: center; margin-top: 18px; }
@media (max-width: 760px) {
  .nav-inner { gap: 10px; padding: 0 14px; }
  .brand-sub, .role-pill { display: none; }
  .nav-links { margin-left: 0; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: none; padding: 6px 10px; }
  .nav-right { margin-left: 0; }
  .hero { padding: 48px 0 32px; }
  .panel-tile { min-height: 0; padding: 40px 22px 32px; }
  .pt-title { font-size: 36px; }
  .section { margin-top: 64px; }
  .section-title { font-size: 32px; }
  .card { padding: 22px; }
}
