@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

/* ===========================================================
   IT Helpdesk — „Metallic"-Design (Oktober 2026)
   Graphit · Silber · gebürstetes Metall · Smaragd-Metallic (ViGo-Grün)
   Alle Klassennamen und Variablennamen (--vg-…) sind unverändert,
   damit die bestehenden PHP-Seiten das neue Design automatisch erhalten.
   =========================================================== */

:root {
  /* Akzent: Smaragd-Metallic (ViGo-Grün mit Glanz) */
  --vg-green:        #14875d;
  --vg-green-hi:     #3cc48d;   /* Glanzlicht oben */
  --vg-green-lo:     #0b5a3d;   /* Schatten unten */
  --vg-green-light:  #3fae84;
  --vg-lime:         #7fd3ae;

  /* Graphit / Silber */
  --vg-green-dark:   #1c232b;   /* Überschriften, Labels (früher Dunkelgrün) */
  --vg-bg:           #e8ebef;
  --vg-white:        #ffffff;   /* Karten-Grundfläche */
  --vg-text:         #1b2129;
  --vg-text-muted:   #67717d;
  --vg-border:       #d3d9e0;

  --metal-card:      linear-gradient(180deg, #ffffff 0%, #f6f8fa 55%, #eef1f4 100%);
  --metal-silver:    linear-gradient(180deg, #fdfdfe 0%, #e9edf1 48%, #d9dfe5 52%, #eef1f4 100%);
  --metal-brushed:   repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, rgba(0,0,0,.025) 1px 3px);
  --metal-graphite:  linear-gradient(165deg, #2c343e 0%, #1d232b 45%, #151a20 100%);
  --metal-emerald:   linear-gradient(180deg, var(--vg-green-hi) 0%, var(--vg-green) 48%, var(--vg-green-lo) 100%);
  --metal-steel-blue:linear-gradient(180deg, #8fb2d9 0%, #4f7cad 50%, #33557d 100%);
  --edge-light:      inset 0 1px 0 rgba(255,255,255,.95);
  --edge-dark:       inset 0 -1px 0 rgba(15,20,26,.06);

  --badge-new:        #7b8591;
  --badge-assigned:   #4a72c4;
  --badge-progress:   #d9731f;
  --badge-waiting:    #d8a514;
  --badge-resolved:   #23935f;
  --badge-closed:     #4b535d;

  --prio-low:      #8a939e;
  --prio-normal:   #23935f;
  --prio-high:     #e07a1f;
  --prio-critical: #d23b3b;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,26,33,.06), 0 6px 18px rgba(20,26,33,.08), var(--edge-light);
  --shadow-lift: 0 2px 4px rgba(20,26,33,.08), 0 14px 32px rgba(20,26,33,.14), var(--edge-light);
}

html.theme-dark {
  --vg-green:        #2fae7c;
  --vg-green-hi:     #6fe3b3;
  --vg-green-lo:     #12704b;
  --vg-green-light:  #5fd0a2;
  --vg-lime:         #8fe2bf;
  --vg-green-dark:   #e7ebf0;
  --vg-bg:           #0e1115;
  --vg-white:        #181d23;
  --vg-text:         #e4e9ee;
  --vg-text-muted:   #8f99a5;
  --vg-border:       #2b323b;

  --metal-card:      linear-gradient(180deg, #20262e 0%, #1a1f26 55%, #161a20 100%);
  --metal-silver:    linear-gradient(180deg, #3a434e 0%, #2b323b 48%, #232931 52%, #2b323b 100%);
  --edge-light:      inset 0 1px 0 rgba(255,255,255,.06);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 22px rgba(0,0,0,.35), var(--edge-light);
  --shadow-lift: 0 2px 4px rgba(0,0,0,.45), 0 16px 36px rgba(0,0,0,.5), var(--edge-light);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--vg-text);
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body {
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(255,255,255,.85), transparent 60%),
    linear-gradient(180deg, #eef1f4 0%, var(--vg-bg) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
html.theme-dark body {
  background:
    radial-gradient(ellipse 70% 45% at 75% -10%, rgba(120,140,165,.10), transparent 60%),
    var(--vg-bg);
  background-attachment: fixed;
}

a { color: var(--vg-green); text-decoration: none; }
a:hover { color: var(--vg-green-lo); text-decoration: underline; }
html.theme-dark a:hover { color: var(--vg-green-hi); }

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--vg-green-dark);
  margin: 0 0 .5em;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh; }

/* Sidebar: gebürstetes Graphit-Metall mit Chromkante */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--metal-brushed), var(--metal-graphite);
  color: #c9d1da;
  display: flex;
  flex-direction: column;
  padding: 22px 0;
  transition: width .18s ease;
  overflow-x: hidden;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.07), 4px 0 18px rgba(10,14,18,.18);
  scrollbar-width: thin; scrollbar-color: #3a434e transparent;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px 20px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 1px 0 rgba(0,0,0,.35);
}

.logo-mark,
.sidebar .brand .logo-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--metal-emerald);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 14px; letter-spacing: .02em;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 4px rgba(0,0,0,.2), 0 4px 10px rgba(11,90,61,.35);
  text-shadow: 0 1px 1px rgba(0,0,0,.3);
}

.sidebar .brand .brand-logo-img { max-height: 34px; max-width: 140px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px 6px; }
.sidebar .brand .brand-labels { min-width: 0; }

.sidebar .brand .sidebar-toggle-btn {
  margin-left: auto;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.10);
  color: #c9d1da;
  width: 32px; height: 32px;
  border-radius: 9px;
  cursor: pointer;
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.sidebar .brand .sidebar-toggle-btn:hover { background: rgba(255,255,255,.16); color: #fff; }

/* Eingeklapptes Menü */
.app-shell.sidebar-collapsed .sidebar { width: 76px; }
.app-shell.sidebar-collapsed .sidebar .brand-text,
.app-shell.sidebar-collapsed .sidebar .brand-sub,
.app-shell.sidebar-collapsed .sidebar .brand-labels,
.app-shell.sidebar-collapsed .sidebar .brand-logo-img,
.app-shell.sidebar-collapsed .sidebar nav a span,
.app-shell.sidebar-collapsed .sidebar .nav-section,
.app-shell.sidebar-collapsed .sidebar .sidebar-footer {
  display: none;
}
.app-shell.sidebar-collapsed .sidebar .brand { justify-content: center; padding: 0 0 20px; flex-direction: column; }
.app-shell.sidebar-collapsed .sidebar .brand .sidebar-toggle-btn { margin-left: 0; }
.app-shell.sidebar-collapsed .sidebar nav a { justify-content: center; padding: 11px; }

.sidebar .brand .brand-text { font-weight: 700; font-size: 1.02rem; color: #fff; letter-spacing: -.01em; }
.sidebar .brand .brand-sub {
  font-family: 'IBM Plex Mono', monospace; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(90deg, #aeb8c3, #e9eef3, #9aa5b1); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }

.sidebar nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #b9c2cc;
  font-size: .9rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.sidebar nav a .ico { width: 19px; height: 19px; color: #8d98a5; transition: color .15s; }
.sidebar nav a:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border-color: rgba(255,255,255,.07);
  text-decoration: none; color: #fff;
}
.sidebar nav a:hover .ico { color: #dfe5eb; }
.sidebar nav a.active {
  background: var(--metal-emerald);
  color: #fff;
  border-color: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px rgba(11,90,61,.45);
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
.sidebar nav a.active .ico { color: #fff; }
.sidebar nav .nav-section {
  margin-top: 20px; padding: 0 12px 8px;
  font-family: 'IBM Plex Mono', monospace; font-size: .64rem; text-transform: uppercase; letter-spacing: .16em; color: #717c89;
  display: flex; align-items: center; gap: 10px;
}
.sidebar nav .nav-section::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.12), transparent); }

.sidebar .sidebar-footer {
  margin: auto 12px 0;
  padding: 14px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.07);
  font-size: .8rem;
  color: #8d98a5;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* Topbar: gebürstetes Silber, fixiert */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--metal-brushed), linear-gradient(180deg, rgba(255,255,255,.92), rgba(240,243,246,.88));
  -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--vg-border);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 4px 14px rgba(20,26,33,.05);
  padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
html.theme-dark .topbar {
  background: var(--metal-brushed), linear-gradient(180deg, rgba(32,38,46,.92), rgba(22,27,33,.9));
  border-color: var(--vg-border);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 4px 14px rgba(0,0,0,.3);
}

.topbar .page-title { font-weight: 700; font-size: 1.12rem; color: var(--vg-green-dark); letter-spacing: -.01em; }

.topbar .user-chip { display: flex; align-items: center; gap: 8px; font-size: .86rem; }
.topbar .user-chip .avatar,
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--metal-emerald); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .78rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 0 2px #fff, 0 0 0 3px #c4ccd5;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
html.theme-dark .avatar { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 0 2px #181d23, 0 0 0 3px #3a434e; }

.content { padding: 26px 28px 60px; }

/* ---------- Cards ---------- */
.card {
  background: var(--metal-card);
  border: 1px solid var(--vg-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.card-title {
  font-weight: 700; color: var(--vg-green-dark); margin-bottom: 14px; font-size: 1.02rem; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 10px;
}
.card-title::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--metal-emerald); flex: none;
  box-shadow: 0 0 8px rgba(20,135,93,.35);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  position: relative; overflow: hidden;
  background: var(--metal-card);
  border: 1px solid var(--vg-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 16px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card::before {           /* Chrom-Leiste oben */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #a9b3be, #f4f6f8 35%, #a9b3be 65%, #dfe4e9);
}
.stat-card::after {            /* Glanz-Reflex */
  content: ""; position: absolute; top: -40%; right: -30%; width: 60%; height: 140%;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: rotate(8deg); pointer-events: none; opacity: .6;
}
html.theme-dark .stat-card::before { background: linear-gradient(90deg, #4a5460, #8e99a6 35%, #4a5460 65%, #6b7682); }
html.theme-dark .stat-card::after { background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.05) 50%, transparent 70%); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.stat-card .stat-value {
  font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15;
  background: linear-gradient(180deg, #4a5562 0%, #1c232b 60%, #39434e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
html.theme-dark .stat-card .stat-value { background: linear-gradient(180deg, #ffffff 0%, #c9d1da 55%, #8f9aa6 100%); -webkit-background-clip: text; background-clip: text; }
.stat-card .stat-label { color: var(--vg-text-muted); font-size: .8rem; margin-top: 4px; font-weight: 500; }
.stat-card.accent::before { background: var(--metal-emerald); height: 3px; }
.stat-card.accent .stat-value { background: var(--metal-emerald); -webkit-background-clip: text; background-clip: text; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .87rem;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease, background .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 17px; height: 17px; }

.btn-primary {
  background: var(--metal-emerald); color: #fff;
  border-color: var(--vg-green-lo);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 6px rgba(11,90,61,.3);
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
.btn-primary:hover { color: #fff; filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 16px rgba(11,90,61,.35); }

.btn-outline {                 /* Silber-/Chrom-Knopf */
  background: var(--metal-silver); color: var(--vg-text);
  border-color: #c3cad2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 1px 2px rgba(20,26,33,.08);
}
.btn-outline:hover { color: var(--vg-text); border-color: #a9b2bc; box-shadow: inset 0 1px 0 #fff, 0 4px 10px rgba(20,26,33,.12); }
html.theme-dark .btn-outline { color: var(--vg-text); border-color: #3c4550; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.4); }
html.theme-dark .btn-outline:hover { border-color: #56606c; }

.btn-danger {
  background: linear-gradient(180deg, #ee6b6b 0%, #d23b3b 50%, #a82626 100%); color: #fff;
  border-color: #962020; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 6px rgba(168,38,38,.3);
}
.btn-danger:hover { color: #fff; filter: brightness(1.06); }
.btn-sm { padding: 6px 12px; font-size: .8rem; border-radius: 9px; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: .83rem; margin-bottom: 6px; color: var(--vg-green-dark); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=time],
input[type=number], input[type=search], input[type=url], input[type=tel], select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #c9d0d8;
  border-radius: 10px;
  font-size: .92rem;
  font-family: inherit;
  background: linear-gradient(180deg, #f3f5f7 0%, #ffffff 40%);
  color: var(--vg-text);
  box-shadow: inset 0 1px 2px rgba(20,26,33,.07);
  transition: border-color .15s, box-shadow .15s;
}
html.theme-dark input, html.theme-dark select, html.theme-dark textarea {
  background: linear-gradient(180deg, #12161b 0%, #181d23 40%); color: var(--vg-text); border-color: #343c46;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.4);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--vg-green);
  box-shadow: inset 0 1px 2px rgba(20,26,33,.06), 0 0 0 3px rgba(20,135,93,.16);
}
input[type=color] { border-radius: 10px; border: 1px solid #c9d0d8; background: var(--metal-silver); }
input[type=checkbox], input[type=radio] { accent-color: var(--vg-green); }
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
thead th {
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #59636f;
  padding: 11px 12px;
  background: var(--metal-brushed), var(--metal-silver);
  border-top: 1px solid #d9dee4;
  border-bottom: 1px solid #c3cad2;
}
thead th:first-child { border-top-left-radius: 10px; border-left: 1px solid #d9dee4; }
thead th:last-child  { border-top-right-radius: 10px; border-right: 1px solid #d9dee4; }
html.theme-dark thead th { color: #aab4bf; border-color: #343c46; }
tbody td { padding: 12px; border-bottom: 1px solid var(--vg-border); font-size: .9rem; vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: linear-gradient(90deg, rgba(20,135,93,.06), rgba(20,135,93,0) 60%); }
html.theme-dark tbody tr:hover { background: linear-gradient(90deg, rgba(47,174,124,.10), transparent 60%); }
tbody tr:last-child td { border-bottom: none; }

/* ---------- Badges (metallisch glänzend) ---------- */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.32) 0%, rgba(255,255,255,0) 55%, rgba(0,0,0,.12) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 2px rgba(0,0,0,.15);
  text-shadow: 0 1px 1px rgba(0,0,0,.2);
}
.badge-new        { background-color: var(--badge-new); }
.badge-assigned   { background-color: var(--badge-assigned); }
.badge-progress   { background-color: var(--badge-progress); }
.badge-waiting    { background-color: var(--badge-waiting); color: #3a2c00; text-shadow: none; }
.badge-resolved   { background-color: var(--badge-resolved); }
.badge-closed     { background-color: var(--badge-closed); }

.prio-dot { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 600; }
.prio-dot::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%; display: inline-block;
  background-image: radial-gradient(circle at 35% 30%, rgba(255,255,255,.75) 0 18%, transparent 45%);
  box-shadow: 0 0 0 2px rgba(255,255,255,.7), 0 1px 2px rgba(0,0,0,.25);
}
.prio-low::before      { background-color: var(--prio-low); }
.prio-normal::before   { background-color: var(--prio-normal); }
.prio-high::before     { background-color: var(--prio-high); }
.prio-critical::before { background-color: var(--prio-critical); box-shadow: 0 0 0 2px rgba(255,255,255,.7), 0 0 8px rgba(210,59,59,.6); }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(60,196,141,.18), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 90%, rgba(143,178,217,.16), transparent 60%),
    var(--metal-brushed),
    linear-gradient(160deg, #2c343e 0%, #181d23 55%, #0f1317 100%);
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--metal-card);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 30px 70px rgba(0,0,0,.45), inset 0 1px 0 #fff, 0 0 0 1px rgba(0,0,0,.25);
  padding: 38px 36px;
}
html.theme-dark .auth-card { border-color: #2b323b; box-shadow: 0 30px 70px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); }
.auth-card .logo-mark { width: 48px; height: 48px; border-radius: 13px; font-size: 18px; margin-bottom: 14px; }
.auth-card h1 { font-size: 1.55rem; margin-bottom: 4px; }
.auth-card .subtitle { color: var(--vg-text-muted); font-size: .9rem; margin-bottom: 24px; }
.auth-footer { text-align: center; margin-top: 18px; font-size: .85rem; color: var(--vg-text-muted); }

/* ---------- Flash messages ---------- */
.flash {
  padding: 12px 16px 12px 44px; border-radius: 12px; margin-bottom: 16px; font-size: .9rem; font-weight: 600;
  position: relative; border: 1px solid; box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.flash::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: currentColor; opacity: .9;
  -webkit-mask: radial-gradient(circle, #000 3px, transparent 3.5px); mask: radial-gradient(circle, #000 3px, transparent 3.5px);
  box-shadow: 0 0 0 2px currentColor;
}
.flash-success { background: linear-gradient(180deg, #effaf4, #e1f4ea); color: #156c45; border-color: #b7e2cb; }
.flash-error   { background: linear-gradient(180deg, #fff3f3, #fde6e6); color: #a82626; border-color: #f2c1c1; }
.flash-info    { background: linear-gradient(180deg, #f2f6fc, #e5edf8); color: #2f5d93; border-color: #c4d5ec; }
html.theme-dark .flash { box-shadow: none; }
html.theme-dark .flash-success { background: #13251d; color: #7fdcb0; border-color: #1f4734; }
html.theme-dark .flash-error   { background: #2a1616; color: #f19a9a; border-color: #4e2424; }
html.theme-dark .flash-info    { background: #141e2b; color: #9cc0ec; border-color: #253a55; }

/* ---------- Ticket detail ---------- */
.ticket-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.ticket-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; font-size: .85rem; color: var(--vg-text-muted); }
.ticket-meta strong { color: var(--vg-text); }

.comment { border-bottom: 1px solid var(--vg-border); padding: 14px 0; }
.comment:last-child { border-bottom: none; }
.comment .comment-head { display: flex; justify-content: space-between; font-size: .82rem; color: var(--vg-text-muted); margin-bottom: 6px; }
.comment.internal { background: linear-gradient(90deg, #fff8e6, #fffdf6); border-left: 3px solid #d8a514; padding-left: 12px; border-radius: 8px; }
html.theme-dark .comment.internal { background: linear-gradient(90deg, #2a2412, #1c1a14); }

.pill-toggle {
  display: inline-flex; background: var(--metal-silver); border-radius: 12px; padding: 3px;
  border: 1px solid #c9d0d8; box-shadow: inset 0 1px 2px rgba(20,26,33,.08);
}
html.theme-dark .pill-toggle { border-color: #343c46; }
.pill-toggle a { padding: 6px 14px; border-radius: 9px; font-size: .82rem; font-weight: 600; color: var(--vg-text-muted); }
.pill-toggle a:hover { text-decoration: none; color: var(--vg-text); }
.pill-toggle a.active { background: var(--metal-emerald); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 6px rgba(11,90,61,.3); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--vg-text-muted); }
.empty-state .logo-mark { margin: 0 auto 14px; }

/* Heute im Kalender */
.cal-today { background: linear-gradient(180deg, rgba(20,135,93,.10), rgba(20,135,93,.03)) !important; border-color: var(--vg-green) !important; }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; overflow-x: auto; padding: 10px; }
  .sidebar .brand { border: none; box-shadow: none; margin: 0; padding: 0 10px; }
  .sidebar nav { flex-direction: row; padding: 0; }
  .sidebar nav .nav-section { display: none; }
  .sidebar nav a { white-space: nowrap; }
  .sidebar .sidebar-footer { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .app-shell.sidebar-collapsed .sidebar { width: 100%; }
}

@media (max-width: 480px) {
  .content { padding: 16px 14px 50px; }
  .topbar { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .topbar .user-chip { flex-wrap: wrap; gap: 6px; }
  .topbar .user-chip > span { display: none; }
  .card { padding: 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  table { font-size: .82rem; }
  .btn { padding: 9px 14px; }
  h1 { font-size: 1.5rem; }
}

/* Benachrichtigungen */
.notif-wrap { position: relative; }
.notif-count {
  position: absolute; top: -6px; right: -6px;
  background: linear-gradient(180deg, #ee6b6b, #c22f2f); color: #fff; font-size: .62rem; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(194,47,47,.5);
}
.notif-dropdown {
  position: absolute; top: 44px; right: 0; width: 330px; max-height: 400px; overflow-y: auto;
  background: var(--metal-card); border: 1px solid var(--vg-border); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(20,26,33,.2), inset 0 1px 0 rgba(255,255,255,.9); z-index: 50;
}
.notif-item { padding: 12px 14px; border-bottom: 1px solid var(--vg-border); display: block; }
.notif-item:hover { background: rgba(20,135,93,.05); text-decoration: none; }
.notif-item.unread { background: linear-gradient(90deg, rgba(20,135,93,.10), transparent); border-left: 3px solid var(--vg-green); }
.notif-item .notif-title { font-weight: 700; font-size: .85rem; color: var(--vg-text); }
.notif-item .notif-msg { font-size: .78rem; color: var(--vg-text-muted); margin-top: 2px; }
.notif-item .notif-time { font-size: .7rem; color: var(--vg-text-muted); margin-top: 4px; font-family: 'IBM Plex Mono', monospace; }
.notif-empty { padding: 20px; text-align: center; color: var(--vg-text-muted); font-size: .85rem; }

/* SLA-Countdown */
.sla-countdown {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums;
  background: var(--metal-silver); border: 1px solid #c9d0d8; box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.sla-countdown.sla-ok { color: var(--vg-green); border-color: var(--vg-green); }
.sla-countdown.sla-warn { color: #9a6f00; border-color: #d8a514; }
.sla-countdown.sla-over { color: #c22f2f; border-color: #d23b3b; }

/* Histogramm-Balken (Dashboard) */
.histogram { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 6px; }
.histogram .hist-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.histogram .hist-bar {
  width: 100%; max-width: 64px; min-height: 4px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(90deg, var(--vg-green-lo) 0%, var(--vg-green-hi) 38%, var(--vg-green) 62%, var(--vg-green-lo) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 10px rgba(11,90,61,.25);
}
.histogram .hist-label { font-size: .72rem; color: var(--vg-text-muted); text-align: center; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.histogram .hist-value { font-size: .78rem; font-weight: 600; color: var(--vg-text); font-family: 'IBM Plex Mono', monospace; }

/* Tags */
.tag-pill {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; color: #fff; margin-right: 4px;
  background-image: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 55%, rgba(0,0,0,.1));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}

/* Sternebewertung */
.star-rating { display: inline-flex; gap: 2px; font-size: 1.3rem; color: #cdd3da; cursor: pointer; }
.star-rating .star.filled { color: #d8a514; text-shadow: 0 1px 0 #fff3c4, 0 0 6px rgba(216,165,20,.35); }
.star-rating.readonly { cursor: default; }

/* Bewegung reduzieren */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── Microsoft 365 SSO (Vigo-Intra) ───────────────────────────── */
.btn-ms {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 10px 16px; border-radius: 12px;
  background: var(--metal-silver); color: var(--vg-text); border: 1px solid #c3cad2;
  font-weight: 600; font-size: .95rem; text-decoration: none;
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(20,26,33,.1);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.btn-ms:hover { transform: translateY(-1px); border-color: #a9b2bc; text-decoration: none; color: var(--vg-text);
  box-shadow: inset 0 1px 0 #fff, 0 10px 22px rgba(20,26,33,.16); }
html.theme-dark .btn-ms { border-color: #3c4550; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 6px rgba(0,0,0,.4); }
.btn-ms[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.sso-hint { margin-top: 8px; font-size: .8rem; color: var(--vg-text-muted); text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 16px; color: var(--vg-text-muted);
  font-family: 'IBM Plex Mono', monospace; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #b9c1ca, transparent); }

/* Topbar-Icons: Sonne/Mond je nach Modus */
.theme-btn .i-sun { display: none; }
html.theme-dark .theme-btn .i-sun { display: inline-block; }
html.theme-dark .theme-btn .i-moon { display: none; }
.btn-icon .ico { width: 18px; height: 18px; }
@media (max-width: 640px) { .hide-sm { display: none; } }
html.theme-dark .stat-card.accent .stat-value { background: linear-gradient(180deg, var(--vg-green-hi), var(--vg-green)); -webkit-background-clip: text; background-clip: text; }
@media (max-width: 860px) {
  .sidebar .brand .brand-labels { white-space: nowrap; }
  .sidebar .brand .brand-sub, .sidebar .brand .sidebar-toggle-btn { display: none; }
  .topbar { position: static; }
}
input[type=file] { font-family: inherit; font-size: .85rem; color: var(--vg-text-muted); }
input[type=file]::file-selector-button {
  margin-right: 12px; padding: 8px 14px; border-radius: 9px; border: 1px solid #c3cad2; cursor: pointer;
  background: var(--metal-silver); color: var(--vg-text); font: 600 .82rem 'IBM Plex Sans', sans-serif;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(20,26,33,.08);
}
