/* ================================================================
   TimeGuard — Design System v4
   Konzept: "Precision Dark" — Enterprise-Dashboard
   Schriften: DM Sans (body) + Bricolage Grotesque (headings)
   Palette: #0a0f1e Navy · #f0ece4 Cream · #3b6ef8 Electric Blue
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&display=swap');

@font-face { font-family:'Inter'; font-weight:400; src:url('../fonts/inter-regular.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-weight:600; src:url('../fonts/inter-semibold.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-weight:700; src:url('../fonts/inter-bold.woff2') format('woff2'); }

/* ── TOKENS ── */
:root {
    /* Schriften */
    --f-body:    'DM Sans', 'Inter', system-ui, sans-serif;
    --f-heading: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;

    /* Kernfarben */
    --navy:      #0a0f1e;
    --navy-2:    #111827;
    --navy-3:    #1d2535;
    --navy-4:    #2d3748;
    --blue:      #3b6ef8;
    --blue-h:    #2558e8;
    --blue-l:    #dbeafe;
    --blue-b:    #93c5fd;
    --cream:     #f7f3ed;
    --cream-2:   #eee9e1;
    --cream-3:   #e2ddd6;

    /* Grau (kompatibel mit --g-xxx) */
    --g-50:  #fafaf9;
    --g-100: #f5f4f2;
    --g-200: #e7e5e0;
    --g-300: #ccc9c2;
    --g-400: #9e9b93;
    --g-500: #6f6c65;
    --g-600: #514e48;
    --g-700: #3a3832;
    --g-800: #242220;
    --g-900: #141210;

    /* Primärfarbe (Alias zu Blue) */
    --p:     var(--blue);
    --p-h:   var(--blue-h);
    --p-l:   #eff6ff;
    --p-b:   var(--blue-b);
    --p-900: #1e3a8a;

    /* Semantik */
    --c-green:  #16a34a; --c-green-bg: #f0fdf4; --c-green-b: #86efac;
    --c-red:    #e53935; --c-red-bg:   #fff5f5; --c-red-b:   #feb2b2;
    --c-amber:  #d97706; --c-amber-bg: #fffbeb; --c-amber-b: #fcd34d;
    --c-blue:   #3b6ef8; --c-blue-bg:  #eff6ff; --c-blue-b:  #93c5fd;
    --c-purple: #7c3aed; --c-purple-bg:#f5f3ff; --c-purple-b:#c4b5fd;
    --c-pink:   #db2777; --c-pink-bg:  #fdf2f8; --c-pink-b:  #f9a8d4;

    /* Legacy */
    --primary-color:  var(--blue);
    --primary-hover:  var(--blue-h);
    --secondary-color: var(--g-500);
    --bg-body:        var(--cream);
    --bg-white:       #fff;
    --bg-surface:     var(--g-50);
    --border-color:   var(--g-200);
    --text-primary:   var(--navy);
    --text-secondary: var(--g-500);
    --success-bg: var(--c-green-bg); --success-text: #166534; --success-border: var(--c-green-b);
    --danger-bg:  var(--c-red-bg);   --danger-text:  #991b1b; --danger-border:  var(--c-red-b);
    --warn-bg:    var(--c-amber-bg); --warn-text:    #92400e; --warn-border:    var(--c-amber-b);
    --info-bg:    var(--c-blue-bg);  --info-text:    #1e40af; --info-border:    var(--c-blue-b);
    --purple-bg:  var(--c-purple-bg);--purple-text:  #5b21b6; --purple-border:  var(--c-purple-b);

    /* Schatten */
    --sh-xs: 0 1px 2px rgba(10,15,30,.05);
    --sh-sm: 0 2px 6px rgba(10,15,30,.08), 0 1px 2px rgba(10,15,30,.04);
    --sh:    0 4px 12px rgba(10,15,30,.10), 0 2px 4px rgba(10,15,30,.05);
    --sh-md: 0 8px 24px rgba(10,15,30,.12), 0 3px 8px rgba(10,15,30,.06);
    --sh-lg: 0 20px 48px rgba(10,15,30,.14), 0 8px 16px rgba(10,15,30,.07);
    --sh-p:  0 4px 16px rgba(59,110,248,.32);

    /* Radien */
    --r-xs: 3px; --r-sm: 6px; --r: 8px; --r-md: 10px;
    --r-lg: 14px; --r-xl: 18px; --r-2xl: 24px;

    /* Sidebar */
    --sidebar-w: 256px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
    font-family: var(--f-body);
    background: var(--cream);
    color: var(--g-800);
    margin: 0; padding: 2rem;
    font-size: .875rem;
    line-height: 1.6;
    min-height: 100vh;
}
h1,h2,h3,h4,h5,h6 {
    font-family: var(--f-heading);
    line-height: 1.2; letter-spacing: -.025em;
    color: var(--navy); margin-top: 0;
}
h1 { font-size: 1.5rem;  font-weight: 700; margin-bottom: .5rem; }
h2 { font-size: 1.2rem;  font-weight: 700; margin-bottom: .4rem; }
h3 { font-size: 1rem;    font-weight: 600; margin-bottom: .35rem; }
h4 { font-size: .9rem;   font-weight: 600; margin-bottom: .3rem; }
h5 { font-size: .85rem;  font-weight: 600; margin-bottom: .25rem; }
h6 { font-size: .8rem;   font-weight: 600; margin-bottom: .2rem; }
a  { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-h); }
img { max-width: 100%; }

/* ── LAYOUT ── */
.main-container, .container {
    max-width: 1340px; margin: 0 auto;
    background: #fff;
    border-radius: var(--r-xl);
    box-shadow: var(--sh-md);
    padding: 2rem 2.5rem;
    border: 1px solid var(--g-200);
}

.card {
    background: #fff;
    border: 1px solid var(--g-200);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-xs);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--sh-sm); }
.card-body { padding: 1rem; }

/* ── PAGE HEADER ── */
.page-header, .header {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 1.25rem; margin-bottom: 1.75rem;
    border-bottom: 1.5px solid var(--g-200);
    flex-wrap: wrap; gap: .75rem;
}
.header-brand { display: flex; align-items: center; gap: .85rem; }
.header-brand img { height: 36px; width: 36px; border-radius: var(--r-sm); object-fit: contain; flex-shrink: 0; }
.header h1, .header-brand h1 { margin: 0; font-size: 1.35rem; color: var(--navy); }
.header-brand p { margin: 0; font-size: .75rem; color: var(--g-500); }
.header-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.section-header  { margin-bottom: 1.25rem; }
.section-title   { font-family: var(--f-heading); font-size: 1rem; font-weight: 700; color: var(--navy); margin: 0 0 .15rem; }
.subtitle        { font-size: .78rem; color: var(--g-500); }

/* ── BUTTONS ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    padding: .5rem 1rem; border-radius: var(--r-md);
    font-family: var(--f-body); font-size: .845rem; font-weight: 600;
    cursor: pointer; border: 1.5px solid transparent;
    transition: all .15s; text-decoration: none; line-height: 1.3;
    white-space: nowrap; letter-spacing: -.01em;
}
.btn:active { transform: scale(.98); }
.btn-primary {
    background: var(--navy); color: #fff;
    border-color: var(--navy);
    box-shadow: 0 2px 8px rgba(10,15,30,.2);
}
.btn-primary:hover { background: var(--navy-2); box-shadow: 0 4px 14px rgba(10,15,30,.28); color: #fff; }

.btn-secondary {
    background: #fff; border-color: var(--g-200); color: var(--g-700);
    box-shadow: var(--sh-xs);
}
.btn-secondary:hover { background: var(--g-50); border-color: var(--g-300); }

.btn-blue    { background: var(--blue);     color: #fff; border-color: var(--blue);    box-shadow: var(--sh-p); }
.btn-blue:hover { background: var(--blue-h); box-shadow: 0 6px 18px rgba(59,110,248,.4); color: #fff; }
.btn-danger  { background: var(--c-red);    color: #fff; border-color: var(--c-red); }
.btn-danger:hover  { background: #c62828; }
.btn-success { background: var(--c-green);  color: #fff; border-color: var(--c-green); }
.btn-success:hover { background: #15803d; }
.btn-warning { background: var(--c-amber);  color: #fff; border-color: var(--c-amber); }
.btn-warning:hover { background: #b45309; }
.btn-orange  { background: #ea580c; color: #fff; border-color: #ea580c; }
.btn-orange:hover  { background: #c2410c; }
.btn-outline { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--p-l); }
.btn-danger-outline { background: transparent; border-color: var(--c-red); color: var(--c-red); }
.btn-danger-outline:hover { background: var(--c-red-bg); }
.btn-info    { background: var(--c-purple); color: #fff; }

.btn-sm, .btn-small { padding: .28rem .65rem; font-size: .775rem; border-radius: var(--r-sm); }
.btn-large  { padding: .85rem 2rem; font-size: 1rem; font-weight: 700; border-radius: var(--r-lg); }

.btn-icon {
    padding: 6px; background: transparent; border: none; cursor: pointer;
    border-radius: var(--r-sm); display: inline-flex; align-items: center;
    color: var(--g-500); transition: background .15s, color .15s; font-family: var(--f-body);
}
.btn-icon:hover { background: var(--g-100); color: var(--g-800); }

.btn-back, .back-link, .btn-back {
    display: inline-flex; align-items: center; gap: .4rem;
    color: var(--g-500); font-size: .845rem; font-weight: 500;
    text-decoration: none; padding: .38rem .7rem; border-radius: var(--r-sm);
    transition: background .15s, color .15s;
}
.btn-back:hover, .back-link:hover { background: var(--g-100); color: var(--g-800); }

.btn-group, .btn-container { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Tabellen-Aktionen */
.btn-small-action { display: inline-flex; align-items: center; justify-content: center; padding: 3px 9px; font-size: .73rem; font-weight: 600; border-radius: var(--r-sm); border: 1.5px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap; text-decoration: none; font-family: var(--f-body); }
.btn-action-edit         { background: #eff6ff; color: var(--blue);   border-color: #bfdbfe; } .btn-action-edit:hover         { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-action-delete, .btn-del, .btn-delete { background: var(--c-red-bg); color: var(--c-red); border-color: var(--c-red-b); } .btn-action-delete:hover, .btn-del:hover, .btn-delete:hover { background: var(--c-red); color: #fff; }
.btn-action-warning      { background: var(--c-amber-bg); color: var(--c-amber); border-color: var(--c-amber-b); } .btn-action-warning:hover      { background: var(--c-amber); color: #fff; }
.btn-action-info         { background: var(--c-purple-bg); color: var(--c-purple); border-color: var(--c-purple-b); } .btn-action-info:hover         { background: var(--c-purple); color: #fff; }
.btn-action-success, .btn-add { background: var(--c-green-bg); color: var(--c-green); border-color: var(--c-green-b); } .btn-action-success:hover, .btn-add:hover { background: var(--c-green); color: #fff; }
.btn-action-add { background: var(--navy); color: #fff; border-color: var(--navy); } .btn-action-add:hover { background: var(--navy-2); }
.btn-edit     { background: #eff6ff; color: var(--blue); border: none; padding: 3px 8px; border-radius: var(--r-xs); font-size: .75rem; font-weight: 600; cursor: pointer; font-family: var(--f-body); }
.btn-save-row { background: var(--c-green-bg); color: var(--c-green); border: none; padding: 3px 8px; border-radius: var(--r-xs); font-size: .75rem; font-weight: 600; cursor: pointer; font-family: var(--f-body); }
.btn-icon-del { background: var(--c-red-bg); color: var(--c-red); border: none; padding: 3px 7px; border-radius: var(--r-xs); cursor: pointer; }
.btn-storno   { background: var(--c-amber-bg); color: var(--c-amber); border: 1.5px solid var(--c-amber-b); border-radius: var(--r-sm); padding: 3px 8px; font-size: .75rem; font-weight: 600; cursor: pointer; font-family: var(--f-body); transition: all .15s; } .btn-storno:hover { background: var(--c-amber); color: #fff; }
.btn-book-free      { background: var(--c-green-bg); color: var(--c-green); border: 1.5px solid var(--c-green-b); padding: 4px 9px; border-radius: var(--r-sm); font-size: .75rem; font-weight: 600; cursor: pointer; font-family: var(--f-body); transition: all .15s; }
.btn-book-unexcused { background: var(--c-red-bg); color: var(--c-red); border: 1.5px solid var(--c-red-b); padding: 4px 9px; border-radius: var(--r-sm); font-size: .75rem; font-weight: 600; cursor: pointer; font-family: var(--f-body); transition: all .15s; }
.btn-row-red   { width:100%; padding:.35rem; font-size:.77rem; font-weight:600; border:none; border-radius:var(--r-xs); color:#fff; cursor:pointer; font-family:var(--f-body); background:var(--c-red); transition:opacity .15s; } .btn-row-red:hover { opacity:.9; }
.btn-row-green { width:100%; padding:.35rem; font-size:.77rem; font-weight:600; border:none; border-radius:var(--r-xs); color:#fff; cursor:pointer; font-family:var(--f-body); background:var(--c-green); transition:opacity .15s; } .btn-row-green:hover { opacity:.9; }
.arrow-btn { background: none; border: 1.5px solid var(--g-200); border-radius: var(--r-sm); padding: 4px 8px; cursor: pointer; color: var(--g-500); font-family: var(--f-body); transition: background .15s; } .arrow-btn:hover { background: var(--g-100); }
.refresh-btn { background: none; border: none; cursor: pointer; color: var(--g-500); padding: 4px; border-radius: var(--r-sm); transition: background .15s; } .refresh-btn:hover { background: var(--g-100); }

/* Login Button */
.btn-login {
    width: 100%; padding: .75rem 1rem;
    background: var(--navy); border: none; border-radius: var(--r-md);
    color: #fff; font-family: var(--f-heading); font-size: .95rem; font-weight: 700;
    cursor: pointer; margin-top: .5rem; transition: background .15s, transform .1s;
    box-shadow: 0 4px 14px rgba(10,15,30,.22); letter-spacing: -.01em;
}
.btn-login:hover  { background: var(--navy-2); box-shadow: 0 6px 20px rgba(10,15,30,.3); }
.btn-login:active { transform: scale(.99); }

/* ── FORMULARE ── */
.form-group { margin-bottom: .9rem; display: flex; flex-direction: column; }
.form-group label, .form-group > label { font-weight: 600; font-size: .78rem; margin-bottom: .3rem; color: var(--g-700); letter-spacing: .005em; }

.form-input, .form-control,
select, input[type="text"], input[type="date"],
input[type="number"], input[type="time"],
input[type="password"], input[type="email"], textarea {
    display: block; width: 100%;
    padding: .55rem .8rem; font-size: .875rem;
    font-family: var(--f-body); border: 1.5px solid var(--g-200);
    border-radius: var(--r-md); background: #fff;
    color: var(--navy); transition: border-color .15s, box-shadow .15s;
    line-height: 1.4;
}
.form-input:focus, .form-control:focus, select:focus, input:focus, textarea:focus {
    outline: none; border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59,110,248,.12);
}
.form-input:hover:not(:focus), select:hover:not(:focus), input:hover:not(:focus) { border-color: var(--g-300); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239e9b93' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.5rem; }
textarea { resize: vertical; min-height: 80px; }
input[type="file"] { border: 1.5px dashed var(--g-200); background: var(--g-50); padding: .7rem 1rem; border-radius: var(--r-md); cursor: pointer; }
input[type="file"]:hover { border-color: var(--blue); }
input[type="file"]::file-selector-button { background: var(--navy); color: #fff; border: none; padding: .35rem .8rem; border-radius: var(--r-sm); cursor: pointer; margin-right: .75rem; font-size: .8rem; font-weight: 600; font-family: var(--f-body); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: .75rem; }
.filter-group { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.filter-group .form-group { margin-bottom: 0; }
.filter-form  { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.filter-form .form-group { flex: 1; min-width: 140px; margin-bottom: 0; }
.filter-form-inline { display: flex; gap: .5rem; align-items: center; }
.filter-form-inline .form-input { width: auto; }
.filter-grid   { display: grid; grid-template-columns: 2fr 1fr 2fr auto; gap: 1rem; align-items: end; }
.filter-grid-3 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; }
.radio-group   { display: flex; flex-wrap: wrap; gap: .4rem; }
.radio-label-btn { padding: .38rem .8rem; border: 1.5px solid var(--g-200); border-radius: var(--r-md); font-size: .82rem; cursor: pointer; transition: all .15s; background: #fff; color: var(--g-600); font-weight: 500; }
.radio-label-btn:hover { border-color: var(--blue); color: var(--blue); }
input[type="radio"]:checked + .radio-label-btn { background: #eff6ff; border-color: var(--blue); color: var(--blue); font-weight: 600; }
.readonly { background: var(--g-50) !important; color: var(--g-400) !important; cursor: not-allowed; }
@media (max-width: 768px) { .filter-grid, .filter-grid-3 { grid-template-columns: 1fr; } }

/* ── TABELLEN ── */
.table-wrapper, .table-container, .table-responsive {
    overflow-x: auto; border: 1.5px solid var(--g-200);
    border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-xs);
}
table, .results-table, .summary-table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: var(--g-50); }
th {
    padding: .65rem 1rem; font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em; color: var(--g-500);
    border-bottom: 1.5px solid var(--g-200); white-space: nowrap;
    position: sticky; top: 0; background: var(--g-50); z-index: 10;
    font-family: var(--f-body);
}
td { padding: .8rem 1rem; font-size: .865rem; color: var(--g-800); border-bottom: 1px solid var(--g-100); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td, .data-row:hover td { background: #f9f8f6; }
tr.data-row:hover td { background: #f9f8f6; }
.kind-krank-row    { background: #faf5ff !important; border-left: 3px solid #a855f7; }
.arbeitsunfall-row { background: #fff7ed !important; border-left: 3px solid #f97316; }
.current-user td   { background: #eff6ff !important; }
.weekend-bg td     { background: var(--g-50); }
.is-today td, .is-today { background: #f0f9ff; }
.is-holiday td     { background: #fffbeb; }
.sticky-col        { position: sticky; left: 0; background: inherit; z-index: 5; }
.sticky-footer tr:last-child td { border-top: 2px solid var(--g-200); font-weight: 700; background: var(--g-50); }
.table-dense { font-size: .8rem; }
.table-dense td { padding: .45rem .6rem; }
.table-dense th { padding: .5rem .6rem; font-size: .68rem; }

/* Name-Zellen */
td.name-cell { position: sticky; background: #fff; z-index: 5; box-shadow: 2px 0 4px rgba(0,0,0,.05); min-width: 200px; }
.name-inputs  { display: flex; gap: .35rem; align-items: center; }
.name-inputs .input-name { flex: 1; min-width: 80px; font-weight: 600; font-size: .82rem; padding: .3rem .45rem !important; border: 1.5px solid var(--g-200); border-radius: var(--r-xs); background: #fff; transition: border-color .15s; width: auto !important; }
.name-inputs .input-name:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(59,110,248,.1); }
.table-wrapper table input[type="text"], .table-wrapper table input[type="password"],
.table-wrapper table input[type="number"], .table-wrapper table input[type="date"],
.table-wrapper table input[type="email"] { padding: .3rem .45rem; font-size: .82rem; min-width: 70px; border-radius: var(--r-xs); border-width: 1.5px; }
.table-wrapper td input[type="text"], .table-wrapper td input[type="email"],
.table-wrapper td input[type="password"], .table-wrapper td input[type="number"],
.table-wrapper td input[type="date"] { min-width: 70px; max-width: 200px; }
.table-wrapper td input[type="password"] { min-width: 60px; max-width: 90px; letter-spacing: .1em; }
.table-wrapper td input[type="checkbox"] { width: 16px !important; min-width: 16px !important; max-width: 16px !important; }
.table-wrapper td select { min-width: 60px; max-width: 160px; }

/* User-Info in Tabellen */
.user-info   { display: flex; align-items: center; gap: .65rem; }
.user-avatar { width: 2rem; height: 2rem; background: linear-gradient(135deg, #eff6ff, #bfdbfe); color: var(--blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .68rem; flex-shrink: 0; font-family: var(--f-heading); }
.user-name   { font-weight: 600; font-size: .875rem; color: var(--navy); }
.user-dept, .user-details { font-size: .75rem; color: var(--g-500); }
.text-sub    { font-size: .75rem; color: var(--g-500); }

/* ── BADGES ── */
.badge, .type-tag, .tag { display: inline-flex; align-items: center; padding: .18rem .6rem; border-radius: 9999px; font-size: .7rem; font-weight: 600; white-space: nowrap; letter-spacing: .01em; }
.badge-green, .badge-success, .status-approved { background: var(--c-green-bg); color: #166534; }
.badge-red,   .badge-danger                    { background: var(--c-red-bg);   color: #991b1b; }
.badge-yellow                                  { background: #fefce8;           color: #854d0e; }
.badge-blue,  .badge-info, .badge-urlaub       { background: #eff6ff;           color: #1e40af; }
.badge-gray,  .badge-inactive                  { background: var(--g-100);      color: var(--g-600); }
.badge-orange,.badge-krank                     { background: var(--c-amber-bg); color: #92400e; }
.badge-purple,.badge-kind                      { background: var(--c-purple-bg);color: #5b21b6; }
.badge-active   { background: var(--c-green-bg); color: #166534; }
.badge-frei     { background: #f0fdf4; color: #15803d; }
.badge-schule   { background: #eff6ff; color: #1d4ed8; }
.badge-sonder   { background: var(--c-pink-bg); color: var(--c-pink); }
.badge-we       { background: #fff7ed; color: #9a3412; }
.badge-unfall   { background: #fff7ed; color: #c2410c; }
.badge-unknown  { background: var(--g-100); color: var(--g-500); }
.badge-light    { background: var(--g-100); color: var(--g-700); font-size: .72rem; font-weight: 500; padding: .15rem .55rem; border-radius: 9999px; display: inline-block; }
.badge-cyan     { background: #cffafe; color: #0e7490; border: 1px solid #67e8f9; font-size: .72rem; font-weight: 600; padding: .15rem .55rem; border-radius: 9999px; }
.badge-gray-light { background: var(--g-200); color: var(--g-700); font-size: .7rem; padding: .15rem .5rem; border-radius: 9999px; }
.nav-badge   { margin-left: auto; background: var(--c-red); color: #fff; font-size: .65rem; font-weight: 700; padding: 1px 6px; border-radius: 9999px; flex-shrink: 0; }
.time-badge  { display: inline-flex; align-items: center; gap: .2rem; background: #eff6ff; color: var(--blue); padding: .15rem .5rem; border-radius: 9999px; font-size: .7rem; font-weight: 600; }
.overdue     { background: var(--c-red-bg); color: var(--c-red); }
.urgent      { background: var(--c-amber-bg); color: var(--c-amber); font-weight: 700; }
.c-krank     { background: var(--c-amber-bg); color: #92400e; font-size: .68rem; font-weight: 600; padding: .12rem .45rem; border-radius: 9999px; }
.c-kind      { background: var(--c-purple-bg); color: #5b21b6; font-size: .68rem; font-weight: 600; padding: .12rem .45rem; border-radius: 9999px; }
.c-unfall    { background: #fff7ed; color: #c2410c; font-size: .68rem; font-weight: 600; padding: .12rem .45rem; border-radius: 9999px; }
.status-offen  { background: var(--c-amber-bg); color: #92400e; }
.status-pending{ background: #eff6ff; color: #1e40af; }
.status-geplant{ background: var(--c-purple-bg); color: #5b21b6; }
.status-unknown{ background: var(--g-100); color: var(--g-500); }

/* ── ALERTS ── */
.alert { padding: .85rem 1.1rem; border-radius: var(--r-md); margin-bottom: 1.25rem; border: 1.5px solid transparent; font-size: .875rem; display: flex; align-items: flex-start; gap: .6rem; }
.alert-success           { background: var(--c-green-bg); color: #166534; border-color: var(--c-green-b); }
.alert-error, .alert-danger { background: var(--c-red-bg); color: #991b1b; border-color: var(--c-red-b); }
.alert-warning, .alert-warn { background: var(--c-amber-bg); color: #92400e; border-color: var(--c-amber-b); }
.alert-info              { background: #eff6ff; color: #1e40af; border-color: var(--blue-b); }
.warning-box, .redirect-info { background: var(--c-amber-bg); border: 1.5px solid var(--c-amber-b); border-radius: var(--r-md); padding: .85rem 1.1rem; font-size: .875rem; color: #92400e; margin-bottom: 1rem; }
.error-message { background: var(--c-red-bg); color: #991b1b; border: 1.5px solid var(--c-red-b); border-radius: var(--r-md); padding: .8rem 1rem; margin-bottom: 1.25rem; font-size: .875rem; text-align: center; }
.anleitung { background: #eff6ff; border: 1.5px solid var(--blue-b); border-radius: var(--r-md); padding: 1rem; font-size: .875rem; color: #1e40af; }
.card-danger { background: var(--c-red-bg); border: 1.5px solid var(--c-red-b); border-radius: var(--r-xl); padding: 1.5rem; margin-bottom: 1.5rem; }
.card-danger h2 { font-family: var(--f-heading); margin: 0 0 .5rem; color: var(--c-red); font-size: 1rem; border: none; padding: 0; }
.card-info { background: #eff6ff; border: 1.5px solid var(--blue-b); border-radius: var(--r-lg); padding: 1.25rem; }
.card-info h3 { color: #1e40af; }
.card-top-success { border-top: 3px solid var(--c-green); background: #fff; border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--sh-xs); }

/* ── STAT-KARTEN ── */
.stats-grid, .stats-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.stat-card {
    background: #fff; border: 1.5px solid var(--g-200);
    border-radius: var(--r-lg); padding: 1.2rem 1.35rem;
    box-shadow: var(--sh-xs); transition: box-shadow .2s, transform .2s;
    position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--blue), var(--blue-b)); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.stat-card:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.stat-card.stat-teal::before   { background: linear-gradient(90deg, #14b8a6, #5eead4); }
.stat-card.stat-gray::before   { background: linear-gradient(90deg, var(--g-400), var(--g-300)); }
.stat-card.stat-green::before  { background: linear-gradient(90deg, #4ade80, #86efac); }
.stat-card.stat-blue::before   { background: linear-gradient(90deg, var(--blue), #93c5fd); }
.stat-card.stat-red::before    { background: linear-gradient(90deg, var(--c-red), #fca5a5); }
.stat-card.stat-amber::before  { background: linear-gradient(90deg, var(--c-amber), #fcd34d); }
.stat-card.stat-purple::before { background: linear-gradient(90deg, var(--c-purple), #c4b5fd); }
.stat-card-value, .stat-value, .stat-val { font-family: var(--f-heading); font-size: 1.75rem; font-weight: 700; color: var(--navy); line-height: 1.1; letter-spacing: -.03em; }
.stat-card-label, .stat-label, .stat-title { font-size: .7rem; color: var(--g-500); font-weight: 600; margin-top: .25rem; text-transform: uppercase; letter-spacing: .07em; }
.stat-card.stat-teal  .stat-card-value { color: #0f766e; font-family: var(--f-heading); }
.stat-card.stat-gray  .stat-card-value { color: var(--g-600); font-family: var(--f-heading); }
.stat-card.stat-green .stat-card-value { color: #166534; font-family: var(--f-heading); }
.stat-card.stat-blue  .stat-card-value { color: #1e40af; font-family: var(--f-heading); }
.stat-card.stat-red   .stat-card-value { color: #991b1b; font-family: var(--f-heading); }
.stat-card.stat-amber .stat-card-value { color: #92400e; font-family: var(--f-heading); }
.stat-card.stat-purple .stat-card-value { color: #4c1d95; font-family: var(--f-heading); }

.stat-box { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; background: #fff; border: 1.5px solid var(--g-200); border-radius: var(--r-lg); padding: .9rem 1rem; box-shadow: var(--sh-xs); transition: box-shadow .15s, transform .15s; min-width: 0; }
.stat-box-inner { display: flex; align-items: center; gap: .65rem; width: 100%; }
.stat-box:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }
.stat-box .stat-value { font-size: 1.4rem !important; line-height: 1.2; font-family: var(--f-heading); white-space: nowrap; margin-top: .15rem; }
.stat-box .stat-label { font-size: .7rem; margin-top: 0; white-space: normal; word-break: break-word; color: var(--g-500); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat-box small       { font-size: .72rem; font-weight: 400; color: var(--g-400); letter-spacing: 0; }
.stat-box > div:not(.stat-icon-bg):not([class*="stat-icon"]) { min-width: 0; width: 100%; }
.stat-icon-bg { width: 38px; height: 38px; border-radius: var(--r-md); background: #eff6ff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-bottom: .15rem; }
.stat-icon-bg img, .stat-icon-bg svg { width: 20px; height: 20px; }
.stat-icon-img { width: 24px; height: 24px; margin: 0; flex-shrink: 0; opacity: .8; }
.summary-grid   { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: .75rem; }
.summary-item   { background: var(--g-50); border: 1.5px solid var(--g-200); border-radius: var(--r-md); padding: .9rem 1rem; }
.summary-label  { font-size: .7rem; color: var(--g-500); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.summary-val    { font-family: var(--f-heading); font-size: 1.3rem; font-weight: 700; color: var(--blue); }
.val-box        { background: var(--g-50); border: 1.5px solid var(--g-200); border-radius: var(--r-sm); padding: .5rem .8rem; font-weight: 600; }
.calculated-time{ font-family: var(--f-heading); font-weight: 700; color: var(--blue); font-size: 1.05rem; }
.level-progress { width: 100%; height: 6px; background: var(--g-200); border-radius: 9999px; margin-top: .35rem; overflow: hidden; }
.stat-bar { height: 5px; background: linear-gradient(90deg, var(--blue), var(--blue-b)); border-radius: 9999px; }

/* ── PROGRESS ── */
.progress-container { background: var(--g-200); border-radius: 9999px; height: 7px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 9999px; transition: width .3s; background: linear-gradient(90deg, var(--blue), var(--blue-b)); }
.progress-bar.green  { background: var(--c-green); }
.progress-bar.yellow { background: var(--c-amber); }
.progress-bar.red    { background: var(--c-red); }
.work-progress-wrap    { margin: .75rem 0; }
.work-progress-labels  { display: flex; justify-content: space-between; font-size: .8rem; color: var(--g-500); margin-bottom: .35rem; }
.work-progress-bar     { width: 100%; background: var(--g-200); height: 7px; border-radius: 9999px; overflow: hidden; }
.work-progress-bar-fill{ height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-b)); border-radius: 9999px; transition: width 1s linear; }

/* ── MODALS ── */
.modal { display: none; position: fixed; inset: 0; background: rgba(10,15,30,.55); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.modal.flex { display: flex; }
.modal-content { background: #fff; border-radius: var(--r-xl); box-shadow: var(--sh-lg); width: 95%; max-width: 540px; padding: 2rem; position: relative; max-height: 90vh; overflow-y: auto; border: 1.5px solid var(--g-200); }
.modal-title    { font-family: var(--f-heading); font-size: 1.15rem; font-weight: 700; text-align: center; margin: 0 0 .35rem; color: var(--navy); }
.modal-subtitle { font-size: .85rem; color: var(--g-500); text-align: center; margin-bottom: 1.5rem; }
.close-button { position: absolute; top: 1.1rem; right: 1.1rem; font-size: 1.2rem; cursor: pointer; color: var(--g-400); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: none; background: none; transition: all .15s; }
.close-button:hover { background: var(--g-100); color: var(--g-700); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1.5px solid var(--g-200); }
.modal-header h4 { font-family: var(--f-heading); font-size: 1rem; font-weight: 700; margin: 0; color: var(--navy); }
.modal-header .close { font-size: 1.3rem; cursor: pointer; color: var(--g-400); line-height: 1; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-xs); transition: background .15s, color .15s; }
.modal-header .close:hover { background: var(--g-100); color: var(--g-700); }
.modal-buttons { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.modal-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; padding-bottom: .85rem; border-bottom: 1.5px solid var(--g-200); }
.modal-header-bar h2, .modal-header-bar h3, .modal-header-bar h4 { font-family: var(--f-heading); font-weight: 700; margin: 0; color: var(--navy); }

/* ── APP LAYOUT (willkommen.php) ── */
.app-layout { display: flex; min-height: 100vh; background: var(--cream); }
.app-sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: var(--navy);
    position: fixed; top: 0; left: 0; bottom: 0;
    overflow-y: auto; z-index: 200;
    display: flex; flex-direction: column;
    transition: transform .25s, width .22s cubic-bezier(.4,0,.2,1);
    scrollbar-width: thin; scrollbar-color: var(--navy-3) transparent;
}
.app-sidebar.collapsed { width: 56px; }
.app-sidebar.collapsed .sidebar-brand span,
.app-sidebar.collapsed .sidebar-user .name,
.app-sidebar.collapsed .sidebar-user .details,
.app-sidebar.collapsed .sidebar-user .logout-btn,
.app-sidebar.collapsed .sidebar-block .nav-heading,
.app-sidebar.collapsed .sidebar-block a > span:last-child,
.app-sidebar.collapsed .nav-badge { opacity: 0; width: 0; overflow: hidden; pointer-events: none; }
.app-sidebar.collapsed .sidebar-block a { justify-content: center; padding: .5rem; }
.app-sidebar.collapsed .nav-icon { width: 18px; height: 18px; opacity: .7; }
.app-sidebar.collapsed + .app-main { margin-left: 56px; }
.app-sidebar.collapsed .sidebar-collapse-btn { transform: translateY(-50%) rotate(180deg); }
.sidebar-brand { display: flex; align-items: center; gap: .7rem; padding: 1.2rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.07); text-decoration: none; flex-shrink: 0; }
.sidebar-brand img { height: 32px; width: 32px; border-radius: var(--r-sm); object-fit: contain; flex-shrink: 0; background: #fff; padding: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sidebar-brand h1, .sidebar-brand span { font-family: var(--f-heading); font-size: 1rem; font-weight: 700; color: #fff; margin: 0; }
.sidebar-user { padding: .75rem .8rem .85rem; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.03); display: block; flex-shrink: 0; }
.sidebar-user .name    { font-weight: 600; font-size: .875rem; color: #fff; }
.sidebar-user .details { font-size: .75rem; color: rgba(255,255,255,.4); margin-top: .15rem; line-height: 1.5; }
.sidebar-block { padding: .5rem .7rem; border-bottom: 1px solid rgba(255,255,255,.04); }
.nav-heading { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.3); padding: .55rem .45rem .25rem; margin: 0; }
.app-sidebar a:not(.sidebar-brand):not(.logout-btn) { display: flex; align-items: center; gap: .5rem; padding: .42rem .55rem; border-radius: var(--r-sm); font-size: .82rem; font-weight: 500; color: rgba(255,255,255,.5); text-decoration: none; transition: background .12s, color .12s, padding-left .12s, transform .1s; }
.app-sidebar a:not(.sidebar-brand):not(.logout-btn):hover { background: rgba(255,255,255,.09); color: rgba(255,255,255,.9); }
.app-sidebar a.active {
    background: rgba(59,110,248,.18);
    color: #fff;
    border-left: 3px solid var(--blue);
    padding-left: calc(.55rem - 3px);
}
.nav-icon { width: 14px; height: 14px; flex-shrink: 0; opacity: .55; transition: opacity .12s; }
.app-sidebar a:hover .nav-icon, .app-sidebar a.active .nav-icon { opacity: 1; }
.nav-alert { background: rgba(229,57,53,.15) !important; color: #fca5a5 !important; font-weight: 700 !important; border-left: 2px solid var(--c-red) !important; padding-left: calc(.55rem - 2px) !important; }
.logout-btn { display: flex; align-items: center; gap: .5rem; padding: .42rem .55rem; border-radius: var(--r-sm); font-size: .82rem; font-weight: 500; color: rgba(255,255,255,.4); background: none; border: none; cursor: pointer; width: 100%; text-align: left; font-family: var(--f-body); transition: background .12s, color .12s; }
.logout-btn:hover { background: rgba(229,57,53,.12); color: #fca5a5; }
.app-main { margin-left: var(--sidebar-w); flex: 1; padding: 1.75rem 2rem; min-height: 100vh; }

/* Mobile Header */
.mobile-header { display: none; position: sticky; top: 0; z-index: 100; background: var(--navy); padding: .75rem 1.1rem; align-items: center; justify-content: space-between; box-shadow: var(--sh); }
.mobile-header .brand { display: flex; align-items: center; gap: .5rem; font-family: var(--f-heading); font-weight: 700; font-size: 1rem; color: #fff; }
.mobile-header .brand img { height: 28px; width: 28px; border-radius: var(--r-xs); object-fit: contain; background: #fff; padding: 2px; }
.hamburger-btn { background: none; border: none; cursor: pointer; padding: 5px; border-radius: var(--r-sm); color: rgba(255,255,255,.5); transition: background .15s; }
.hamburger-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(10,15,30,.6); backdrop-filter: blur(2px); z-index: 150; }
@media (max-width: 768px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; padding: 1rem; }
    .mobile-header { display: flex; }
    .sidebar-overlay.visible { display: block; }
    body { padding: 0; }
}

/* Willkommen-Inhalte */
.glass-card { background: #fff; border: 1.5px solid var(--g-200); border-radius: var(--r-xl); box-shadow: var(--sh-sm); padding: 1.5rem; }
.glass-card h2 { font-family: var(--f-heading); margin: 0 0 1rem; font-size: 1rem; font-weight: 700; color: var(--navy); border-bottom: 1.5px solid var(--g-100); padding-bottom: .65rem; }
.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 1100px) { .two-col-grid { grid-template-columns: 1fr; } }
.action-list { display: flex; flex-direction: column; gap: .25rem; }
.action-list a { display: flex; align-items: center; gap: .6rem; padding: .52rem .75rem; background: var(--g-50); border: 1.5px solid var(--g-200); border-radius: var(--r-md); color: var(--g-700); text-decoration: none; font-size: .845rem; font-weight: 500; transition: all .15s; }
.action-list a:hover { background: #eff6ff; color: var(--blue); border-color: var(--blue-b); }
.stamp-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.stamp-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1.5rem; border-radius: var(--r-lg); font-family: var(--f-heading); font-size: .925rem; font-weight: 700; cursor: pointer; border: none; transition: all .15s; text-decoration: none; color: #fff; box-shadow: var(--sh-sm); letter-spacing: .01em; }
.stamp-btn:active { transform: scale(.97); }
.start-work { background: linear-gradient(135deg, #16a34a, #15803d); }
.start-work:hover { box-shadow: 0 4px 12px rgba(22,163,74,.35); }
.stop-work  { background: linear-gradient(135deg, var(--c-red), #b91c1c); }
.stop-work:hover  { box-shadow: 0 4px 12px rgba(229,57,53,.35); }
.break-details { margin-top: 1rem; }
.break-list    { display: grid; gap: .4rem; margin-top: .6rem; }
.break-item { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; background: var(--g-50); border: 1.5px solid var(--g-200); border-left: 3px solid var(--blue); border-radius: var(--r-md); padding: .65rem .9rem; }
.break-item .break-info strong { display: block; font-size: .875rem; color: var(--g-600); }
.break-item .break-duration    { font-family: var(--f-heading); font-size: 1rem; font-weight: 700; color: var(--c-green); }
.absence-box { text-align: center; padding: 2rem 1.5rem; }
.absence-icon { width: 56px; height: 56px; margin: 0 auto 1rem; opacity: .5; display: block; }
.absence-box p { font-size: .95rem; color: var(--g-500); margin: .6rem 0 0; }
.absence-box strong { font-family: var(--f-heading); font-size: 1.25rem; color: var(--blue); display: block; margin-top: .3rem; }
.plusstunden-box { background: var(--c-green-bg); border: 1.5px solid var(--c-green-b); border-radius: var(--r-md); padding: 1rem; margin-top: 1rem; display: flex; align-items: flex-start; gap: .75rem; }
.plusstunden-icon { width: 22px; height: 22px; flex-shrink: 0; opacity: .8; }
.plusstunden-box strong { font-family: var(--f-heading); color: var(--c-green); }
.plusstunden-box .detail { font-size: .85rem; color: #166534; margin-top: .2rem; }
.time-display       { font-family: var(--f-heading); font-size: 1.05rem; color: var(--blue); font-weight: 700; }
.time-display-muted { font-family: var(--f-heading); color: var(--g-500); }
.pause-active  { color: var(--c-amber) !important; }
.password-form { max-width: 380px; }
.team-pausen-container { background: var(--g-50); border: 1.5px solid var(--g-200); border-radius: var(--r-lg); padding: .85rem 1rem; margin-bottom: 1rem; }
.team-pausen-list  { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .4rem; }
.team-pausen-item  { display: flex; justify-content: space-between; align-items: center; padding: .5rem .8rem; border-radius: var(--r-sm); background: #fff; border: 1.5px solid var(--g-200); }
.team-pausen-item span { font-size: .875rem; }
.team-pausen-item .duration { font-family: var(--f-heading); font-weight: 700; color: var(--c-amber); white-space: nowrap; }

/* ── LOGIN ── */
.login-wrapper { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1.5rem; background: var(--cream); }
.login-container { background: #fff; border: 1.5px solid var(--g-200); border-radius: var(--r-2xl); box-shadow: var(--sh-lg); padding: 2.75rem 2.25rem; width: 100%; max-width: 420px; text-align: center; }
.login-container .logo-img { max-height: 60px; max-width: 160px; width: auto; margin-bottom: 1.1rem; border-radius: var(--r-sm); object-fit: contain; }
.login-container h1 { font-family: var(--f-heading); font-size: 1.6rem; font-weight: 800; color: var(--navy); margin: 0 0 .2rem; letter-spacing: -.03em; }
.login-container h2 { font-size: .875rem; color: var(--g-500); margin: 0 0 2rem; font-weight: 400; }
body.login-page { padding: 0; margin: 0; min-height: 100vh; background: var(--cream); display: flex; align-items: center; justify-content: center; }
body.login-page .login-container { text-align: center; }
body.login-page .login-container h1 { font-size: 1.5rem; margin-bottom: .25rem; }

/* ── PAGE-SIDEBAR (Unterseiten) ── */
.page-layout { display: flex; min-height: 100vh; background: var(--cream); }
.page-sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--navy); position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 200; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--navy-3) transparent; }
.page-content { margin-left: var(--sidebar-w); flex: 1; min-width: 0; padding: 1.75rem 2rem; min-height: 100vh; }
.page-sidebar-brand { display: flex; align-items: center; gap: .65rem; padding: 1.1rem 1.1rem 1rem; border-bottom: 1px solid rgba(255,255,255,.07); flex-shrink: 0; }
.page-sidebar-brand img { width: 32px; height: 32px; border-radius: var(--r-sm); object-fit: contain; background: #fff; padding: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.2); flex-shrink: 0; }
.page-sidebar-brand span { font-family: var(--f-heading); font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.page-sidebar-user { padding: .75rem .8rem .85rem; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.03); display: block; flex-shrink: 0; }
.page-sidebar-user .name { font-weight: 600; font-size: .845rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-sidebar-user .meta { font-size: .72rem; color: rgba(255,255,255,.35); margin-top: .15rem; }
.page-sidebar-nav { padding: .5rem .7rem; border-bottom: 1px solid rgba(255,255,255,.04); }
.page-sidebar-nav .nav-heading { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.3); padding: .5rem .4rem .25rem; margin: 0; }
.page-sidebar-nav a { display: flex; align-items: center; gap: .5rem; padding: .42rem .5rem; border-radius: var(--r-sm); font-size: .82rem; font-weight: 500; color: rgba(255,255,255,.5); text-decoration: none; transition: background .12s, color .12s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.page-sidebar-nav a.active { background: var(--blue); color: #fff; }
.page-sidebar-nav a .nav-icon { width: 14px; height: 14px; flex-shrink: 0; opacity: .55; transition: opacity .12s; }
.page-sidebar-nav a:hover .nav-icon, .page-sidebar-nav a.active .nav-icon { opacity: 1; }
body:has(.page-sidebar) { padding: 0; background: var(--cream); }
body:has(.page-sidebar) .main-container { margin: 0; border-radius: var(--r-xl); min-height: calc(100vh - 3.5rem); }
.page-menu-btn { display: none; }
@media (max-width: 900px) {
    .page-sidebar { transform: translateX(-100%); transition: transform .25s; }
    .page-sidebar.open { transform: translateX(0); }
    .page-content { margin-left: 0; padding: 1rem; }
    .page-menu-btn { display: flex; position: fixed; top: .75rem; left: .75rem; z-index: 300; width: 38px; height: 38px; background: var(--navy); border: none; border-radius: var(--r-md); align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--sh); }
    .page-menu-btn svg { width: 18px; height: 18px; stroke: #fff; }
    .page-sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 150; display: none; }
    .page-sidebar-overlay.visible { display: block; }
}

/* ── SCHICHTPLAN ── */
.headline { font-family: var(--f-heading); font-size: 1.4rem; font-weight: 700; color: var(--navy); padding: 1rem 1.5rem .75rem; border-bottom: 1.5px solid var(--g-200); background: #fff; letter-spacing: -.02em; }
.flex-container { display: flex; gap: 0; min-height: calc(100vh - 60px); align-items: flex-start; }
.user-list-container { width: 220px; flex-shrink: 0; background: #fff; border-right: 1.5px solid var(--g-200); padding: 1rem .85rem; position: sticky; top: 0; max-height: calc(100vh - 60px); overflow-y: auto; scrollbar-width: thin; font-size: .82rem; }
.user-list-container h3 { font-family: var(--f-heading); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--g-500); margin: .75rem 0 .4rem; }
.user-list-container a { display: block; color: var(--blue); font-size: .8rem; padding: .2rem 0; text-decoration: none; margin-bottom: .15rem; }
.user-list-container a:hover { text-decoration: underline; }
.user-list-container hr { border: none; border-top: 1.5px solid var(--g-200); margin: .75rem 0; }
#user-list, #fully-scheduled-user-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
#user-list .user-item, #fully-scheduled-user-list .user-item { background: var(--g-50); border: 1.5px solid var(--g-200); border-radius: var(--r-sm); padding: .42rem .6rem; cursor: grab; font-size: .8rem; font-weight: 500; color: var(--g-800); transition: background .15s, border-color .15s, box-shadow .15s; line-height: 1.35; }
#user-list .user-item:hover { background: #eff6ff; border-color: var(--blue-b); }
#user-list .user-item:active { cursor: grabbing; box-shadow: var(--sh); }
#fully-scheduled-user-list .user-item { opacity: .6; }
.flex-container > .container { flex: 1; min-width: 0; padding: 1.25rem 1.5rem; border-radius: 0; box-shadow: none; border: none; background: var(--cream); max-width: none; }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; background: #fff; border: 1.5px solid var(--g-200); border-radius: var(--r-lg); padding: .85rem 1.25rem; box-shadow: var(--sh-xs); }
.week-nav a { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--g-100); border: 1.5px solid var(--g-200); color: var(--g-700); font-size: 1.1rem; font-weight: 700; text-decoration: none; transition: all .15s; flex-shrink: 0; }
.week-nav a:hover { background: #eff6ff; border-color: var(--blue-b); color: var(--blue); }
.week-nav h2 { font-family: var(--f-heading); font-size: 1.05rem; font-weight: 700; margin: 0 0 .35rem; color: var(--navy); }
.filter-bar { display: flex; gap: .75rem; margin-bottom: 1rem; justify-content: flex-start; align-items: center; background: #fff; border: 1.5px solid var(--g-200); border-radius: var(--r-md); padding: .6rem 1rem; box-shadow: var(--sh-xs); flex-wrap: wrap; }
.drop-zone { min-height: 48px; transition: background .15s; vertical-align: top; }
.drop-zone.drag-over { background: #eff6ff !important; outline: 2px dashed var(--blue-b); border-radius: var(--r-xs); }
.assigned-user { background: #fff; border: 1.5px solid var(--g-200); border-radius: var(--r-sm); padding: .35rem .5rem; margin-bottom: .3rem; cursor: grab; font-size: .78rem; transition: box-shadow .15s; border-left: 3px solid var(--blue); }
.assigned-user:hover { box-shadow: var(--sh-sm); }
.assigned-user:active { cursor: grabbing; }
.assigned-user.urlaub        { border-left-color: var(--blue);   background: #eff6ff; }
.assigned-user.krank         { border-left-color: var(--c-amber); background: var(--c-amber-bg); }
.assigned-user.arbeitsunfall { border-left-color: #f97316;        background: #fff7ed; }
.assigned-user.schule        { border-left-color: var(--c-purple); background: var(--c-purple-bg); }
.assigned-user.frei          { border-left-color: var(--c-green);  background: var(--c-green-bg); }
.assigned-user-top  { display: flex; justify-content: space-between; align-items: flex-start; gap: .25rem; }
.assigned-user-top span { font-weight: 600; color: var(--navy); line-height: 1.3; }
.remove-user-btn { cursor: pointer; color: var(--c-red); font-size: 1rem; font-weight: 700; line-height: 1; padding: 0 2px; opacity: .6; transition: opacity .15s; flex-shrink: 0; }
.remove-user-btn:hover { opacity: 1; }
.new-shift-form { background: #fff; border: 1.5px solid var(--g-200); border-radius: var(--r-lg); padding: 1.25rem 1.5rem; box-shadow: var(--sh-xs); }
.new-shift-form h3 { font-family: var(--f-heading); font-size: .9rem; font-weight: 700; color: var(--navy); margin: 0 0 .85rem; }
.new-shift-form .row { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; flex-wrap: wrap; }
.new-shift-form .row label { font-size: .8rem; font-weight: 600; color: var(--g-700); min-width: 110px; flex-shrink: 0; }
.meldung { background: var(--c-green-bg); color: #166534; border: 1.5px solid var(--c-green-b); border-radius: var(--r-md); padding: .75rem 1rem; margin-bottom: 1rem; font-size: .875rem; font-weight: 500; }
#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast { background: var(--navy-2); color: #fff; padding: .75rem 1rem; border-radius: var(--r-md); font-size: .85rem; font-weight: 500; box-shadow: var(--sh-lg); pointer-events: all; opacity: 0; transform: translateX(1rem); transition: opacity .25s, transform .25s; display: flex; align-items: center; gap: .75rem; max-width: 340px; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { border-left: 3px solid var(--c-green); }
.toast.error   { border-left: 3px solid var(--c-red); }
.toast.warning { border-left: 3px solid var(--c-amber); }
.toggle-box { background: var(--g-50); border: 1.5px solid var(--g-200); border-radius: var(--r-sm); padding: .55rem .7rem; margin-bottom: .6rem; }
.flex-container-main { flex: 1; min-width: 0; overflow-x: auto; background: #fff; border-radius: var(--r-lg); border: 1.5px solid var(--g-200); padding: 1rem; box-shadow: var(--sh-xs); }
th.feiertag, td.feiertag { background: #fffbeb !important; }
.feiertag-name { display: block; font-size: .65rem; font-weight: 500; color: #92400e; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }

/* ── KALENDER / URLAUBSPLANER ── */
.planner-table { border-collapse: collapse; font-size: .75rem; table-layout: fixed; }
.planner-table th { padding: .3rem .2rem; font-size: .65rem; text-align: center; min-width: 28px; max-width: 34px; background: var(--g-50); }
.planner-table td { padding: .25rem .2rem; text-align: center; border: 1px solid var(--g-100); min-width: 28px; max-width: 34px; height: 28px; vertical-align: middle; }
.planner-table .employee-name, .planner-table th.employee-name { text-align: left; font-weight: 600; min-width: 140px; max-width: 180px; padding: .35rem .6rem; position: sticky; left: 0; background: #fff; z-index: 5; box-shadow: 2px 0 4px rgba(0,0,0,.05); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planner-table th.today { background: #eff6ff; color: var(--blue); font-weight: 700; }
.planner-table td.weekend { background: var(--g-50); }
.planner-table tr.current-user td { background: #eff6ff; }
.planner-table tr.current-user .employee-name { background: #eff6ff; color: var(--blue); }
.cell-status { font-size: .6rem; font-weight: 700; border-radius: 2px; }
.cell-Urlaub        { background: #dbeafe; color: #1e40af; }
.cell-Urlaub.cell-offen { background: #bfdbfe; color: #1e3a8a; opacity: .75; }
.cell-Krank         { background: var(--c-amber-bg); color: #92400e; }
.cell-KindKrank     { background: var(--c-purple-bg); color: #5b21b6; }
.cell-Arbeitsunfall { background: #fff7ed; color: #c2410c; }
.cell-Schule        { background: #eff6ff; color: #1d4ed8; }
.cell-Frei          { background: var(--c-green-bg); color: #166534; }
.cell-Sonderurlaub  { background: var(--c-pink-bg); color: var(--c-pink); }
.cell-conflict      { background: #fef9c3; color: #854d0e; outline: 1px solid #fbbf24; }
.cell-dept          { background: var(--g-100); color: var(--g-600); font-size: .6rem; }

/* ── SONSTIGE KOMPONENTEN ── */
.hover-effect { transition: box-shadow .2s, transform .2s; } .hover-effect:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.section-header  { margin-bottom: 1.25rem; }
.secondary-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1.5px solid var(--g-200); }
.block-info, .block-content { padding: .75rem 1rem; background: var(--g-50); border-radius: var(--r-md); border: 1.5px solid var(--g-200); }
.selection-panel { background: var(--g-50); border: 1.5px solid var(--g-200); border-radius: var(--r-lg); padding: 1rem; }
.unterschrift { border: 1.5px dashed var(--g-200); border-radius: var(--r-md); padding: 1rem; text-align: center; color: var(--g-400); font-size: .85rem; }
.info-box { background: var(--g-50); padding: .85rem 1rem; border-radius: var(--r-sm); border: 1.5px solid var(--g-200); font-size: .875rem; color: var(--g-700); }
.empty-state { text-align: center; padding: 3rem 1.25rem; background: #fff; border-radius: var(--r-lg); border: 1.5px dashed var(--g-300); color: var(--g-500); font-size: .95rem; display: block; }
.action-footer { margin-top: 1.25rem; display: flex; justify-content: flex-end; gap: .5rem; align-items: center; background: var(--g-50); padding: .75rem 1rem; border-radius: var(--r-md); border: 1.5px solid var(--g-200); }
.accordion-header { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; cursor: pointer; font-weight: 600; background: var(--g-50); border-radius: var(--r-md); transition: background .15s; }
.accordion-header:hover { background: var(--g-100); }
.accordion-content { padding: .75rem 1rem; }
.warning-box, .redirect-info { background: var(--c-amber-bg); border: 1.5px solid var(--c-amber-b); border-radius: var(--r-md); padding: .85rem 1.1rem; font-size: .875rem; color: #92400e; margin-bottom: 1rem; }
.nav-links { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1.5px solid var(--g-200); }
.nav-links a { color: var(--blue); font-weight: 500; font-size: .875rem; text-decoration: none; padding: .35rem .7rem; border-radius: var(--r-sm); transition: background .15s; }
.nav-links a:hover { background: #eff6ff; }
.header-left  { display: flex; align-items: center; gap: .75rem; }
.header-right { display: flex; align-items: center; gap: .5rem; }
.content      { padding: 0; }
.bar-chart    { display: flex; gap: .25rem; align-items: flex-end; height: 120px; }
.bar-col      { display: flex; flex-direction: column; align-items: center; gap: .25rem; flex: 1; }
.bar-part     { width: 100%; border-radius: var(--r-xs) var(--r-xs) 0 0; min-height: 4px; }
.bar-label    { font-size: .65rem; color: var(--g-500); text-align: center; white-space: nowrap; }
.legend-item  { display: flex; align-items: center; gap: .4rem; font-size: .78rem; }
.legend-dot   { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.action-box, .action-panel { background: var(--g-50); border: 1.5px solid var(--g-200); border-radius: var(--r-md); padding: 1rem; }
.action-bar   { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.action-link  { color: var(--blue); text-decoration: none; font-size: .85rem; font-weight: 500; }
.action-link:hover { text-decoration: underline; }
.tooltip { position: relative; cursor: help; border-bottom: 1px dotted var(--g-400); }
.tooltip .tooltiptext { visibility: hidden; opacity: 0; position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%); background: var(--navy-2); color: #fff; padding: 6px 10px; border-radius: var(--r-sm); font-size: .72rem; white-space: pre-wrap; z-index: 200; transition: opacity .15s; width: max-content; max-width: 220px; text-align: center; box-shadow: var(--sh-md); }
.tooltip:hover .tooltiptext { visibility: visible; opacity: 1; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #eff6ff; color: var(--blue); font-family: var(--f-heading); font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.scroll-area { overflow-y: auto; flex: 1; }
.scroll-max-400 { max-height: 400px; overflow-y: auto; }
.scroll-max-500 { max-height: 500px; overflow-y: auto; }
.bordered-list { list-style: none; padding: 0; margin: 0; border: 1.5px solid var(--g-200); border-radius: var(--r-md); overflow: hidden; }
.bordered-list > li { padding: .65rem .85rem; border-bottom: 1px solid var(--g-200); }
.bordered-list > li:last-child { border-bottom: none; }
.font-mono { font-family: 'Courier New', monospace; }
.my-6 { margin: 1.5rem 0; border: 0; border-top: 1.5px solid var(--g-200); }

/* Benutzerverwaltung */
.cb-cell { text-align: center; vertical-align: middle; padding: .5rem .4rem; }
.cb-cell input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--blue); }
.cb-cell input[type="checkbox"]:disabled { opacity: .4; cursor: not-allowed; }
.cb-cell.bg-purple { background: var(--c-purple-bg); }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .4rem .75rem; margin-top: .4rem; }
.checkbox-item { display: flex; align-items: center; gap: .4rem; font-size: .845rem; font-weight: 500; cursor: pointer; padding: .35rem .5rem; border-radius: var(--r-sm); transition: background .15s; }
.checkbox-item:hover { background: var(--g-50); }
.checkbox-item input[type="checkbox"] { width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--blue); cursor: pointer; }
details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .4rem; font-size: .845rem; font-weight: 600; color: var(--g-600); padding: .55rem .75rem; background: var(--g-50); border: 1.5px solid var(--g-200); border-radius: var(--r-md); transition: background .15s; }
details > summary:hover { background: var(--g-100); color: var(--g-800); }
details > summary::before { content: '▶'; font-size: .65rem; transition: transform .2s; }
details[open] > summary::before { transform: rotate(90deg); }
details > summary::-webkit-details-marker { display: none; }
.day-selection { display: flex; gap: .5rem; justify-content: center; margin-bottom: 1.25rem; flex-wrap: wrap; }
.day-box { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 1.5px solid var(--g-200); font-size: .845rem; font-weight: 700; cursor: pointer; background: #fff; color: var(--g-600); transition: all .15s; user-select: none; font-family: var(--f-heading); }
.day-box:hover { border-color: var(--blue); color: var(--blue); background: #eff6ff; }
.day-box.selected { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(10,15,30,.22); }

/* Punkte Ranking */
.trophy-gold   { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; box-shadow: var(--sh-sm); background: linear-gradient(135deg, #fef9c3, #fbbf24); }
.trophy-silver { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; box-shadow: var(--sh-sm); background: linear-gradient(135deg, #f1f5f9, #94a3b8); }
.trophy-bronze { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; box-shadow: var(--sh-sm); background: linear-gradient(135deg, #fff7ed, #f97316); }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #eff6ff, #bfdbfe); color: var(--blue); display: flex; align-items: center; justify-content: center; font-family: var(--f-heading); font-size: 1.2rem; font-weight: 700; flex-shrink: 0; }
.title-xl  { font-family: var(--f-heading); font-size: 1.75rem; font-weight: 800; color: var(--navy); letter-spacing: -.03em; margin: 0; }
.result-summary { margin-top: 1.25rem; padding-top: .85rem; border-top: 1.5px solid var(--g-200); color: var(--g-600); font-size: .85rem; text-align: right; }
.btn-large-primary { width: 320px; max-width: 100%; padding: .85rem 1.5rem; font-size: 1.05rem; font-weight: 700; border-radius: var(--r-md); background: var(--blue); color: #fff; border: none; box-shadow: var(--sh-p); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; transition: all .15s; text-decoration: none; }
.btn-large-primary:hover { background: var(--blue-h); }
.section-label { font-size: .95rem; font-weight: 600; color: var(--g-700); margin: 1.25rem 0 .5rem; font-family: var(--f-heading); }

/* Urlaubsanspruch Tabelle */
.ua-table { border-collapse: collapse; width: 100%; font-size: .8rem; }
.ua-table th, .ua-table td { padding: .4rem .5rem; border-bottom: 1px solid var(--g-100); white-space: nowrap; }
.ua-table thead th { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--g-500); background: var(--g-50); position: sticky; top: 0; z-index: 10; }
.ua-table .year-header { background: #eff6ff; color: var(--blue); font-weight: 700; font-size: .78rem; text-align: center; border-left: 2px solid var(--blue-b); }
.ua-table .year-header.past { background: var(--g-100); color: var(--g-600); border-left-color: var(--g-300); }
.ua-table .year-header.future { background: #f0fdf4; color: var(--c-green); border-left-color: var(--c-green-b); }
.ua-table .sub-header { background: var(--g-50); font-size: .67rem; text-align: center; color: var(--g-500); }
.ua-table .sub-header.year-sep { border-left: 2px solid var(--blue-b); }
.ua-table .sub-header.past-sep { border-left: 2px solid var(--g-300); }
.ua-table .sub-header.future-sep { border-left: 2px solid var(--c-green-b); }
.ua-table .col-name { min-width: 140px; font-weight: 600; color: var(--navy); position: sticky; left: 0; background: #fff; z-index: 5; box-shadow: 2px 0 4px rgba(0,0,0,.05); }
.ua-table tr:hover td { background: #f9f8f6; }
.ua-table tr:hover td.col-name { background: #fff; }
.ua-table input[type="number"] { width: 54px !important; min-width: 54px !important; max-width: 54px !important; padding: .25rem .3rem !important; font-size: .8rem !important; text-align: center; border: 1.5px solid var(--g-200); border-radius: var(--r-xs); font-family: var(--f-heading); font-weight: 600; background: #fff; transition: border-color .15s; }
.ua-table input[type="number"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(59,110,248,.1); }
.ua-table .val-cell { text-align: center; font-family: var(--f-heading); font-weight: 700; font-size: .85rem; }
.ua-table .val-planned { color: var(--blue); }
.ua-table .val-taken   { color: var(--c-green); }
.ua-table .year-sep-cell   { border-left: 2px solid var(--blue-b); }
.ua-table .past-sep-cell   { border-left: 2px solid var(--g-300); }
.ua-table .future-sep-cell { border-left: 2px solid var(--c-green-b); }
.ua-footer  { display: flex; gap: .75rem; justify-content: flex-end; padding: 1rem 0 .25rem; flex-wrap: wrap; }
.ua-legend  { display: flex; gap: 1.25rem; align-items: center; font-size: .75rem; color: var(--g-500); padding: .5rem 0; flex-wrap: wrap; }
.ua-legend-item { display: flex; align-items: center; gap: .35rem; }
.ua-legend-dot  { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* Flatpickr */
.flatpickr-calendar { font-family: var(--f-body) !important; border-radius: var(--r-lg) !important; box-shadow: var(--sh-md) !important; border: 1.5px solid var(--g-200) !important; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange { background: var(--navy) !important; border-color: var(--navy) !important; }
.flatpickr-day:hover { background: #eff6ff !important; }
.flatpickr-day.today { border-color: var(--blue) !important; }

/* Druck */
.no-print { }
.print-header { display: none; }
@media print {
    .no-print { display: none !important; }
    .print-header { display: block !important; }
    .app-sidebar, .page-sidebar, nav { display: none !important; }
    .app-main, .page-content { margin-left: 0 !important; }
    body { background: #fff !important; padding: 0 !important; }
    .main-container { box-shadow: none !important; border: none !important; }
}

/* ── UTILITIES ── */
.hidden  { display: none !important; }
.flex    { display: flex !important; }
.flex-gap{ display: flex; gap: .75rem; flex-wrap: wrap; }
.flex-col{ flex-direction: column; }
.flex-container-main { flex: 1; min-width: 0; overflow-x: auto; background: #fff; border-radius: var(--r-lg); border: 1.5px solid var(--g-200); padding: 1rem; box-shadow: var(--sh-xs); }
.items-center { align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .75rem; }
.col-span-2 { grid-column: span 2; }
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.mt-2 { margin-top: .5rem; } .mt-4 { margin-top: 1rem; } .mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: .25rem; } .mb-4 { margin-bottom: 1rem; }
.p-2  { padding: .5rem; } .p-3 { padding: .75rem; } .p-4 { padding: 1rem; }
.px-2 { padding-left: .5rem; padding-right: .5rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: .25rem; padding-bottom: .25rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.p-0  { padding: 0; }
.text-right { text-align: right; } .text-center { text-align: center; } .text-left { text-align: left; }
.text-xs  { font-size: .73rem; } .text-sm { font-size: .845rem; } .text-lg { font-size: 1.05rem; }
.text-xl  { font-size: 1.2rem; } .text-2xl { font-size: 1.4rem; } .text-3xl { font-size: 1.75rem; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; } .font-medium { font-weight: 500; }
.w-full { width: 100%; } .block { display: block; }
.rounded    { border-radius: var(--r); } .rounded-md { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); } .rounded-xl { border-radius: var(--r-xl); } .rounded-full { border-radius: 9999px; }
.border   { border: 1.5px solid var(--g-200); }
.border-b { border-bottom: 1.5px solid var(--g-200); }
.border-t { border-top: 1.5px solid var(--g-200); }
.border-collapse { border-collapse: collapse; }
.shadow-sm { box-shadow: var(--sh-xs); } .shadow-md { box-shadow: var(--sh); }
.shadow-xl { box-shadow: var(--sh-md); } .shadow-2xl { box-shadow: var(--sh-lg); }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: .025em; } .tracking-wider { letter-spacing: .07em; }
.whitespace-nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relative { position: relative; } .absolute { position: absolute; } .sticky { position: sticky; }
.top-0 { top: 0; } .z-10 { z-index: 10; } .z-50 { z-index: 50; }
.table-responsive { overflow-x: auto; }
.text-gray-400, .text-gray-500, .text-slate-400, .text-slate-500 { color: var(--g-400); }
.text-gray-600, .text-slate-700 { color: var(--g-500); }
.text-gray-700, .text-gray-800, .text-slate-800 { color: var(--g-700); }
.text-gray-900 { color: var(--g-900); }
.text-white  { color: #fff; }
.text-red, .text-red-600, .text-red-700, .text-danger { color: var(--c-red); }
.text-green, .text-green-600, .text-success { color: var(--c-green); }
.text-blue-600, .text-indigo-600 { color: var(--blue); }
.text-orange-800 { color: #9a3412; }
.text-purple-600 { color: var(--c-purple); }
.text-info   { color: #1e40af; }
.text-italic { font-style: italic; }
.bg-white    { background: #fff; }
.bg-gray-50  { background: var(--g-50); }
.bg-gray-100 { background: var(--g-100); }
.bg-indigo-50  { background: #eff6ff; }
.bg-purple   { background: var(--c-purple-bg); }
.bg-krank    { background: var(--c-amber-bg); }
.bg-kind     { background: var(--c-purple-bg); }
.bg-unfall   { background: #fff7ed; }
.w-4 { width: 1rem; } .w-8 { width: 2rem; } .w-12 { width: 3rem; } .w-16 { width: 4rem; }
.flex-grow-1 { flex: 1; }
.align-middle { vertical-align: middle; } .align-top { vertical-align: top; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.col-9pct  { width: 9%; text-align: right; }
.col-40    { width: 40px; }
.col-50    { width: 50px; }
.col-90    { width: 90px; padding: .3rem; }
.col-150   { width: 150px; }
.col-min-80  { min-width: 80px; }
.col-min-120 { min-width: 120px; }
.col-min-150 { min-width: 150px; }
.col-max-200 { max-width: 200px; }
.cell-active  { background: #eff6ff; color: var(--blue); text-align: center; font-weight: 600; }
.cell-purple  { background: var(--c-purple-bg); color: var(--c-purple); text-align: center; font-weight: 600; }
.row-clickable { cursor: pointer; background: var(--g-50); transition: background .15s; } .row-clickable:hover { background: #eff6ff; }
.modal-img { max-height: 40vh; opacity: .85; max-width: 100%; }
.badge-width { min-width: 80px; max-width: 120px; display: inline-block; }
.alert-card-red   { display: flex; justify-content: space-between; align-items: center; border-radius: var(--r-md); padding: .75rem 1rem; margin-bottom: .5rem; background: #fff; border: 1.5px solid var(--g-200); border-left: 4px solid var(--c-red); }
.alert-card-amber { display: flex; justify-content: space-between; align-items: center; border-radius: var(--r-md); padding: .75rem 1rem; margin-bottom: .5rem; background: #fff; border: 1.5px solid var(--g-200); border-left: 4px solid var(--c-amber); }
.card-top-success { border-top: 3px solid var(--c-green); background: #fff; border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--sh-xs); }
.icon-sm { width: 18px; height: 18px; flex-shrink: 0; }
.logo-icon { height: 45px; width: auto; border-radius: var(--r-xs); object-fit: contain; }
.time-display       { font-family: var(--f-heading); font-size: 1.05rem; color: var(--blue); font-weight: 700; }
.time-display-muted { font-family: var(--f-heading); color: var(--g-500); }

/* ── FOOTER ── */
.footer-copy { text-align: center; font-size: .75rem; color: var(--g-400); margin-top: 2.5rem; border-top: 1.5px solid var(--g-200); padding-top: 1.25rem; }

/* ── BODY OVERRIDES ── */
body:has(.main-container) { padding: 0; background: var(--cream); }
body:has(.app-layout)     { padding: 0; background: var(--cream); }
body:has(.login-wrapper)  { padding: 0; background: var(--cream); }
body:not(:has(.main-container)):not(:has(.app-layout)):not(:has(.login-wrapper)):not(.landing):not(.login-page) { padding: 1.5rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .main-container, .container { padding: 1.25rem; border-radius: var(--r-lg); }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
    .header { flex-direction: column; align-items: flex-start; }
    .two-col-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .modal-content { padding: 1.35rem; }
}

/* ================================================================
   TimeGuard polish layer
   Purpose: cleaner enterprise UI with calmer contrast and denser scans.
   ================================================================ */

:root {
    --f-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --f-heading: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --navy: #18202f;
    --navy-2: #222b3b;
    --navy-3: #2f394b;
    --blue: #2563eb;
    --blue-h: #1d4ed8;
    --cream: #f4f6f8;
    --cream-2: #e9edf2;
    --cream-3: #d8dee7;

    --g-50: #f8fafc;
    --g-100: #f1f5f9;
    --g-200: #e2e8f0;
    --g-300: #cbd5e1;
    --g-400: #94a3b8;
    --g-500: #64748b;
    --g-600: #475569;
    --g-700: #334155;
    --g-800: #1e293b;
    --g-900: #0f172a;

    --c-green: #0f9f6e;
    --c-green-bg: #ecfdf5;
    --c-green-b: #a7f3d0;
    --c-red: #dc2626;
    --c-red-bg: #fef2f2;
    --c-red-b: #fecaca;
    --c-amber: #d97706;
    --c-amber-bg: #fffbeb;
    --c-amber-b: #fde68a;

    --r-xs: 3px;
    --r-sm: 5px;
    --r: 6px;
    --r-md: 7px;
    --r-lg: 8px;
    --r-xl: 8px;
    --r-2xl: 8px;

    --sh-xs: 0 1px 2px rgba(15, 23, 42, .05);
    --sh-sm: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .05);
    --sh: 0 8px 22px rgba(15, 23, 42, .08);
    --sh-md: 0 14px 34px rgba(15, 23, 42, .10);
    --sh-lg: 0 24px 58px rgba(15, 23, 42, .12);
}

body {
    background:
        linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
    color: var(--g-800);
    letter-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: 0;
}

.main-container,
.container {
    border-color: rgba(148, 163, 184, .28);
    box-shadow: var(--sh);
}

body:has(.page-sidebar) .main-container {
    border-radius: 8px;
    min-height: calc(100vh - 3rem);
}

.card,
.glass-card,
.stat-box,
.action-box,
.action-panel,
.selection-panel,
.info-box,
.block-info,
.block-content,
.table-wrapper,
.table-container,
.table-responsive {
    border-color: rgba(148, 163, 184, .30);
    border-radius: 8px;
    box-shadow: var(--sh-xs);
}

.card,
.glass-card {
    background: rgba(255, 255, 255, .96);
}

.card:hover,
.glass-card:hover,
.stat-box:hover {
    box-shadow: var(--sh-sm);
    transform: none;
}

.page-sidebar {
    background: #18202f;
    border-right: 1px solid rgba(255, 255, 255, .08);
}

.page-sidebar-brand {
    padding: 1rem 1rem .9rem;
}

.page-sidebar-brand img {
    border-radius: 6px;
}

.page-sidebar-user {
    background: rgba(255, 255, 255, .045);
}

.page-sidebar-user .meta,
.page-sidebar-nav .nav-heading {
    color: rgba(255, 255, 255, .52);
}

.page-sidebar-nav {
    padding: .45rem .65rem;
}

.page-sidebar-nav a {
    min-height: 34px;
    border-radius: 7px;
    color: rgba(255, 255, 255, .70);
}

.page-sidebar-nav a:hover {
    background: rgba(255, 255, 255, .09);
}

.page-sidebar-nav a.active {
    background: #2563eb;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.page-content {
    padding: 1.5rem;
}

.page-header,
.header {
    border-bottom-color: rgba(148, 163, 184, .32);
}

.btn,
.btn-login,
.stamp-btn,
.btn-large-primary {
    border-radius: 7px;
    letter-spacing: 0;
}

.btn-primary,
.btn-login,
.stamp-btn.start-work,
.btn-large-primary {
    background: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .20);
}

.btn-primary:hover,
.btn-login:hover,
.stamp-btn.start-work:hover,
.btn-large-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-secondary,
.btn-outline {
    background: #fff;
    border-color: var(--g-300);
    color: var(--g-700);
}

.btn-secondary:hover,
.btn-outline:hover {
    background: var(--g-50);
    border-color: var(--g-400);
}

.form-input,
.form-control,
select,
input[type="text"],
input[type="date"],
input[type="number"],
input[type="time"],
input[type="password"],
input[type="email"],
textarea {
    border-color: var(--g-300);
    border-radius: 7px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, .02);
}

.form-input:focus,
.form-control:focus,
select:focus,
input:focus,
textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

th {
    background: #f8fafc;
    color: var(--g-600);
}

td {
    color: var(--g-700);
}

tr:hover td,
.data-row:hover td {
    background: #f8fafc;
}

.alert,
.success-message,
.error-message,
.warning-box,
.redirect-info {
    border-radius: 8px;
    box-shadow: var(--sh-xs);
}

.login-wrapper {
    background:
        linear-gradient(155deg, rgba(37, 99, 235, .10), transparent 32%),
        linear-gradient(25deg, rgba(15, 159, 110, .10), transparent 38%),
        #f4f6f8;
}

.login-container {
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 8px;
    box-shadow: var(--sh-lg);
}

.logo-img {
    border-radius: 8px;
}

.stat-box {
    border-left: 3px solid #2563eb;
}

.stamp-btn.stop-work {
    background: #dc2626;
    box-shadow: 0 8px 18px rgba(220, 38, 38, .18);
}

.stamp-btn.stop-work:hover {
    background: #b91c1c;
}

@media (max-width: 768px) {
    .page-content {
        padding: 1rem;
    }

    .main-container,
    .container {
        padding: 1rem;
    }
}

/* ================================================================
   TimeGuard Enhancement Layer
   Dark Mode · Sidebar Upgrade · Micro-Animations · Dashboard
   ================================================================ */

/* ── 2. SIDEBAR UPGRADES ── */

/* Collapse-Button */
.sidebar-collapse-btn {
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--blue);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: .65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 210;
    transition: background .15s, transform .25s;
    box-shadow: 0 2px 8px rgba(59,110,248,.4);
    line-height: 1;
}
.sidebar-collapse-btn:hover { background: var(--blue-h); }

/* Collapsed sidebar */
.page-sidebar.collapsed { width: 56px !important; }
.page-sidebar.collapsed .page-sidebar-brand span,
.page-sidebar.collapsed .page-sidebar-user .name,
.page-sidebar.collapsed .page-sidebar-user .meta,
.page-sidebar.collapsed .page-sidebar-nav .nav-heading,
.page-sidebar.collapsed .page-sidebar-nav a span {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
}
.page-sidebar.collapsed .page-sidebar-nav a {
    justify-content: center;
    padding: .5rem;
}
.page-sidebar.collapsed .page-sidebar-nav a .nav-icon {
    width: 18px;
    height: 18px;
    opacity: .7;
}
.page-sidebar.collapsed + .page-content {
    margin-left: 56px;
}
.page-sidebar.collapsed .sidebar-collapse-btn {
    transform: translateY(-50%) rotate(180deg);
}

/* Sidebar smooth transition */
.page-sidebar {
    transition: width .22s cubic-bezier(.4,0,.2,1);
}
.page-content {
    transition: margin-left .22s cubic-bezier(.4,0,.2,1);
}

/* Tooltip bei collapsed nav links */
.page-sidebar.collapsed .page-sidebar-nav a {
    position: relative;
}
.page-sidebar.collapsed .page-sidebar-nav a::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--navy-3);
    color: #fff;
    padding: .3rem .65rem;
    border-radius: var(--r-sm);
    font-size: .78rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
    z-index: 300;
    box-shadow: var(--sh-sm);
}
.page-sidebar.collapsed .page-sidebar-nav a:hover::after {
    opacity: 1;
}

/* Sidebar-User: Avatar */
.page-sidebar-user {
    display: flex;
    align-items: center;
    gap: .6rem;
}
.sidebar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .82rem;
    flex-shrink: 0;
    letter-spacing: 0;
}
.sidebar-avatar-info { flex: 1; min-width: 0; }

/* Aktiver Link — linker Balken */
.page-sidebar-nav a.active {
    background: rgba(59,110,248,.18);
    color: #fff;
    border-left: 3px solid var(--blue);
    padding-left: calc(.5rem - 3px);
}
.page-sidebar-nav a.nav-alert,
.app-sidebar a.nav-alert {
    background: rgba(220,38,38,.15) !important;
    color: #fca5a5 !important;
    font-weight: 700 !important;
    border-left: 3px solid var(--c-red) !important;
    padding-left: calc(.5rem - 3px) !important;
}
.page-sidebar-nav a.nav-alert:hover,
.app-sidebar a.nav-alert:hover {
    background: rgba(220,38,38,.25) !important;
}

/* Hover: leichtes Glow */
.page-sidebar-nav a:hover {
    background: rgba(255,255,255,.09);
    color: rgba(255,255,255,.9);
}

/* Logout-Link am Ende der Sidebar */
.sidebar-logout {
    margin-top: auto;
    padding: .75rem .7rem;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}
.sidebar-logout a {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .42rem .5rem;
    border-radius: var(--r-sm);
    font-size: .82rem;
    font-weight: 500;
    color: rgba(255,100,100,.7);
    text-decoration: none;
    transition: background .12s, color .12s;
}
.sidebar-logout a:hover {
    background: rgba(255,80,80,.12);
    color: #ff6b6b;
}

/* ── 3. MICRO-ANIMATIONS ── */

/* Alle Buttons */
.btn {
    transition: all .15s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background .12s;
    border-radius: inherit;
    pointer-events: none;
}
.btn:active::after { background: rgba(255,255,255,.12); }
.btn:active { transform: scale(.97) translateY(1px); }

/* Cards — sanfter Lift beim Hover */
.card {
    transition: box-shadow .2s cubic-bezier(.4,0,.2,1),
                transform .2s cubic-bezier(.4,0,.2,1),
                border-color .2s;
}
.card:hover {
    box-shadow: var(--sh-sm);
    transform: translateY(-1px);
}

/* Stat-Boxes */
.stat-box, .stat-card {
    transition: box-shadow .2s cubic-bezier(.4,0,.2,1),
                transform .2s cubic-bezier(.4,0,.2,1);
}
.stat-box:hover, .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-sm);
}

/* Badges — kurzes Einblenden */
.badge {
    animation: badgeIn .18s cubic-bezier(.4,0,.2,1) both;
}
@keyframes badgeIn {
    from { opacity: 0; transform: scale(.85); }
    to   { opacity: 1; transform: scale(1); }
}

/* Tabellen-Zeilen */
table tbody tr {
    transition: background .1s;
}
.data-row {
    animation: rowIn .2s both;
}
@keyframes rowIn {
    from { opacity: 0; transform: translateX(-4px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Inputs — Ring-Glow beim Fokus */
.form-input, .form-control, select, input[type="text"],
input[type="date"], input[type="number"], input[type="time"],
input[type="password"], input[type="email"] {
    transition: border-color .15s, box-shadow .15s, background .15s;
}

/* Alert: Slide-Down */
.alert, .success-message, .error-message {
    animation: alertIn .25s cubic-bezier(.4,0,.2,1) both;
}
@keyframes alertIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Modals */
.modal, .modal-overlay {
    animation: modalIn .2s cubic-bezier(.4,0,.2,1) both;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(.96) translateY(-8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Page-load Fade */
.main-container, .page-content > .main-container, .app-main {
    animation: pageIn .3s cubic-bezier(.4,0,.2,1) both;
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Small action buttons */
.btn-small-action {
    transition: all .12s cubic-bezier(.4,0,.2,1);
}
.btn-small-action:hover {
    transform: translateY(-1px);
}
.btn-small-action:active {
    transform: scale(.95);
}

/* Nav-Links in Sidebar */
.page-sidebar-nav a {
    transition: background .12s, color .12s, padding-left .12s, transform .1s;
}
.page-sidebar-nav a:active {
    transform: scale(.97);
}

/* ── 4. DASHBOARD STAT-BOX IMPROVEMENTS ── */
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}
.stat-box {
    border-left: 3px solid var(--blue);
    background: #fff;
}
.stat-box:hover {
    border-left-color: var(--blue-h);
}
/* Farbige Varianten */
.stat-box.stat-green  { border-left-color: var(--c-green); }
.stat-box.stat-red    { border-left-color: var(--c-red); }
.stat-box.stat-amber  { border-left-color: var(--c-amber); }
.stat-box.stat-purple { border-left-color: var(--c-purple); }

/* Stat-Value groß + fett */
.stat-box .stat-value {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    line-height: 1.1;
    color: var(--navy);
    white-space: nowrap;
    margin-top: .2rem;
}
.stat-box .stat-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--g-500);
    margin-bottom: .15rem;
}

/* ── 5. SEITEN-LAYOUT VERBESSERUNGEN ── */

/* Scrollbar schmal und harmonisch */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--g-300) transparent;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--g-300); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--g-400); }

/* Focus-Outline für Accessibility */
:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Selection */
::selection {
    background: rgba(59,110,248,.2);
    color: var(--navy);
}

/* Tabellen: sticky header */
.table-wrapper table thead th,
.table-container table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
}

/* Bessere Tabellenzeilen-Trennung */
table tbody tr + tr td {
    border-top: 1px solid var(--g-100);
}


/* Einheitliches Sidebar-User Layout */
.sidebar-user-top {
    display: flex;
    align-items: center;
    gap: .6rem;
}
.sidebar-user-text {
    flex: 1;
    min-width: 0;
}
.app-sidebar .sidebar-user-text .name,
.page-sidebar .sidebar-user-text .name {
    font-size: .85rem;
    font-weight: 700;
    color: #fff !important;
    line-height: 1.25;
    margin-bottom: .15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-sidebar .sidebar-user-text .meta,
.page-sidebar .sidebar-user-text .meta {
    font-size: .68rem;
    font-weight: 500;
    color: rgba(255,255,255,.6) !important;
    line-height: 1.4;
    word-break: break-word;
}
/* Avatar bleibt einheitlich */
.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .78rem;
    flex-shrink: 0;
}

/* Logout-Block am Sidebar-Ende — einheitlich */
.app-sidebar .sidebar-logout,
.page-sidebar .sidebar-logout {
    margin-top: auto;
    padding: .6rem .7rem .75rem;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}
.sidebar-logout form { margin: 0; }
.sidebar-logout a,
.sidebar-logout button {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .42rem .55rem;
    border-radius: var(--r-sm);
    font-size: .82rem;
    font-weight: 500;
    color: rgba(255,100,100,.7);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    transition: background .12s, color .12s;
}
.sidebar-logout a:hover,
.sidebar-logout button:hover {
    background: rgba(255,80,80,.12);
    color: #ff6b6b;
}

/* Bei collapsed: nur Icon */
.app-sidebar.collapsed .sidebar-user-text,
.page-sidebar.collapsed .sidebar-user-text,
.app-sidebar.collapsed .sidebar-logout span,
.page-sidebar.collapsed .sidebar-logout span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}
.app-sidebar.collapsed .sidebar-user-top,
.page-sidebar.collapsed .sidebar-user-top {
    justify-content: center;
}
.app-sidebar.collapsed .sidebar-logout a,
.page-sidebar.collapsed .sidebar-logout a {
    justify-content: center;
    padding: .42rem;
}

/* Sidebar-User: alle Texte weiß als Fallback */
.app-sidebar .sidebar-user,
.app-sidebar .sidebar-user *,
.page-sidebar .page-sidebar-user,
.page-sidebar .page-sidebar-user * {
    color: rgba(255,255,255,.85);
}
.app-sidebar .sidebar-user .sidebar-avatar,
.page-sidebar .page-sidebar-user .sidebar-avatar {
    color: #fff;
}
