/* =====================================================================
   D · Ruhrline – Gestaltungsregeln aus dem Bestand RuhrlineRP (rl-ui, rl-factions, rl-garages) nachgebaut:
   dunkles Glasfenster, Ruhr-Orange, Bahnschrift in Versalien, Remix-Icons, Kennzahl-Karten mit Eckglühen,
   orange Überzeile (Mono, gesperrt), Status-Chips mit Punkt, Aktiv-Zustand als orange Kontur + Verlauf.
   ===================================================================== */
.th-ruhr {
  --font-head: "Bahnschrift", "DIN Alternate", "Segoe UI Variable", sans-serif;
  --font-body: "Bahnschrift", "DIN Alternate", "Segoe UI Variable", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, monospace;
  --bg: #080a0e; --surface: #101319; --surface-2: #151922; --surface-3: #1b202a; --text: #f7f8fb; --muted: #8d95a3;
  --primary: #ff7a00; --on-primary: #101010; --accent: #ff9a35; --on-accent: #101010;
  --ok: #4bd28b; --warn: #ffc15c; --err: #ff5d67; --info: #6cb4ff;
  --border: rgba(255,255,255,.1); --line-hot: rgba(255,122,0,.34);
  --radius: 11px; --radius-card: 15px; --gap: 10px; --pad: 17px;
  --focus: 0 0 0 3px rgba(255,122,0,.28); --sel-bg: rgba(255,122,0,.14); --sel-bar: inset 2px 0 0 #ff7a00;
  --map-water: #1c3a52; --map-land: #18202a; --map-road: #2e3a4a; --map-main: #c86a12; --map-forest: #1d3328; --map-rail: #8d95a3; --map-town: #232c38;
  --shadow: 0 12px 35px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.025);
  /* Komponenten-Token (jede Richtung setzt eigene, siehe studio.css) */
  --btn-bg: rgba(255,255,255,.045); --btn-radius: 10px; --btn-hover-bg: rgba(255,122,0,.10); --btn-hover-line: rgba(255,122,0,.55);
  --btn-primary-bg: linear-gradient(135deg, #ff9a3c, #ff4d00); --btn-primary-fg: #101010; --btn-case: uppercase; --btn-weight: 900; --btn-shadow: 0 8px 24px rgba(255,86,0,.18);
  --btn-sel-bg: rgba(255,122,0,.12); --btn-sel-ring: inset 2px 0 #ff7a00; --tab-active: inset 0 -2px 0 #ff7a00;
  --th-bg: rgba(255,255,255,.03); --th-fg: #8d95a3; --th-case: uppercase; --th-weight: 800;
  --badge-bg: rgba(255,122,0,.075); --head-bg: #0b0e12; --head-fg: #f7f8fb; --head-line: 2px solid #ff7a00;
}
.th-ruhr[data-mode="light"], [data-mode="light"] .th-ruhr:not(.dark), .th-ruhr.light {
  --bg: #eef2f7; --surface: #ffffff; --surface-2: #f3f6fa; --surface-3: #e5ebf2; --text: #18202b; --muted: #647081;
  --primary: #e26700; --border: rgba(24,34,48,.13); --line-hot: rgba(226,103,0,.38); --sel-bg: rgba(226,103,0,.10); --sel-bar: inset 2px 0 0 #e26700;
  --map-water: #a9cbe8; --map-land: #eef1ea; --map-road: #ffffff; --map-main: #f2a55a; --map-forest: #cfdcc4; --map-town: #e2ddd3; --map-rail: #647081;
  --shadow: 0 10px 30px rgba(24,34,48,.08);
  --btn-bg: #ffffff; --th-bg: #f3f6fa; --th-fg: #647081; --head-bg: #ffffff; --head-fg: #18202b; --head-line: 2px solid #e26700;
}
.th-ruhr.dark, .th-ruhr .dark { --bg: #080a0e; --surface: #101319; --surface-2: #151922; --surface-3: #1b202a; --text: #f7f8fb; --muted: #8d95a3; --primary: #ff7a00; --border: rgba(255,255,255,.1); }

/* ---------- Gemeinsame Bausteine (in allen Richtungen nutzbar) */
[class^="ri-"], [class*=" ri-"] { line-height: 1; }
.eyebrow { display: block; color: var(--primary); font: 800 .7rem/1.2 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 4px; }
.brand-row { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; font-size: 19px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: inherit; }
.brand-row strong { display: block; font-family: var(--font-head); letter-spacing: .17em; font-style: italic; transform: skewX(-7deg); text-transform: uppercase; font-size: .95rem; }
.brand-row small { display: block; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.side a { display: flex !important; align-items: center; gap: 10px; }
.side a i { width: 18px; font-size: 16px; color: var(--muted); }
.side a.active i { color: var(--primary); }
.side-foot { margin: 16px 16px 6px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .72rem; color: var(--muted); }
.side-foot b { display: block; color: var(--text); font-weight: 700; } .side-foot i { color: var(--ok); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat-card { position: relative; overflow: hidden; min-height: 104px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-card, var(--radius)); background: var(--surface); box-shadow: var(--shadow); }
.stat-card::after { content: ""; position: absolute; width: 92px; height: 92px; right: -34px; bottom: -42px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 12%, transparent); }
.stat-card i { color: var(--primary); font-size: 20px; }
.stat-card strong { display: block; margin-top: 12px; font: 800 1.45rem/1.1 var(--font-head); }
.stat-card span { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--muted); font: 900 .66rem/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .04em; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status.ok::before { background: var(--ok); } .status.hot::before { background: var(--primary); } .status.bad::before { background: var(--err); } .status.bad { color: var(--err); }

/* ---------- Ruhrline-Ausprägung der Studio-Komponenten */
.th-ruhr body { background: radial-gradient(circle at 60% -10%, rgba(255,122,0,.07), transparent 40%), var(--bg); }
.th-ruhr .topbar { background: rgba(9,12,15,.96); color: var(--text); border-bottom: 1px solid var(--border); }
.th-ruhr .topbar::after { content: ""; position: absolute; left: 250px; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--primary), transparent 72%); }
.th-ruhr[data-mode="light"] .topbar { background: #ffffff; }
.th-ruhr .brand-mark { border-color: var(--line-hot); background: linear-gradient(145deg, rgba(255,122,0,.22), rgba(255,122,0,.04)); color: var(--primary); box-shadow: inset 0 0 18px rgba(255,122,0,.06); }
.th-ruhr .topbar select, .th-ruhr .topbar .btn { background: rgba(255,255,255,.045) !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-radius: 10px; padding: 6px 10px; }
.th-ruhr .roleinfo { background: rgba(255,122,0,.075); border: 1px solid rgba(255,122,0,.25); color: #ffc184; }
.th-ruhr[data-mode="light"] .roleinfo { color: #a44a00; }
.th-ruhr .side { background: linear-gradient(180deg, var(--surface), var(--bg)); padding: 14px 10px; }
.th-ruhr .side h4 { font: 800 .62rem/1.2 var(--font-mono); letter-spacing: .16em; margin: 16px 10px 6px; }
.th-ruhr .side a { border: 1px solid transparent; border-radius: 11px; padding: 8px 12px; font-size: .84rem; font-weight: 700; color: color-mix(in srgb, var(--text) 75%, var(--muted)); margin-bottom: 1px; }
.th-ruhr .side a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.th-ruhr .side a.active { border-color: var(--line-hot); background: linear-gradient(90deg, rgba(255,122,0,.18), rgba(255,122,0,.035)); box-shadow: none; color: var(--text); }
.th-ruhr main h1 { text-transform: uppercase; font-weight: 800; letter-spacing: .01em; }
.th-ruhr .card { border-radius: 15px; background: linear-gradient(145deg, color-mix(in srgb, var(--surface-3) 88%, transparent), color-mix(in srgb, var(--surface) 88%, transparent)); }
.th-ruhr[data-mode="light"] .card { background: var(--surface); }
.th-ruhr .card h2, .th-ruhr .card h3 { font-weight: 800; }
.th-ruhr input, .th-ruhr select, .th-ruhr textarea { border-radius: 8px; background: rgba(255,255,255,.045); }
.th-ruhr[data-mode="light"] input, .th-ruhr[data-mode="light"] select, .th-ruhr[data-mode="light"] textarea { background: #fff; }
.th-ruhr select option { background: #11161b; color: #f7f8fb; }
.th-ruhr input:focus, .th-ruhr select:focus, .th-ruhr textarea:focus { border-color: rgba(255,122,0,.75); box-shadow: 0 0 0 3px rgba(255,122,0,.10); outline: none; }
.th-ruhr .note { border-radius: 11px; background: rgba(255,255,255,.035); border-left-color: var(--primary); }
.th-ruhr[data-mode="light"] .note { background: var(--surface-2); }
.th-ruhr .note.ok { border-left-color: var(--ok); } .th-ruhr .note.err { border-left-color: var(--err); } .th-ruhr .note.warn { border-left-color: var(--warn); }
.th-ruhr .toast { background: #11161b; color: #f7f8fb; border-color: rgba(255,255,255,.1); border-radius: 11px; }
.th-ruhr * { scrollbar-width: thin; scrollbar-color: rgba(255,122,0,.65) rgba(255,255,255,.035); }
.th-ruhr ::selection { color: #111; background: var(--primary); }
.th-ruhr .icon-missing { border-color: rgba(255,193,92,.7); }

/* Geräte im Ruhrline-Stil (wie rPad/rPhone im Bestand: dunkel, Orange als Aktivfarbe) */
.th-ruhr .device-tablet .screen { background: #0b0e12; color: #f7f8fb; font-family: var(--font-body);
  --tab-list: #101319; --tab-line: rgba(255,255,255,.08); --tab-text: #f7f8fb; --tab-muted: #8d95a3; --tab-sel: rgba(255,122,0,.14); --tab-hot: #ff7a00; --tab-side: #080a0e; --tab-side-on: linear-gradient(90deg, rgba(255,122,0,.35), rgba(255,122,0,.08)); }
.th-ruhr .device-tablet .screen .kv dt { color: #8d95a3; }
.th-ruhr .device-tablet .screen .state-box { border-color: rgba(255,255,255,.12); color: #8d95a3; }

/* Feinschliff */
.btn { text-decoration: none; }
.roleinfo { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar { flex-wrap: nowrap; }
.topbar label { white-space: nowrap; }
@media (max-width: 1350px) { .roleinfo { display: none; } }

/* Eingebettete Bestandsoberflächen */
.nui-wrap { border: 1px solid var(--border); border-radius: 15px; overflow: hidden; background: #06080b; box-shadow: var(--shadow); }
.nui-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: rgba(9,12,15,.96); position: relative; }
.nui-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--primary), transparent 60%); }
.nui-head strong { text-transform: uppercase; font-size: .9rem; }
