/* ============================================================
   PRÉ-KYC RINNE · app styles
   Componentes derivados do Rinne Design System.
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--bg-subtle);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
input, button, textarea, select { font-family: inherit; }
::selection { background: var(--purple-200); }

@keyframes pk-spin  { to { transform: rotate(360deg); } }
@keyframes pk-pulse { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
@keyframes pk-in    { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pk-toast { from { opacity: 0; transform: translate(-50%,12px); } to { opacity: 1; transform: translate(-50%,0); } }

.hidden { display: none !important; }

/* —— Eyebrow / labels —— */
.eyebrow {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow .slash { color: var(--accent); }

/* ============================================================
   LOGIN
   ============================================================ */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.login-brand {
  position: relative;
  background: var(--ink-900);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px;
}
.login-brand .dotgrid {
  position: absolute; inset: 0;
  background-image: var(--dotgrid);
  background-size: var(--dotgrid-size);
  opacity: .5;
  -webkit-mask-image: radial-gradient(120% 90% at 30% 20%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 30% 20%, #000 0%, transparent 72%);
}
.login-brand > * { position: relative; }
.login-brand .logo { height: 26px; width: auto; display: block; }
.login-brand .eyebrow { color: var(--lavender); margin-bottom: 18px; }
.login-brand h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink-50);
  margin: 0 0 18px;
  max-width: 15ch;
}
.login-brand p { font-size: 15px; line-height: 1.6; color: var(--ink-300); margin: 0; max-width: 42ch; }
.login-brand .footline {
  display: flex; gap: 28px;
  font-family: var(--font-data);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-400);
}
.login-form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background: var(--surface);
}
.login-form { width: 100%; max-width: 360px; animation: pk-in .4s var(--ease-out) both; }
.login-form .eyebrow { margin-bottom: 10px; }
.login-form h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 26px;
  letter-spacing: -0.01em; color: var(--text-strong); margin: 0 0 4px;
}
.login-form .sub { font-size: 14px; color: var(--text-muted); margin: 0 0 28px; }
.login-fields { display: flex; flex-direction: column; gap: 16px; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.login-divider .line { flex: 1; height: 1px; background: var(--border); }
.login-divider .ou {
  font-family: var(--font-data); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-subtle);
}
.login-footnote { font-size: 12px; color: var(--text-subtle); text-align: center; margin: 26px 0 0; line-height: 1.5; }

@media (max-width: 880px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}

/* ============================================================
   FIELDS (DS Input)
   ============================================================ */
.field label {
  display: block;
  font-family: var(--font-data);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field input, .field select {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px; color: var(--text-strong);
  outline: none;
  background: var(--surface);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.field select { padding: 0 12px; cursor: pointer; }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.field input.data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.field input::placeholder { color: var(--text-subtle); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-data);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
  box-shadow: var(--glow-purple-sm);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); border-color: var(--accent-press); }
.btn-primary .arrow { transition: transform var(--dur-fast) var(--ease-out); }
.btn-primary:hover .arrow { transform: translateX(3px); }

.btn-secondary {
  background: var(--surface); border-color: var(--border-strong); color: var(--text-body);
}
.btn-secondary:hover { background: var(--paper-2); }

.btn-danger { background: var(--red-500); border-color: var(--red-500); color: #fff; }

.btn-block { width: 100%; }
.btn-lg { height: 48px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 11px; letter-spacing: 0.06em; gap: 6px; }

.btn-icon {
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease-out);
  flex: 0 0 auto;
}
.btn-icon:hover { background: var(--paper-2); }
.btn-icon.sm { width: 32px; height: 32px; color: var(--text-subtle); }

/* dark-panel outline button */
.btn-dark-outline {
  width: 100%; height: 40px;
  border: 1px solid var(--border-dark); border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-50);
  font-family: var(--font-data); font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background var(--dur-fast) var(--ease-out);
}
.btn-dark-outline:hover { background: var(--ink-800); }

/* upload accent chip button */
.btn-upload {
  height: 32px; padding: 0 12px;
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  background: var(--accent); color: #fff;
  font-family: var(--font-data); font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-upload:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ============================================================
   TOP BAR / NAV
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 64px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
}
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 14px; }
.topbar .logo { height: 22px; width: auto; display: block; }
.topbar .sep { width: 1px; height: 22px; background: var(--border); }
.topbar nav { display: flex; align-items: center; gap: 4px; }
.nav-btn {
  height: 32px; padding: 0 14px; border: 0;
  border-radius: var(--radius-sm); background: transparent;
  font-family: var(--font-data); font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; color: var(--text-muted);
}
.nav-btn.active { background: var(--ink-900); color: #fff; }
.topbar .who { font-family: var(--font-data); font-size: 12px; color: var(--text-muted); }
.topbar .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink-900); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-data); font-size: 12px; font-weight: 600;
}

main { max-width: 1200px; margin: 0 auto; padding: 40px 32px 80px; }
.page { animation: pk-in .3s var(--ease-out) both; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 28px;
}
.page-head .eyebrow { margin-bottom: 8px; }
.page-head h1 {
  font-family: var(--font-display); font-weight: 700; font-size: 32px;
  letter-spacing: -0.01em; color: var(--text-strong); margin: 0;
}
.page-head .sub { font-size: 15px; color: var(--text-muted); margin: 8px 0 0; max-width: 60ch; }

/* ============================================================
   KPIs
   ============================================================ */
.kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 28px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.kpi .label {
  font-family: var(--font-data); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted);
}
.kpi .value {
  font-family: var(--font-data); font-size: 30px; font-weight: 600;
  color: var(--text-strong); margin-top: 8px; font-variant-numeric: tabular-nums;
}
.kpi .value.amber { color: var(--amber-500); }
.kpi .value.accent { color: var(--accent); }
.kpi .value.green { color: var(--green-500); }

/* ============================================================
   TABLES
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.table-card { overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--paper-2); }
th {
  padding: 13px 20px; text-align: left;
  font-family: var(--font-data); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap;
}
th.right, td.right { text-align: right; }
td {
  padding: 17px 20px; border-top: 1px solid var(--border);
  vertical-align: middle; font-size: 14px; color: var(--text-body);
}
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--paper-2); }
.cell-title { font-weight: 600; font-size: 14px; color: var(--text-strong); }
.cell-mono {
  font-family: var(--font-data); font-size: 12px; color: var(--text-muted);
  margin-top: 2px; font-variant-numeric: tabular-nums;
}
.org-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-data); font-size: 13px; color: var(--text-body);
}
.org-chip .sq {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--ink-900); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600; flex: 0 0 auto;
}
.mono-13 { font-family: var(--font-data); font-size: 13px; color: var(--text-body); font-variant-numeric: tabular-nums; }
.mono-13.muted { color: var(--text-muted); }
.row-actions { display: inline-flex; align-items: center; gap: 6px; }
.chev { color: var(--text-subtle); display: inline-flex; }

/* ============================================================
   PILLS & DOTS
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: var(--radius-pill);
  font-family: var(--font-data); font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap; line-height: 1;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.pill-sm {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: var(--radius-pill);
  font-family: var(--font-data); font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.check-dots { display: flex; align-items: center; gap: 7px; }
.check-dots .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }

/* ============================================================
   DETAIL
   ============================================================ */
.back-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: none; color: var(--text-muted);
  font-family: var(--font-data); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; padding: 0; margin-bottom: 22px;
}
.back-btn:hover { color: var(--text-strong); }

.detail-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 28px; flex-wrap: wrap;
}
.detail-head h1 {
  font-family: var(--font-display); font-weight: 700; font-size: 28px;
  letter-spacing: -0.01em; color: var(--text-strong); margin: 0;
}
.detail-head .meta {
  display: flex; align-items: center; gap: 18px; margin-top: 10px;
  font-family: var(--font-data); font-size: 13px; color: var(--text-muted);
  flex-wrap: wrap;
}
.detail-head .meta .num { font-variant-numeric: tabular-nums; }
.detail-head .actions { display: flex; align-items: center; gap: 10px; }

.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.detail-grid .col { display: flex; flex-direction: column; gap: 24px; }
.detail-grid .col.sticky { position: sticky; top: 88px; }
@media (max-width: 980px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .col.sticky { position: static; }
}

.panel { padding: 26px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 4px;
}
.panel-head .title { display: flex; align-items: center; gap: 9px; }
.panel-head .eyebrow { letter-spacing: 0.16em; }

/* analyzing spinner row */
.analyzing { display: flex; align-items: center; gap: 14px; padding: 24px 0 8px; }
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--purple-200); border-top-color: var(--accent);
  border-radius: 50%; display: inline-block;
  animation: pk-spin .8s linear infinite; flex: 0 0 auto;
}
.analyzing .t1 { font-weight: 600; color: var(--text-strong); }
.analyzing .t2 { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* callouts */
.callout { display: flex; gap: 14px; border-radius: var(--radius-md); padding: 16px 18px; margin: 16px 0 22px; }
.callout .k {
  font-family: var(--font-data); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 3px;
}
.callout p { font-size: 13px; line-height: 1.55; margin: 6px 0 0; }
.callout-contact { background: var(--purple-50); border: 1px solid var(--purple-200); }
.callout-contact .badge {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow-purple-sm);
}
.callout-contact .k { color: var(--accent); }
.callout-contact .name { font-weight: 700; font-size: 16px; color: var(--text-strong); }
.callout-contact p { color: var(--text-body); }
.callout-warn { background: var(--amber-100); border: 1px solid #F0D28A; }
.callout-warn .icon { color: #8A5A12; flex: 0 0 auto; padding-top: 1px; }
.callout-warn .k { color: #8A5A12; }
.callout-warn p { color: #6b4610; margin: 0; }

/* sócios */
.socios-label {
  font-family: var(--font-data); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-subtle); margin-bottom: 2px;
}
.socio-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 4px 16px; align-items: start;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.socio-row .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.socio-row .nome { font-weight: 600; color: var(--text-strong); font-size: 15px; }
.socio-row .tipo {
  display: inline-flex; padding: 2px 8px; border-radius: 4px;
  font-family: var(--font-data); font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  background: var(--ink-100); color: var(--ink-500);
}
.socio-row .tipo.pj { background: var(--amber-100); color: #8A5A12; }
.socio-row .kyc-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-data); font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.socio-row .kyc-tag::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.socio-row .sub {
  font-family: var(--font-data); font-size: 12px; color: var(--text-muted);
  margin-top: 4px; font-variant-numeric: tabular-nums;
}
.socio-row .part {
  font-family: var(--font-data); font-size: 15px; font-weight: 600;
  color: var(--text-strong); font-variant-numeric: tabular-nums;
}

/* reanalyze button */
.btn-reanalyze {
  height: 34px; padding: 0 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-data); font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-body);
  display: inline-flex; align-items: center; gap: 7px;
  transition: background var(--dur-fast) var(--ease-out);
}
.btn-reanalyze:hover { background: var(--paper-2); }
.btn-reanalyze.hot {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: var(--glow-purple-sm);
}
.btn-reanalyze.hot:hover { background: var(--accent-hover); }
.btn-reanalyze:disabled { opacity: .6; cursor: wait; }

/* documentos */
.doc-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.doc-row .file-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--paper-2); border: 1px solid var(--border);
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.doc-row .info { flex: 1; min-width: 0; }
.doc-row .tipo { font-weight: 600; font-size: 14px; color: var(--text-strong); }
.doc-row .nome { font-family: var(--font-data); font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.doc-row .acts { display: flex; align-items: center; gap: 6px; }

/* ============================================================
   DARK PANEL (Integração Rinne)
   ============================================================ */
.dark-panel {
  background: var(--ink-900); border-radius: var(--radius-lg);
  padding: 26px; position: relative; overflow: hidden;
}
.dark-panel .dotgrid {
  position: absolute; inset: 0;
  background-image: var(--dotgrid); background-size: var(--dotgrid-size);
  opacity: .4;
  -webkit-mask-image: radial-gradient(90% 70% at 80% 0%, #000, transparent 70%);
  mask-image: radial-gradient(90% 70% at 80% 0%, #000, transparent 70%);
}
.dark-panel .inner { position: relative; }
.dark-panel .eyebrow { color: var(--lavender); letter-spacing: 0.16em; margin-bottom: 18px; }
.check-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--border-dark);
}
.check-row .dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.check-row .dot.ok { background: var(--green-500); box-shadow: 0 0 0 3px rgba(24,165,103,.14); }
.check-row .dot.pending { background: var(--ink-300); }
.check-row .dot.error { background: var(--red-500); }
.check-row .label { flex: 1; color: var(--ink-50); font-size: 14px; }
.check-row .state {
  font-family: var(--font-data); font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
}
.check-row .state.ok { color: var(--green-500); }
.check-row .state.pending { color: var(--text-subtle); }
.check-row .state.error { color: var(--red-500); }

.url-box-label {
  font-family: var(--font-data); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-300); margin-bottom: 8px;
}
.url-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--ink-800); border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.url-box .url {
  flex: 1; min-width: 0;
  font-family: var(--font-data); font-size: 12px; color: var(--lavender);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.url-box .copy {
  width: 28px; height: 28px;
  border: 1px solid var(--border-dark); border-radius: 6px;
  background: transparent; color: var(--ink-300); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.url-box .copy:hover { color: var(--ink-50); }

/* pacote */
.pdf-ok {
  display: flex; align-items: center; gap: 12px;
  background: var(--green-100); border: 1px solid #B6E3CC;
  border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 16px;
}
.pdf-ok .icon { color: #0F7A4A; display: inline-flex; }
.pdf-ok .t1 { font-weight: 600; color: #0F5A38; font-size: 14px; }
.pdf-ok .t2 { font-size: 12px; color: #0F7A4A; }

/* ============================================================
   SETTINGS
   ============================================================ */
.section-label {
  font-family: var(--font-data); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 14px;
}
.orgs-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 36px; }
@media (max-width: 880px) { .orgs-grid { grid-template-columns: 1fr; } }
.org-card { padding: 22px; }
.org-card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.org-card .sq {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--ink-900); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-data); font-size: 13px; font-weight: 600; flex: 0 0 auto;
}
.org-card .nome { font-weight: 600; font-size: 15px; color: var(--text-strong); }
.org-card .slug { font-family: var(--font-data); font-size: 12px; color: var(--text-muted); }
.org-card .stats { display: flex; gap: 24px; border-top: 1px solid var(--border); padding-top: 14px; }
.org-card .stat .n {
  font-family: var(--font-data); font-size: 22px; font-weight: 600;
  color: var(--text-strong); font-variant-numeric: tabular-nums;
}
.org-card .stat .n.accent { color: var(--accent); }
.org-card .stat .l {
  font-family: var(--font-data); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-top: 2px;
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--purple-100); color: var(--purple-700);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-data); font-size: 12px; font-weight: 600; flex: 0 0 auto;
}
.user-cell { display: flex; align-items: center; gap: 12px; }

/* ============================================================
   MODALS
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(17,19,23,.5); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 56px 24px; overflow: auto;
}
.overlay.center { align-items: center; z-index: 80; padding: 24px; }
.modal {
  width: 100%; max-width: 560px;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: pk-in .28s var(--ease-out) both;
}
.modal.narrow { max-width: 480px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px; border-bottom: 1px solid var(--border);
}
.modal-head .eyebrow { letter-spacing: 0.16em; margin-bottom: 4px; }
.modal-head h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  letter-spacing: -0.01em; color: var(--text-strong); margin: 0;
}
.modal-body { padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 12px;
  padding: 20px 28px; border-top: 1px solid var(--border);
  background: var(--paper-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* dropzone */
.dropzone {
  width: 100%; border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md); background: var(--paper-2);
  padding: 20px; cursor: pointer;
  display: flex; align-items: center; gap: 14px; text-align: left;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.dropzone:hover { background: var(--purple-50); border-color: var(--purple-300); }
.dropzone.sm { padding: 16px 20px; }
.dropzone .icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); flex: 0 0 auto;
}
.dropzone.sm .icon { width: 36px; height: 36px; }
.dropzone .t1 { display: block; font-weight: 600; color: var(--text-body); }
.dropzone .t1.picked { font-family: var(--font-data); font-size: 14px; color: var(--text-strong); }
.dropzone .t2 { display: block; font-size: 12px; color: var(--text-subtle); margin-top: 2px; }

/* proc toggle row */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--paper-2);
}
.toggle-row .t1 { font-weight: 600; color: var(--text-strong); font-size: 14px; }
.toggle-row .t2 { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* DS Switch */
.switch {
  width: 44px; height: 26px; border-radius: var(--radius-pill);
  border: 0; padding: 0; position: relative; cursor: pointer;
  background: var(--ink-200);
  transition: background var(--dur) var(--ease-out);
  flex: 0 0 auto;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease-out);
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.switch:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* confirm dialog */
.confirm-box {
  width: 100%; max-width: 420px;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 28px;
  animation: pk-in .22s var(--ease-out) both;
}
.confirm-box .head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.confirm-box .icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--red-100); color: var(--red-500);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.confirm-box h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  letter-spacing: -0.01em; color: var(--text-strong); margin: 0;
}
.confirm-box p { font-size: 14px; line-height: 1.6; color: var(--text-body); margin: 0 0 24px; }
.confirm-box .acts { display: flex; justify-content: flex-end; gap: 12px; }

/* toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; z-index: 90;
  transform: translateX(-50%);
  background: var(--ink-900); color: var(--ink-50);
  padding: 13px 20px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-data); font-size: 13px; letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 10px;
  animation: pk-toast .3s var(--ease-out) both;
}
.toast::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lavender);
}
