/* ===== Shotmigo Glass theme (from the owner's Figma, Nov 2026) =====
   Loaded AFTER style.css on every panel page. Only restyles, never changes layout logic.
   Tokens from Figma: font Bai Jamjuree, primary #284EDD, accent #2163F4,
   page = soft blue gradient + blurred blue blobs, cards = white glass (30%) r12,
   inputs = white 50% r10, primary buttons = pill r24. */
:root {
  --blue: #284edd;
  --blue-h: #1f3fc0;
  --blue-2: #2163f4;
  --blue-soft: rgba(42,163,244,.16);
  --navy: #0b0f1a;
  --ink: #0b0f1a;
  --text: #0b0f1a;
  --muted: #5a5a5a;
  --border: rgba(255,255,255,.65);
  --bg: #e4eefc;
  --white: #ffffff;
  --glass: rgba(255,255,255,.48);
  --glass-strong: rgba(255,255,255,.55);
  --field: rgba(255,255,255,.55);
  --r-card: 12px;
  --r-input: 10px;
  --shadow: 0 1px 2px rgba(40,78,221,.05);
  --shadow-md: 0 14px 34px -14px rgba(40,78,221,.28);
  --font: 'Bai Jamjuree', 'Noto Sans Arabic', 'Inter', sans-serif;
}

/* ---------- page canvas ---------- */
html, body { font-family: var(--font); }
body {
  background: linear-gradient(54deg, #d0e4ff 27%, #ededee 100%) fixed;
  color: var(--text);
}
body::before, body::after { display: none;
  content: ''; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%;
  filter: blur(90px);
}
body::before { width: 520px; height: 540px; right: 6%; top: 18%; background: rgba(40,78,221,.30); transform: rotate(16deg); }
body::after  { width: 460px; height: 420px; left: -6%; bottom: -10%; background: rgba(33,99,244,.16); }
.app-shell, .main-area, .client-wrap { background: transparent; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, .page-title, .main-header-title, .modal-title, .auth-logo { font-family: var(--font) !important; color: var(--text) !important; font-weight: 600 !important; letter-spacing: -.01em !important; }
.main-header-sub, .page-sub, .stat-label { font-family: var(--font) !important; }

/* ---------- top bar: light glass instead of ink ---------- */
.sidebar {
  background: rgba(255,255,255,.38);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid rgba(255,255,255,.7);
}
.sidebar-logo img { filter: brightness(0); }
.sidebar-user { border-left-color: rgba(11,15,26,.1); }
.sidebar-user strong { color: var(--text); }
.sidebar-user span { color: var(--muted); }
.nav-item { color: #2a2f3a; }
.nav-item svg { opacity: .7; }
.nav-item:hover { background: rgba(255,255,255,.6); color: var(--text); }
.nav-item.active { background: var(--blue-2); color: #fff; box-shadow: 0 4px 4px rgba(0,0,0,.18); }
.nav-item[href="logout.php"] { color: #fa0101; }
.nav-item[href="logout.php"]:hover { background: rgba(250,1,1,.08); color: #fa0101; }

/* ---------- glass surfaces ---------- */
.stat-card, .card, .panel, .gallery-left-panel, .gallery-toolbar, .upload-area,
.share-option, .empty-state, .settings-card, .set-card, .box, .table-wrap {
  background: var(--glass) !important;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--border) !important;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-md);
}
.stat-card::before { display: none; }
.stat-val { font-family: var(--font) !important; font-weight: 700 !important; color: var(--text) !important; }
.stats-row .stat-card:first-child .stat-val { color: var(--blue-2) !important; }
.stat-label { color: var(--text) !important; }

/* gallery cards: white rounded tiles r24 like the Figma grid */
.gallery-card { border-radius: 24px; background: #fff; box-shadow: 0 10px 30px -16px rgba(40,78,221,.35); }
.gallery-card:hover { box-shadow: 0 22px 44px -18px rgba(40,78,221,.45); }
.photo-item, .client-photo, .sel-photo { border-radius: var(--r-photo); }

/* ---------- forms ---------- */
.form-group label { color: var(--text); }
.form-group input, .form-group select, .form-group textarea,
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel],
input[type=url], input[type=number], input[type=date], select, textarea {
  background-color: var(--field);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--r-input);
  color: var(--text);
}
.form-group input::placeholder, textarea::placeholder { color: #5a5a5a; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
input:focus, select:focus, textarea:focus {
  background-color: rgba(255,255,255,.8);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(40,78,221,.14);
}

/* ---------- buttons ---------- */
.btn { font-family: var(--font); font-weight: 500; border-radius: 24px; }
.btn-primary { background: var(--blue); box-shadow: 0 8px 20px -8px rgba(40,78,221,.6); }
.btn-primary:hover { background: var(--blue-h); }
.btn-ghost { background: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.9); color: var(--blue); }
.btn-ghost:hover { background: #fff; border-color: #fff; }
.btn-navy { background: var(--text); }

/* toggles: Figma switch (white track, blue knob) */


/* tabs / filter pills */
.panel-tab.active, .tab.active, .filter-pill.active, .chip.active { background: var(--blue-2) !important; color: #fff !important; }

/* Page-level white cards that pages define inline (invoices KPIs, boxes, tables):
   higher specificity so the page's own <style> does not win. */
html body .main-area :is(.kpi, .box, .card, .tw) {
  background: var(--glass) !important;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-color: var(--border) !important;
  box-shadow: var(--shadow-md);
}
/* Pages that paint their own flat body colour (invoices, ...): keep the glass canvas. */
html body { background: linear-gradient(54deg, #d0e4ff 27%, #ededee 100%) fixed !important; }
/* Grey pill tracks (tabs, segmented filters) -> glass track */
html body :is(.tabs, .seg, .flt-bar, .src-bar, .ptabs, .vtabs) {
  background: rgba(255,255,255,.22) !important;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
html body .flt-tab .c { color: inherit !important; opacity: .65; }
/* Grey "ghost" buttons -> light glass */
html body .main-area :is(.btn.ghost, a.ghost, button.ghost, .btn-ghost) {
  background: rgba(255,255,255,.4) !important;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.8) !important; color: var(--text) !important;
}
html body .main-area :is(.btn.ghost, a.ghost, button.ghost, .btn-ghost):hover { background: rgba(255,255,255,.7) !important; }
html body .main-area :is(.btn.primary, a.primary, button.primary, .btn.dark, a.dark, button.dark, .btn-navy) { background: var(--blue) !important; color: #fff !important; }

/* "More" menu in the top bar: light glass, dark readable text */
html body .nm-btn[aria-expanded="true"]:not(.active) { background: rgba(255,255,255,.7) !important; color: var(--text) !important; }
html body .nm-menu {
  background: rgba(255,255,255,.72) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.9) !important; border-radius: 12px !important;
  box-shadow: 0 24px 50px -18px rgba(40,78,221,.4) !important;
}
html body .nm-menu .nav-item { color: var(--text) !important; }
html body .nm-menu .nav-item svg { opacity: .7; }
html body .nm-menu .nav-item:hover { background: rgba(40,78,221,.1) !important; color: var(--blue) !important; }
html body .nm-menu .nav-item.active { background: var(--blue-2) !important; color: #fff !important; }

/* Any remaining dark dropdowns / popovers in the panel -> same light glass */
html body .main-area :is(.dropdown-menu, .menu-pop, .row-menu, .more-menu, .ctx-menu, .pop) {
  background: rgba(255,255,255,.8) !important; color: var(--text) !important;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.9) !important; border-radius: 12px;
}

/* Every field in the panel (pages paint theirs white inline) -> glass field */
html body .main-area :is(select, input[type=text], input[type=search], input[type=email], input[type=number], input[type=date], input[type=tel], input[type=url], input[type=password], textarea) {
  background-color: rgba(255,255,255,.45) !important;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-color: rgba(255,255,255,.8) !important;
}
html body .main-area :is(select, input, textarea):focus { background-color: rgba(255,255,255,.75) !important; border-color: var(--blue) !important; }
html body .modal :is(select, input, textarea) { background-color: rgba(255,255,255,.6) !important; }

/* Tables: glass container, see-through header and rows */
html body .main-area .tw { background: rgba(255,255,255,.28) !important; }
html body .main-area :is(table th, table thead tr) { background: rgba(255,255,255,.25) !important; }
html body .main-area table td, html body .main-area table tr { background: transparent !important; }
html body .main-area table tbody tr:hover td { background: rgba(255,255,255,.3) !important; }
html body .main-area table :is(td, th) { border-color: rgba(255,255,255,.55) !important; }
html body .main-area :is(.btn.ghost, a.ghost, button.ghost) { background: rgba(255,255,255,.3) !important; }

/* Billing page */
html body .bl-card {
  background: var(--glass) !important; border-color: var(--border) !important;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow-md);
}
html body .bl-pick { background: rgba(255,255,255,.3); border-color: rgba(255,255,255,.8) !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
html body .bl-pick.current { background: rgba(220,252,231,.45) !important; border-color: #16a34a !important; }
html body .bl-pick-btn { background: var(--blue) !important; }
html body .bl-bar { background: rgba(255,255,255,.55) !important; }

/* Empty lists: just the message, no glass box around nothing. */
html body .empty-state, html body .main-area .empty-state {
  background: none !important; border: 0 !important; box-shadow: none !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}

/* ---------- filter pills (Figma: glass track, blue raised "All", red Trash) ---------- */
html body .flt-bar, html body .src-bar {
  background: rgba(255,255,255,.22) !important;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.75); 
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
html body .flt-tab, html body .src-tab {
  color: var(--text) !important; background: none;
}
html body .flt-tab[data-f="trash"] { color: #e3261c !important; }
html body .flt-tab.on:not(.ts-tab), html body .src-tab.on:not(.ts-tab) {
  background: #3b63ee !important; color: #f8f9fd !important;
  box-shadow: 0 4px 6px rgba(0,0,0,.25) !important;
}
html body :is(#g-search, #ev-search, #v-search, #c-search, #vis-search) {
  background: rgba(255,255,255,.5) !important; border: 1px solid rgba(255,255,255,.75) !important;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
/* pages that hard-code Inter inline: take the theme font */
html body .main-area :where(div, span, p, a, button, label, input, select, textarea, td, th, li, strong, b, h1, h2, h3, h4):not(.flt-tab):not(.src-tab):not(#g-search):not(#ev-search):not(#v-search) { font-family: var(--font) !important; }

/* ---------- modals ---------- */
.modal-overlay { background: rgba(40,60,110,.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal {
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 12px;
  box-shadow: 0 30px 80px -24px rgba(40,78,221,.45);
}

/* ---------- auth (login / sign up) ---------- */
.auth-wrap {
  background: linear-gradient(54deg, #bce3fe 24%, #ededee 100%);
  background-image: linear-gradient(54deg, #bce3fe 24%, #ededee 100%);
}
.auth-box {
  background: rgba(255,255,255,.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 12px;
  box-shadow: 0 30px 70px -30px rgba(40,78,221,.45);
  max-width: 499px;
  padding: 3rem 2.6rem;
}
.auth-logo { font-size: 32px !important; }
.auth-logo img { filter: brightness(0); }
.auth-sub { font-size: 18px; color: var(--text); }
.auth-tabs { background: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.7); }
.auth-tab { font-size: 15px; color: var(--text); }
.auth-tab.active { background: var(--blue-2); color: #fff; box-shadow: 0 4px 4px rgba(0,0,0,.18); }

/* login: big glass frame, features left, form right (Figma Desktop-5) */
/* The glass only reads as glass when something colourful sits BEHIND it: a big blurred
   blue blob between the two panels, so both panels frost it (Figma Ellipse 3). */
.auth-frame {
  position: relative; isolation: isolate; overflow: hidden;
  width: 100%; max-width: 1270px; min-height: 780px;
  display: grid; grid-template-columns: 393px 1fr 482px; align-items: center;
  padding: 3.5rem 5.5rem 3.5rem 2.4rem;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.6); border-radius: 12px;
}
.auth-blob {
  position: absolute; z-index: -1; left: 38%; top: 22%; width: 520px; height: 540px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(52,82,226,.95), rgba(76,110,232,.55) 45%, rgba(120,150,240,0) 100%);
  filter: blur(40px); transform: rotate(16deg); pointer-events: none;
}
.auth-frame .auth-box {
  grid-column: 3; max-width: none; align-self: stretch;
  display: flex; flex-direction: column; justify-content: center;
  background: rgba(255,255,255,.3);
  -webkit-backdrop-filter: blur(30px) saturate(1.1); backdrop-filter: blur(30px) saturate(1.1);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 20px 50px -30px rgba(40,78,221,.35);
}
.auth-side {
  grid-column: 1; height: 510px;
  background: rgba(255,255,255,.45);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,.55); border-radius: 10px; padding: 3.2rem 1.1rem;
}
.auth-side ul { list-style: none; display: grid; gap: 1.85rem; }
.auth-side li { display: flex; align-items: center; gap: 1.2rem; font-size: 25px; color: var(--text); }
.auth-side svg { width: 34px; height: 34px; flex: none; stroke: #3d55dc; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-frame .form-group input { background: rgba(255,255,255,.5); border-color: rgba(255,255,255,.4); }
.auth-frame .auth-tabs { background: rgba(255,255,255,.3); }
@media (max-width: 1100px) {
  .auth-frame { grid-template-columns: 1fr; max-width: 520px; padding: 0; background: none; border: 0; min-height: 0; overflow: visible; }
  .auth-frame .auth-box { grid-column: 1; }
  .auth-side { display: none; }
  .auth-blob { left: 10%; top: 10%; width: 80%; height: 70%; }
}

/* alerts keep meaning, softer glass */
.alert-error { background: rgba(254,226,226,.8); }
.alert-success { background: rgba(232,249,241,.85); }

@media (max-width: 700px) {
  body::before { width: 300px; height: 320px; right: -20%; }
  .auth-box { padding: 2.2rem 1.4rem; }
}

/* ===== Performance =====
   backdrop-filter re-blurs everything behind an element on every scroll frame. Behind the
   panel cards there is only a smooth gradient, so the blur shows nothing and only costs speed:
   keep it on the few floating layers (top bar, menus, modals, login), drop it everywhere else.
   The gradient is painted once on <html> (no background-attachment: fixed repaint on scroll). */
html { background: linear-gradient(54deg, #d0e4ff 27%, #ededee 100%) !important; min-height: 100%; }
html body { background: transparent !important; }
html body *:not(.sidebar):not(.nm-menu):not(.modal):not(.modal-overlay):not(.create-modal):not(.help-modal):not(.v-modal):not(.profile-modal):not(.add-modal):not(.add-album-modal):not(.sup-modal):not(.fl-modal):not(.album-modal):not(.pub-box):not(.qr-box):not(.mfd-box):not(.pick-box):not(.nbell-panel):not(dialog):not(.menu):not(.modal-overlay):not(.create-modal-overlay):not(.v-modal-ov):not(.add-album-overlay):not(.add-overlay):not(.album-modal-overlay):not(.fl-overlay):not(.profile-overlay):not(.pub-ov):not(.qr-overlay):not(.sup-ov):not(.mfd-ov):not(.help-backdrop):not(.photo-action-bar):not(.vsel-bar):not(.pp-merge-bar):not(.auth-box):not(.auth-side):not(.email-modal) {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.sidebar { -webkit-backdrop-filter: blur(12px) !important; backdrop-filter: blur(12px) !important; }

/* Event cards: glass body under the cover photo */
html body .ev-card { background: var(--glass) !important; border-color: var(--border) !important; box-shadow: var(--shadow-md); }

/* Text on the blue active box is always white (filters, tabs, nav, everywhere) */
html body :is(.flt-tab.on, .src-tab.on, .panel-tab.active, .nav-item.active, .auth-tab.active, .flt-tab.active) { color: #fff !important; }
html body :is(.flt-tab.on, .src-tab.on, .nav-item.active) svg { color: #fff !important; stroke: currentColor; }

/* ===== All panel pop-ups (New Gallery, New Event, New Video Album, help, profile...) =====
   Frosted light glass over the dimmed page; fields stay clearly visible inside. */
html body :is(.modal, .create-modal, .help-modal, .v-modal, .profile-modal, .add-modal, .add-album-modal, .sup-modal, .fl-modal, .album-modal, .pub-box, .qr-box, .mfd-box, .pick-box) {
  background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,.06)) !important;
  -webkit-backdrop-filter: blur(5px) saturate(1.4) !important; backdrop-filter: blur(5px) saturate(1.4) !important;
  border: 1px solid rgba(255,255,255,.85) !important;
  border-radius: 12px !important;
  box-shadow: 0 30px 80px -24px rgba(20,40,110,.45), inset 0 1px 0 rgba(255,255,255,.9) !important;
  font-family: var(--font);
}
html body :is(.modal-overlay, .create-modal-overlay, .v-modal-ov, .add-album-overlay, .add-overlay, .album-modal-overlay, .fl-overlay, .profile-overlay, .pub-ov, .qr-overlay, .sup-ov, .mfd-ov, .help-backdrop) { background: rgba(30,45,90,.16) !important; }
html body :is(.modal, .create-modal, .help-modal, .v-modal, .profile-modal, .add-modal, .add-album-modal, .sup-modal, .fl-modal, .album-modal, .pub-box, .qr-box, .mfd-box, .pick-box) :is(*, input, select, textarea, button) { font-family: var(--font) !important; }
html body :is(.modal, .create-modal, .help-modal, .v-modal, .profile-modal, .add-modal, .add-album-modal, .sup-modal, .fl-modal, .album-modal, .pub-box, .qr-box, .mfd-box, .pick-box) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea) {
  background-color: rgba(255,255,255,.35) !important;
  border: 1px solid rgba(255,255,255,.8) !important;
  border-radius: 10px !important;
  color: var(--text) !important;
}
html body :is(.modal, .create-modal, .help-modal, .v-modal, .profile-modal, .add-modal, .add-album-modal, .sup-modal, .fl-modal, .album-modal, .pub-box, .qr-box, .mfd-box, .pick-box) :is(input, select, textarea):focus {
  background-color: #fff !important; border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(40,78,221,.14) !important;
}

/* Notification bell: dark icon on the light glass top bar */


html body .nbell-btn:hover { background: rgba(255,255,255,.6) !important; }

/* Album / project / video pages: same calm gradient as the dashboard, no blurred cover wash */
html body .pnl-glow { display: none !important; }
/* album page: left panel top lines up with the right column */
html body .gallery-admin > .gallery-left-panel { margin-top: 0 !important; }
/* Upload drop area + Upload ZIP button: glass, not white */
html body .gallery-main .upload-area, html body .upload-area {
  background: rgba(255,255,255,.3) !important;
  border: 1.5px dashed rgba(40,78,221,.28) !important;
}
html body .upload-area:hover, html body .upload-area.drag { background: rgba(255,255,255,.55) !important; border-color: var(--blue) !important; }
html body :is(#zip-upload-btn, #face-find-btn) { background: rgba(255,255,255,.35) !important; border: 1px solid rgba(255,255,255,.85) !important; border-radius: 24px !important; }
html body :is(#zip-upload-btn, #face-find-btn):hover { background: rgba(255,255,255,.65) !important; }
/* Every two-column page (album, event, design project, video album): columns start on one line */
html body :is(.gallery-admin, .dv-wrap, .vv-wrap) > :first-child { margin-top: 0 !important; }
html body .glass-panel { margin-top: 0 !important; }
/* Upload Photos: one glass layer only (the toolbar), no dashed box inside, content centred */
html body .gallery-main .upload-area, html body .upload-area {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  display: flex !important; align-items: center !important; justify-content: center !important; text-align: center !important;
}
html body .upload-area > * { text-align: center !important; }
html body .upload-area:hover, html body .upload-area.drag { background: rgba(255,255,255,.35) !important; border: 0 !important; }

/* Floating selection bars (photos, videos, people merge): light glass over the photos */
html body :is(.photo-action-bar, .vsel-bar, .pp-merge-bar) {
  background: rgba(236,243,253,.55) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.5) !important; backdrop-filter: blur(16px) saturate(1.5) !important;
  border: 1px solid rgba(255,255,255,.85) !important;
  box-shadow: 0 18px 44px -14px rgba(20,40,110,.45), inset 0 1px 0 rgba(255,255,255,.9) !important;
  color: var(--text) !important;
}
html body :is(.photo-action-bar, .vsel-bar, .pp-merge-bar) :is(button, a, span):not([class*="sep"]) { color: var(--text) !important; }
html body :is(.photo-action-bar, .vsel-bar, .pp-merge-bar) :is(button, a):hover { background: rgba(255,255,255,.6) !important; }
html body :is(.photo-action-bar, .vsel-bar, .pp-merge-bar) :is(.danger, .del, [onclick*="elete"], [onclick*="rash"]) { color: #dc2626 !important; }
html body :is(.photo-action-bar, .vsel-bar) [class*="sep"] { background: none !important; color: rgba(11,15,26,.25) !important; }

/* On / off switches: glass track, white knob; blue when on (all pages) */
html body :is(.wm-slider, .toggle-slider) {
  background: rgba(11,15,26,.14) !important;
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: inset 0 1px 3px rgba(11,15,26,.18) !important;
}
html body :is(.wm-slider, .toggle-slider)::before { background: #fff !important; box-shadow: 0 2px 5px rgba(11,15,26,.25) !important; }
html body :is(.wm-toggle, .toggle-switch) input:checked + :is(.wm-slider, .toggle-slider) {
  background: var(--blue) !important; border-color: rgba(255,255,255,.6); box-shadow: inset 0 1px 2px rgba(0,0,0,.15), 0 4px 10px -4px rgba(40,78,221,.6) !important;
}
/* Fields on light glass panels: a soft blue outline so every box reads as a box */
html body .main-area :is(select, input[type=text], input[type=search], input[type=email], input[type=number], input[type=date], input[type=tel], input[type=url], input[type=password], textarea) {
  border: 1px solid rgba(40,78,221,.16) !important;
  background-color: rgba(255,255,255,.4) !important;
}
/* Album side panel: the cover keeps one fixed size on every tab (Photos / Albums / Settings).
   The panel is a flex column, so a long Settings list was squeezing the cover to nothing. */
html body .gallery-left-panel .cover-drop-zone { flex: 0 0 auto !important; aspect-ratio: 16/10 !important; height: auto !important; min-height: 0; width: 100% !important; }
html body .gallery-left-panel .cover-drop-zone img { width: 100% !important; height: 100% !important; object-fit: cover; }
html body .gallery-left-panel { scrollbar-gutter: stable; }
/* Phones: the page canvas keeps the gradient all the way down (no grey/white strip under the
   app, and none when Safari's toolbar shrinks or the page bounces). */
html { background-color: #e4ebf6 !important; background-repeat: no-repeat !important; background-attachment: scroll; }
html body .app-shell { height: 100vh; height: 100dvh; }
/* One fixed gradient layer behind everything, taller than the screen, so Safari's moving
   toolbar and the bounce never show an empty strip at the top or bottom. */
html { background: #d3e2fa !important; }
html body::before {
  display: block !important; content: ''; position: fixed; left: 0; right: 0; top: -15vh; bottom: -15vh;
  z-index: -1; pointer-events: none; border-radius: 0; filter: none; transform: none; width: auto; height: auto;
  background: linear-gradient(54deg, #d0e4ff 27%, #ededee 100%) !important;
}
html body .app-shell { min-height: 100vh; min-height: 100dvh; }
/* Phones: search + filter pills on ONE line (search shrinks, pills scroll sideways if needed) */
@media (max-width: 700px) {
  html body .main-area div:has(> .flt-bar) { flex-wrap: nowrap !important; gap: .45rem !important; }
  html body .main-area div:has(> .flt-bar) > input { flex: 0 0 36% !important; min-width: 0 !important; max-width: none !important; padding-left: .7rem !important; padding-right: .5rem !important; }
  html body .main-area .flt-bar { flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap !important; }
  html body .main-area .flt-bar::-webkit-scrollbar { display: none; }
  html body .main-area .flt-bar .flt-tab { padding: .4rem .65rem !important; flex-shrink: 0; }
}
/* iPhone Safari draws its toolbar ON TOP of the page (see-through). The app used to stop above
   it, so the toolbar showed a flat grey strip. Run the app under the toolbar (large viewport)
   and give the scroll area room at the bottom so nothing ends up hidden behind the bar. */
html body .app-shell { height: 100vh !important; height: 100lvh !important; min-height: 0 !important; }
@media (max-width: 900px) {
  html body .main-area { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 90px) !important; }
}
/* One search box look on every section (the My Photos one): same glass, size and corners */
html body .main-area div:has(> .flt-bar) > input,
html body :is(#g-search, #ev-search, #v-search, #c-search, #vis-search) {
  background: rgba(255,255,255,.5) !important; border: 1px solid rgba(255,255,255,.75) !important;
  border-radius: 10px !important; padding: .6rem 1rem !important; font-size: 12px !important;
  font-family: Inter, 'Noto Sans Arabic', sans-serif !important; color: var(--text) !important;
  max-width: 320px; box-shadow: none !important; opacity: 1 !important;
}
html body .main-area div:has(> .flt-bar) > input:focus { background: rgba(255,255,255,.8) !important; border-color: var(--blue) !important; }
/* Phones: let the PAGE scroll (not an inner box). Safari then treats it like a normal page:
   its toolbar floats over the content and shrinks on scroll, so no grey band at the bottom. */
@media (max-width: 900px) {
  html, html body { height: auto !important; min-height: 100% !important; overflow: visible !important; }
  html body .app-shell { height: auto !important; min-height: 100vh; overflow: visible !important; }
  html body .main-area { overflow: visible !important; flex: none !important; }
  html body :is(.sidebar-wrap, .app-shell > .sidebar) { position: sticky !important; top: 0; z-index: 200; }
}
/* Invoices table: the pinned action column (Pay / PDF) needs a solid frosted fill on phones,
   otherwise the scrolled columns show through behind the buttons. */
html body .main-area .tw :is(tbody td, thead th, tfoot td):last-child { background: #e8eef9 !important; }
/* Phones: invoice summary cards two per row */
@media (max-width: 700px) {
  html body .main-area .kpis { grid-template-columns: 1fr 1fr !important; gap: .55rem !important; }
  html body .main-area .kpis .kpi { padding: .8rem .8rem !important; min-width: 0; }
  html body .main-area .kpis .kpi .v { font-size: 20px !important; }
  html body .main-area .kpis .kpi .l, html body .main-area .kpis .kpi .s { font-size: 11.5px !important; }
}
/* Phones: the 4 stat cards (My Photos, Designs, Videos, Events...) on ONE row, compact */
@media (max-width: 700px) {
  html body .stats-row { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: .4rem !important; }
  html body .stats-row .stat-card { padding: .6rem .5rem !important; min-width: 0; text-align: center; }
  html body .stats-row .stat-val { font-size: 18px !important; white-space: nowrap; }
  html body .stats-row .stat-val small, html body .stats-row .stat-val span { font-size: 9px !important; }
  html body .stats-row .stat-label { font-size: 10px !important; line-height: 1.25; margin-top: .25rem !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html body .stats-row .stat-card .stat-bar, html body .stats-row .stat-card progress { display: none; }
}
/* Phones: top bar must hide what scrolls under it (no blur on mobile, so make it nearly solid) */
@media (max-width: 900px) {
  html body .sidebar { background: rgba(232,239,251,.96) !important; }
}
/* Phones: invoice / quotation list as compact cards, everything visible, no sideways scroll */
@media (max-width: 700px) {
  html body .main-area .tw { overflow: visible !important; }
  html body .main-area .tw table { min-width: 0 !important; width: 100% !important; }
  html body .main-area .tw thead { display: none; }
  html body .main-area .tw tbody tr {
    display: grid !important; grid-template-columns: minmax(0,1fr) auto; column-gap: .6rem; row-gap: .15rem;
    padding: .7rem .8rem; border-bottom: 1px solid rgba(255,255,255,.6);
  }
  html body .main-area .tw tbody td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; font-size: 12px; position: static !important; box-shadow: none !important; background: none !important; }
  html body .main-area .tw tbody td:nth-child(1) { grid-column: 1; grid-row: 1; }
  html body .main-area .tw tbody td:nth-child(6) { grid-column: 2; grid-row: 1; justify-self: end; }
  html body .main-area .tw tbody td:nth-child(2) { grid-column: 1; grid-row: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html body .main-area .tw tbody td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; font-weight: 600; }
  html body .main-area .tw tbody td:nth-child(3) { grid-column: 1; grid-row: 3; font-size: 11px; }
  html body .main-area .tw tbody td:nth-child(5) { grid-column: 2; grid-row: 3; text-align: right; font-size: 11px; }
  html body .main-area .tw tbody td:nth-child(5)::before { content: 'Balance '; color: var(--muted); font-weight: 400; }
  html body .main-area .tw tbody td:nth-child(7) { grid-column: 1 / -1; grid-row: 4; margin-top: .45rem; }
  html body .main-area .tw tbody td:nth-child(7) .acts { display: flex; gap: .4rem; justify-content: flex-end; }
  html body .main-area .tw tbody td:nth-child(7) .btn { min-height: 30px !important; padding: 0 .85rem !important; font-size: 12px !important; }
  html body .main-area .tw .inv-no { font-size: 13px; }
  html body .main-area .tw .inv-no small { display: inline; margin-left: .35rem; font-size: 11px; }
  html body .main-area .tw tfoot tr { display: flex; justify-content: space-between; padding: .6rem .8rem; }
  html body .main-area .tw tfoot td { padding: 0 !important; background: none !important; position: static !important; box-shadow: none !important; }
}

/* ===== Page-by-page audit fixes (2026-11-14): last white / grey / dark boxes -> glass ===== */
html body :is(.btn-ghost, .btn.ghost):not(.modal *):not(.create-modal *) {
  background: rgba(255,255,255,.4) !important; border: 1px solid rgba(255,255,255,.85) !important; color: var(--text) !important;
}
html body :is(.btn-ghost, .btn.ghost):hover { background: rgba(255,255,255,.7) !important; }
html body :is(.lo-box, .ev-pay, .clients-table, .fl-wrap, .tl-card, .cr-card, .cr-table-wrap) {
  background: var(--glass) !important; border: 1px solid var(--border) !important; box-shadow: var(--shadow-md);
}
html body :is(.clients-table, .cr-table-wrap) :is(th, thead tr) { background: rgba(255,255,255,.25) !important; }
html body :is(.clients-table, .cr-table-wrap) :is(td, tr) { background: transparent !important; border-color: rgba(255,255,255,.55) !important; }
html body .ev-bal { background: rgba(255,255,255,.4) !important; border: 1px solid rgba(255,255,255,.85) !important; }
html body .ev-bal small { color: var(--blue) !important; }
html body .profile-modal-header { background: transparent !important; color: var(--text) !important; border-bottom: 1px solid rgba(255,255,255,.6) !important; }
html body .profile-modal-header :is(h2, h3, div, span, p, button) { color: var(--text) !important; }
html body .tl-tab { background: rgba(255,255,255,.3) !important; border: 1px solid rgba(255,255,255,.8) !important; color: var(--text) !important; }
html body .tl-tab.on { background: var(--blue-2) !important; border-color: var(--blue-2) !important; color: #fff !important; }
html body .cr-buy { background: var(--blue) !important; }
html body #fl-search { background: rgba(255,255,255,.5) !important; border: 1px solid rgba(255,255,255,.75) !important; border-radius: 10px !important; }
html body :is(.modal, .create-modal, .v-modal, .help-modal, .profile-modal) :is(.btn-ghost, .btn.ghost) { background: rgba(255,255,255,.55) !important; border: 1px solid rgba(255,255,255,.9) !important; }
html body :is(.vshare-opt, .share-option) { background: rgba(255,255,255,.35) !important; border: 1px solid rgba(255,255,255,.8) !important; }
html body :is(.vshare-opt, .share-option):hover { background: rgba(255,255,255,.6) !important; }
/* Notification panel: frosted enough that the page under it can't be read through */
html body .nbell-panel {
  background: rgba(240,245,253,.9) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.3) !important; backdrop-filter: blur(18px) saturate(1.3) !important;
  border: 1px solid rgba(255,255,255,.9) !important; border-radius: 12px !important;
  box-shadow: 0 24px 50px -18px rgba(40,78,221,.4) !important;
}
/* Pop-up backgrounds: blur the page behind (only while a pop-up is open, so no speed cost),
   so a glass window over busy photos stays readable. Long-text help gets a denser glass. */
html body :is(.modal-overlay, .create-modal-overlay, .v-modal-ov, .add-album-overlay, .add-overlay, .album-modal-overlay, .fl-overlay, .profile-overlay, .pub-ov, .qr-overlay, .sup-ov, .mfd-ov, .help-backdrop) {
  -webkit-backdrop-filter: blur(8px) !important; backdrop-filter: blur(8px) !important;
}
html body .help-modal { background: linear-gradient(135deg, rgba(240,245,253,.82), rgba(240,245,253,.7)) !important; }
/* Native <dialog> pop-ups (invoice payment etc.) + row "..." menus: same glass */
html body dialog {
  background: linear-gradient(135deg, rgba(240,245,253,.82), rgba(240,245,253,.66)) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.3) !important; backdrop-filter: blur(14px) saturate(1.3) !important;
  border: 1px solid rgba(255,255,255,.85) !important; border-radius: 12px !important;
  box-shadow: 0 30px 80px -24px rgba(20,40,110,.45) !important; color: var(--text);
}
html body dialog::backdrop { background: rgba(30,45,90,.16); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
html body dialog :is(.pd, form) { background: transparent !important; }
html body .more .menu {
  background: rgba(240,245,253,.92) !important; -webkit-backdrop-filter: blur(16px) !important; backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255,255,255,.9) !important; border-radius: 12px !important;
}
html body .more .menu :is(a, button):hover { background: rgba(40,78,221,.1) !important; }
/* Notification bell in brand blue */
html body .nbell-btn, html body .nbell-btn svg { color: var(--blue) !important; }
/* Table headers that used to sit on a dark band: readable dark text on glass */
html body :is(.clients-table, .fl-table, .cr-table-wrap, .tw, .main-area table) th { color: #4a5262 !important; background: rgba(255,255,255,.3) !important; }
html body :is(.clients-table, .fl-table) td { color: var(--text); }
html body :is(.fl-table, .clients-table) tr:hover td { background: rgba(255,255,255,.35) !important; }
/* Drop-downs (sort "Name (A–Z)", year, etc.): same glass as the search box */
html body .main-area select:not(.modal select):not(dialog select) {
  background-color: rgba(255,255,255,.5) !important; border: 1px solid rgba(255,255,255,.75) !important;
}
html body .main-area select:focus { background-color: rgba(255,255,255,.8) !important; border-color: var(--blue) !important; }
/* Logout: a calm red, not the bright one */
html body .sidebar a.nav-item[href="logout.php"], html body .sidebar a.nav-item[href="logout.php"] svg { color: #c2413b !important; }
html body .sidebar a.nav-item[href="logout.php"]:hover { background: rgba(194,65,59,.08) !important; color: #c2413b !important; }
/* Billing: lighter glass + theme font (this page has no .main-area wrapper) */
html body .bl-card { background: rgba(255,255,255,.3) !important; border: 1px solid rgba(255,255,255,.75) !important; }
html body .bl-pick { background: rgba(255,255,255,.22) !important; border: 1px solid rgba(255,255,255,.8) !important; }
html body .bl-pick.current { background: rgba(220,252,231,.35) !important; border: 1.5px solid #34a853 !important; }
html body :is(.bl-card, .bl-card *) { font-family: var(--font) !important; }
html body .bl-bar { background: rgba(255,255,255,.45) !important; border: 1px solid rgba(255,255,255,.8); }

/* ===== My Profile window (Figma Desktop-20) ===== */
html body .profile-modal .pf-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.6rem .2rem; }
html body .profile-modal .pf-title { font-size: 26px !important; font-weight: 600 !important; margin: 0; color: var(--text) !important; }
html body .profile-modal .pf-sub { font-size: 12px; color: var(--muted); margin: .25rem 0 0; }
html body .profile-modal .profile-modal-header { border-bottom: 0 !important; padding-top: .8rem !important; align-items: center; }
html body .profile-modal .profile-modal-header .profile-avatar { width: 96px !important; height: 78px !important; border-radius: 10px !important; background: rgba(42,163,244,.27) !important; border: 1px solid rgba(255,255,255,.8) !important; overflow: hidden; }
html body .profile-modal .profile-avatar img { object-fit: contain !important; }
html body .profile-modal .profile-header-info { display: flex; flex-direction: column; gap: .15rem; }
html body .profile-modal .profile-header-info strong { font-size: 16px; color: var(--text) !important; }
html body .profile-modal .profile-header-info span { font-size: 14px; color: var(--text) !important; }
html body .profile-modal .pf-change-photo { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--blue); cursor: pointer; text-align: left; margin-top: .2rem; }
html body .profile-modal .pf-change-photo:hover { text-decoration: underline; }
html body .profile-modal .pf-public {
  display: flex; align-items: center; gap: .75rem; margin: .4rem 0 1rem; padding: .85rem 1rem; border-radius: 12px;
  background: rgba(255,255,255,.3); border: 1px solid rgba(255,255,255,.8); color: var(--text); text-decoration: none;
}
html body .profile-modal .pf-public svg { color: var(--blue); flex-shrink: 0; }
html body .profile-modal .pf-public span { display: flex; flex-direction: column; }
html body .profile-modal .pf-public b { font-size: 14px; font-weight: 500; }
html body .profile-modal .pf-public small { font-size: 12px; font-weight: 600; color: var(--text); }
html body .profile-modal a.pf-public[href]:hover { background: rgba(255,255,255,.55); }
html body .profile-modal .pf-save { min-width: 175px; border-radius: 7px !important; justify-content: center; }
/* Profile window: solid light background at 80% (owner: less see-through) */
html body .profile-modal { background: rgba(236,242,252,.8) !important; }
/* Profile: round photo; studio link shows the domain right after what you type */
html body .profile-modal .profile-modal-header .profile-avatar { width: 84px !important; height: 84px !important; border-radius: 50% !important; }
html body .profile-modal .pf-slug { display: flex; align-items: center; border: 1px solid rgba(255,255,255,.8); border-radius: 10px; background: rgba(255,255,255,.5); overflow: hidden; }
html body .profile-modal .pf-slug:focus-within { border-color: var(--blue); background: rgba(255,255,255,.85); }
html body .profile-modal .pf-slug input { border: 0 !important; background: transparent !important; box-shadow: none !important; flex: 1; min-width: 0; padding-right: 0 !important; text-align: right; }
html body .profile-modal .pf-slug-dom { padding: 0 .8rem 0 .1rem; font-size: 13px; color: var(--muted); white-space: nowrap; }
/* Studio link: the inner field has NO box of its own; the whole row is one field */
html body .profile-modal .pf-slug input#pf-slug,
html body .profile-modal .pf-slug input#pf-slug:focus {
  border: 0 !important; background: transparent !important; background-color: transparent !important;
  box-shadow: none !important; border-radius: 0 !important; outline: none !important; padding-left: .9rem !important;
}
/* Password fields with show / hide eye */
html body .pf-pw { position: relative; }
html body .pf-pw input { padding-right: 2.8rem !important; }
html body .pf-eye { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: .35rem; cursor: pointer; color: var(--muted); display: flex; border-radius: 6px; }
html body .pf-eye:hover { color: var(--blue); background: rgba(40,78,221,.08); }
/* Studio link: type from the left, the domain follows right after the name */
html body .profile-modal .pf-slug { justify-content: flex-start; cursor: text; }
html body .profile-modal .pf-slug input#pf-slug { flex: 0 0 auto !important; text-align: left !important; padding-right: 0 !important; min-width: 3ch; width: auto; }
html body .profile-modal .pf-slug-dom { padding-left: 0; }
html body .profile-modal .profile-close { color: var(--text) !important; background: rgba(255,255,255,.7) !important; border: 1px solid rgba(255,255,255,.9) !important; opacity: 1 !important; }
html body .profile-modal .profile-close:hover { background: #fff !important; }
html body .profile-modal .pf-sub { white-space: nowrap; font-size: 11.5px; } @media (max-width: 520px) { html body .profile-modal .pf-sub { white-space: normal; } }

/* ===================== DARK MODE (photographer choice, saved per account) =====================
   <html class="dark"> is printed by the server (sm_theme_attr()). Same glass, on a deep navy canvas. */
html.dark {
  --text: #e8ecf6; --ink: #e8ecf6; --navy: #e8ecf6; --muted: #a3abc0;
  --glass: rgba(255,255,255,.06); --glass-strong: rgba(255,255,255,.09); --field: rgba(255,255,255,.07);
  --border: rgba(255,255,255,.12); --bg: #070b16; --white: #121a2e; --surface: #121a2e; --blue-soft: rgba(126,160,255,.14);
  --shadow-md: 0 14px 34px -14px rgba(0,0,0,.7);
  color-scheme: dark;
}
html.dark, html.dark body { background: #070b16 !important; color: var(--text); }
html.dark body::before { background: radial-gradient(60% 50% at 85% 20%, rgba(40,78,221,.28), transparent 70%), radial-gradient(50% 45% at 5% 95%, rgba(33,99,244,.14), transparent 70%), #070b16 !important; }
/* top bar */
html.dark body .sidebar { background: rgba(10,15,30,.7) !important; border-bottom-color: rgba(255,255,255,.08) !important; }
@media (max-width: 900px) { html.dark body .sidebar { background: rgba(10,15,30,.97) !important; } }
html.dark :is(.sidebar-logo img, .auth-logo img, .nav-logo img) { filter: brightness(0) invert(1) !important; }
html.dark body .nav-item { color: #c9d0e0; }
html.dark body .nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
html.dark body .nm-menu { background: rgba(16,22,40,.92) !important; border-color: rgba(255,255,255,.1) !important; }
html.dark body .nm-btn[aria-expanded="true"]:not(.active) { background: rgba(255,255,255,.12) !important; }
html.dark body .nbell-btn:hover { background: rgba(255,255,255,.1) !important; }
html.dark body .nbell-btn, html.dark body .nbell-btn svg { color: #7ea0ff !important; }
html.dark body .nbell-panel { background: rgba(16,22,40,.95) !important; border-color: rgba(255,255,255,.1) !important; color: var(--text); }
html.dark body .nbell-panel * { color: inherit; border-color: rgba(255,255,255,.08) !important; }
html.dark body .pf-btn-all { border-color: rgba(255,255,255,.3); background: #1a2340; }
html.dark body .sidebar a.nav-item[href="logout.php"], html.dark body .sidebar a.nav-item[href="logout.php"] svg { color: #f07a73 !important; }
/* surfaces */
html.dark body :is(.stat-card, .card, .panel, .gallery-left-panel, .gallery-toolbar, .share-option, .settings-card, .set-card, .box, .table-wrap, .ev-card, .lo-box, .ev-pay, .clients-table, .fl-wrap, .tl-card, .cr-card, .cr-table-wrap, .bl-card, .glass-panel),
html.dark body .main-area :is(.kpi, .box, .card, .tw) {
  background: rgba(255,255,255,.055) !important; border-color: rgba(255,255,255,.11) !important; box-shadow: 0 14px 34px -16px rgba(0,0,0,.75) !important; color: var(--text);
}
html.dark body .gallery-card { background: #121a2e !important; box-shadow: 0 10px 30px -16px rgba(0,0,0,.8) !important; color: var(--text); }
html.dark body .stats-row .stat-card:first-child .stat-val { color: #7ea0ff !important; }
html.dark body :is(.tabs, .seg, .flt-bar, .src-bar, .ptabs, .vtabs, .auth-tabs, .bl-bar) { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.1) !important; box-shadow: none !important; }
html.dark body .tl-tab:not(.on) { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.12) !important; }
html.dark body :is(.flt-tab, .src-tab, .auth-tab, .tl-tab):not(.on):not(.active) { color: #c9d0e0 !important; }
html.dark body .flt-tab[data-f="trash"]:not(.on) { color: #f07a73 !important; }
html.dark body .bl-pick { background: rgba(255,255,255,.05) !important; border-color: rgba(255,255,255,.12) !important; }
html.dark body .bl-pick.current { background: rgba(34,197,94,.12) !important; }
html.dark body .ev-bal { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.12) !important; }
/* fields */
html.dark body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]), select, textarea),
html.dark body .main-area :is(select, input[type=text], input[type=search], input[type=email], input[type=number], input[type=date], input[type=tel], input[type=url], input[type=password], textarea),
html.dark body .main-area div:has(> .flt-bar) > input,
html.dark body :is(#g-search, #ev-search, #v-search, #c-search, #vis-search, #fl-search) {
  background-color: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.14) !important; color: var(--text) !important;
}
html.dark body :is(input, select, textarea):focus, html.dark body .main-area div:has(> .flt-bar) > input:focus { background-color: rgba(255,255,255,.1) !important; border-color: #5b7cff !important; }
html.dark body ::placeholder { color: #7d869b !important; }
html.dark body select option { background: #121a2e; color: var(--text); }
html.dark body .profile-modal .pf-slug { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
html.dark body .profile-modal .pf-slug:focus-within { background: rgba(255,255,255,.1); }
html.dark body .profile-modal .pf-slug input#pf-slug { background: transparent !important; }
/* buttons */
html.dark body :is(.btn-ghost, .btn.ghost, a.ghost, button.ghost, #zip-upload-btn, #face-find-btn, .vshare-opt, .share-option),
html.dark body .main-area :is(.btn.ghost, a.ghost, button.ghost, .btn-ghost) {
  background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.14) !important; color: var(--text) !important;
}
html.dark body :is(.btn-ghost, .btn.ghost, a.ghost, button.ghost, #zip-upload-btn, #face-find-btn, .vshare-opt, .share-option):hover { background: rgba(255,255,255,.13) !important; }
html.dark body .upload-area:hover, html.dark body .upload-area.drag { background: rgba(255,255,255,.06) !important; }
/* tables */
html.dark body :is(.clients-table, .fl-table, .cr-table-wrap, .tw, .main-area table) th { color: #a3abc0 !important; background: rgba(255,255,255,.04) !important; }
html.dark body table :is(td, th) { border-color: rgba(255,255,255,.08) !important; }
html.dark body table td { color: var(--text); }
html.dark body table tbody tr:hover td { background: rgba(255,255,255,.04) !important; }
html.dark body .main-area .tw :is(tbody td, thead th, tfoot td):last-child { background: #0f1628 !important; }
@media (max-width: 700px) { html.dark body .main-area .tw tbody tr { border-bottom-color: rgba(255,255,255,.08); } html.dark body .main-area .tw tbody td:last-child { background: none !important; } }
/* menus / pop-ups */
html.dark body .main-area :is(.dropdown-menu, .menu-pop, .row-menu, .more-menu, .ctx-menu, .pop), html.dark body .more .menu {
  background: rgba(16,22,40,.95) !important; border-color: rgba(255,255,255,.1) !important; color: var(--text) !important;
}
html.dark body .more .menu :is(a, button) { color: var(--text) !important; }
html.dark body .more .menu :is(a, button):hover { background: rgba(255,255,255,.08) !important; }
html.dark body :is(.modal, .create-modal, .help-modal, .v-modal, .profile-modal, .add-modal, .add-album-modal, .sup-modal, .fl-modal, .album-modal, .pub-box, .qr-box, .mfd-box, .pick-box, dialog) {
  background: linear-gradient(135deg, rgba(22,30,54,.92), rgba(14,20,38,.88)) !important;
  border-color: rgba(255,255,255,.12) !important; box-shadow: 0 30px 80px -24px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06) !important; color: var(--text) !important;
}
html.dark body :is(.modal-overlay, .create-modal-overlay, .v-modal-ov, .add-album-overlay, .add-overlay, .album-modal-overlay, .fl-overlay, .profile-overlay, .pub-ov, .qr-overlay, .sup-ov, .mfd-ov, .help-backdrop) { background: rgba(0,0,0,.45) !important; }
html.dark body dialog::backdrop { background: rgba(0,0,0,.45); }
html.dark body :is(.modal, .create-modal, .help-modal, .v-modal, .profile-modal, .add-modal, .add-album-modal, .sup-modal, .fl-modal, .album-modal, .pub-box, .qr-box, .mfd-box, .pick-box, dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea) {
  background-color: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.14) !important; color: var(--text) !important;
}
html.dark body :is(.modal, .create-modal, .help-modal, .v-modal, .profile-modal, .add-modal, .add-album-modal, .sup-modal, .fl-modal, .album-modal, .pub-box, .qr-box, .mfd-box, .pick-box, dialog) :is(input, select, textarea):focus { background-color: rgba(255,255,255,.1) !important; }
html.dark body :is(.modal, .create-modal, .v-modal, .help-modal, .profile-modal) :is(.btn-ghost, .btn.ghost) { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.14) !important; }
html.dark body .profile-modal .profile-close { color: var(--text) !important; background: rgba(255,255,255,.1) !important; border-color: rgba(255,255,255,.18) !important; }
html.dark body .profile-modal .pf-public { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
html.dark body .profile-modal-header { border-bottom-color: rgba(255,255,255,.1) !important; }
html.dark body :is(.photo-action-bar, .vsel-bar, .pp-merge-bar) { background: rgba(16,22,40,.82) !important; border-color: rgba(255,255,255,.12) !important; box-shadow: 0 18px 44px -14px rgba(0,0,0,.8) !important; }
html.dark body :is(.photo-action-bar, .vsel-bar, .pp-merge-bar) :is(button, a):hover { background: rgba(255,255,255,.1) !important; }
html.dark body :is(.photo-action-bar, .vsel-bar) [class*="sep"] { color: rgba(255,255,255,.25) !important; }
html.dark body :is(.wm-slider, .toggle-slider) { background: rgba(255,255,255,.14) !important; border-color: rgba(255,255,255,.12); }
html.dark body .alert-error { background: rgba(239,68,68,.14); color: #fca5a5; }
html.dark body .alert-success { background: rgba(16,185,129,.14); color: #6ee7b7; }
html.dark body :is(.ev-bal small, .profile-modal .pf-change-photo, .profile-modal .pf-public svg) { color: #7ea0ff !important; }
/* login page */
html.dark .auth-wrap { background: #070b16 !important; }
html.dark :is(.auth-box, .auth-frame .auth-box, .auth-side) { background: rgba(255,255,255,.05) !important; border-color: rgba(255,255,255,.12) !important; }
html.dark .auth-frame { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.1); }
/* theme switch button (top bar) */
.sm-theme-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(40,78,221,.2); background: rgba(255,255,255,.4); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0; margin-inline-start: .4rem; }
.sm-theme-btn svg { width: 17px; height: 17px; } .sm-theme-btn .i-sun { display: none; }
html.dark .sm-theme-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
html.dark .sm-theme-btn .i-sun { display: block; } html.dark .sm-theme-btn .i-moon { display: none; }
html.dark body .glass-panel::before, html.dark body .glass-panel::after { opacity: .12 !important; }
