[hidden]{display:none!important;}
:root {
  --bg: #f5f5f7;
  --surface: #fff;
  --surface-2: #f5f5f7;
  --line: #00000014;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-soft: #0071e31f;
  --amber: #bf4800;
  --amber-soft: #fff4e8;
  --danger: #ff3b30;
  --ok: #0a7c66;
  --ok-soft: #0a7c6614;
  --shadow: 0 1px 2px #0000000a, 0 12px 32px #0000000f;
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
  min-height: 100vh;
}
button, input { font: inherit; }


a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 28px;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--muted); padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.nav a:hover { background: #0000000a; color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.badge-ro {
  margin-left: auto; font-size: 12px; font-weight: 600; color: var(--amber);
  background: var(--amber-soft); padding: 6px 12px; border-radius: 999px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 24px 64px; }
.hero h1 { margin: 0 0 8px; font-size: 32px; letter-spacing: -.03em; }
.hero p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.hint {
  margin-top: 14px; padding: 12px 16px; border-radius: 12px;
  background: var(--amber-soft); color: var(--amber); font-size: 13px; font-weight: 600;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px;
}
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.card .metric { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin: 10px 0 4px; }
.card a.cta {
  display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600;
  color: var(--accent); text-decoration: none;
}

.panel {
  margin-top: 22px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; font-size: 17px; }
.muted { color: var(--muted); font-size: .82rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: none; background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #0071e308; }

.pill {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 650;
  background: color-mix(in srgb, var(--pill, var(--muted)) 14%, transparent);
  color: var(--pill, var(--muted));
}
.pill.ok { --pill: var(--ok); }
.pill.warn { --pill: #c27803; }
.pill.info { --pill: var(--accent); }
.pill.muted { --pill: var(--muted); }
.pill.danger { --pill: var(--danger); }

.check-list { list-style: none; margin: 0; padding: 8px 0; }
.check-list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.check-list li:last-child { border-bottom: none; }
.check-name { font-weight: 650; min-width: 88px; }
.footer {
  margin-top: 36px; color: var(--muted); font-size: 12px; text-align: center;
}

.page { display: none; }
.page.active { display: block; }


.brand-sub { color: var(--muted); font-weight: 500; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge-ro { margin-left: 0; }
.who { color: var(--muted); font-size: 12px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn {
  color: var(--text); letter-spacing: -.01em; background: #0000000d; border: 0;
  border-radius: 980px; padding: .42rem .95rem; font-size: .86rem; font-weight: 500;
  cursor: pointer; transition: background .2s, opacity .2s;
}
.btn:hover { background: #00000014; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #0077ed; }
.btn.ghost { color: var(--accent); background: transparent; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.small { padding: .2rem .55rem; font-size: .78rem; }
.btn:disabled, .btn.bci-otp-busy {
  opacity: .45; background: #e5e7eb !important; color: #9ca3af !important;
  cursor: default; box-shadow: none; border-color: #e5e7eb;
}

.field {
  color: var(--text); background: #0000000a; border: 0; border-radius: 12px; outline: none;
  padding: .62rem .8rem; width: 100%; font: inherit; transition: background .2s, box-shadow .2s;
  box-sizing: border-box;
}
.field:focus { background: #fff; box-shadow: 0 0 0 4px #0071e32e; }



body.on-login .topbar, body.on-login #app-root { display: none !important; }

/* login -- match brain.bcihk.net CRM card metrics (2026-10-10) */
.login-page{background:radial-gradient(1200px 600px at 10% -10%, #0071e314, transparent 55%), radial-gradient(900px 500px at 100% 0%, #34c7590f, transparent 50%), var(--bg,#f5f5f7);place-items:center;min-height:100vh;padding:1.5rem;display:grid}
.login-card{background:var(--panel,#fff);border-radius:22px;gap:.35rem;width:min(400px,92vw);padding:2.1rem 1.7rem 1.6rem;display:grid;box-shadow:0 1px 2px #0000000a,0 18px 50px #00000014}
.login-brand{align-items:center;gap:.85rem;margin-bottom:.85rem;display:flex}
.login-mark{object-fit:contain;border-radius:0;flex-shrink:0;width:72px;height:auto;display:block}
.login-brand strong{letter-spacing:-.02em;font-weight:600}
.login-brand span{color:var(--muted,#6e6e73);font-size:.75rem;display:block}

/* login brand hierarchy: product first (Project), suite second (BCI Brain) */
.login-brand .brand-text-swap .brand-primary{
  font-family: var(--display);
  letter-spacing: -.02em;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  text-transform: none;
  display: block;
}
.login-brand .brand-text-swap .brand-secondary{
  color: var(--muted);
  letter-spacing: .01em;
  margin-top: .12rem;
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.2;
  text-transform: none;
  display: block;
}

.brand-text strong{font-family:var(--display);letter-spacing:-.02em;font-size:1.02rem;font-weight:600;line-height:1.2;display:block}
.brand-text span{color:var(--muted);letter-spacing:.02em;text-transform:uppercase;margin-top:.12rem;font-size:.75rem;display:block}
.login-card h1{letter-spacing:-.03em;margin:0 0 .2rem;font-size:1.85rem;font-weight:600}
.login-card .btn{width:100%;margin-top:.45rem}
.login-msg{min-height:1.2em;margin-top:.65rem;font-size:.86rem}
.login-msg:empty{display:none;min-height:0;margin-top:0}
.login-msg.err{color:var(--danger,#ff3b30)}
.brand-mark,.brand-logo{object-fit:contain;border-radius:0;flex-shrink:0;width:52px;height:auto;display:block}

.login-card .btn.ghost:disabled {
  color: var(--muted);
  background: #0000000d;
  opacity: 1;
}

