\
:root {
    --color-bg: #020617;
    --color-surface: #020617;
    --color-card: #020617;
    --color-border: #1f2937;
    --color-accent: #ef4444;
    --color-accent-soft: rgba(239, 68, 68, 0.12);
    --color-text: #f9fafb;
    --color-text-muted: #9ca3af;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-soft: 0 18px 55px rgba(15, 23, 42, 0.7);
    --shadow-subtle: 0 10px 30px rgba(15, 23, 42, 0.6);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #0f172a, #020617);
    color: var(--color-text);
}

/* Login body override */
.body-login {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #0f172a, #020617);
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(22px);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.75), transparent);
    border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

.app-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 20px 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

h1 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0.03em;
}

.app-subtitle {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: var(--color-text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Nav */
.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    font-size: 13px;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.nav-link:hover {
    color: var(--color-text);
    border-color: rgba(55, 65, 81, 0.9);
    background: rgba(15, 23, 42, 0.8);
}

.nav-link-active {
    color: #fff;
    border-color: rgba(248, 113, 113, 0.9);
    background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.2), rgba(15, 23, 42, 0.98));
}

/* User chip */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(15, 23, 42, 0.9);
}

.user-name {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Main */
.app-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 20px 28px 20px;
}

/* Card */
.card {
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.98));
    border-radius: var(--radius-lg);
    padding: 16px 18px 14px 18px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(55, 65, 81, 0.9);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease, box-shadow 0.12s ease;
}

.btn-primary {
    background: linear-gradient(to right, #ef4444, #f97316);
    color: #fff;
    border-color: rgba(248, 113, 113, 0.8);
    box-shadow: 0 12px 30px rgba(248, 113, 113, 0.45);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(248, 113, 113, 0.6);
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.7);
    color: var(--color-text);
    border-color: rgba(55, 65, 81, 0.9);
}

.btn-ghost:hover {
    background: rgba(30, 64, 175, 0.55);
    border-color: rgba(129, 140, 248, 0.9);
}

.btn-danger {
    border-color: rgba(248, 113, 113, 0.9);
}

.btn-compact {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-full {
    width: 100%;
}

/* Table */
.table-wrapper {
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.99));
}

.table-wrapper-compact {
    border-radius: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table-compact th,
.data-table-compact td {
    padding-top: 6px;
    padding-bottom: 6px;
}

.data-table thead {
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95));
}

.data-table th,
.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(31, 41, 55, 0.95);
}

.data-table th {
    text-align: left;
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.data-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.92);
}

.data-table tbody tr:nth-child(odd) {
    background: rgba(15, 23, 42, 0.86);
}

.data-table tbody tr:hover {
    background: rgba(30, 64, 175, 0.4);
}

.data-table td {
    color: var(--color-text);
}

/* Status pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid transparent;
}

.status-green {
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(34, 197, 94, 0.6);
    color: #bbf7d0;
}

.status-yellow {
    background: rgba(250, 204, 21, 0.18);
    border-color: rgba(250, 204, 21, 0.65);
    color: #fef9c3;
}

.status-orange {
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.7);
    color: #ffedd5;
}

.status-red {
    background: rgba(248, 113, 113, 0.22);
    border-color: rgba(248, 113, 113, 0.8);
    color: #fee2e2;
}

/* Links */
.link-inline {
    font-size: 12px;
    text-decoration: none;
    color: #93c5fd;
}

.link-inline:hover {
    color: #bfdbfe;
}

.link-danger {
    color: #fca5a5;
}

.link-danger:hover {
    color: #fecaca;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 14px 10px;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* Form layout */
.card-form {
    max-width: 840px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.form-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

label {
    font-size: 13px;
    color: var(--color-text-muted);
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="password"] {
    border-radius: 10px;
    border: 1px solid rgba(55, 65, 81, 0.95);
    padding: 7px 9px;
    font-size: 13px;
    background: rgba(15, 23, 42, 0.9);
    color: var(--color-text);
    outline: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

input::placeholder {
    color: #6b7280;
}

input:focus {
    border-color: rgba(129, 140, 248, 1);
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.6);
    background: rgba(15, 23, 42, 0.96);
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.form-actions-full {
    margin-top: 10px;
}

/* Inline forms */
.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.inline-form input[type="password"] {
    max-width: 190px;
}

/* Alerts */
.alert {
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 14px;
    font-size: 13px;
}

.alert-error {
    background: rgba(248, 113, 113, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.8);
    color: #fee2e2;
}

.alert-success {
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.7);
    color: #bbf7d0;
}

/* Section titles */
.section-title {
    margin: 8px 0 8px 0;
    font-size: 15px;
}

.section-title-margin {
    margin-top: 18px;
}

/* Footer */
.app-footer {
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    background: radial-gradient(circle at bottom, rgba(15, 23, 42, 0.96), #020617);
}

.app-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 20px 16px 20px;
    font-size: 11px;
    color: var(--color-text-muted);
}

/* Login layout */
.login-main {
    width: 100%;
    max-width: 420px;
    padding: 24px 18px;
}

.login-card {
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
    border-radius: 18px;
    padding: 18px 18px 16px 18px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(55, 65, 81, 0.95);
}

.login-header h1 {
    font-size: 22px;
    margin: 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-form {
    margin-top: 14px;
}

.login-hint {
    margin-top: 10px;
    font-size: 11px;
    color: var(--color-text-muted);
}

.login-hint code {
    background: rgba(15, 23, 42, 0.9);
    padding: 2px 4px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 840px) {
    .app-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .card {
        padding: 14px 10px 12px 10px;
    }

    .table-wrapper {
        border-radius: 12px;
    }

    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table th,
    .data-table td,
    .data-table tr {
        display: block;
    }

    .data-table thead {
        display: none;
    }

    .data-table tr {
        border-bottom: 1px solid rgba(31, 41, 55, 0.9);
        padding: 6px 8px;
        margin-bottom: 6px;
        border-radius: 10px;
        background: rgba(15, 23, 42, 0.96);
    }

    .data-table td {
        border: none;
        padding: 3px 0;
        font-size: 13px;
    }

    .data-table td::before {
        content: attr(data-label);
        display: inline-block;
        min-width: 110px;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--color-text-muted);
        margin-right: 6px;
    }

    .form-grid,
    .form-grid-compact {
        grid-template-columns: 1fr;
    }

    .inline-form {
        flex-direction: column;
        align-items: flex-start;
    }

    .inline-form input[type="password"] {
        max-width: 100%;
    }

    .header-actions {
        gap: 8px;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}



/* --- Readability Boost (Update) --- */
:root{
  --color-text: #ffffff;
  --color-text-muted: rgba(255,255,255,0.78);
}

body{
  background: radial-gradient(circle at top left, #111827, #020617);
}

.app-subtitle,
label,
.login-hint,
.data-table th{
  color: var(--color-text-muted) !important;
}

.login-card,
.card,
.table-wrapper{
  border-color: rgba(255,255,255,0.14) !important;
  background: radial-gradient(circle at top left, rgba(17,24,39,0.92), rgba(2,6,23,0.98)) !important;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="password"]{
  background: rgba(2,6,23,0.85) !important;
  border-color: rgba(255,255,255,0.16) !important;
  color: #fff !important;
}

input::placeholder{
  color: rgba(255,255,255,0.55) !important;
}

.alert-error{
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: rgba(239, 68, 68, 0.95) !important;
  color: #fff !important;
}

.btn-ghost{
  background: rgba(2,6,23,0.65) !important;
}

.data-table td{
  color: #fff !important;
}

h1{
  font-size: 24px;
}
.app-subtitle{
  font-size: 14px;
}
.data-table{
  font-size: 14px;
}



/* --- Dashboard (Update: Belastungsübung) --- */
.dashboard-card{ padding: 18px; }
.dashboard-grid{
    display:grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.dash-item{
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 14px;
    padding: 14px 14px;
    background: rgba(2,6,23,0.35);
}
.dash-label{ color: var(--color-text-muted); font-size: 13px; line-height: 1.2; }
.dash-value{ font-size: 28px; font-weight: 800; margin-top: 6px; }
.dashboard-lists{
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.dash-list h2{ margin: 0 0 8px 0; font-size: 14px; color: var(--color-text-muted); }
.dash-group{ margin-top: 10px; }
.dash-group-title{ font-weight: 700; margin-bottom: 6px; }
.dash-list ul{ margin: 0; padding-left: 18px; }
.dash-list li{ margin: 4px 0; }
.muted{ color: var(--color-text-muted); font-size: 12.5px; }
.form-hint{ margin-top: 6px; font-size: 12.5px; color: var(--color-text-muted); }
@media (max-width: 900px){
    .dashboard-grid{ grid-template-columns: 1fr; }
    .dashboard-lists{ grid-template-columns: 1fr; }
}



/* Checkbox row */
.check-row{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border:1px solid rgba(255,255,255,0.14);
    border-radius:12px;
    background: rgba(2,6,23,0.35);
    color: #fff;
}
.check-row input[type="checkbox"]{
    width: 18px;
    height: 18px;
    accent-color: var(--primary, #ef4444);
}



/* --- Inline Toggle + Ampel --- */
.name-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.name-text{ font-weight:700; }
.inline-toggle{ display:inline-block; margin: 0; }
.inline-check{ display:inline-flex; align-items:center; gap:8px; cursor:pointer; user-select:none; }
.inline-check input[type="checkbox"]{ width:18px; height:18px; accent-color: var(--primary, #ef4444); }
.sep{ opacity: .6; margin: 0 6px; }

.ampel-dot{
  width: 10px; height: 10px; border-radius: 50%;
  display:inline-block;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}
.ampel-dot.green{ background: #22c55e; }
.ampel-dot.yellow{ background: #eab308; }
.ampel-dot.orange{ background: #f97316; }
.ampel-dot.red{ background: #ef4444; }

.ampel-text.green{ color: #22c55e; }
.ampel-text.yellow{ color: #eab308; }
.ampel-text.orange{ color: #f97316; }
.ampel-text.red{ color: #ef4444; }

.info-box{
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(2,6,23,0.35);
  margin-bottom: 14px;
  color: rgba(255,255,255,0.9);
}
.ampel-line{ display:block; margin: 4px 0; color: var(--color-text-muted); }



/* Badges for simple status */
.badge{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(2,6,23,0.35);
  color: rgba(255,255,255,0.92);
}
.badge-green{ border-color: rgba(34,197,94,0.45); }
.badge-yellow{ border-color: rgba(234,179,8,0.45); }
.badge-orange{ border-color: rgba(249,115,22,0.45); }
.badge-red{ border-color: rgba(239,68,68,0.55); }
