/* =====================================================================
 *  oweili.css — the Oweili design system (one theme for every page)
 *
 *  1. Fonts          5. Buttons          9.  Stage photos (25/50/100%)
 *  2. Tokens         6. Forms            10. Dashboards (stat cards, tables)
 *  3. Base           7. Cards            11. Footer
 *  4. Type scale     8. Artwork display  12. Helpers, motion, older classes
 *
 *  Pages use these tokens and classes instead of writing their own colors,
 *  fonts, buttons or inputs. Keep page <style> blocks for layout only.
 * ===================================================================== */

/* ── 1. FONTS — DM Sans for English, Tajawal for Arabic. Must stay the first rule. ── */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300..800&family=Tajawal:wght@300;400;500;700;800&display=swap");

/* ── 2. TOKENS ── */
:root {
  /* brand colors (rebrand: warm pink + deep navy) */
  --color-primary: #DB8084;        /* warm pink: buttons and large highlights */
  --color-primary-dark: #C96A6E;   /* pink hover; pink words in headings on light backgrounds */
  --color-accent: #23314A;         /* deep navy: links and secondary actions */
  --color-accent-dark: #1A2538;    /* navy hover */
  --color-neutral: #8FA1B1;        /* soft grey-blue */
  --color-dark: #23314A;           /* headings */
  --color-body: #4A5568;           /* body text */
  --color-light: #8FA1B1;          /* captions on large text and icons */
  --color-bg: #FFFFFF;
  --color-card: rgba(255,255,255,0.85);
  --color-border: rgba(35,49,74,0.1);
  --color-border-strong: rgba(35,49,74,0.24); /* form fields: visible edge (WCAG 1.4.11) */

  /* helpers built from the palette, so every page follows light and dark mode */
  --rgb-primary: 219,128,132;      /* use as rgba(var(--rgb-primary), 0.1) */
  --rgb-accent: 35,49,74;
  --rgb-neutral: 143,161,177;
  --rgb-ink: 35,49,74;             /* soft fills and lines */
  --rgb-shadow: 35,49,74;          /* shadows */
  --rgb-surface: 255,255,255;      /* frosted glass */
  --color-surface: #FFFFFF;        /* solid cards, inputs, menus */
  --color-surface-2: #F5F7F9;      /* sunken areas, image placeholders */
  --color-frame: #FFFFFF;          /* behind artwork photos */
  --color-menu: #FFFFFF;           /* solid menus, pop-up windows */
  --color-on-primary: #23314A;     /* text on pink (navy passes contrast, white does not) */
  --color-on-accent: #FFFFFF;      /* text on navy */
  --color-on-dark: #FFFFFF;        /* text on the heading color */
  --color-dark-hover: #1A2538;
  --color-highlight: var(--color-primary-dark); /* pink words inside headings */
  --color-tint-blue: rgba(var(--rgb-accent),0.06);
  --color-tint-pink: rgba(var(--rgb-primary),0.12);
  --color-hover-light: rgba(var(--rgb-ink),0.05);
  --nav-bg: rgba(255,255,255,0.82);
  --veil: linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0.8) 55%, rgba(255,255,255,0.92) 100%);
  --veil-strong: rgba(255,255,255,0.93);
  --hero-shade: rgba(0,0,0,0.15);

  /* role accent colors (dashboards) */
  --color-artist: #DB8084;
  --color-collector: #23314A;
  --color-institute: #8FA1B1;
  --color-subadmin: #5B8A6E;
  --color-admin: #23314A;

  /* fonts: DM Sans has no Arabic letters, so in --font-sans every English
     letter is drawn in DM Sans and every Arabic letter falls through to Tajawal */
  --font-en: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-ar: "Tajawal", "Helvetica Neue", Arial, sans-serif;
  --font-sans: "DM Sans", "Tajawal", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* type scale */
  --fs-hero: 48px;
  --fs-section: 32px;
  --fs-card: 24px;
  --fs-subtitle: 18px;
  --fs-body: 16px;
  --fs-input: 15px;
  --fs-button: 14px;
  --fs-label: 13px;
  --fs-caption: 13px;
  --fs-min: 12px;   /* smallest text allowed anywhere (badges) */
  --lh-en: 1.6;
  --lh-ar: 1.7;

  /* spacing — 8px grid */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --section-pad: 96px;

  /* shapes */
  --radius-input: 8px;
  --radius-btn: 8px;
  --radius-card: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 4px 20px rgba(var(--rgb-shadow),0.06);
  --shadow-card-hover: 0 16px 40px rgba(var(--rgb-shadow),0.10);
  --ease: 0.2s ease;

  /* sizes */
  --nav-h: 64px;
  --btn-h: 48px;
  --btn-h-sm: 36px;
  --input-h: 48px;
  --stage-size: 120px;
}

/* ── 2b. DARK MODE — class "dark-mode" on <html>, set by theme_head.php:
    the visitor's saved choice, or their phone or computer setting until they choose ── */
html.dark-mode {
  color-scheme: dark;
  --color-primary: #DB8084;
  --color-primary-dark: #C96A6E;
  --color-accent: #8FA1B1;       /* lighter in dark mode so links stay readable */
  --color-accent-dark: #B4C2CE;
  --color-dark: #F0F4F8;
  --color-body: #CBD5E0;
  --color-light: #8FA1B1;
  --color-bg: #0F1520;
  --color-card: rgba(35,49,74,0.6);
  --color-border: rgba(143,161,177,0.15);
  --color-border-strong: rgba(143,161,177,0.32);
  --rgb-accent: 143,161,177;
  --rgb-ink: 143,161,177;
  --rgb-shadow: 0,0,0;
  --rgb-surface: 35,49,74;
  --color-surface: rgba(35,49,74,0.6);   /* frosted glass cards */
  --color-surface-2: #172031;
  --color-frame: #1A2538;
  --color-menu: #1A2538;
  --color-on-primary: #23314A;
  --color-on-accent: #0F1520;
  --color-on-dark: #0F1520;
  --color-dark-hover: #CBD5E0;
  --color-highlight: var(--color-primary);
  --color-tint-blue: rgba(143,161,177,0.1);
  --color-tint-pink: rgba(219,128,132,0.14);
  --nav-bg: rgba(15,21,32,0.88);
  --veil: rgba(15,21,32,0.6);
  --veil-strong: rgba(15,21,32,0.9);
  --hero-shade: rgba(15,21,32,0.6);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.35);
  --shadow-card-hover: 0 16px 40px rgba(0,0,0,0.5);
  --color-collector: #8FA1B1;
  --color-admin: #F0F4F8;
}
/* cards become frosted glass on the dark background */
.dark-mode .card, .dark-mode .aw-card, .dark-mode .stat-card, .dark-mode .table-wrap, .dark-mode .auth-card, .dark-mode .glass-card {
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
/* inputs stay solid so text is always easy to read */
.dark-mode .input, .dark-mode .field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
.dark-mode .field select, .dark-mode .field textarea, .dark-mode .ow-form input, .dark-mode .ow-form select, .dark-mode .ow-form textarea { background: #172031; }

/* the light / dark button (theme_head.php): moon in light mode, sun in dark mode */
.theme-btn { min-width: 40px; padding: 0 10px; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun, .dark-mode .theme-btn .i-moon { display: none; }
.dark-mode .theme-btn .i-sun { display: block; }

@media (max-width: 768px) {
  :root {
    --fs-hero: 36px;
    --fs-section: 26px;
    --fs-card: 20px;
    --section-pad: 48px;
  }
}
@media (max-width: 420px) { :root { --stage-size: min(120px, 26vw); } }

/* ── 3. BASE (every page) ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-en);
  color: var(--color-body);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { line-height: var(--lh-ar); text-align: right; }
/* page transitions: every page fades in (0.3s); when a link is followed the page
   fades out (0.2s) first. The script that adds .ow-leaving lives in theme_head.php.
   "backwards" lets the fade-in stop applying once it ends, so nothing else changes */
@keyframes owPageIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes owPageOut { from { opacity: 1; } to { opacity: 0; } }
body { animation: owPageIn 0.3s ease-out backwards; }
html.ow-leaving body { animation: owPageOut 0.2s ease-in forwards; }
@media (prefers-reduced-motion: reduce) { body, html.ow-leaving body { animation: none; } }
img { max-width: 100%; }
a { color: var(--color-accent); }
a:hover { color: var(--color-accent-dark); }
input, select, textarea, button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* two-language text: <span class="bi-en">…</span><span class="bi-ar">…</span>
   shows the one that matches the page direction */
html:not([dir="rtl"]) .bi-ar { display: none; }
html[dir="rtl"] .bi-en { display: none; }

/* ── 4. TYPE SCALE ── */
h1, h2, h3, h4 { color: var(--color-dark); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 var(--space-sm); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { letter-spacing: 0; line-height: 1.35; }
.t-hero { font-size: var(--fs-hero); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--color-dark); }
.t-section { font-size: var(--fs-section); font-weight: 700; color: var(--color-dark); }
.t-card { font-size: var(--fs-card); font-weight: 700; color: var(--color-dark); }
.t-subtitle { font-size: var(--fs-subtitle); line-height: 1.6; color: var(--color-body); font-weight: 400; }
.t-body { font-size: var(--fs-body); color: var(--color-body); }
.t-caption { font-size: var(--fs-caption); color: var(--color-body); }
.t-eyebrow { font-size: var(--fs-min); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-dark); }
p { margin: 0 0 var(--space-sm); }
fieldset { min-width: 0; }

/* ── 5. BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: var(--btn-h); padding: 0 var(--space-md);
  border-radius: var(--radius-btn); border: 1px solid transparent;
  font-family: inherit; font-size: var(--fs-button); font-weight: 700; line-height: 1.2;
  letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease), box-shadow var(--ease);
}
[dir="rtl"] .btn { letter-spacing: 0; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-primary); color:var(--color-on-primary); }
.btn-primary:hover { background: var(--color-primary-dark); color:var(--color-on-primary); }
.btn-primary:focus-visible { outline-color: var(--color-primary); }
.btn-secondary { background: var(--color-surface); color: var(--color-dark); border-color: var(--color-dark); }
.btn-secondary:hover { background: var(--color-hover-light); color: var(--color-dark); }
.btn-accent { background: var(--color-accent); color:var(--color-on-accent); }
.btn-accent:hover { background: var(--color-accent-dark); color:var(--color-on-accent); }
.btn-dark { background: var(--color-dark); color:var(--color-on-dark); }
.btn-dark:hover { background: var(--color-dark-hover); color:var(--color-on-dark); }
/* "danger" = destructive actions (delete, reject, ban): dark text on a pink tint, never small pink text */
.btn-danger { background: var(--color-tint-pink); color: var(--color-dark); border-color: rgba(var(--rgb-primary),0.35); }
.btn-danger:hover { background: rgba(var(--rgb-primary),0.12); color: var(--color-dark); }
.btn-ghost { background: transparent; color: var(--color-dark); border-color: var(--color-border-strong); }
.btn-ghost:hover { background: var(--color-hover-light); color: var(--color-dark); }
.btn-sm { min-height: var(--btn-h-sm); padding: 0 var(--space-sm); font-size: var(--fs-min); }  /* table rows and tight spots only */
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.disabled, .btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── 6. FORMS ── */
.field { display: flex; flex-direction: column; gap: var(--space-xs); margin-bottom: var(--space-sm); }
.field label, .label { font-size: var(--fs-label); font-weight: 700; color: var(--color-dark); }
.input,
.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
.field select, .field textarea, .ow-form input[type=text], .ow-form input[type=email],
.ow-form input[type=password], .ow-form input[type=date], .ow-form input[type=number], .ow-form input[type=tel], .ow-form input[type=url],
.ow-form select, .ow-form textarea {
  width: 100%; min-height: var(--input-h); padding: 12px 16px;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-input);
  background: var(--color-surface); color: var(--color-dark);
  font-family: inherit; font-size: var(--fs-input); line-height: 1.4;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field textarea, .ow-form textarea, textarea.input { min-height: 120px; line-height: 1.6; resize: vertical; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover,
.ow-form input:hover, .ow-form select:hover, .ow-form textarea:hover { border-color: rgba(var(--rgb-ink),0.32); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus,
.ow-form input:focus, .ow-form select:focus, .ow-form textarea:focus {
  outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(var(--rgb-accent),0.12);
}
.field input[type=file], .ow-form input[type=file] { font-size: var(--fs-label); max-width: 100%; }
.field.has-error input, .field.has-error select, .field.has-error textarea, .input.has-error,
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--color-primary); }
.field-error { font-size: var(--fs-label); font-weight: 600; color: var(--color-dark); }
.field-error::before { content: "● "; color: var(--color-primary); }
.field-hint { font-size: var(--fs-label); color: var(--color-body); line-height: 1.5; }
.alert { padding: 12px 16px; border-radius: var(--radius-input); font-size: 15px; line-height: 1.6; margin-bottom: var(--space-sm); color: var(--color-dark); }
.alert-error { background: var(--color-tint-pink); border: 1px solid rgba(var(--rgb-primary),0.3); }
.alert-ok { background: var(--color-tint-blue); border: 1px solid rgba(var(--rgb-accent),0.2); }

/* ── 6b. SIGN-IN AND SIGN-UP PAGES (login, register, forgot, verify) ── */
.auth-wrap { position: relative; z-index: 10; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: calc(var(--nav-h) + var(--space-lg)) var(--space-sm) var(--space-xl); }
.auth-card { width: 100%; max-width: 460px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: var(--space-lg); }
.auth-card.wide { max-width: 600px; }
.auth-head { text-align: center; margin-bottom: var(--space-md); }
.auth-head h1, .auth-card > h1 { font-size: var(--fs-section); font-weight: 700; color: var(--color-dark); margin: 0 0 var(--space-xs); }
.auth-head p, .auth-card > p { font-size: var(--fs-body); color: var(--color-body); margin: 0; }
.auth-foot { margin-top: var(--space-md); text-align: center; font-size: 15px; color: var(--color-body); }
.link { color: var(--color-accent); font-weight: 600; text-decoration: none; }
.link:hover { color: var(--color-accent-dark); text-decoration: underline; }
.hint { font-size: var(--fs-label); color: var(--color-body); line-height: 1.5; margin-top: 4px; }
.err-box { background: var(--color-tint-pink); border: 1px solid rgba(var(--rgb-primary),0.3); color: var(--color-dark); font-size: 15px; font-weight: 600; padding: 12px 16px; border-radius: var(--radius-input); margin-bottom: var(--space-sm); }
.ok-box { background: var(--color-tint-blue); border: 1px solid rgba(var(--rgb-accent),0.25); color: var(--color-accent-dark); font-size: 15px; font-weight: 600; padding: 12px 16px; border-radius: var(--radius-input); margin-bottom: var(--space-sm); }
.pw-rules, .rules { list-style: none; margin: var(--space-xs) 0 4px; padding: 12px 16px; background: rgba(var(--rgb-ink),0.03); border-radius: var(--radius-input); font-size: var(--fs-label); color: var(--color-body); }
.pw-rules li, .rules li { padding: 3px 0; display: flex; align-items: center; gap: 8px; }
.pw-rules li .mark { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--color-border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: transparent; flex-shrink: 0; }
.pw-rules li.ok { color: var(--color-accent-dark); }
.pw-rules li.ok .mark { background: var(--color-accent); border-color: var(--color-accent); color:var(--color-on-accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-sm); }
@media (max-width: 768px) { .grid2 { grid-template-columns: 1fr; } .auth-card { padding: var(--space-md); } }

/* ── 7. CARDS ── */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: var(--space-md);
}
.card-hover { transition: transform var(--ease), box-shadow var(--ease); }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.card-media { display: block; height: 200px; margin: calc(-1 * var(--space-md)) calc(-1 * var(--space-md)) var(--space-md); border-radius: 12px 12px 0 0; overflow: hidden; background: var(--color-surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.glass-card { background: var(--color-card); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid var(--color-border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }

/* ── 8. ARTWORK DISPLAY (same everywhere) ── */
.aw-card { display: flex; flex-direction: column; overflow: hidden; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); transition: transform var(--ease), box-shadow var(--ease); }
.aw-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.aw-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--color-frame); border-bottom: 1px solid var(--color-border); overflow: hidden; }
.aw-img img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--color-frame); }
/* drawn placeholder when an artwork photo is missing or fails to load (owArtImgHtml) */
.aw-img-noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--color-light); background: var(--color-surface-2); }
.aw-img-noimg[hidden], .aw-img img[hidden] { display: none; }
.aw-img-noimg svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* older phones (iOS 14 and earlier) do not know aspect-ratio: keep the 4:3 frame with the
   classic padding trick, so the picture area never collapses to zero height */
@supports not (aspect-ratio: 4 / 3) {
  .aw-img { height: 0; padding-top: 75%; }
  .aw-img > img, .aw-img > .aw-img-noimg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
}
.aw-body { display: flex; flex-direction: column; gap: 4px; padding: var(--space-sm) var(--space-sm) var(--space-md); flex: 1; }
.aw-title { font-size: var(--fs-body); font-weight: 700; line-height: 1.4; color: var(--color-dark); text-decoration: none; }
a.aw-title:hover { color: var(--color-accent); }
.aw-artist { font-size: var(--fs-caption); color: var(--color-body); text-decoration: none; }
a.aw-artist:hover { color: var(--color-accent); text-decoration: underline; }
.aw-price { margin-top: auto; padding-top: var(--space-xs); font-size: var(--fs-body); font-weight: 700; color: var(--color-dark); }
.aw-status { position: absolute; top: 10px; inset-inline-start: 10px; padding: 2px 10px; border-radius: var(--radius-pill); font-size: var(--fs-min); font-weight: 700; background: rgba(var(--rgb-surface),0.92); color: var(--color-dark); border: 1px solid var(--color-border-strong); }
/* Heart (favorites) — Gallery cards, the artwork window and the Buyer dashboard */
.fav-btn { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--color-border-strong); background: rgba(var(--rgb-surface),0.92); color: var(--color-dark); cursor: pointer; padding: 0; transition: transform .15s ease, background .15s ease; }
.fav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.fav-btn:hover { transform: scale(1.06); }
.fav-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.fav-btn[aria-pressed="true"] { color: var(--color-primary-dark); border-color: var(--color-primary); }
.fav-btn[aria-pressed="true"] svg { fill: var(--color-primary); stroke: var(--color-primary-dark); }
.fav-btn.fav-inline { position: static; }
@media (prefers-reduced-motion: reduce) { .fav-btn { transition: none; } .fav-btn:hover { transform: none; } }
/* the "✦ A Real Touch" / «✦ لمسة حقيقية» badge — identical on every page */
.human-badge, .verified-badge {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; width: auto;
  padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: var(--fs-min); font-weight: 700; line-height: 1.6; white-space: nowrap;
  color: var(--color-accent); background: rgba(var(--rgb-accent),0.06); border: 1px solid rgba(var(--rgb-accent),0.15);
}
.human-badge[hidden], .verified-badge[hidden] { display: none !important; }

/* the drawn art style pictures from art_covers.js (Explore + upload) — brand colors, follow light and dark mode */
.ill .bgk { fill: var(--color-surface-2); }
.ill .pk { fill: var(--color-primary); }
.ill .gb { fill: var(--color-neutral); }
.ill .ink { fill: var(--color-dark); }
.ill .ln { fill: none; stroke: var(--color-dark); }
.ill .st { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ill .st.pk { stroke: var(--color-primary); }
.ill .st.gb { stroke: var(--color-neutral); }
.ill .st.ink { stroke: var(--color-dark); }
.ill .st.bgk { stroke: var(--color-surface-2); }
.ill .tx { fill: var(--color-dark); font-family: var(--font-sans); font-size: 13px; font-weight: 600; }
.ill .sgb { stop-color: var(--color-neutral); }
.ill .sbg { stop-color: var(--color-surface-2); }
.ill .sink { stop-color: var(--color-dark); }

/* ── 9. STAGE PHOTOS (25% / 50% / 100%) — same squares everywhere ── */
.stages { display: flex; align-items: flex-start; gap: 0; }
.stage { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; text-decoration: none; }
.stage-img { width: var(--stage-size); height: var(--stage-size); border-radius: 12px; overflow: hidden; background: var(--color-frame); border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; }
.stage-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage.missing .stage-img { border: 1.5px dashed var(--color-border-strong); background: var(--color-surface-2); color: var(--color-light); }
.stage.missing .stage-img svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.stage-label { font-size: var(--fs-label); font-weight: 700; color: var(--color-dark); }
.stage.missing .stage-label { color: var(--color-body); font-weight: 600; }
.stage-line { flex: 1 1 16px; min-width: 12px; max-width: 48px; height: 0; margin-top: calc(var(--stage-size) / 2); border-top: 1px dashed var(--color-border-strong); }
a.stage:hover .stage-img { border-color: var(--color-accent); }
a.stage:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 12px; }

/* ── 10. DASHBOARDS ── */
.dash { --role: var(--color-artist); }
.dash.role-artist { --role: var(--color-artist); }
.dash.role-collector { --role: var(--color-collector); }
.dash.role-institute { --role: var(--color-institute); }
.dash.role-subadmin { --role: var(--color-subadmin); }
.dash.role-admin { --role: var(--color-admin); }
.dash-wrap { max-width: 1200px; margin: 0 auto; padding: calc(var(--nav-h) + var(--space-lg)) var(--space-lg) var(--space-2xl); }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-lg); }
.dash-head h1 { font-size: var(--fs-section); margin: 0; }
.dash-head .t-caption { margin: 4px 0 0; }
.dash-section { margin-bottom: var(--space-xl); }
.dash-section > h2, .dash-title { font-size: var(--fs-subtitle); font-weight: 700; margin: 0 0 var(--space-sm); }
.role-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--radius-pill); font-size: var(--fs-min); font-weight: 700; color: var(--color-dark); background: var(--color-surface); border: 1px solid var(--color-border-strong); }
.role-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--role); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); }
.stat-card { background: var(--color-surface); border: 1px solid var(--color-border); border-top: 3px solid var(--role, var(--color-dark)); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: var(--space-sm); }
.stat-num { display: block; font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--color-dark); }
.stat-lbl { display: block; margin-top: 4px; font-size: var(--fs-label); font-weight: 600; color: var(--color-body); }
.table-wrap { overflow-x: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: start; padding: 12px 16px; font-size: var(--fs-min); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-body); background: var(--color-surface-2); border-bottom: 1px solid var(--color-border); white-space: nowrap; }
[dir="rtl"] .table th { letter-spacing: 0; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--color-border); color: var(--color-dark); vertical-align: middle; }
.table tbody tr:nth-child(even) td { background: rgba(var(--rgb-ink),0.02); }
.table tbody tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: var(--space-xs); overflow-x: auto; padding-bottom: 2px; margin-bottom: var(--space-md); }
.tab { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-sm); border-radius: var(--radius-btn); border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-dark); font-family: inherit; font-size: var(--fs-button); font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background var(--ease), border-color var(--ease); }
.tab:hover { background: var(--color-hover-light); color: var(--color-dark); }
.tab.active, .tab.on, .tab[aria-current="page"] { background: var(--color-dark); border-color: var(--color-dark); color:var(--color-on-dark); }
.tab .count { font-size: var(--fs-min); padding: 0 8px; border-radius: var(--radius-pill); background: rgba(var(--rgb-ink),0.07); }
.tab.active .count, .tab.on .count, .tab[aria-current="page"] .count { background: rgba(var(--rgb-surface),0.22); }
.pill { display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill); font-size: var(--fs-min); font-weight: 700; color: var(--color-dark); background: rgba(var(--rgb-ink),0.06); }
.pill-blue { background: rgba(var(--rgb-accent),0.1); color: var(--color-accent-dark); }
.pill-pink { background: var(--color-tint-pink); border: 1px solid rgba(var(--rgb-primary),0.3); }
/* staff pages (admin, sub-admin, articles) keep a simple header instead of the public menu */
.staff-page { background: var(--color-surface-2); }
.staff-wrap { max-width: 1100px; margin: 0 auto; padding: var(--space-lg); }

/* ── 11. FOOTER (footer.php — same on every page) ── */
.ow-footer { position: relative; z-index: 2; margin-top: var(--space-2xl); padding: var(--space-xl) var(--space-lg) var(--space-lg); background: var(--color-surface); border-top: 1px solid var(--color-border); }
.ow-footer-in { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); }
.ow-footer-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--color-dark); font-weight: 800; letter-spacing: 0.14em; font-size: 16px; }
.ow-footer-brand svg { width: 22px; height: 22px; }
.ow-footer-links { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); list-style: none; margin: 0; padding: 0; }
.ow-footer-links a { font-size: 15px; font-weight: 600; color: var(--color-dark); text-decoration: none; }
.ow-footer-links a:hover { color: var(--color-accent); }
.ow-footer-social { display: flex; gap: var(--space-xs); }
.ow-footer-social a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: var(--radius-btn); border: 1px solid var(--color-border-strong); color: var(--color-dark); transition: background var(--ease), color var(--ease); }
.ow-footer-social a:hover { background: var(--color-dark); color:var(--color-on-dark); }
.ow-footer-social svg { width: 18px; height: 18px; fill: currentColor; }
.ow-footer-copy { max-width: 1200px; margin: var(--space-md) auto 0; padding-top: var(--space-md); border-top: 1px solid var(--color-border); font-size: var(--fs-caption); color: var(--color-body); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs) var(--space-sm); }
.ow-footer-mail { color: var(--color-dark); font-weight: 600; text-decoration: none; }
.ow-footer-mail:hover, .ow-footer-mail:focus-visible { text-decoration: underline; }

/* ── 12a. BACKGROUND VIDEO WITH WHITE VEIL (bg.mp4) ── */
.bg-wrap { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 2s ease; }
.bg-video.on { opacity: 0.9; }
.overlay, .veil { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: var(--veil); }
.veil.strong { background: var(--veil-strong); }
@media (prefers-reduced-motion: reduce) { .bg-video { display: none; } }

/* ── 12. HELPERS, MOTION ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }
.section { padding: var(--section-pad) 0; }
.empty-state { padding: var(--space-xl) var(--space-md); text-align: center; font-size: var(--fs-body); line-height: 1.7; color: var(--color-dark); }
.empty-state svg { width: 44px; height: 44px; stroke: var(--color-accent); fill: none; stroke-width: 1.6; display: block; margin: 0 auto var(--space-sm); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tag { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: var(--fs-min); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tag-blue { background: rgba(var(--rgb-accent),0.08); color: var(--color-accent-dark); border: 1px solid rgba(var(--rgb-accent),0.15); }
.tag-red  { background: var(--color-tint-pink); color: var(--color-dark); border: 1px solid rgba(var(--rgb-primary),0.25); }
.tag-dark { background: rgba(var(--rgb-ink),0.06); color: var(--color-dark); border: 1px solid var(--color-border); }

@keyframes ow-riseUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ow-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.animate-rise { animation: ow-riseUp 0.9s cubic-bezier(0.22,1,0.36,1) both; }

@media (max-width: 1024px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .container { padding: 0 var(--space-sm); }
  .dash-wrap { padding: calc(var(--nav-h) + var(--space-md)) var(--space-sm) var(--space-xl); }
  .staff-wrap { padding: var(--space-sm); }
  .ow-footer { padding: var(--space-lg) var(--space-sm) var(--space-md); }
  .ow-footer-in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) { .stat-grid { grid-template-columns: 1fr 1fr; } .stat-num { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* "By joining you agree to…" under sign-up buttons */
.agree-note { font-size: var(--fs-caption); color: var(--color-body); margin: 0 0 var(--space-sm); line-height: 1.6; }
.agree-note a { color: var(--color-accent); font-weight: 600; }

/* ---- Language + light / dark buttons: ONE shared look on every page ----
   Printed only by owCornerControls() / owThemeButton() in theme_head.php.
   Same height (40px), border, corners, font and spacing everywhere, in both
   languages and both themes. The doubled class wins over older page styles. */
.ow-ctls { display: inline-flex; align-items: center; gap: var(--space-xs); flex-shrink: 0; }
button.ow-ctl.ow-ctl {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  height: 40px; min-height: 40px; margin: 0; padding: 0 12px; vertical-align: middle;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-btn);
  background: transparent; color: var(--color-dark);
  font-family: var(--font-sans); font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: 0; text-transform: none;
  white-space: nowrap; cursor: pointer; box-shadow: none;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
button.ow-ctl.ow-ctl.lang-btn { min-width: 84px; }
button.ow-ctl.ow-ctl.theme-btn { width: 40px; min-width: 40px; padding: 0; }
button.ow-ctl.ow-ctl:hover { background: var(--color-dark); border-color: var(--color-dark); color: var(--color-on-dark); }
button.ow-ctl.ow-ctl:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
button.ow-ctl.ow-ctl:active { transform: translateY(1px); }

/* ---------------------------------------------------------------------
   Certificate of Authenticity: the details form (upload + edit), the
   declaration box and the "Certified authentic" badge
   --------------------------------------------------------------------- */
.cert-fields { border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-md); margin: var(--space-md) 0; background: var(--color-surface); }
.cert-fields legend { font-weight: 700; font-size: 16px; color: var(--color-dark); padding: 0 var(--space-xs); }
.cert-hint { font-size: var(--fs-caption); color: var(--color-body); margin: 0 0 var(--space-sm); line-height: 1.6; }
.cf-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.cf-row.cf-edition { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cf-row[hidden] { display: none; }
.cf-label { display: block; font-size: var(--fs-label); font-weight: 700; color: var(--color-dark); margin-bottom: 6px; }
.cf-choice { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.cf-choice label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-input); cursor: pointer; font-size: 15px; color: var(--color-dark); }
.cf-choice label:has(input:checked) { border-color: var(--color-dark); box-shadow: inset 0 0 0 1px var(--color-dark); }
.declare { display: flex; align-items: flex-start; gap: 12px; margin: var(--space-sm) 0 var(--space-md); padding: var(--space-sm); border: 1px solid rgba(var(--rgb-primary), .45); border-radius: var(--radius-input); background: var(--color-tint-pink); cursor: pointer; font-size: 15px; font-weight: 600; color: var(--color-dark); line-height: 1.6; }
.declare input { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; accent-color: var(--color-dark); }
.declare input:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
@media (max-width: 560px) { .cf-row { grid-template-columns: 1fr 1fr; } .cf-row .field:last-child:nth-child(3) { grid-column: 1 / -1; } }

.cert-badge { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 14px; border: 1px solid var(--color-dark); border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; color: var(--color-dark); text-decoration: none; background: var(--color-surface); }
.cert-badge svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.cert-badge .cert-no { font-weight: 600; letter-spacing: .04em; }
.cert-badge:hover { background: var(--color-dark); color: var(--color-on-dark); }
.cert-badge:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.rights-note { font-size: var(--fs-caption); color: var(--color-body); line-height: 1.6; margin: var(--space-xs) 0 0; }

/* Certificate colours: the brand palette, kept light in dark mode too (a certificate is printed on paper) */
:root {
  --cert-ink: #23314A; --cert-body: #4A5568; --cert-muted: #8FA1B1; --cert-accent: #DB8084; --cert-accent-dark: #C96A6E;
  --cert-paper: #FFFFFF; --cert-tint: rgba(219,128,132,0.07); --cert-line: rgba(35,49,74,0.18);
}
