/* Rabia Dastgir team space. Brand taken from rabiadastgir.com:
   teal #1a534d headings (Fraunces), Barlow body, pink→orange pill CTA, sky→blush gradient. */
:root {
  --ink: #141617; --teal: #1a534d; --teal-2: #2a6a63; --teal-wash: #e8f0ee;
  --cream: #fff5f0; --mist: #e8e9e6; --paper: #ffffff; --line: #e2e5e2; --muted: #5f6c69;
  --pink: #ed1553; --orange: #f25e0d; --blue: #21419b; --sky: #01abed;
  --ok: #1f7a4d; --ok-wash: #e4f2e8; --warn: #b4560a; --warn-wash: #fdeadd; --bad: #c3123f; --bad-wash: #fde3ea;
  --grad: linear-gradient(105deg, #d4f0fb 0%, #fff5f0 48%, #fbdde7 100%);
  --cta: linear-gradient(90deg, #ed1553 0%, #f25e0d 100%);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h1 { font: 500 28px/1.15 var(--display); color: var(--teal); margin: 0; text-wrap: balance; }
h2 { font: 500 20px/1.2 var(--display); color: var(--teal); margin: 0; }
.muted { color: var(--muted); }
.note { font-size: 13px; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 13px; }

/* ---------- buttons & inputs ---------- */
.btn { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500; }
.btn:hover { border-color: var(--teal); color: var(--teal); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.solid { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.solid:hover { background: var(--teal-2); color: #fff; }
.btn.cta { border: 0; background: var(--cta); color: #fff; font-weight: 600; padding: 11px 22px; box-shadow: 0 6px 16px -8px rgba(237,21,83,.6); }
.btn.cta:hover { filter: brightness(1.05); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.wide { width: 100%; }
.link { border: 0; background: none; color: var(--teal); font-weight: 600; padding: 4px 6px; border-radius: 6px; }
.link:hover { background: rgba(26,83,77,.08); }
.icon-btn { border: 0; background: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--cream); color: var(--teal); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .lbl { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.inp { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--paper); width: 100%; min-width: 0; }
.inp:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(26,83,77,.12); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.err { color: var(--bad); font-size: 14px; min-height: 1.2em; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--mist); white-space: nowrap; font-weight: 500; }
.chip.owner { background: var(--teal); color: #fff; }
.chip.admin { background: var(--bad-wash); color: var(--bad); }
.chip.ok { background: var(--ok-wash); color: var(--ok); }
.chip.warn { background: var(--warn-wash); color: var(--warn); }
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; flex: none; }

/* ---------- full-screen (sign-in) ---------- */
.full { min-height: 100%; background: var(--grad); display: flex; flex-direction: column; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.full-top { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; max-width: 1080px; width: 100%; margin: 0 auto; }
.full-mid { flex: 1; display: grid; place-items: center; padding-block: 12px 64px; }
.wordmark { font: 500 22px var(--display); color: var(--teal); display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.wordmark img { width: 38px; height: 38px; border-radius: 50%; }
.card { background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border-radius: 20px; padding: 30px; width: min(420px, 100%); box-shadow: 0 30px 70px -30px rgba(26,83,77,.45); display: flex; flex-direction: column; gap: 16px; }
.card h1 { font-size: 30px; }
.card p { margin: 0; }
.code-inp { font-family: var(--mono); font-size: 28px; letter-spacing: .4em; text-align: center; padding: 12px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.pk-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--teal-wash); color: var(--teal); display: grid; place-items: center; }
.pk-icon svg { width: 28px; height: 28px; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; height: 100%; }
.side { background: var(--cream); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.brand { background: var(--grad); padding-block: 18px 16px; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: 18px; }
.brand .wordmark { font-size: 20px; }
.brand .wordmark img { width: 34px; height: 34px; }
.brand small { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); opacity: .75; margin: 2px 0 0 44px; }
.side-body { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; padding-left: max(12px, env(safe-area-inset-left, 0px)); }
.nav { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 9px 14px; border-radius: 999px; color: var(--ink); text-align: left; font-weight: 500; text-decoration: none; }
.nav:hover { background: rgba(26,83,77,.07); }
.nav[aria-current="page"] { background: var(--teal); color: #fff; }
.nav-sep { margin: 10px 14px 4px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.me { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 8px 4px; display: flex; flex-direction: column; gap: 10px; }
.me-row { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.me-row .who { min-width: 0; flex: 1; }
.me-row b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-row span { font-size: 12px; color: var(--muted); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: none; align-items: center; gap: 10px; padding-block: 10px; padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); }
.pane { flex: 1; overflow: auto; padding-block: 26px 64px; padding-left: 32px; padding-right: max(32px, env(safe-area-inset-right, 0px)); }
.pane-inner { max-width: 960px; display: flex; flex-direction: column; gap: 22px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head p { margin: 6px 0 0; }
.section { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 2px; }
.item .grow { flex: 1; min-width: 0; }
.item b { font-weight: 600; }
.item .sub { font-size: 13px; color: var(--muted); }
.tile { width: 38px; height: 38px; border-radius: 10px; background: var(--teal-wash); color: var(--teal); display: grid; place-items: center; flex: none; }

/* table */
.wrap-x { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.dim td { opacity: .6; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person .who { min-width: 0; }
.person b { font-weight: 600; display: block; }
.person span { font-size: 13px; color: var(--muted); }
.acts { display: flex; gap: 2px; justify-content: flex-end; }

/* placeholder */
.soon { background: var(--grad); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.soon ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* checks */
.checks .item b::before { content: "… "; color: var(--muted); }
.checks .item.ok b::before { content: "✓ "; color: var(--ok); }
.checks .item.bad b::before { content: "✗ "; color: var(--bad); }
.checks .item.bad .sub { color: var(--bad); }
.audit .item { align-items: flex-start; }
.audit time { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 110px; }

/* popover & modal */
.pop { position: fixed; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(20,22,23,.25); padding: 6px; min-width: 220px; z-index: 60; }
.pop button { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: none; padding: 9px 12px; border-radius: 8px; text-align: left; }
.pop button:hover { background: var(--cream); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.pop .danger { color: var(--bad); }
.scrim { position: fixed; inset: 0; background: rgba(20,22,23,.35); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--paper); border-radius: 18px; width: min(500px, 100%); max-height: 92%; overflow: auto; box-shadow: 0 30px 70px -20px rgba(20,22,23,.45); }
.modal header { padding: 22px 24px 4px; display: flex; gap: 12px; align-items: flex-start; }
.modal header h2 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.modal .mb { padding: 12px 24px 4px; display: flex; flex-direction: column; gap: 14px; }
.modal footer { padding: 18px 24px 22px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-cards { display: grid; gap: 8px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--teal); background: var(--teal-wash); }
.radio-card input { margin-top: 3px; }
.radio-card b { display: block; font-weight: 600; }
.radio-card span { font-size: 13px; color: var(--muted); }

/* toast */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; z-index: 90; width: min(460px, calc(100% - 32px)); }
.toast { background: var(--teal); color: #fff; border-radius: 12px; padding: 11px 16px; box-shadow: 0 12px 30px -10px rgba(20,22,23,.4); font-size: 14px; animation: tin .2s ease-out; }
.toast.err { background: var(--bad); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--teal-wash); border-top-color: var(--teal); animation: spin .8s linear infinite; margin: 40vh auto 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) { .col-hide-md { display: none; } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86%); z-index: 40; transform: translateX(-105%); transition: transform .2s; box-shadow: 20px 0 50px -20px rgba(0,0,0,.3); }
  .side.open { transform: none; }
  .top { display: flex; }
  .pane { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-top: 18px; }
  .grid2 { grid-template-columns: 1fr; }
  .col-hide-sm { display: none; }
  h1 { font-size: 24px; }
  .card { padding: 24px; }
}
