/* Jyotish admin — "Saffron Cosmos" */
:root {
  --bg: #0D0806;
  --bg2: #170E0A;
  --bg3: #1F140F;
  --ink: #FFF4E6;
  --ink2: rgba(255, 244, 230, 0.72);
  --ink3: rgba(255, 244, 230, 0.48);
  --ink4: rgba(255, 244, 230, 0.24);
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --card: rgba(255, 255, 255, 0.05);
  --card2: rgba(255, 255, 255, 0.08);
  --saffron: #FF8A1F;
  --marigold: #FFB627;
  --turmeric: #F5D142;
  --sindoor: #E8452C;
  --kumkum: #B3123E;
  --sandal: #F3D9B1;
  --sandal-ink: #2A1405;
  --success: #7ED9A0;
  --warning: #FFC15E;
  --danger: #FF7A6B;
  --agni: linear-gradient(135deg, #FFD36B 0%, #FF8A1F 50%, #E8452C 100%);
  --serif: "Instrument Serif", "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --radius: 22px;
  --field: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  /* night sky: soft Agni dawn at the bottom, kumkum haze at the top, a sprinkle of stars */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,244,230,.55), transparent 60%),
    radial-gradient(1px 1px at 72% 9%, rgba(255,244,230,.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 62%, rgba(245,209,66,.35), transparent 60%),
    radial-gradient(1px 1px at 88% 44%, rgba(255,244,230,.35), transparent 60%),
    radial-gradient(1px 1px at 55% 30%, rgba(255,244,230,.3), transparent 60%),
    radial-gradient(1px 1px at 22% 80%, rgba(255,244,230,.3), transparent 60%),
    radial-gradient(1px 1px at 93% 86%, rgba(255,244,230,.3), transparent 60%),
    radial-gradient(70% 45% at 80% 115%, rgba(255,138,31,.16), transparent 70%),
    radial-gradient(60% 40% at 10% -10%, rgba(179,18,62,.14), transparent 70%),
    var(--bg);
}
a { color: var(--marigold); text-decoration: none; }
a:hover { color: var(--ink); }
::selection { background: rgba(255,138,31,.35); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: 0.1px; }
h1 { font-size: 44px; line-height: 1.05; }
h2 { font-size: 28px; line-height: 1.15; }
h3 { font-size: 21px; line-height: 1.2; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink3); }
.muted { color: var(--ink3); }
.ink2 { color: var(--ink2); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 28px 18px; display: flex; flex-direction: column; gap: 22px;
  border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(23,14,10,.85), rgba(13,8,6,.6));
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-name { font-family: var(--serif); font-size: 26px; line-height: 1; }
.brand-sub { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink3); margin-top: 4px; }
.mark { width: 40px; height: 40px; flex: none; position: relative; }
.mark svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 14px rgba(255,138,31,.45)); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 999px; color: var(--ink2); font-size: 14px;
  transition: background .15s, color .15s;
}
.nav a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.4; opacity: .8; flex: none; }
.nav a:hover { background: var(--card); color: var(--ink); }
.nav a.on { background: rgba(255,255,255,.1); color: var(--ink); }
.nav a.on svg { stroke: var(--saffron); opacity: 1; }
.nav .group { margin: 14px 12px 4px; }
.side-foot { margin-top: auto; padding: 0 8px; display: flex; flex-direction: column; gap: 10px; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink3); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink4); flex: none; }
.dot.ok { background: var(--success); box-shadow: 0 0 8px rgba(126,217,160,.6); }
.dot.warn { background: var(--warning); box-shadow: 0 0 8px rgba(255,193,94,.5); }
.dot.live { background: var(--saffron); box-shadow: 0 0 8px rgba(255,138,31,.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.main { padding: 36px 44px 80px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .eyebrow { margin-bottom: 8px; }
.page-head p { margin: 10px 0 0; color: var(--ink2); max-width: 640px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .9fr); gap: 20px; align-items: start; }
.sticky { position: sticky; top: 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0; }
.card.tight { padding: 16px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head .eyebrow { margin-bottom: 4px; }
.kpi { position: relative; overflow: hidden; }
.kpi .value { font-size: 40px; font-weight: 300; letter-spacing: -1px; line-height: 1.1; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 18px; color: var(--ink3); font-weight: 400; margin-right: 2px; letter-spacing: 0; }
.kpi .sub { font-size: 12px; color: var(--ink3); margin-top: 4px; }
.kpi.glow::after {
  content: ""; position: absolute; width: 160px; height: 160px; right: -60px; top: -60px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,138,31,.28), transparent 70%); pointer-events: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 999px;
  border: 1px solid rgba(255,244,230,.28); background: transparent; color: var(--ink); font: 500 14px var(--sans); cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s, opacity .15s; white-space: nowrap;
}
.btn:hover { background: var(--card); border-color: rgba(255,244,230,.45); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--sandal); color: var(--sandal-ink); border-color: transparent; font-weight: 600; box-shadow: 0 0 34px rgba(255,138,31,.18); }
.btn.primary:hover { background: #F8E4C4; }
.btn.glass { background: rgba(255,255,255,.08); border-color: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255,122,107,.35); }
.btn.danger:hover { background: rgba(255,122,107,.08); }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.xs { height: 26px; padding: 0 10px; font-size: 12px; }
.btn.icon { width: 32px; height: 32px; padding: 0; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ---------- chips & tags ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.08);
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink2); white-space: nowrap; }
.chip.ok { color: var(--success); background: rgba(126,217,160,.1); }
.chip.warn { color: var(--warning); background: rgba(255,193,94,.1); }
.chip.bad { color: var(--danger); background: rgba(255,122,107,.1); }
.chip.live { color: var(--saffron); background: rgba(255,138,31,.12); }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line2); font-size: 12px; color: var(--ink2); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .label { font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink3); }
.field .hint { font-size: 12px; color: var(--ink3); }
input[type=text], input[type=number], input[type=password], input[type=search], input[type=date], input[type=time], input[type=url], select, textarea {
  width: 100%; background: rgba(255,255,255,.03); color: var(--ink); border: 1px solid rgba(255,244,230,.18); border-radius: var(--field);
  font: 14px var(--sans); padding: 0 14px; height: 44px; outline: none; transition: border-color .15s, background .15s;
}
textarea { height: auto; padding: 12px 14px; line-height: 1.55; resize: vertical; min-height: 90px; }
textarea.tall { min-height: 320px; font-size: 13px; }
textarea.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
input:focus, select:focus, textarea:focus { border-color: var(--saffron); background: rgba(255,138,31,.04); }
select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23FFF4E6' stroke-opacity='.5' fill='none' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
select option { background: var(--bg2); }
input[type=color] { width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,244,230,.18); border-radius: 12px; background: none; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 4px; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 8px; }
.prefix { position: relative; }
.prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink3); pointer-events: none; }
.prefix > input { padding-left: 30px; }
.fields { display: grid; gap: 16px; }
.f2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.f3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.f4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }

/* toggle */
.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13px; color: var(--ink2); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .track { width: 40px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; transition: background .2s; flex: none; }
.toggle .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink2); transition: transform .2s, background .2s; }
.toggle input:checked + .track { background: var(--saffron); }
.toggle input:checked + .track::after { transform: translateX(16px); background: #fff; }
.toggle input:focus-visible + .track { outline: 2px solid var(--marigold); outline-offset: 2px; }

/* segmented pills */
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); gap: 2px; }
.seg button { height: 32px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--ink2); font: 500 13px var(--sans); cursor: pointer; }
.seg button.on { background: rgba(255,255,255,.12); color: var(--ink); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: 1.3px; text-transform: uppercase; color: var(--ink3); padding: 0 12px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; transition: background .12s; }
tbody tr.click:hover { background: rgba(255,255,255,.03); }
td.r, th.r { text-align: right; }
.amt-pos { color: var(--success); }
.amt-neg { color: var(--ink); }
.empty { padding: 40px 10px; text-align: center; color: var(--ink3); }

/* ---------- pandits ---------- */
.swatch { width: 34px; height: 34px; border-radius: 50%; flex: none; position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.swatch::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--hue); box-shadow: 0 0 12px var(--hue); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 20px; flex: none;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.plist { display: flex; flex-direction: column; gap: 10px; }
.prow { display: grid; grid-template-columns: 22px 34px 44px minmax(0, 1fr) 110px 80px 92px 92px 96px; gap: 14px; align-items: center;
  padding: 12px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: border-color .15s, background .15s, opacity .15s; }
.prow.dragging { opacity: .4; }
.prow.over { border-color: var(--saffron); }
.prow.inactive { opacity: .55; }
.grip { cursor: grab; color: var(--ink4); display: grid; place-items: center; }
.grip svg { width: 14px; height: 14px; fill: currentColor; }
.prow .who b { display: block; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .who span { font-size: 12.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.updown { display: flex; flex-direction: column; gap: 2px; }

.preview-card {
  border-radius: 26px; padding: 22px; position: relative; overflow: hidden; min-height: 230px;
  background: linear-gradient(180deg, var(--g1), var(--g2) 55%, var(--g3));
}
.preview-card::before { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -80px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hue) 55%, transparent), transparent 70%); opacity: .8; }
.preview-card .orb { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 28px;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hue) 60%, white), var(--hue) 55%, color-mix(in srgb, var(--hue) 50%, black));
  box-shadow: 0 0 40px color-mix(in srgb, var(--hue) 60%, transparent); color: #1b0f08; position: relative; }
.preview-card .pname { font-family: var(--serif); font-size: 26px; margin-top: 16px; position: relative; }
.preview-card .ptitle { color: var(--ink2); margin-top: 2px; position: relative; }
.preview-card .pmeta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; position: relative; }
.preview-card .prate { position: absolute; right: 22px; bottom: 20px; text-align: right; }
.preview-card .prate b { font-size: 30px; font-weight: 300; font-variant-numeric: tabular-nums; }
.preview-card .prate small { color: var(--ink3); font-size: 13px; }
.ai-pill { position: absolute; top: 20px; right: 20px; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; padding: 4px 2px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.bubble.user { align-self: flex-end; background: var(--sandal); color: var(--sandal-ink); border-bottom-right-radius: 6px; }
.bubble.pandit { align-self: flex-start; background: rgba(255,255,255,.08); border-bottom-left-radius: 6px; }
.bubble.system { align-self: center; background: transparent; color: var(--ink3); font-size: 12px; }
.bubble .t { display: block; font-size: 10.5px; color: var(--ink3); margin-top: 4px; }
.bubble.user .t { color: rgba(42,20,5,.55); }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.08); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink2); animation: bounce 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.composer { display: flex; gap: 8px; margin-top: 12px; }
.composer input { border-radius: 999px; }

details.fold { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
details.fold summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 13px; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::before { content: "›"; display: inline-block; transition: transform .15s; color: var(--saffron); font-size: 16px; }
details.fold[open] summary::before { transform: rotate(90deg); }
pre.prompt { white-space: pre-wrap; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: 12px; line-height: 1.5;
  max-height: 420px; overflow: auto; color: var(--ink2); margin: 12px 0 0; }

/* lists (onboarding, packs, quick prompts) */
.item { display: grid; gap: 14px; padding: 18px; border-radius: 18px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.item-head { display: flex; align-items: center; gap: 10px; }
.item-head .n { font-family: var(--serif); font-size: 22px; color: var(--marigold); width: 28px; }
.qp { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }

/* bars */
.bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--agni); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; text-align: center; }
.login-card .mark { width: 84px; height: 84px; margin: 0 auto 26px; }
.login-card h1 { font-size: 46px; }
.login-card p { color: var(--ink2); margin: 10px 0 28px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.login-card .btn { height: 52px; font-size: 15px; }
.mandala-bg { position: fixed; width: 900px; height: 900px; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: .07; pointer-events: none; z-index: -1; animation: spin 240s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mandala-bg, .dot.live, .typing i { animation: none; } }

/* toast */
.toasts { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { padding: 12px 18px; border-radius: 999px; background: rgba(31,20,15,.92); border: 1px solid var(--line2); backdrop-filter: blur(14px);
  font-size: 13.5px; box-shadow: 0 10px 40px rgba(0,0,0,.4); animation: rise .25s ease-out; max-width: 420px; }
.toast.ok { border-color: rgba(126,217,160,.35); }
.toast.err { border-color: rgba(255,122,107,.45); color: #FFD6CF; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

.notice { padding: 14px 16px; border-radius: 16px; background: rgba(255,182,39,.07); border: 1px solid rgba(255,182,39,.2); color: var(--ink2); font-size: 13px; }
.notice.ok { background: rgba(126,217,160,.07); border-color: rgba(126,217,160,.22); }
.notice.err { background: rgba(255,122,107,.07); border-color: rgba(255,122,107,.25); }
.copy { display: flex; gap: 8px; align-items: center; }
.copy code { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--ink3); }
.kv dd { margin: 0; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink3); font-size: 13px; margin-bottom: 14px; }
.back:hover { color: var(--ink); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: var(--ink3); font-size: 12.5px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--saffron); animation: spin2 .8s linear infinite; display: inline-block; }
@keyframes spin2 { to { transform: rotate(360deg); } }


/* ---------- avatar upload ---------- */
.avatar.lg { width: 64px; height: 64px; font-size: 28px; }
.avatar-drop { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; border: 1px dashed rgba(255,244,230,.22);
  background: rgba(255,255,255,.02); transition: border-color .15s, background .15s; min-height: 88px; }
.avatar-drop.over { border-color: var(--saffron); background: rgba(255,138,31,.06); }
.avatar-drop.busy { opacity: .6; pointer-events: none; }
.avatar-drop.disabled { opacity: .7; }
.avatar-drop .av-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.preview-card .orb { overflow: hidden; }
.preview-card .orb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- languages ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.lang-card { transition: opacity .15s; }
.lang-card.off { opacity: .55; }
.lang-card .native { font-family: var(--serif); font-size: 30px; line-height: 1.2; }
.lang-card .native[dir=rtl] { text-align: right; }
.lang-card .row.small { min-height: 24px; }
.tr-group { margin: 22px 0 4px; color: var(--marigold); }
.tr-group:first-child { margin-top: 10px; }
.tr-row { display: grid; grid-template-columns: minmax(140px, .55fr) minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; padding: 14px 12px; border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent; }
.tr-row.missing { border-left-color: var(--warning); background: rgba(255,193,94,.03); }
.tr-key { color: var(--ink3); word-break: break-all; padding-top: 2px; }
.tr-en { color: var(--ink2); white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; }
.tr-tx textarea { min-height: 0; font-size: 14px; }
.tr-tx textarea[dir=rtl] { font-size: 16px; line-height: 1.8; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 6px; }


/* ---------- availability ---------- */
.avail { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink3); white-space: nowrap; }
.avail.on { color: var(--success); }
.prow .who .avail { display: inline-flex; margin-top: 3px; }
.sched { display: flex; flex-direction: column; }
.sch-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sch-row:last-child { border-bottom: 0; }
.sch-day { font-weight: 600; color: var(--ink2); font-size: 13px; }
.sch-slots { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 32px; }
.slot { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.slot input[type=time] { width: 128px; height: 30px; padding: 0 8px; border-radius: 10px; font-size: 13px; }
.slot .btn.icon { width: 26px; height: 26px; }

@media (max-width: 1180px) {
  .split { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prow { grid-template-columns: 22px 34px 44px minmax(0, 1fr) 90px 92px 92px 80px; }
  .prow .rating { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 16px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav .group, .side-foot { display: none; }
  .main { padding: 24px 16px 60px; }
  h1 { font-size: 34px; }
  .g2, .g3, .g4, .f2, .f3, .f4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .prow { grid-template-columns: 22px 34px minmax(0, 1fr) 80px; }
  .prow .avatar, .prow .rating, .prow .rate, .prow .tog-active { display: none; }
  .tr-row { grid-template-columns: 1fr; gap: 8px; }
}
