/* EwizPro-specific admin tweaks — loaded AFTER the vendored Hitcourt Design System
   so app overrides win (per USAGE rule 1). Keep this tiny; real design changes
   belong in the design-system repo, not here. */

.form-narrow { max-width: 640px; }

/* Standalone auth screen (login) — the app shell isn't used pre-auth. */
.auth-shell { min-height: 100dvh; display: grid; place-items: center; padding: 2rem 1rem; background: var(--ground); }
.auth-card  { width: 100%; max-width: 400px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: 1.1rem; }
.auth-brand .mark {
  width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center;
  font-weight: 700; color: var(--on-accent-strong); background: var(--accent-strong);
}
.auth-brand .name { font-weight: 600; line-height: 1.1; }
.auth-brand .name small { display: block; color: var(--ink-3); font-weight: 500; font-size: var(--fs--1); }

/* Theme-toggle icons: inline SVGs shown/hidden purely by [data-theme] (NOT via theme.js's
   <i> class-swap, which no-ops because FontAwesome SVG-JS turns <i> into <svg>).
   Light mode -> dark-blue half-moon ("go dark"); dark mode -> orange sun ("go light"). */
[data-theme-toggle] .theme-ico { display: inline-flex; align-items: center; line-height: 0; }
[data-theme-toggle] .theme-ico-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .theme-ico-moon { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .theme-ico-sun  { display: inline-flex; }

/* ---- Avatar field + cropper (200x200 profile photos) ---- */
.avatar-field { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.avatar-preview { position: relative; width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--rule); flex: none; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-preview img.is-empty { display: none; }
.avatar-preview__ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 1.5rem; }
.avatar-preview img:not(.is-empty) + .avatar-preview__ph { display: none; }
/* rounded thumbnail in list tables */
.avatar-thumb { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; display: block; }

.cropper-wrap { max-width: 100%; }
/* Cap the crop area to the viewport so tall/portrait photos can't overflow the screen.
   Cropper.js sizes its container to the <img>'s rendered box, so bounding the img bounds the UI. */
.cropper-wrap img, #cropperImage { display: block; max-width: 100%; max-height: 52vh; }
.cropper-container { max-height: 52vh; }
#cropperModal .modal-body { max-height: 66vh; overflow: hidden; }
/* Round framing ONLY for the avatar cropper (#cropperModal, WhatsApp-style). The unified image
   cropper (#ecCropperModal — logo/banner/cover/public-photo) stays SQUARE/rectangular. */
#cropperModal .cropper-view-box, #cropperModal .cropper-face { border-radius: 50%; }
.cropper-controls { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.cropper-controls #cropZoom { flex: 1; accent-color: var(--accent); }

/* ---- De-green (Rajat directive 2026-07-22): positive/success states use BLUE, never green.
   Overrides the vendored design-system --success token (app stylesheet wins). Danger stays red,
   warning stays amber. Applies to Active/Booked badges, Money-in, success alerts, beacons. ---- */
:root, :root[data-theme="light"] {
  --success: #0284c7; --success-soft: #e0f2fe; --success-ink: #0369a1; --on-success: #ffffff;
  --bs-success: #0284c7; --bs-success-rgb: 2,132,199;
}
:root[data-theme="dark"] {
  --success: #38bdf8; --success-soft: #0c2b3a; --success-ink: #7dd3fc; --on-success: #06283a;
  --bs-success: #38bdf8; --bs-success-rgb: 56,189,248;
}

/* Website editor — gallery thumbnails (showcase manager) */
.gallery-thumb { display:inline-flex; flex-direction:column; gap:.35rem; cursor:pointer; }
.gallery-thumb img { width:110px; height:110px; object-fit:cover; border-radius:10px; border:1px solid var(--bs-border-color, #d0d7de); display:block; }
.gallery-thumb__rm { font-size:var(--fs--1, .82rem); color:var(--bs-secondary, #6b7280); display:inline-flex; align-items:center; gap:.3rem; }
.gallery-thumb input:checked ~ * { }
.gallery-thumb:has(input:checked) img { outline:2px solid #dc3545; opacity:.55; }

/* ── Row-action kebab (⋮) menus + single-line credential cell (2026-09-08) ───────────────
   Consolidates per-row actions into one uniform dropdown so admin list Action columns never
   stagger; the Account column shows creds/status on ONE line. */
.creds-inline{display:flex;align-items:center;gap:14px;flex-wrap:nowrap;white-space:nowrap;font-size:var(--fs--1);line-height:1.6}
.creds-inline .pw-cell{display:inline-flex;align-items:center;gap:4px}
.pw-cell .pw{font-variant-numeric:tabular-nums;letter-spacing:.5px}
.row-actions{display:inline-block}
.row-actions .dropdown-menu{min-width:210px}
.row-actions form{margin:0}
/* a <button> acting as a dropdown-item: reset native button chrome + match the design-system
   .dropdown-item type EXACTLY (font-size var(--fs--1), weight var(--fw-medium)) so link items
   (<a>, e.g. Edit) and form items (<button>) render at the identical size in every kebab menu. */
.dropdown-menu button.dropdown-item{width:100%;text-align:left;border:0;background:transparent;cursor:pointer;
    font-family:inherit;font-size:var(--fs--1);font-weight:var(--fw-medium);line-height:1.4}

/* ── User-table extras: serial-no column + country flag (2026-09-08) ── */
.col-sno{width:46px;text-align:center;color:var(--ink-3);font-variant-numeric:tabular-nums}
.cc-flag{font-size:1.15em;line-height:1;cursor:help;vertical-align:-1px}

/* clickable row title (opens a detail view) */
.row-title{color:var(--accent-strong, #2563eb);font-weight:700;text-decoration:none}
.row-title:hover{text-decoration:underline}

/* clamp long free-text cells to 2 lines so they never overflow into neighbouring columns
   (full text available on hover via the cell's title attribute) */
.cell-clamp{max-width:360px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;line-height:1.45}

/* ── Dossier profile (feature #1) — "classified file" hero + intel grid ── */
.dossier-hero{position:relative;overflow:hidden;border-radius:16px;padding:26px 28px;margin-bottom:18px;
  background:linear-gradient(135deg,#0c2444 0%,#12325a 55%,#1b4a7e 100%);color:#fff;box-shadow:0 12px 40px rgba(18,50,90,.25)}
.dossier-hero .dossier-scan{position:absolute;inset:0;pointer-events:none;opacity:.10;
  background:repeating-linear-gradient(0deg,#fff 0 1px,transparent 1px 4px)}
.dossier-id{position:absolute;top:14px;right:18px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:12px;letter-spacing:2px;color:#ffd9a8;border:1px solid rgba(255,255,255,.25);padding:4px 10px;border-radius:6px}
.dossier-top{position:relative;z-index:2;display:flex;gap:22px;align-items:center}
.dossier-photo{flex:0 0 108px;width:108px;height:108px;border-radius:14px;overflow:hidden;background:rgba(255,255,255,.10);
  border:2px solid rgba(255,255,255,.35);display:grid;place-items:center;box-shadow:0 6px 20px rgba(0,0,0,.3)}
.dossier-photo img{width:100%;height:100%;object-fit:cover;object-position:top center}
.dossier-photo span{font-size:40px;font-weight:900;color:#fff;opacity:.85}
.dossier-headline .tag{font-family:ui-monospace,monospace;font-size:11px;letter-spacing:2px;color:#ccdcf0;margin-bottom:4px}
.dossier-headline .tag .on{color:#7ef0b0}.dossier-headline .tag .off{color:#ffb0a8}
.dossier-headline h2{margin:0 0 10px;font-size:clamp(22px,3vw,30px);font-weight:800}
.dossier-headline h2 small{font-weight:500;color:#cdd9ea;font-size:.6em}
.dossier-facts{display:flex;flex-wrap:wrap;gap:8px}
.dossier-facts span{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.16);border-radius:999px;
  padding:5px 12px;font-size:12.5px;font-weight:600;display:inline-flex;align-items:center;gap:6px}
.dossier-facts span.sport{background:rgba(217,164,65,.22);border-color:rgba(217,164,65,.4)}
.dossier-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.dcard{background:var(--surface,#fff);border:1px solid var(--rule,#e6ebf2);border-radius:14px;padding:16px 18px;box-shadow:var(--shadow-sm,0 4px 18px rgba(18,50,90,.06))}
.dcard-wide{grid-column:1/-1}
.dcard h6{margin:0 0 12px;font-size:12px;letter-spacing:1px;text-transform:uppercase;color:var(--accent-strong,#12325a);
  display:flex;align-items:center;gap:8px;font-weight:700}
.dcard dl{margin:0;display:grid;grid-template-columns:auto 1fr;gap:6px 14px}
.dcard dt{color:var(--ink-3,#8090a6);font-size:12.5px;font-weight:600;white-space:nowrap}
.dcard dd{margin:0;font-size:13.5px;font-weight:600;color:var(--ink,#16233a)}
.dcard .muted{color:var(--ink-3,#8090a6);font-weight:500}
.dcard .dlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px;font-size:13.5px}
.dcard .dlist li{padding-bottom:9px;border-bottom:1px solid var(--rule,#eef2f7)}
.dcard .dlist li:last-child{border-bottom:0;padding-bottom:0}
@media(max-width:640px){.dossier-top{flex-direction:column;text-align:center}.dossier-facts{justify-content:center}}

/* ── Player dashboard (feature #5) — mobile-first ── */
.pdash{display:flex;flex-direction:column;gap:14px}
.pdash-hi h1{margin:0;font-size:1.5rem}
.pdash-next{border-radius:16px;padding:18px 20px;color:#fff;
  background:linear-gradient(135deg,var(--accent-strong,#12325a),#1b4a7e);box-shadow:0 10px 30px rgba(18,50,90,.22)}
.pdash-next.empty{opacity:.85}
.pdash-next .lbl{font-size:11px;letter-spacing:2px;text-transform:uppercase;color:#ffd9a8;font-weight:700;margin-bottom:6px}
.pdash-next .when{font-size:1.35rem;font-weight:800;line-height:1.2}
.pdash-next .meta{display:flex;flex-wrap:wrap;gap:14px;margin-top:8px;font-size:13px;color:#dbe6f5}
.pdash-next .meta i{margin-right:5px}
.pdash-next .focus{margin-top:10px;font-size:13px;color:#eaf1fb;background:rgba(255,255,255,.12);border-radius:9px;padding:7px 11px}
.pdash-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.pstat{background:var(--surface,#fff);border:1px solid var(--rule,#e6ebf2);border-radius:12px;padding:12px 8px;text-align:center;box-shadow:var(--shadow-sm,0 4px 18px rgba(18,50,90,.05))}
.pstat b{display:block;font-size:1.5rem;font-weight:800;color:var(--accent-strong,#12325a);line-height:1}
.pstat span{font-size:11px;color:var(--ink-3,#8090a6);font-weight:600}
.pdash-cols{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.pcard{margin:0}
.pcard-h{display:flex;align-items:center;gap:8px;font-size:12px;letter-spacing:.6px;text-transform:uppercase;
  color:var(--accent-strong,#12325a);font-weight:700;margin-bottom:12px}
.pcard-h .ml-auto{margin-left:auto;font-size:11px;text-transform:none;letter-spacing:0}
.pcoach{display:flex;align-items:center;gap:12px}
.pcoach-av{width:52px;height:52px;border-radius:50%;overflow:hidden;background:var(--surface-2,#eef2f7);display:grid;place-items:center;flex:none}
.pcoach-av img{width:100%;height:100%;object-fit:cover}
.pcoach-av span{font-weight:800;color:var(--accent-strong,#12325a)}
.pcoach .nm{font-weight:700}
.pchips{display:flex;flex-wrap:wrap;gap:7px}
.pchip{background:var(--accent-soft,#e0f2fe);color:var(--accent-ink,#0369a1);border-radius:999px;padding:5px 13px;font-size:13px;font-weight:600}
.plist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.plist li{padding-bottom:10px;border-bottom:1px solid var(--rule,#eef2f7)}
.plist li:last-child{border-bottom:0;padding-bottom:0}
.plist .sub{font-size:12px;color:var(--ink-3,#8090a6);margin-top:2px}
.plist a{text-decoration:none;color:inherit}
.pdash-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px}
.ptile{display:flex;flex-direction:column;align-items:center;gap:7px;padding:16px 8px;border-radius:14px;text-decoration:none;
  background:var(--surface,#fff);border:1px solid var(--rule,#e6ebf2);color:var(--ink,#16233a);font-weight:600;font-size:12.5px;transition:transform .12s,box-shadow .12s}
.ptile:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm,0 6px 20px rgba(18,50,90,.1))}
.ptile i{font-size:19px;color:var(--accent-strong,#12325a)}
@media(max-width:560px){.pdash-stats{grid-template-columns:repeat(2,1fr)}}

/* ── Bilingual admin (spec §8): hide the INACTIVE language only, scoped UNDER
   html[data-lang] so the selector never matches <html lang="…"> itself (which would
   blank the whole page). Admin defaults EN (data-lang set in the layout) with RU toggle. ── */
html[data-lang="en"] [lang="ru"]{display:none}
html[data-lang="ru"] [lang="en"]{display:none}
.lang-toggle{display:inline-flex;gap:2px;background:var(--surface-2,#eef2f7);border-radius:999px;padding:3px}
.lang-toggle button{border:0;background:transparent;border-radius:999px;padding:3px 10px;font-size:12px;font-weight:700;color:var(--ink-3,#8090a6);cursor:pointer}
.lang-toggle button.on{background:var(--accent-strong,#12325a);color:#fff}

/* ── Dashboard extras layered on the design-system stat/card primitives ── */
.dash-grid{display:grid;grid-template-columns:2fr 1fr;gap:16px;align-items:start}
@media(max-width:900px){.dash-grid{grid-template-columns:1fr}}
.stream-row{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid var(--rule,#eef2f7)}
.stream-row:last-child{border-bottom:0}
.stream-row .bar{flex:1;height:8px;border-radius:999px;background:var(--surface-2,#eef2f7);overflow:hidden}
.stream-row .bar>span{display:block;height:100%;border-radius:999px;background:var(--accent-strong,#12325a)}
.stream-row .amt{font-variant-numeric:tabular-nums;font-weight:700;min-width:104px;text-align:right}
.curve{display:flex;align-items:flex-end;gap:10px;height:120px;padding-top:8px}
.curve .col{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end}
.curve .col .b{width:100%;border-radius:8px 8px 0 0;background:linear-gradient(180deg,#1BA1DB,#147EAE);min-height:6px}
.curve .col small{font-size:11px;color:var(--ink-3,#8090a6)}
.mini-list{list-style:none;margin:0;padding:0}
.mini-list li{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--rule,#eef2f7);font-size:13px}
.mini-list li:last-child{border-bottom:0}
.night-pill{font-size:10px;font-weight:700;padding:1px 7px;border-radius:999px;background:#0c3d54;color:#fff}
.day-pill{font-size:10px;font-weight:700;padding:1px 7px;border-radius:999px;background:#FCE300;color:#0c3d54}
