/* Aura-Suite Design-System (überall byte-gleich; nach style.css einbinden).
 * Ziel: modernes, ruhiges Geschäftsdesign. Struktur und Abläufe der Apps bleiben, nur die Optik wird vereinheitlicht:
 * Flächen mit Tiefe, feine Linien, weiche Schatten, klare Fokus-Ringe, sanfte Übergänge, eine Akzentfarbe.
 * Hell/Dunkel: Das Hell-Design kehrt die Seite per Filter um (aura-prefs.js). Schatten stehen deshalb als Variablen da, die im Hell-Design
 * "vor der Umkehr" hell sind (werden dunkel). Bewegung wird bei "Bewegung reduzieren" abgeschaltet. */
:root {
  --aura-accent: #4a72f5; --aura-accent-2: #6f90fb; --aura-accent-soft: rgba(74, 114, 245, .14); --aura-ring: rgba(74, 114, 245, .35);
  --aura-surface: #121a2b; --aura-surface-2: #0e1525; --aura-line: #232e45; --aura-text-dim: #8995b0;
  --aura-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px -16px rgba(0, 0, 0, .7);
  --aura-shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --aura-glow: 0 0 0 1px rgba(74, 114, 245, .35), 0 8px 24px -10px rgba(74, 114, 245, .55);
  --aura-radius: 12px; --aura-ease: cubic-bezier(.2, .7, .2, 1);
}
html[data-theme="light"] {
  --aura-shadow: 0 1px 0 rgba(0, 0, 0, .04) inset, 0 10px 28px -16px rgba(255, 255, 255, .55);
  --aura-shadow-sm: 0 1px 2px rgba(255, 255, 255, .5);
}

/* ---- Grundlage */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
html body { font-feature-settings: 'cv11', 'ss01', 'tnum' 0; letter-spacing: -.003em;
  background-image: radial-gradient(1100px 520px at 8% -12%, rgba(74, 114, 245, .10), transparent 62%), radial-gradient(900px 480px at 100% -8%, rgba(120, 99, 245, .07), transparent 58%);
  background-attachment: fixed; background-repeat: no-repeat; }
html ::selection { background: rgba(74, 114, 245, .35); color: inherit; }
html * { scrollbar-width: thin; scrollbar-color: #2c3853 transparent; }
html *::-webkit-scrollbar { width: 8px; height: 8px; }
html *::-webkit-scrollbar-thumb { background: #2c3853; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
html *::-webkit-scrollbar-thumb:hover { background: #3b4a6c; background-clip: content-box; border: 2px solid transparent; }
html *::-webkit-scrollbar-track { background: transparent; }
table, .tbl, .kpi .v, [data-num], time { font-variant-numeric: tabular-nums; }

/* ---- Fokus: überall gut sichtbar, nie nur per Farbe */
html :focus { outline: none; }
html :focus-visible { outline: 2px solid var(--aura-accent-2); outline-offset: 2px; border-radius: 8px; }
html input:focus-visible, html textarea:focus-visible, html select:focus-visible { outline: none; border-color: var(--aura-accent); box-shadow: 0 0 0 3px var(--aura-ring); }

/* ---- Kopfzeile: Glas */
html header { backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px); background-color: rgba(13, 20, 36, .72); border-bottom-color: rgba(137, 149, 176, .14); position: relative; z-index: 30; }

/* ---- Flächen und Karten */
html .rounded-2xl.border, html .rounded-xl.border, html .panel, html .kpi, html .custom-panel { box-shadow: var(--aura-shadow); }
html .rounded-2xl.border { border-color: rgba(137, 149, 176, .16); }
html .panel, html .kpi { background-image: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 60%); border-color: rgba(137, 149, 176, .16); border-radius: 14px; }
html .kpi { transition: transform .18s var(--aura-ease), border-color .18s; }
html .kpi:hover { transform: translateY(-1px); border-color: rgba(111, 144, 251, .4); }
html .kpi .v { letter-spacing: -.02em; }
html aside, html #sidebar { background-image: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 30%); border-color: rgba(137, 149, 176, .14); }

/* ---- Dialoge */
html .fixed.inset-0:not(.hidden) { animation: aura-fade .18s ease-out; }
html .fixed.inset-0:not(.hidden) > div { animation: aura-pop .22s var(--aura-ease); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); border-color: rgba(137, 149, 176, .18); }
@keyframes aura-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes aura-pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---- Schaltflächen und Eingaben */
html button, html .btn, html input, html select, html textarea, html a { transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .12s var(--aura-ease), opacity .15s; }
html button:not(:disabled):active { transform: translateY(.5px) scale(.99); }
html button:disabled, html .btn:disabled { opacity: .5; cursor: not-allowed; }
html .bg-blue-600, html .bg-blue-500, html .btn-primary { background-image: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0)); box-shadow: var(--aura-shadow-sm), 0 8px 18px -10px rgba(74, 114, 245, .8); border-color: rgba(255, 255, 255, .08); }
html .bg-blue-600:hover, html .bg-blue-500:hover, html .btn-primary:hover { box-shadow: var(--aura-shadow-sm), 0 10px 22px -10px rgba(74, 114, 245, .95); filter: brightness(1.06); }
html .btn { border-radius: 10px; font-weight: 500; }
html .btn:hover { border-color: #475472; }
html input, html select, html textarea { border-radius: 10px; }
html input::placeholder, html textarea::placeholder { color: #66728f; }
html .fld { background: #0b1322; border-color: #273450; }
html .fld:focus { border-color: var(--aura-accent); box-shadow: 0 0 0 3px var(--aura-ring); }

/* ---- Navigation (AuraTicket: view-btn, AuraPlan: nav-btn, Unter-Navigation, Filter) */
html .view-btn, html .nav-btn, html .admin-subnav-btn, html .overview-subnav-btn, html .status-filter-btn, html .assignee-filter-btn, html .admin-tab-btn { border-radius: 10px; font-weight: 500; letter-spacing: -.005em; }
html .view-btn:hover, html .nav-btn:hover, html .admin-subnav-btn:hover, html .overview-subnav-btn:hover, html .status-filter-btn:hover, html .assignee-filter-btn:hover { background: rgba(137, 149, 176, .10); color: #e9edf5; }
html .view-btn.active, html .nav-btn.active { background: linear-gradient(180deg, rgba(111, 144, 251, .95), rgba(74, 114, 245, .95)); color: #fff; border-color: rgba(255, 255, 255, .12); box-shadow: var(--aura-glow); }
html .status-filter-btn.active, html .assignee-filter-btn.active, html .admin-subnav-btn.active, html .overview-subnav-btn.active { background: var(--aura-accent-soft); color: #fff; border-color: rgba(111, 144, 251, .45); }
html .admin-tab-btn { background: rgba(18, 26, 43, .8); border-color: #232e45; }
html .admin-tab-btn:hover { background: #1d2639; border-color: #35425f; }
html .admin-tab-btn.active { background: var(--aura-accent); border-color: var(--aura-accent); box-shadow: var(--aura-glow); }
html .t-tab { border-radius: 8px 8px 0 0; }
html .t-tab.active { border-bottom-color: var(--aura-accent-2); }

/* ---- Listen und Nachrichten */
html .ticket-item { border-bottom-color: rgba(137, 149, 176, .10); position: relative; transition: background-color .15s; }
html .ticket-item.active { background: linear-gradient(90deg, rgba(74, 114, 245, .14), rgba(74, 114, 245, .03)); }
html .ticket-item.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--aura-accent-2); }
html .msg-bubble { border-radius: 14px; box-shadow: var(--aura-shadow-sm); }
html .msg-incoming { background: #1a2338; border: 1px solid rgba(137, 149, 176, .12); }
html .msg-outgoing { background: linear-gradient(180deg, #4a72f5, #3a5ce6); }
html .msg-note { background: rgba(245, 158, 11, .08); border: 1px dashed rgba(245, 158, 11, .45); color: #fcd9a0; }
html .chip, html .sla-chip { letter-spacing: .01em; }
html .bar-track { background: #1d2639; } html .bar-fill { background: linear-gradient(90deg, #3a5ce6, #6f90fb); border-radius: 6px; }
html table.tbl th { text-transform: uppercase; font-size: 10.5px; letter-spacing: .06em; color: #7b87a4; }
html table.tbl tr:hover td { background: rgba(137, 149, 176, .05); }

/* ---- AuraChat */
html .custom-panel { background-color: rgba(18, 26, 43, .82); border: 1px solid rgba(137, 149, 176, .14); }
html #top-loading-bar { background: linear-gradient(90deg, #263779, #4a72f5, #6f90fb, #4a72f5, #263779); background-size: 200% 100%; }

/* ---- AuraPlan */
html .shift-day { border-radius: 10px; }
html #clock-btn { border-radius: 12px; font-weight: 600; box-shadow: var(--aura-shadow-sm), 0 10px 24px -12px currentColor; }

/* ---- Anmeldung: ruhige Karte, grosse Eingabefelder */
html #login-screen, html #login-view { background-image: radial-gradient(900px 500px at 50% -10%, rgba(74, 114, 245, .16), transparent 62%); }

@media (prefers-reduced-motion: reduce) {
  html *, html *::before, html *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
