/* ======================================================
   GX THEMES – portal-wide overrides (works with gitrix.css)
   These override: --bg, --bg2, --text, --muted, --border, --accent, --accent2
   and also set body background for each theme.
====================================================== */

/* Flagship */
html[data-theme="flagship"]{
  --bg:#050814; --bg2:#0c1020;
  --border:rgba(255,255,255,.12);
  --text:#f5f7ff; --muted:rgba(245,247,255,.68);
  --accent:#0b7fab; --accent2:#18a4d4;
}
html[data-theme="flagship"] body{
  background:
    radial-gradient(1200px 700px at 70% 30%, rgba(24,164,212,.18), transparent 100%),
    radial-gradient(900px 600px at 15% 20%, rgba(11,127,171,.18), transparent 60%),
    linear-gradient(180deg, #050814, #03040a) !important;
}

/* Aurora (approved dark) */
html[data-theme="aurora"]{
  --bg:#050814; --bg2:#0c1020;
  --border:rgba(255,255,255,.10);
  --text:#f5f7ff; --muted:#a2acc7;
  --accent:#6ea7ff; --accent2:#38bdf8;
}
html[data-theme="aurora"] body{
  background:
    radial-gradient(1200px 700px at 70% 30%, rgba(110,167,255,.22), transparent 60%),
    radial-gradient(900px 600px at 20% 70%, rgba(56,189,248,.14), transparent 55%),
    linear-gradient(180deg, #050814, #050814) !important;
}

/* Mono Glass */
html[data-theme="mono"]{
  --bg:#070707; --bg2:#121212;
  --border:rgba(255,255,255,.10);
  --text:#f5f7ff; --muted:rgba(245,247,255,.62);
  --accent:#9ca3af; --accent2:#d1d5db;
}
html[data-theme="mono"] body{
  background:
    radial-gradient(1200px 700px at 70% 30%, rgba(255,255,255,.10), transparent 60%),
    linear-gradient(180deg, #0a0a0a, #050505) !important;
}

/* Daybreak (light) */
html[data-theme="daybreak"]{
  --bg:#f5f7fb; --bg2:rgba(255,255,255,.78);
  --border:rgba(16,19,24,.14);
  --text:rgba(16,19,24,.92); --muted:rgba(16,19,24,.74);
  --accent:#2563eb; --accent2:#0ea5e9;
}
html[data-theme="daybreak"] body{
  background:
    radial-gradient(1200px 700px at 70% 30%, rgba(37,99,235,.10), transparent 60%),
    linear-gradient(180deg, #f7f8fc, #eef1f7) !important;
}

/* Azure Light (blue glass) */
html[data-theme="azure-light"]{
  --bg:#eef6ff; --bg2:rgba(255,255,255,.80);
  --border:rgba(16,19,24,.14);
  --text:rgba(16,19,24,.92); --muted:rgba(16,19,24,.74);
  --accent:#0b7fab; --accent2:#006dff;
}
html[data-theme="azure-light"] body{
  background:
    radial-gradient(1200px 700px at 70% 30%, rgba(0,136,255,.16), transparent 60%),
    radial-gradient(900px 600px at 20% 15%, rgba(0,200,255,.12), transparent 60%),
    linear-gradient(180deg, #eef6ff, #e7f0ff) !important;
}

/* Glasswave (creative) */
html[data-theme="glasswave"]{
  --bg:#050814; --bg2:rgba(12,16,32,.92);
  --border:rgba(255,255,255,.12);
  --text:#f7fbff; --muted:rgba(247,251,255,.70);
  --accent:#38bdf8; --accent2:#a78bfa;
}
html[data-theme="glasswave"] body{
  background:
    radial-gradient(900px 700px at 75% 25%, rgba(56,189,248,.18), transparent 60%),
    radial-gradient(900px 650px at 30% 70%, rgba(167,139,250,.16), transparent 60%),
    radial-gradient(800px 600px at 10% 20%, rgba(34,197,94,.10), transparent 60%),
    linear-gradient(180deg, #050814, #02030a) !important;
}

/* Paper Pro (clean) */
html[data-theme="paper-pro"]{
  --bg:#f6f7fb; --bg2:rgba(255,255,255,.86);
  --border:rgba(16,19,24,.12);
  --text:rgba(16,19,24,.92); --muted:rgba(16,19,24,.74);
  --accent:#2563eb; --accent2:#0ea5e9;
}
html[data-theme="paper-pro"] body{
  background:
    radial-gradient(1200px 700px at 70% 30%, rgba(37,99,235,.10), transparent 60%),
    linear-gradient(180deg, #ffffff, #eef1f7) !important;
}

/* Terminal Neo (power) */
html[data-theme="terminal-neo"]{
  --bg:#050708; --bg2:rgba(10,14,30,.88);
  --border:rgba(255,255,255,.10);
  --text:#eafff2; --muted:rgba(234,255,242,.64);
  --accent:#22c55e; --accent2:#22d3ee;
}
html[data-theme="terminal-neo"] body{
  background:
    radial-gradient(1100px 650px at 70% 25%, rgba(34,197,94,.14), transparent 60%),
    radial-gradient(900px 600px at 20% 15%, rgba(34,211,238,.10), transparent 60%),
    linear-gradient(180deg, #050708, #020304) !important;
}

/* Light themes: softer overlay (modal backdrop) */
html[data-theme="daybreak"],
html[data-theme="azure-light"],
html[data-theme="paper-pro"]{
  --overlay-a: 0.38;
}

/* Custom (your colors) – keep existing custom vars from gx_prefs.js */
html[data-theme="custom"] body{
  background:
    radial-gradient(1200px 700px at 70% 30%, color-mix(in srgb, var(--accent2) 24%, transparent), transparent 60%),
    radial-gradient(900px 600px at 15% 20%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%),
    linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 70%, #000)) !important;
}

/* ===============================
   LIGHT THEME – TEXT READABILITY FIX
   =============================== */

/* obecně světlý theme */
body[data-theme*="light"],
body[class*="light"],
body[class*="azure"] {

  /* základní text */
  color: #111827; /* skoro černá */

}

/* hlavičky */
body[data-theme*="light"] h1,
body[data-theme*="light"] h2,
body[data-theme*="light"] h3,
body[data-theme*="light"] h4,
body[data-theme*="light"] h5 {
  color: #0f172a;
}

/* běžné popisky, texty, hodnoty */
body[data-theme*="light"] label,
body[data-theme*="light"] .gx-label,
body[data-theme*="light"] .gx-field,
body[data-theme*="light"] .gx-value,
body[data-theme*="light"] .gx-text {
  color: #1f2937;
}

/* sekundární / muted text */
body[data-theme*="light"] .muted,
body[data-theme*="light"] .gx-muted,
body[data-theme*="light"] .gx-sub {
  color: #4b5563;
}

/* placeholder */
body[data-theme*="light"] input::placeholder,
body[data-theme*="light"] textarea::placeholder {
  color: #6b7280;
}

/* input text */
body[data-theme*="light"] input,
body[data-theme*="light"] select,
body[data-theme*="light"] textarea {
  color: #111827;
}

