/* ==========================================================================
   IMENDIT Portal — Design-System (EINE Quelle der Wahrheit)
   --------------------------------------------------------------------------
   Geladen von admin/layout.php UND customer/layout.php. Enthält:
     1) Tokens in :root  (Farben, Abstände, Radien, Schatten, Typo)
     2) Basis/Reset + Element-Defaults (damit Bestandsseiten weiterlaufen)
     3) Komponenten-Bibliothek als Klassen (Buttons, Karten, Tabellen,
        Formulare, Badges/Status, Seitenkopf, Infobox, Steps, Empty-State …)
     4) Admin-Shell (Topbar/Navigation) — bewusst unter `.admin-shell`
        gescoped, damit die Kunden-Shell NICHT beeinflusst wird.

   Hell-Theme, Akzent ausschließlich IMENDIT-Orange, sonst neutrale Grautöne.
   Neue Seiten verwenden NUR diese Klassen/Tokens — nicht erneut inline stylen.
   ========================================================================== */

/* ===== 1) TOKENS ========================================================= */
:root {
  /* Marke / Akzent (einziger Akzent im ganzen Portal) */
  --accent:        #f29f05;
  --accent-strong: #df8f00;
  --accent-soft:   rgba(242, 159, 5, 0.12);   /* Hover/aktiv-Flächen */
  --accent-tint:   rgba(242, 159, 5, 0.22);   /* aktiver Nav-Zustand */

  /* Neutrale Flächen & Text */
  --bg:            #f4f6f9;   /* App-Hintergrund (ruhig, neutral) */
  --panel:         #ffffff;   /* Karten/Panels */
  --panel-2:       #fbfcfe;   /* dezent abgesetzte Fläche (z.B. Hilfs-Karten) */
  --text:          #1f2933;   /* Haupttext */
  --text-strong:   #111418;   /* Überschriften */
  --muted:         #5f6c7b;   /* Sekundärtext */
  --muted-2:       #8a97a6;   /* Tertiär / Captions */
  --border:        #eef1f5;   /* Standard-Rahmen */
  --border-strong: #e2e8f0;   /* kräftigerer Rahmen (Tabellen/Fieldset) */
  --row-hover:     #f6f9fc;   /* Tabellenzeilen-Hover */
  --head-bg:       #f8fafc;   /* Tabellenkopf */

  /* Semantische Status-Farben (Text / Fläche / Rahmen) */
  --success:       #15803d;  --success-bg: #eaf7ee;  --success-line: #bfe6cd;
  --warn:          #b45309;  --warn-bg:    #fff7ed;  --warn-line:    #fde8c2;
  --danger:        #dc2626;  --danger-bg:  #fdecea;  --danger-line:  #f4c7c3;
  --info:          #1d4ed8;  --info-bg:    #eff6ff;  --info-line:    #dbeafe;

  /* Abstands-Skala (4er-Raster) */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.25rem;  --sp-6: 1.5rem;   --sp-8: 2rem;     --sp-10: 2.5rem;

  /* Radien */
  --r-sm: 8px;   --r: 10px;   --r-md: 12px;   --r-lg: 14px;   --r-pill: 999px;

  /* Schatten (dezent) */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow:    0 6px 20px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.12);

  /* Typografie */
  --ff: "Inter", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fs-xs: 0.78rem;  --fs-sm: 0.85rem;  --fs-base: 0.95rem;  --fs-md: 1rem;
  --fs-lg: 1.15rem;  --fs-xl: 1.5rem;   --fs-2xl: 1.9rem;
  --fw-normal: 400;  --fw-medium: 500;  --fw-semibold: 600;  --fw-bold: 700;
  --lh-tight: 1.25;  --lh: 1.5;         --lh-loose: 1.65;

  /* Fokus-Ring (Barrierefreiheit, on-brand) */
  --focus: 0 0 0 3px rgba(242, 159, 5, 0.35);
}

/* ===== 2) BASIS / RESET ================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  font-family: var(--ff);
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--text-strong); line-height: var(--lh-tight); }

/* Element-Defaults für Formulare — Bestandsseiten nutzen nackte Elemente.
   Neue Seiten nutzen zusätzlich .input/.select/.textarea (s.u.). */
label { display: block; font-size: 0.9rem; color: #4b5563; margin-bottom: var(--sp-1); }
input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="number"], input[type="search"], input[type="tel"],
select, textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  background: #fff;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}
textarea { min-height: 120px; resize: vertical; }

/* Tabellen-Defaults (Element-Selektoren + .table für neue Seiten) */
table, .table { width: 100%; border-collapse: collapse; }
th, td { padding: var(--sp-3); border-bottom: 1px solid #e5e7eb; text-align: left; }
thead th {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--head-bg);
  font-weight: var(--fw-semibold);
}
tbody tr:hover { background: var(--row-hover); }

/* ===== 3) KOMPONENTEN ==================================================== */

/* -- Seiten-Container ---------------------------------------------------- */
.page { max-width: 1200px; margin: 1.75rem auto 2.5rem; padding: 0 1.5rem; }

/* -- Panel (Haupt-Container-Karte) --------------------------------------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow);
}
.panel.narrow { max-width: 720px; margin: 0 auto; }
.panel + .panel { margin-top: var(--sp-5); }
.panel.accent { border-left: 4px solid var(--accent); }

/* -- Karte (Kennzahl / Kachel) ------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--sp-5);
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}
.card h2, .card h3 {
  font-size: 0.95rem; font-weight: var(--fw-semibold);
  color: var(--muted); margin-bottom: var(--sp-1);
}
.card .value { font-size: var(--fs-2xl); font-weight: var(--fw-bold); color: var(--accent); }
.card .meta { font-size: var(--fs-sm); color: var(--muted-2); margin-top: 0.35rem; }

/* Wert-Varianten (Farbakzent einer Kennzahl) */
.value.value-urgent, .value.value--danger  { color: var(--danger); }
.value.value--success { color: var(--success); }
.value.value--warn    { color: var(--warn); }
.value.value--ink     { color: var(--text); }
.value.value--muted   { color: var(--muted); }
.value.value-warning {
  color: #7c2d12; background: var(--warn-bg);
  border-radius: 6px; padding: 0 0.35rem; display: inline-block;
}

/* Kennzahl-Kachelgitter (kompakter als .grid; für Report-Kacheln) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-4);
}
.stat-grid .card { padding: var(--sp-4); }
.stat-grid .card .value { font-size: 1.7rem; }

/* -- Seitenkopf ---------------------------------------------------------- */
/* .page-header = neues Standard-Muster (Titel links, Aktionen rechts).
   .page-title bleibt als Alias für Bestandsseiten erhalten. */
.page-header, .page-title {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-5); flex-wrap: wrap;
}
.page-header h1, .page-title h1 {
  font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: -0.01em;
}
.page-header .lead { flex-basis: 100%; color: var(--muted); font-size: var(--fs-base);
  line-height: var(--lh-loose); margin-top: -0.4rem; max-width: 74ch; }
.page-header-actions { display: inline-flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }

/* Abschnittsüberschrift innerhalb eines Panels */
.section-title, .subhead {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: var(--fw-bold); margin-bottom: 0.9rem;
}

/* -- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1rem; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: var(--fw-semibold); font-size: 0.92rem; line-height: 1.2;
  cursor: pointer; font-family: inherit; transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-small { padding: 0.38rem 0.8rem; font-size: 0.82rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); text-decoration: none; }
.btn-ghost { background: #fff; color: #2b3440; border-color: var(--border-strong); }
.btn-ghost:hover { background: #f7f8fa; text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; text-decoration: none; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-back {
  background: #fff; color: #2b3440; border: 1px solid var(--border-strong);
  padding: 0.45rem 0.9rem; border-radius: var(--r-sm); font-size: 0.88rem;
  box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; gap: 0.4rem;
}
.btn-back:hover { background: #f7f8fa; text-decoration: none; }

/* -- Formulare ----------------------------------------------------------- */
.field { margin-top: var(--sp-4); }
.field:first-child { margin-top: 0; }
.field > label { font-size: 0.9rem; color: #4b5563; margin-bottom: 0.35rem; }
/* Klassen-Varianten (identisch zu den Element-Defaults, für explizite Nutzung) */
.input, .select, .textarea {
  width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border-strong);
  border-radius: var(--r); background: #fff; font-size: 1rem; font-family: inherit; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.textarea { min-height: 120px; resize: vertical; }
.input-mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.85rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-4); }
.form-grid .field { margin-top: 0; }
.form-inline { display: flex; gap: var(--sp-3); align-items: flex-end; flex-wrap: wrap; }
.form-inline .field { margin: 0; }
.check-row { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin: 0.3rem 0; }
.check-row label { font-size: 0.87rem; margin-bottom: 0; display: inline-flex; align-items: center; gap: 0.35rem; }
.check-block { font-size: 0.88rem; display: block; margin-top: 0.3rem; color: #4b5563; }
.fieldset {
  margin-top: var(--sp-4); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); padding: var(--sp-4) 1.1rem;
}
.fieldset > legend { font-weight: var(--fw-semibold); font-size: 0.92rem; padding: 0 0.4rem; }
.actions { margin-top: var(--sp-5); display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* Filter-Leiste (Pillen-Selects + Button) */
.filter { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.filter select, .filter button { padding: 0.55rem 0.9rem; font-size: 0.9rem; border-radius: var(--r-pill); }
.filter button { background: var(--accent); color: #fff; border: none; cursor: pointer; }
.filter button:hover { background: var(--accent-strong); }

/* -- Badges / Status ----------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem;
  padding: 0.22rem 0.6rem; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); line-height: 1.4;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-line); }
.badge-warn    { background: var(--warn-bg);    color: var(--warn);    border-color: var(--warn-line); }
.badge-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info-line); }
.badge-muted   { background: #f1f5f9; color: var(--muted); border-color: var(--border-strong); }

/* Status-Pill (Bestand: offen/in Arbeit/erledigt) */
.status-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.25rem 0.7rem; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); border: 1px solid transparent;
}
.status-open     { background: rgba(59,130,246,0.12); color: #1d4ed8; border-color: rgba(59,130,246,0.22); }
.status-progress { background: rgba(245,158,11,0.15); color: #b45309; border-color: rgba(245,158,11,0.25); }
.status-done     { background: rgba(34,197,94,0.15);  color: #15803d; border-color: rgba(34,197,94,0.25); }

/* Deadline-Hervorhebung (Bestand) */
.deadline-urgent { color: var(--danger); font-weight: var(--fw-bold); }
.deadline-warning {
  color: #7c2d12; background: var(--warn-bg); border-radius: 6px;
  padding: 0 0.3rem; font-weight: var(--fw-bold); display: inline-block;
}

/* -- Hinweise / Notices -------------------------------------------------- */
.notice {
  background: var(--info-bg); border: 1px solid var(--info-line); color: #23406c;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); margin-bottom: var(--sp-4);
}
.notice.error   { background: var(--danger-bg);  border-color: var(--danger-line);  color: #a61b1b; }
.notice.success { background: var(--success-bg); border-color: var(--success-line); color: #1c6b3a; }

/* -- Infobox (erklärt knapp, was ein Bereich tut) ------------------------ */
.info-box {
  display: flex; gap: 0.8rem; align-items: flex-start;
  background: var(--info-bg); border: 1px solid var(--info-line); border-left: 3px solid #3b82f6;
  border-radius: var(--r-md); padding: 0.9rem 1.1rem; margin-bottom: var(--sp-5);
  font-size: 0.9rem; line-height: var(--lh-loose); color: #34475c;
}
.info-box .info-box-ic { flex-shrink: 0; color: #3b82f6; margin-top: 1px; }
.info-box .info-box-body { min-width: 0; }
.info-box h3 { font-size: 0.92rem; font-weight: var(--fw-bold); margin: 0 0 0.15rem; color: #1e3a5f; }
.info-box p { margin: 0.35rem 0 0; }
.info-box a { font-weight: var(--fw-semibold); }
.info-box.tip  { background: #fff8ec; border-color: var(--warn-line); border-left-color: var(--accent); color: #5b4a24; }
.info-box.tip .info-box-ic { color: var(--accent); }
.info-box.tip h3 { color: #7a5a09; }
.info-box.warn { background: var(--danger-bg); border-color: var(--danger-line); border-left-color: #ef4444; color: #7f2b2b; }
.info-box.warn .info-box-ic { color: #ef4444; }
.info-box.warn h3 { color: #991b1b; }
.ui-ic { width: 20px; height: 20px; display: block; overflow: visible; }

/* -- Seiten-Intro (Titel + erklärender Untertitel; via portal_page_intro) */
.page-intro { margin-bottom: 1.4rem; }
.page-intro-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.page-intro-top h1 { font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: -0.01em; color: var(--text); }
.page-intro-actions { display: inline-flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.page-intro .lead { color: var(--muted); font-size: var(--fs-base); line-height: var(--lh-loose); margin-top: 0.4rem; max-width: 74ch; }

/* -- Schritt-für-Schritt (via portal_steps) ------------------------------ */
.steps-box {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.1rem 1.25rem; margin-bottom: var(--sp-5); box-shadow: var(--shadow);
}
.steps-heading { display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--fw-bold); font-size: 0.95rem; color: var(--text); margin-bottom: 0.75rem; }
.steps-heading .ui-ic { color: var(--accent); }
.steps-list { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.steps-list li { counter-increment: step; position: relative; padding-left: 2.4rem; min-height: 1.75rem; display: flex; flex-direction: column; justify-content: center; }
.steps-list li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong);
  font-weight: var(--fw-bold); font-size: 0.85rem; display: flex; align-items: center; justify-content: center;
}
.steps-list .step-t { font-weight: var(--fw-semibold); font-size: 0.92rem; color: var(--text); }
.steps-list .step-x { font-size: var(--fs-sm); color: var(--muted); line-height: var(--lh); }

/* -- Abschnittskopf mit Icon + Aktion ------------------------------------ */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.sec-head .sec-label { display: flex; align-items: center; gap: var(--sp-2); }
.sec-ic { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sec-head .btn-small { font-size: 0.8rem; }
.sec-link { font-size: 0.82rem; color: var(--accent); text-decoration: none; font-weight: var(--fw-medium); }

/* -- Leerer Zustand ------------------------------------------------------ */
.empty-state { text-align: center; padding: var(--sp-8) var(--sp-4); color: var(--muted); }
.empty-state .empty-icon { margin-bottom: 0.75rem; opacity: 0.4; }
.empty-state .empty-icon svg { width: 48px; height: 48px; stroke: #9ca3af; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-state .empty-message { font-size: 1rem; font-weight: var(--fw-medium); margin-bottom: 0.35rem; }
.empty-state .empty-hint { font-size: var(--fs-sm); color: var(--muted-2); }

/* -- Kleinteiliges / Hilfsklassen ---------------------------------------- */
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: #e7edf5; color: #334155;
  font-size: 0.72rem; font-weight: var(--fw-bold); display: inline-flex; align-items: center;
  justify-content: center; margin-right: var(--sp-2); text-transform: uppercase;
}
.cell-flex { display: inline-flex; align-items: center; }
.doc-icon, .link-icon {
  width: 16px; height: 16px; stroke: #64748b; fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; margin-right: 0.4rem; flex-shrink: 0;
}
.text-muted { color: var(--muted); font-size: 0.9rem; }
.text-sub   { color: #64748b; font-size: 0.82rem; }
.text-note  { font-size: 0.78rem; color: var(--muted-2); margin-top: 0.6rem; line-height: var(--lh); }
.mt-1 { margin-top: var(--sp-4); }
.mb-1 { margin-bottom: var(--sp-4); }
/* Lesbare Aufzählung (z.B. Checklisten) */
.check-list { font-size: 0.86rem; color: #374151; line-height: 1.8; padding-left: 1.2rem; margin: 0; }
.footer { color: var(--muted-2); text-align: center; font-size: 0.8rem; padding-bottom: 2rem; }

/* -- Benachrichtigungs-Dropdown (Shell-übergreifend) --------------------- */
.notif-item { padding: 0.75rem 1rem; border-bottom: 1px solid #f3f4f6; cursor: pointer; font-size: 0.88rem; color: #374151; transition: background .15s; }
.notif-item:hover { background: #f9fafb; }
.notif-item.unread { background: #fffbeb; border-left: 3px solid var(--accent); }
.notif-time { font-size: 0.75rem; color: #9ca3af; margin-top: 0.25rem; }

/* -- Angebots-Vorstellung (gesperrte Leistung einladend zeigen) ---------- */
/* Wird im Kundenportal statt einer gesperrten Funktion gezeigt
   (aktuell Awareness-Training in customer/assessments.php). */
.aw-promo { overflow: hidden; }
.aw-hero {
  position: relative; margin: -0.35rem -0.35rem 1.4rem; padding: 1.6rem 1.6rem 1.5rem;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(242,159,5,0.16) 0%, rgba(242,159,5,0) 58%),
    linear-gradient(135deg, #1f2933 0%, #2c3a49 100%);
  color: #f8fafc;
}
.aw-badge {
  display: inline-block; font-size: 0.72rem; font-weight: var(--fw-bold); letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--accent); background: rgba(242,159,5,0.14);
  border: 1px solid rgba(242,159,5,0.35); border-radius: var(--r-pill); padding: 0.25rem 0.7rem;
}
.aw-hero h2 { font-size: 1.45rem; font-weight: var(--fw-bold); line-height: 1.25; letter-spacing: -0.01em; color: #fff; margin: 0.75rem 0 0; }
.aw-hero .aw-lead { color: #cbd5e1; font-size: 0.95rem; line-height: 1.65; margin: 0.6rem 0 0; max-width: 62ch; }
.aw-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.15rem; }
.aw-cta-form { margin: 0; }
.aw-cta .btn-ghost { background: transparent; color: #e2e8f0; border-color: rgba(226,232,240,0.35); }
.aw-cta .btn-ghost:hover { background: rgba(226,232,240,0.12); color: #fff; }
.aw-hero .aw-fine { color: #94a3b8; font-size: 0.8rem; margin: 0.7rem 0 0; }
.aw-grid { list-style: none; margin: 0 0 1.35rem; padding: 0; display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.aw-card { display: grid; gap: 0.3rem; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem 1.05rem; }
.aw-card-ic { width: 34px; height: 34px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; background: rgba(242,159,5,0.13); color: var(--accent-strong); margin-bottom: 0.15rem; }
.aw-card-ic svg { width: 19px; height: 19px; }
.aw-card-t { font-weight: 650; font-size: 0.93rem; color: var(--text); }
.aw-card-x { font-size: 0.85rem; line-height: 1.55; color: var(--muted); }
.aw-modules { margin-bottom: 1.35rem; }
.aw-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.aw-chip { font-size: 0.8rem; color: #40506a; background: #f1f5f9; border: 1px solid var(--border-strong); border-radius: var(--r-pill); padding: 0.28rem 0.7rem; }
@media (max-width: 600px) {
  .aw-hero { padding: 1.2rem 1.1rem; }
  .aw-hero h2 { font-size: 1.2rem; }
  .aw-cta .btn { width: 100%; text-align: center; }
  .aw-cta-form { width: 100%; }
}

/* ===== 4) ADMIN-SHELL (gescoped auf .admin-shell) ======================== */
/* Nur das Admin-Portal trägt body.admin-shell — die Kunden-Shell bleibt
   davon unberührt. Alle Farben kommen aus den Tokens oben. */
.admin-shell .topbar {
  position: sticky; top: 0; z-index: 20;
  background: #fff; border-bottom: 1px solid var(--border);
}
.admin-shell .topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0.6rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem 1rem; flex-wrap: wrap; overflow: visible;
}
.admin-shell .logo {
  display: flex; align-items: center; gap: 0.75rem; font-size: 1.1rem;
  font-weight: var(--fw-semibold); letter-spacing: 0.2px; color: var(--text-strong);
  white-space: nowrap; flex-shrink: 0;
}
.admin-shell .logo img { height: 34px; width: auto; }

/* Hauptnavigation als eigene, volle zweite Zeile */
.admin-shell #mainNav {
  flex-basis: 100%; padding-top: 0.4rem; border-top: 1px solid var(--border);
  margin-top: 0.15rem; display: flex; flex-wrap: nowrap; justify-content: flex-start;
  gap: 0.1rem; align-items: center;
}
.admin-shell .nav { display: flex; flex-wrap: wrap; gap: 0.2rem; align-items: center; }
.admin-shell .nav-link {
  color: #485260; font-size: 0.83rem; padding: 0.42rem 0.55rem; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; gap: 0.4rem; position: relative;
  white-space: nowrap; line-height: 1.2;
}
.admin-shell .nav-link:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
.admin-shell .nav-link.active { color: var(--text-strong); background: var(--accent-tint); font-weight: var(--fw-semibold); }
.admin-shell #mainNav .nav-end { margin-left: auto; display: inline-flex; align-items: center; gap: 0.1rem; }
.admin-shell #mainNav .nav-icon-only .nav-text { display: none; }
.admin-shell .nav-text { display: inline; }
.admin-shell .nav-sep { width: 1px; height: 20px; background: var(--border); margin: 0 0.3rem; flex-shrink: 0; }
.admin-shell .nav-icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }

/* Ausklappmenü "Verwaltung" */
.admin-shell .nav-more { position: relative; }
.admin-shell .nav-more > summary { list-style: none; cursor: pointer; user-select: none; }
.admin-shell .nav-more > summary::-webkit-details-marker { display: none; }
.admin-shell .nav-caret { width: 13px; height: 13px; margin-left: -0.1rem; transition: transform .15s; }
.admin-shell .nav-more[open] > summary .nav-caret { transform: rotate(180deg); }
.admin-shell .nav-more-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 190px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 0.35rem; display: grid; gap: 0.1rem;
}
.admin-shell .nav-more-menu .nav-link { width: 100%; }

/* Burger-Button */
.admin-shell #burgerToggle {
  display: none; background: none; border: none; cursor: pointer; padding: 0.5rem;
  -webkit-tap-highlight-color: transparent;
}
.admin-shell #burgerToggle svg { width: 28px; height: 28px; stroke: var(--text); stroke-width: 2; stroke-linecap: round; fill: none; display: block; pointer-events: none; }

/* Notification-Dropdown (per fixed positioniert) */
.admin-shell + #notifDropdown, #notifDropdown { /* im Admin absolut per Inline-Position gesetzt */ }

/* Mittlere Breiten: Menü einzeilig halten, erst enger, dann ohne Symbole */
@media (min-width: 769px) and (max-width: 1239px) {
  .admin-shell #mainNav .nav-link { padding: 0.4rem 0.42rem; gap: 0.3rem; }
  .admin-shell #mainNav .nav-sep { margin: 0 0.1rem; }
}
@media (min-width: 769px) and (max-width: 1139px) {
  .admin-shell #mainNav > a.nav-link .nav-icon,
  .admin-shell #mainNav .nav-more > summary .nav-icon:not(.nav-caret) { display: none; }
  .admin-shell #mainNav .nav-link { font-size: 0.8rem; }
}
@media (min-width: 769px) and (max-width: 919px) {
  .admin-shell #mainNav .nav-link { font-size: 0.76rem; padding: 0.38rem 0.3rem; }
  .admin-shell #mainNav .nav-sep { margin: 0; }
}

/* Mobile: Burger + gestapelte Navigation */
@media (max-width: 768px) {
  .admin-shell #burgerToggle { display: block; }
  .admin-shell .topbar-inner { flex-wrap: wrap; }
  .admin-shell #mainNav:not(.open) { display: none; }
  .admin-shell #mainNav.open {
    display: flex; flex-direction: column; width: 100%; gap: 0.25rem;
    white-space: normal; overflow-x: visible; border-top: none; padding-top: 0; margin-top: 0;
  }
  .admin-shell #mainNav.open .nav-link { width: 100%; padding: 0.65rem 1rem; justify-content: flex-start; }
  .admin-shell #mainNav.open .nav-text { display: inline; }
  .admin-shell #mainNav.open .nav-more,
  .admin-shell #mainNav.open .nav-end { width: 100%; display: flex; flex-direction: column; gap: 0.25rem; margin-left: 0; }
  .admin-shell #mainNav.open .nav-more > summary { display: none; }
  .admin-shell #mainNav.open .nav-more-menu { position: static; box-shadow: none; border: none; padding: 0; min-width: 0; }
  .admin-shell #mainNav.open .nav-icon-only .nav-text-mobile { display: inline; }
  .admin-shell .nav-sep { display: none; }
}

/* ===== RESPONSIVE (allgemein) =========================================== */
@media (max-width: 900px) {
  .page { margin-top: 1.25rem; padding: 0 1rem; }
  .grid { grid-template-columns: 1fr; }
  .filter { flex-direction: column; align-items: stretch; }
  .filter select, .filter button { width: 100%; }
}
@media (max-width: 768px) {
  #notifDropdown { right: 0.5rem !important; width: calc(100vw - 1rem) !important; max-width: 340px; }
}
@media (max-width: 600px) {
  .page-header h1, .page-title h1, .page-intro-top h1 { font-size: 1.25rem; }
  .page { padding: 0 0.75rem; }
  .card .value { font-size: 1.7rem; }
  table, .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  thead th, tbody td { white-space: nowrap; }
  .panel { padding: 1rem; border-radius: var(--r-md); }
  .info-box { padding: 0.8rem 0.9rem; }
  .btn { min-height: 44px; }
  .btn-small { padding: 0.45rem 0.75rem; font-size: 0.85rem; min-height: 44px; }
}

/* 2FA-Statusbox — webauthn.js setzt .wa-status[.ok|.error] (Farbe zentral statt inline) */
.wa-status { margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  font-size: var(--fs-sm); line-height: var(--lh, 1.6); text-align: left;
  background: var(--panel-2); border: 1px solid var(--border-strong); color: var(--muted); }
.wa-status.ok { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }
.wa-status.error { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }

/* Severity-Aliase (NinjaOneHelper::getSeverityBadge liefert badge-critical/-warning) */
.badge-critical { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge-warning  { background: var(--warn-bg);   color: var(--warn);   border-color: var(--warn-line); }
