/* SQWADSY App — Dark for the existing App screens outside the v3.4 redesign (10.10).
 * The v3.4 Light/Dark toggle is global, but these screens keep white surfaces from their own CSS while their text
 * already follows the theme (light-on-white). Found by a contrast probe on every route (tests/app-v34-local/
 * run-dark.cjs). Only Dark is touched; v7.3 tokens from booking-tokens.css; Light is unchanged.
 * Decorative illustrations (map card, pitch photos, Leaflet controls) keep their own colours. */

/* ---------------------------------------------------------------- surfaces */
:root[data-theme="dark"] body.experience :is(
  .rest-panel, .settings-section, .pc-panel, .pv-visibility, .pv-security, .pv-deletion,
  .com-grid, .com-notif-main, .com-context, .report-list, .find-filter-bar, .cg-preview-body, .tb-card,
  #communityPage aside, .playing-save
) { background: var(--surface) !important; border-color: var(--line) !important; color: var(--ink) !important; box-shadow: none !important; }
:root[data-theme="dark"] body.experience :is(.find-search, .pv-choice, .pf-panel-icon, .cg-step-number, .report-list th, .com-chip,
  #messagesMsg, #notificationsMsg, #upcomingGamesMsg, .cg-reservation, .cg-warning, .exp-spots)
  { background: var(--surface-2) !important; border-color: var(--line) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience .pv-choice.selected { background: var(--mint-soft) !important; border-color: var(--mint-line) !important; }

/* ---------------------------------------------------------------- text on those surfaces */
:root[data-theme="dark"] body.experience :is(.rest-panel, .settings-section, .pc-panel, .pv-visibility, .pv-security, .pv-deletion,
  .com-grid, .com-notif-main, .com-context, .report-list, .find-filter-bar, .cg-preview-body, .tb-card, #communityPage aside)
  :is(h1, h2, h3, h4, strong, dt, b, label, summary) { color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(.rest-panel, .settings-section, .pc-panel, .pv-visibility, .pv-security, .pv-deletion,
  .com-grid, .com-notif-main, .com-context, .report-list, .find-filter-bar, .cg-preview-body, .tb-card, #communityPage aside)
  :is(p, small, dd, li, .pc-muted, .pf-muted, .sub, .report-empty, .com-empty-notif, .exp-character-count) { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience :is(.rest-panel, .settings-section, .pc-panel, .pv-visibility, .pv-security, .find-filter-bar)
  span:not([class*="badge"]):not([class*="chip"]):not([class*="tag"]) { color: inherit !important; }

/* ---------------------------------------------------------------- secondary buttons that stayed white */
:root[data-theme="dark"] body.experience :is(.rest-panel, .settings-section, .pc-panel, .pv-security, .find-filter-bar, .report-list, #communityPage, #accountPage, #hostGamePage, #privacyPage)
  button:not(.rest-primary):not(.exp-button):not([class*="primary"]):not(.danger):not([aria-pressed="true"]):not(.selected) { background: var(--surface-2) !important; border-color: var(--line) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(#copyInvite, #copyCalendarLink, #endOtherSessions, .rest-action, .com-mark) { background: var(--surface-2) !important; border-color: var(--line) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(#regenerateCalendarBtn, button.danger) { background: var(--bad-bg) !important; border-color: var(--bad-dot) !important; color: var(--bad) !important; }

/* ---------------------------------------------------------------- dark text left on dark surfaces */
:root[data-theme="dark"] body.experience :is(.pc-back, .pv-back) { color: var(--link) !important; }
:root[data-theme="dark"] body.experience #upcomingGamesPage :is(button[role="tab"], .tabs button, nav button) { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience #hostGamePage :is(.cg-step, .cg-steps button, .cg-step span) { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience #hostGamePage .exp-required-marker { color: var(--bad) !important; }
:root[data-theme="dark"] body.experience .account-nav-label { color: var(--ink) !important; }

/* ---------------------------------------------------------------- second pass (probe 10.10) */
:root[data-theme="dark"] body.experience #socialPostForm button:disabled { background: var(--surface-2) !important; color: var(--quiet) !important; border-color: var(--line) !important; }
:root[data-theme="dark"] body.experience #playerVenues .exp-map-notice, :root[data-theme="dark"] body.experience #playerVenues span[role="status"] { background: var(--surface-2) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(#communityPage, #upcomingGamesPage) button:not([aria-pressed="true"]):not([aria-selected="true"]):not([class*="primary"]):not(.exp-button):not(.p2-btn.pri) { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience :is(#communityPage, #upcomingGamesPage) button:is([aria-pressed="true"], [aria-selected="true"]) { color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(#accountPage, #privacyPage, #communityPage) a:not(.exp-button):not([class*="primary"]) { color: var(--link) !important; }
:root[data-theme="dark"] body.experience #accountPage .rest-primary { background: var(--mint) !important; color: var(--mint-ink) !important; border-color: var(--mint) !important; }
:root[data-theme="dark"] body.experience #privacyPage :is(details, summary) { background: var(--surface) !important; border-color: var(--line) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience #privacyPage summary :is(strong, span) { color: var(--ink) !important; }
:root[data-theme="dark"] body.experience #privacyPage summary small { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience #hostGamePage button[aria-pressed="true"]:not(.exp-button) { background: var(--mint-soft) !important; border-color: var(--mint-line) !important; color: var(--mint-text) !important; }
:root[data-theme="dark"] body.experience #hostGamePage button[aria-pressed="true"]:not(.exp-button) * { color: var(--mint-text) !important; }
:root[data-theme="dark"] body.experience .tb-tabs button { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience .tb-tabs button[aria-pressed="true"] { color: var(--mint-text) !important; border-bottom-color: var(--mint) !important; }
:root[data-theme="dark"] body.experience #allGamesPage :is(.find-filter-field, .find-filter-bar button, .find-periods button):not([aria-pressed="true"]) { background: var(--surface-2) !important; border-color: var(--line) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience #allGamesPage .find-filter-field :is(span, small, select, input) { color: var(--ink) !important; background-color: transparent !important; }
:root[data-theme="dark"] body.experience .reports-toolbar button { color: var(--ink) !important; }
:root[data-theme="dark"] body.experience .reports-toolbar button[aria-pressed="true"] { background: var(--mint-soft) !important; color: var(--mint-text) !important; border-color: var(--mint-line) !important; }
/* Acasă: empty state „Nu ai meciuri viitoare…” and the load-error notes (light boxes with light text in Dark) */
:root[data-theme="dark"] body.experience #home :is(p.sub, p.error, #upcomingMsg) { background: var(--surface-2) !important; border-color: var(--line) !important; color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience #home p.error button { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }
/* Authentication screens in Dark: „Arată” (show password), „Afișează parolele”, „Nu ești tu? Deconectare” and the other
 * secondary buttons stayed white with light text. */
:root[data-theme="dark"] body.experience[data-view="auth"] :is(.password-toggle, #showSignupPasswords, #mfaChallengeSignOut, .loginbox button:not([type="submit"]):not(.primary), .account-page button:not([type="submit"]):not(.primary)) { background: var(--surface-2) !important; border-color: var(--line) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience #signupPage .signup-panel { background: var(--surface) !important; border-color: var(--line) !important; color: var(--ink) !important; box-shadow: none !important; }
:root[data-theme="dark"] body.experience #signupPage .signup-panel :is(h2, label, span, strong) { color: var(--ink) !important; }
:root[data-theme="dark"] body.experience #signupPage .signup-panel :is(p, small) { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience[data-view="auth"] :is(#signupPage, #forgotPage, #checkEmailPage, #mfaChallengePage, .loginbox) a { color: var(--link) !important; }

/* ---------------------------------------------------------------- third pass (audit 11.10, probe on every route)
 * Echipă (detail), Editează meciul, Notificări and the Acasă post menu kept white surfaces under light text;
 * „Acceptă” in Activitatea mea took the secondary-button text colour; „Anulează meciul” stayed dark red on dark. */
:root[data-theme="dark"] body.experience #teamsBoard :is(.tb-team-heading, .tb-panel),
:root[data-theme="dark"] body.experience #editGamePage :is(.eg-header, .eg-card, .eg-footer),
:root[data-theme="dark"] body.experience #notificationsList .notification-row,
:root[data-theme="dark"] body.experience #home .home-post-menu
  { background: var(--surface) !important; border-color: var(--line) !important; color: var(--ink) !important; box-shadow: none !important; }
:root[data-theme="dark"] body.experience #notificationsList .notification-row.unread { background: var(--surface-2) !important; }
:root[data-theme="dark"] body.experience :is(#teamsBoard, #editGamePage, #notificationsList, #home .home-post-menu) :is(h1, h2, h3, h4, strong, b, label, label > span, .tb-crest, .tb-stats strong, .com-notif-body p:first-child, .home-post-menu button, .home-post-menu button span)
  { color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(#teamsBoard, #editGamePage, #notificationsList) :is(p, small, .tb-description, .tb-empty, .eg-count, .pi-note, .eg-selected small, .com-notif-body p:not(:first-child), .com-notif-body small, time)
  { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience :is(#teamsBoard, #editGamePage, #notificationsList) a:not([class*="primary"]):not(.notification-row):not(.exp-button):not(.tb-link) { color: var(--link) !important; }
:root[data-theme="dark"] body.experience #teamsBoard .tb-crest { color: #F2EEE8 !important; }
:root[data-theme="dark"] body.experience #teamsBoard .tb-chip { background: var(--mint-soft) !important; color: var(--mint-text) !important; border-color: var(--mint-line) !important; }
:root[data-theme="dark"] body.experience #teamsBoard .tb-team-heading button:not([class*="primary"]):not(.tb-primary),
:root[data-theme="dark"] body.experience #editGamePage :is(.eg-choices button, .eg-capacity button, .eg-footer button:not([type="submit"]), .game-link-row button):not([aria-pressed="true"]):not(.selected):not(.active)
  { background: var(--surface-2) !important; border-color: var(--line) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience #editGamePage .pi-locked { background: var(--ok-bg) !important; border-color: var(--ok-dot) !important; }
:root[data-theme="dark"] body.experience #editGamePage .pi-locked strong { color: var(--ok) !important; }
:root[data-theme="dark"] body.experience #editGamePage .eg-warning { background: var(--pend-bg) !important; border-color: var(--pend-dot) !important; color: var(--pend) !important; }
:root[data-theme="dark"] body.experience #editGamePage #deleteGameBtn { background: var(--bad-bg) !important; border-color: var(--bad-dot) !important; color: var(--bad) !important; }
:root[data-theme="dark"] body.experience #notificationsList .com-notif-icon { background: var(--surface) !important; }
:root[data-theme="dark"] body.experience #home .home-post-menu button:hover { background: var(--surface-2) !important; }
:root[data-theme="dark"] body.experience main.hv3 .hv3-danger-o { border-color: var(--bad-dot) !important; color: var(--bad) !important; }
:root[data-theme="dark"] body.experience .exp-map-retry { background: var(--surface-2) !important; border-color: var(--line) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience #editGamePage :is(.eg-back, .eg-steps button, .eg-pencil, .game-link-row span) { color: var(--ink) !important; }
:root[data-theme="dark"] body.experience #editGamePage .eg-steps button:not([aria-current]):not(.active) { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience #teamsBoard .tb-link { color: #F2EEE8 !important; }
:root[data-theme="dark"] body.experience #editGamePage.edit-game-v2 { background: var(--bg) !important; }
:root[data-theme="dark"] body.experience #editGamePage :is(.eg-preview-toggle, .eg-chips button, .eg-selected, .eg-mobile-controls button:not(.primary)) { background: var(--surface-2) !important; border-color: var(--line) !important; color: var(--ink) !important; }

/* ---------------------------------------------------------------- fourth pass (live audit 12.10, state-dependent surfaces)
 * Mesaje with an open conversation (#conversationPage) (selected row, header, bubbles, composer, mobile „shared games”) and Sesizări with a
 * report selected (row, chip, detail, team answer) kept light surfaces under light text. The earlier probes visited
 * both pages empty. */
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage, #communityPage) :is(.com-chat-header, #sendMessageForm, .com-shared-mobile, .report-detail, .report-response, tr.profile-report.selected, .message-bubble.theirs)
  { background: var(--surface) !important; border-color: var(--line) !important; color: var(--ink) !important; box-shadow: none !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row.selected { background: var(--surface-2) !important; border-color: var(--mint-line) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .message-bubble.mine { background: var(--mint-soft) !important; border-color: var(--mint-line) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage, #communityPage) .avatar-placeholder { background: var(--surface-2) !important; color: var(--ink) !important; border-color: var(--line) !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage, #communityPage) :is(.com-chat-header, .conversation-row, .message-bubble, #sendMessageForm, .com-shared-mobile, .com-context, .report-detail, tr.profile-report, .report-response)
  :is(h1, h2, h3, strong, b, p, span, td, th, button.report-title, label, summary) { color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage, #communityPage) :is(.conversation-row p, .com-shared-empty, .report-detail small, .report-timeline small, time, .message-time, .com-context p)
  { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience #sendMessageForm :is(input, textarea) { background: var(--surface-2) !important; color: var(--ink) !important; border-color: var(--line) !important; }
:root[data-theme="dark"] body.experience #communityPage .report-chip.open { background: var(--pend-bg) !important; color: var(--pend) !important; border-color: var(--pend-dot) !important; }
:root[data-theme="dark"] body.experience #conversationPage :is(.com-chat, .conversation-thread) { background: var(--bg) !important; }
/* Mesaje · rândurile de conversație în Dark (CIA 13.10). refinements.css pictează rândul #fff, communications-v2.css
   necititul / selectatul #eafbf5 și hover-ul #f1faf7, fără variantă Dark (rând alb + text deschis, 1.17:1).
   - Text ≥ 4.5:1 pe fiecare fundal (citit, necitit, hover, necitit + hover, selectat).
   - Indicatori ≥ 3:1 față de culorile alăturate: necitit = bara din stânga + punctul (#00D690); selectat = inel interior
     de 2 px (#00D690, formă, nu doar culoare); focus (tastatură) = contur exterior albastru, 3 px, la 2 px distanță
     (în afara rândului, deci distinct de inelul interior al selecției); hover = fundal mai deschis + numele subliniat.
   - Hover-ul nu șterge necititul sau selecția: necitit + hover rămâne verde, inelul selecției rămâne. */
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row { background: var(--surface) !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row.unread { background: var(--mint-soft) !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row:hover { background: #2c2f35 !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row.unread:hover { background: #143F33 !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row.selected { background: var(--surface-2) !important; box-shadow: inset 0 0 0 2px #00D690 !important; color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row.selected:hover { background: #2c2f35 !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row.unread::before, :root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row .unread-dot { background: #00D690 !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row :is(strong, b) { color: var(--ink) !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row p { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row-time { color: var(--quiet) !important; }
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .conversation-row:focus-visible { outline: 3px solid #6EA8FF !important; outline-offset: 2px !important; }
/* Mesaje · panoul gol „Alege o conversație” (#messagesPage, > 800 px, nicio conversație deschisă). Cauza: communications-v2.css
   îl pictează cu un gradient deschis (background-image #f9fcff → #edf6fc), iar stratul Dark de mai sus întunecă doar
   .com-grid (background-color) și face textul din .com-grid deschis: titlul #E8EEF4 și textul #C3CED9 ajung peste gradientul
   deschis (1.07–1.55:1). O măsurare care citește numai background-color vede .com-grid #1E2023 și raportează 10–14:1.
   Aici: gradient închis din tokenuri, text ≥ 4.5:1; ilustrația terenului (decorativă) în nuanțele Dark. */
:root[data-theme="dark"] body.experience #messagesPage .com-empty { background: linear-gradient(160deg, var(--surface), var(--bg)) !important; color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience #messagesPage .com-empty h2 { color: var(--ink) !important; }
:root[data-theme="dark"] body.experience #messagesPage .com-empty p { color: var(--ink-2) !important; }
:root[data-theme="dark"] body.experience #messagesPage .com-empty .com-pitch-pattern { border-color: var(--mint-line) !important; background: linear-gradient(27deg, transparent 46%, #1F6B4F 47%, #1F6B4F 48%, transparent 49%), radial-gradient(circle at center, transparent 20%, #1F6B4F 21%, #1F6B4F 22%, transparent 23%), linear-gradient(110deg, #11372B, var(--j-rail)) !important; }
:root[data-theme="dark"] body.experience #messagesPage .com-empty .com-pitch-pattern::before { border-color: #1F6B4F !important; }
/* Separatorul dintre inbox și panou / fir (.com-inbox border-right #e4edf8 în communications-v2.css): o linie deschisă în Dark,
   vizibilă după ce panoul a devenit închis. Aceeași linie ca restul ramelor Dark. */
:root[data-theme="dark"] body.experience :is(#messagesPage, #conversationPage) .com-inbox { border-right-color: var(--line) !important; }
