/* ═══════════════════════════════════════════════════════════════════════
   EMERALD TAKEOFF — portal design system
   Plus Jakarta Sans · emerald brand · light & dark · built for touch
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #f3f8f5;
  --surface: #ffffff;
  --surface-2: #f0f6f3;
  --surface-3: #e6f0eb;
  --border: #d9e6df;
  --border-strong: #c3d6cc;
  --text: #0e2a20;
  --text-2: #3d5a4d;
  --muted: #587064;
  --primary: #0f7a50;
  --primary-hover: #0b6341;
  --primary-soft: #dff3ea;
  --on-primary: #ffffff;
  --accent: #2fd98b;
  --ring: rgba(16, 185, 129, .45);
  --danger: #b4281f;
  --danger-soft: #fdeceb;
  --warn: #8a5a00;
  --warn-soft: #fff4d6;
  --info: #1d4ed8;
  --info-soft: #e5edff;
  --ok: #0f7a50;
  --ok-soft: #dff3ea;
  --shadow-1: 0 1px 2px rgba(14, 42, 32, .06), 0 1px 3px rgba(14, 42, 32, .04);
  --shadow-2: 0 4px 12px rgba(14, 42, 32, .08), 0 2px 4px rgba(14, 42, 32, .04);
  --shadow-3: 0 24px 60px rgba(6, 37, 27, .28);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --sidebar: 264px;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #08130f;
  --surface: #0f1d17;
  --surface-2: #132520;
  --surface-3: #1a2f27;
  --border: #213a2f;
  --border-strong: #2d4d3f;
  --text: #e5f2ec;
  --text-2: #b7cfc4;
  --muted: #8ba698;
  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-soft: #0f3326;
  --on-primary: #03251a;
  --ring: rgba(52, 211, 153, .5);
  --danger: #ff8a80;
  --danger-soft: #3a1714;
  --warn: #f3c969;
  --warn-soft: #33270b;
  --info: #9db8ff;
  --info-soft: #14213f;
  --ok: #34d399;
  --ok-soft: #0f3326;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 6px 18px rgba(0, 0, 0, .4);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.ico { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14.5px; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s; white-space: nowrap; text-decoration: none !important;
}
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-1); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 34px; }
.btn.block { width: 100%; }
.spin { width: 16px; height: 16px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── forms ───────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-weight: 600; font-size: 13.5px; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--danger); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1.5px solid var(--border-strong); color: var(--text); transition: border-color .15s, box-shadow .15s; appearance: none;
}
.textarea { min-height: 88px; resize: vertical; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23587064' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.input[aria-invalid='true'] { border-color: var(--danger); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: background .18s; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .18s; }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--ring); outline-offset: 2px; }
.switch input:disabled + i { opacity: .5; }

/* ── cards & chips ───────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card-h { padding: 18px 22px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-h h3 { font-size: 16px; }
.card-h p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.card-b { padding: 18px 22px 22px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 8px; background: var(--surface-3); font-size: 12px; font-weight: 600; color: var(--text-2); }
.chip i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13.5px; color: #fff; background: linear-gradient(135deg, #0f7a50, #25c07c); flex: none; letter-spacing: .02em; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }

/* ── app shell ───────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; gap: 6px;
  background: linear-gradient(180deg, #06251b 0%, #0a3326 100%); color: #d6ece2; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; color: #fff; text-decoration: none !important; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { display: block; font-size: 17px; letter-spacing: -.01em; line-height: 1.1; }
.brand small { display: block; color: #8fc5ac; font-size: 11.5px; font-weight: 500; }
.nav-sec { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #6fa58c; padding: 14px 10px 4px; }
.nav a, .nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 11px; border: 0; background: none;
  color: #cfe6db; font-weight: 600; font-size: 14.5px; text-align: left; text-decoration: none !important; transition: background .15s, color .15s;
}
.nav a:hover, .nav button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a[aria-current='page'] { background: rgba(47, 217, 139, .16); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav .count { margin-left: auto; font-size: 11.5px; background: rgba(255, 255, 255, .12); padding: 1px 8px; border-radius: 999px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.me { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 12px; color: #fff; }
.me .avatar { background: linear-gradient(135deg, #25c07c, #0f7a50); }
.me b { display: block; font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.me small { color: #8fc5ac; font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.page { padding: 34px clamp(18px, 3.4vw, 44px) 80px; width: 100%; max-width: 1240px; margin: 0 auto; animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-h h1 { font-size: clamp(24px, 3vw, 31px); }
.page-h p { color: var(--muted); margin-top: 6px; max-width: 62ch; }
.scrim { display: none; }
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-3); }
  .side.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(2, 20, 14, .55); z-index: 25; }
  .topbar { display: flex; }
}

/* ── hub ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 28px; color: #fff; display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  background: radial-gradient(900px 300px at 85% -20%, rgba(47, 217, 139, .35), transparent 60%), linear-gradient(135deg, #06251b, #0d4a35 70%, #0f7a50);
  box-shadow: var(--shadow-2);
}
.hero .logo-tile { width: 92px; height: 92px; border-radius: 20px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.hero .logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 8px; }
.hero h2 { font-size: clamp(22px, 2.6vw, 28px); }
.hero p { color: #b6dccb; margin-top: 4px; }
.hero .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hero .badge { background: rgba(255, 255, 255, .14); color: #e9fff4; }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-top: 24px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-1); color: var(--text); text-decoration: none !important; transition: transform .16s, box-shadow .16s, border-color .16s;
}
a.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--tint) 55%, var(--border)); }
.tile .ib { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--tint); box-shadow: 0 6px 14px color-mix(in srgb, var(--tint) 40%, transparent); }
.tile .ib .ico { width: 24px; height: 24px; }
.tile h3 { font-size: 16.5px; }
.tile p { color: var(--muted); font-size: 14px; flex: 1; }
.tile .go { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--primary); }
.tile.locked { opacity: .62; background: var(--surface-2); }
.tile.locked .ib { background: var(--surface-3); color: var(--muted); box-shadow: none; }
.checklist { display: grid; gap: 10px; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); text-decoration: none !important; color: var(--text); }
.check .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex: none; color: transparent; }
.check.done .tick { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.check.done span { text-decoration: line-through; color: var(--muted); }
a.check:hover { background: var(--surface-3); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; transition: width .5s ease; }

/* ── tables ──────────────────────────────────────────────────────────── */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1 1 240px; }
.toolbar .select { width: auto; min-width: 170px; flex: 0 0 auto; }
.toolbar .btn { flex: none; }
.tbl td:first-child, .tbl th:first-child { min-width: 230px; }
.search { position: relative; }
.search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 40px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 860px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr.click { cursor: pointer; }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-user b { display: block; line-height: 1.25; }
.cell-user small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .ico { width: 40px; height: 40px; opacity: .5; margin-bottom: 10px; }
.empty h3 { color: var(--text); font-size: 17px; margin-bottom: 4px; }
.skel { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { padding: 18px 20px; }
.stat .n { font-size: 31px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.stat .s { font-size: 12.5px; margin-top: 8px; color: var(--muted); }

/* ── modal / drawer / toast ──────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(2, 20, 14, .6); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .16s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-3); animation: pop .2s ease both; border: 1px solid var(--border); }
.modal.wide { width: min(780px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal-h { padding: 20px 24px 6px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-h h2 { font-size: 19px; }
.modal-h p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.modal-b { padding: 14px 24px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-f { padding: 16px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.drawer-ov { justify-content: flex-end; padding: 0; }
.drawer { height: 100vh; width: min(640px, 100vw); background: var(--surface); display: flex; flex-direction: column; box-shadow: var(--shadow-3); animation: slide .22s ease both; border-left: 1px solid var(--border); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: #0b2f22; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-3); font-weight: 600; font-size: 14px; max-width: min(420px, calc(100vw - 32px)); animation: pop .2s ease both; }
.toast.bad { background: #8d1f18; }
.toast .ico { color: var(--accent); }
.toast.bad .ico { color: #ffd2cd; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--info-soft); color: var(--info); font-size: 14px; }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.callout.bad { background: var(--danger-soft); color: var(--danger); }
.callout.ok { background: var(--ok-soft); color: var(--ok); }
.callout .ico { margin-top: 2px; }
.callout b { color: inherit; }
.creds { display: grid; gap: 10px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 12px; padding: 16px; }
.creds div { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.creds span { color: var(--muted); font-size: 13px; }
.creds code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: 15px; word-break: break-all; text-align: right; }

/* ── tabs / toggles list ─────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 16px; font-weight: 700; font-size: 14.5px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; min-height: 46px; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected='true'] { color: var(--primary); border-bottom-color: var(--primary); }
.toggle-list { display: grid; gap: 8px; }
.toggle-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.toggle-row .ib { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.toggle-row .ib .ico { width: 18px; height: 18px; }
.toggle-row .t { flex: 1; min-width: 0; }
.toggle-row .t b { display: block; font-size: 14.5px; }
.toggle-row .t small { color: var(--muted); font-size: 12.5px; }
.toggle-row.off { background: var(--surface-2); }
.sub-perms { margin: 6px 0 0 48px; display: grid; gap: 6px; }
.sub-perms label { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); min-height: 32px; }
.sub-perms input { width: 18px; height: 18px; accent-color: var(--primary); }

/* ── dropzone / preview ──────────────────────────────────────────────── */
.drop { display: flex; align-items: center; gap: 18px; padding: 16px; border: 2px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop .thumb { width: 150px; height: 84px; border-radius: 10px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; flex: none; }
.drop .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 560px) { .drop { flex-direction: column; align-items: flex-start; } }
.paper { background: #fff; color: #1a2b24; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-2); overflow: hidden; font-size: 12px; line-height: 1.45; }
.paper .ph { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 12px; border-bottom: 3px solid var(--pbright, #10b981); }
.paper .ph img { max-height: 46px; max-width: 150px; object-fit: contain; }
.paper .ph b { font-size: 12px; letter-spacing: .06em; color: var(--pdark, #0f7a50); }
.paper .pb { padding: 14px 18px; display: grid; gap: 7px; }
.paper .pb i { display: block; height: 7px; border-radius: 4px; background: #e4ece8; }
.paper .sig { margin: 4px 18px 14px; padding: 10px 12px; border-radius: 8px; background: #eef7f3; }
.paper .sig b { display: block; color: var(--pdark, #0f7a50); font-size: 13px; }
.paper .pf { padding: 9px 14px; background: var(--pdark, #0f7a50); color: #fff; text-align: center; font-size: 10px; line-height: 1.5; }
.swatch { display: flex; align-items: center; gap: 10px; }
.swatch input[type='color'] { width: 46px; height: 44px; padding: 3px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); cursor: pointer; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
@media (max-width: 1080px) { .two-col { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 18px; }
.sticky { position: sticky; top: 20px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.seatbar { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.seatbar .progress { flex: 1; }

/* ── auth screens ────────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); }
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background: radial-gradient(700px 500px at 90% 8%, rgba(47, 217, 139, .38), transparent 62%), radial-gradient(600px 500px at -10% 105%, rgba(15, 122, 80, .7), transparent 60%), #06251b;
}
.auth-art::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at 30% 30%, #000, transparent 75%); }
.auth-art > * { position: relative; }
.auth-art h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; max-width: 14ch; }
.auth-art p.lead { color: #b6dccb; font-size: 17px; max-width: 44ch; margin-top: 16px; }
.auth-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.auth-art li { display: flex; gap: 12px; align-items: flex-start; color: #d9efe4; }
.auth-art li .ico { color: var(--accent); margin-top: 3px; }
.auth-art .foot { color: #6fa58c; font-size: 13px; }
.gem-float { position: absolute !important; right: -60px; bottom: -40px; width: 380px; opacity: .13; transform: rotate(-12deg); }
.auth-card-wrap { display: grid; place-items: center; padding: 28px 18px; }
.auth-card { width: min(440px, 100%); }
.auth-card h2 { font-size: 27px; }
.auth-card .sub { color: var(--muted); margin: 8px 0 24px; }
.auth-card form { display: grid; gap: 16px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 22px 26px; gap: 18px; }
  .auth-art h1 { font-size: 27px; max-width: none; }
  .auth-art ul, .auth-art .lead, .gem-float { display: none; }
}
.center-card { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 50% -10%, rgba(16, 185, 129, .18), transparent 60%), var(--bg); }
.center-card .card { width: min(480px, 100%); padding: 32px; }
.loading { min-height: 100vh; display: grid; place-items: center; }
.loading svg { width: 54px; height: 54px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print { .side, .topbar, .toasts { display: none !important; } .shell { display: block; } }
