/* ═══════════════════════════════════════════════════════════════
   HEJU Time – Design System v2
   Inter · Slate · Indigo · Clean SaaS Admin
   ═══════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   ───────────────────────────────────────────────────────────── */
:root {
    /* Slate */
    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Indigo */
    --indigo-50:  #eef2ff;
    --indigo-100: #e0e7ff;
    --indigo-200: #c7d2fe;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;
    --indigo-800: #3730a3;

    /* Emerald */
    --emerald-50:  #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-500: #10b981;
    --emerald-600: #059669;

    /* Red */
    --red-50:  #fef2f2;
    --red-100: #fee2e2;
    --red-300: #fca5a5;
    --red-500: #ef4444;
    --red-600: #dc2626;

    /* Blue */
    --blue-50:  #eff6ff;
    --blue-100: #dbeafe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;

    /* Amber */
    --amber-50:  #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;

    /* ── Semantic tokens ── */
    --primary:       var(--indigo-600);
    --primary-hover: var(--indigo-700);
    --primary-light: var(--indigo-50);

    --bg-body:    var(--slate-50);
    --bg-sidebar: #0f172a;
    --bg-header:  #ffffff;
    --bg-card:    #ffffff;

    --text-main:   var(--slate-900);
    --text-muted:  var(--slate-500);
    --text-sidebar: var(--slate-300);

    --border-color:   var(--slate-200);
    --border-sidebar: var(--slate-800);

    /* ── Green aliases (emerald) ── */
    --green-50:  var(--emerald-50);
    --green-100: var(--emerald-100);
    --green-200: var(--emerald-100);
    --green-400: var(--emerald-500);
    --green-500: var(--emerald-500);
    --green-600: var(--emerald-600);
    --green-700: var(--emerald-600);

    /* ── Red aliases ── */
    --red-400: var(--red-300);
    --red-700: var(--red-600);

    /* ── Alias for legacy templates ── */
    --color-primary:       var(--primary);
    --color-primary-hover: var(--primary-hover);
    --color-text-main:     var(--text-main);
    --color-text-muted:    var(--text-muted);
    --color-bg:            var(--bg-body);
    --color-border:        var(--border-color);
    --color-success:       var(--emerald-600);
    --color-danger:        var(--red-600);
    --color-warning:       var(--amber-600);

    /* ── Radius ── */
    --radius-xs: 0.375rem;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;

    /* ── Shadow scale ── */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.02);
    --shadow-indigo: 0 4px 14px rgba(79,70,229,0.2);

    /* ── Typography ── */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* ── Transitions ── */
    --transition-fast:   150ms ease-out;
    --transition-normal: 200ms ease-out;
    --transition-slow:   300ms ease-out;
}

/* ─────────────────────────────────────────────────────────────
   2. BASE RESET
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 0.9375rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--slate-900);
}

p { margin: 0 0 1rem; }
a { text-decoration: none; color: inherit; transition: color var(--transition-fast); }

/* ─────────────────────────────────────────────────────────────
   3. APP LAYOUT
   ───────────────────────────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100dvh;
}

/* ── Sidebar ── */
.sidebar {
    width: 15.5rem;
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-sidebar);
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 50;
    overflow: hidden;
}

/* Subtle gradient overlay for depth */
.sidebar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 6rem;
    background: linear-gradient(to top, rgba(0,0,0,0.25), transparent);
    pointer-events: none;
}

.logo-area {
    padding: 1.125rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo-icon {
    width: 2rem; height: 2rem;
    background: var(--indigo-600);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 0.875rem;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.3);
}

.logo-text {
    color: white;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 1rem;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-group-title {
    padding: 1rem 0.75rem 0.375rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate-600);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--slate-400);
    font-weight: 500;
    font-size: 0.8125rem;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    position: relative;
}
.nav-item:hover {
    background: rgba(255,255,255,0.07);
    color: white;
}
.nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
}
/* Left accent bar for active item */
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -0.625rem;
    top: 50%; transform: translateY(-50%);
    width: 3px; height: 1.25rem;
    background: var(--indigo-500);
    border-radius: 0 3px 3px 0;
}

/* ── Main wrapper ── */
.main-wrapper {
    flex: 1;
    margin-left: 15.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

/* ── Top Header ── */
.top-header {
    height: 3.75rem;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky; top: 0; z-index: 40;
    box-shadow: var(--shadow-xs);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* User avatar */
.user-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--indigo-500), var(--indigo-700));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.8125rem;
    transition: box-shadow var(--transition-fast);
    cursor: pointer;
}
.user-avatar:hover { box-shadow: 0 0 0 3px var(--indigo-100); }

/* ── Search ── */
.search-bar {
    position: relative;
    width: 100%;
    max-width: 300px;
}
.search-input {
    width: 100%;
    padding: 0.4375rem 1rem 0.4375rem 2.25rem;
    background: var(--slate-100);
    border: 1px solid transparent;
    border-radius: 9999px;
    font-size: 0.8125rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-input:focus {
    outline: none;
    background: white;
    border-color: var(--indigo-300, #a5b4fc);
    box-shadow: 0 0 0 3px var(--indigo-100);
}
.search-input::placeholder { color: var(--slate-400); }
.search-icon {
    position: absolute;
    left: 0.75rem; top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    pointer-events: none;
    width: 15px; height: 15px;
}

/* ── Page Content ── */
.content-container {
    padding: 1.75rem 2rem 3rem;
    flex: 1;
}

/* ─────────────────────────────────────────────────────────────
   4. PAGE HEADER
   ───────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.page-header__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
}
.page-header__subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

/* ─────────────────────────────────────────────────────────────
   5. CARDS
   ───────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

/* Status card (admin dashboard) */
.status-card {
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
    cursor: default;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}
.status-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.status-card.active { border-top: 3px solid var(--emerald-500); }
.status-card.inactive { border-top: 3px solid var(--slate-200); }
.status-card.active .card-title { color: var(--slate-900); }

/* ─────────────────────────────────────────────────────────────
   6. FORMS
   ───────────────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
input[type="tel"],
select,
textarea,
.input {
    display: block;
    width: 100%;
    padding: 0.5625rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    line-height: 1.5;
    color: var(--text-main);
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, select:focus, textarea:focus, .input:focus {
    outline: none;
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 3px var(--indigo-100);
}

input::placeholder, textarea::placeholder { color: var(--slate-400); }

label {
    display: inline-block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--slate-700);
}

.form-group { margin-bottom: 1.125rem; }

.input-sm { padding: 0.3125rem 0.625rem; font-size: 0.8125rem; }

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--indigo-600);
    width: 1rem; height: 1rem;
    margin-right: 0.375rem;
    cursor: pointer;
    display: inline;
    width: auto;
}

/* ─────────────────────────────────────────────────────────────
   7. BUTTONS
   ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(79,70,229,0.2);
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-indigo);
}

.btn-secondary {
    background: white;
    border-color: var(--border-color);
    color: var(--slate-700);
}
.btn-secondary:hover {
    background: var(--slate-50);
    border-color: var(--slate-300);
}

.btn-success {
    background: var(--emerald-500);
    color: white;
}
.btn-success:hover { background: var(--emerald-600); }

.btn-danger {
    background: white;
    border-color: var(--red-300);
    color: var(--red-600);
}
.btn-danger:hover { background: var(--red-50); }

.btn-neutral {
    background: var(--slate-100);
    border-color: var(--slate-200);
    color: var(--slate-700);
}
.btn-neutral:hover { background: var(--slate-200); }

.btn-sm {
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-xs);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-icon {
    padding: 0.375rem;
    border-radius: var(--radius-xs);
}

/* Legacy edit button */
.btn-edit {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--slate-600);
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.btn-edit:hover { background: var(--slate-50); }

/* Quick-action square button */
.btn-action {
    min-height: 34px; min-width: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-color);
    background: white;
    color: var(--slate-500);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    padding: 0;
}
.btn-action:hover { background: var(--slate-100); color: var(--slate-800); }
.btn-action--success:hover { background: var(--emerald-50); color: var(--emerald-600); border-color: var(--emerald-100); }
.btn-action--reopen:hover  { background: var(--amber-50);   color: var(--amber-600);   border-color: var(--amber-100); }

.btn--loading { opacity: 0.6; pointer-events: none; cursor: not-allowed; }

/* ─────────────────────────────────────────────────────────────
   8. BADGES
   ───────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius-xs);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.badge-high        { background: var(--emerald-100); color: var(--emerald-600); }
.badge-mid         { background: var(--indigo-100);  color: var(--indigo-700); }
.badge-low         { background: var(--red-100);     color: var(--red-600); }
.badge-neutral     { background: var(--slate-100);   color: var(--slate-600); }
.badge-success     { background: var(--emerald-100); color: var(--emerald-600); }
.badge-warning     { background: var(--amber-100);   color: var(--amber-600); }
.badge-info        { background: var(--indigo-100);  color: var(--indigo-600); }
.badge-danger      { background: var(--red-100);     color: var(--red-600); }

/* System log row highlight */
tr.tr-error { background: var(--red-50); }
tr.tr-error:hover { background: #fee2e2; }

/* Task-type badges */
.badge-type-cleaning    { background: var(--blue-100);    color: var(--blue-600); }
.badge-type-checkout    { background: var(--amber-100);   color: var(--amber-600); }
.badge-type-checkin     { background: var(--emerald-100); color: var(--emerald-600); }
.badge-type-maintenance { background: var(--red-100);     color: var(--red-600); }
.badge-type-special     { background: var(--indigo-100);  color: var(--indigo-600); }

/* ─────────────────────────────────────────────────────────────
   9. TABLES
   ───────────────────────────────────────────────────────────── */
.table-container,
.table-wrapper {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table,
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th,
th {
    background: var(--slate-50);
    color: var(--slate-500);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--slate-100);
    white-space: nowrap;
}

.admin-table td,
td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--slate-50);
    color: var(--slate-700);
    font-size: 0.875rem;
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--slate-50); }

/* ─────────────────────────────────────────────────────────────
   10. MODALS
   ───────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(3px);
    display: flex; justify-content: center; align-items: center;
    z-index: 100;
    animation: modal-fade-in 200ms ease-out;
}

.modal-content {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 92%;
    max-width: 520px;
    max-height: 92dvh;
    overflow-y: auto;
    animation: modal-slide-up 200ms ease-out;
}

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.modal-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1.25rem;
    gap: 0.5rem; flex-wrap: wrap;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes modal-slide-up {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─────────────────────────────────────────────────────────────
   11. TOAST NOTIFICATIONS
   ───────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 1.25rem; right: 1.25rem;
    z-index: 200;
    display: flex; flex-direction: column; gap: 0.625rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: white;
    color: var(--slate-800);
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 3px solid var(--slate-300);
    min-width: 280px; max-width: 380px;
    display: flex; align-items: flex-start; gap: 0.75rem;
    font-size: 0.875rem; font-weight: 500;
    animation: toast-in 250ms ease-out forwards;
}
.toast.success { border-left-color: var(--emerald-500); }
.toast.error   { border-left-color: var(--red-500); }
.toast.info    { border-left-color: var(--blue-500); }

.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast.success .toast-icon { color: var(--emerald-500); }
.toast.error   .toast-icon { color: var(--red-500); }
.toast.info    .toast-icon { color: var(--blue-500); }
.toast-content { flex: 1; line-height: 1.4; }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(110%); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(110%); }
}

/* ─────────────────────────────────────────────────────────────
   12. NOTIFICATIONS DROPDOWN
   ───────────────────────────────────────────────────────────── */
#notif-dropdown {
    width: 20rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--slate-200);
    z-index: 50;
}
#notif-list {
    max-height: 20rem; overflow-y: auto;
    list-style: none; padding: 0; margin: 0;
}
#notif-list > li {
    padding: 0.75rem;
    border-bottom: 1px solid var(--slate-50);
    font-size: 0.875rem; color: var(--slate-700);
    transition: background var(--transition-fast);
}
#notif-list > li:last-child { border-bottom: none; }
#notif-list > li:hover { background: var(--slate-50); }

#notif-badge {
    width: 0.5rem; height: 0.5rem;
    background: var(--red-500);
    border: 2px solid white;
    border-radius: 9999px;
}
#mark-all-read {
    background: none; border: none;
    color: var(--indigo-600); font-size: 0.75rem;
    cursor: pointer; padding: 0;
}
#mark-all-read:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────────
   13. SKELETON LOADERS
   ───────────────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--slate-100) 25%,
        var(--slate-200) 50%,
        var(--slate-100) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-wave 1.6s ease-in-out infinite;
    border-radius: var(--radius-xs);
}
@keyframes skeleton-wave {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─────────────────────────────────────────────────────────────
   14. DASHBOARD SEARCH (admin dashboard)
   ───────────────────────────────────────────────────────────── */
.details-search {
    padding: 0.4375rem 0.875rem 0.4375rem 2.125rem;
    background: var(--slate-100);
    border: 1px solid transparent;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    width: 15rem;
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.625rem center;
}
.details-search:focus {
    outline: none;
    background-color: white;
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 3px var(--indigo-100);
}

/* ─────────────────────────────────────────────────────────────
   15. TASKS TIMELINE
   ───────────────────────────────────────────────────────────── */
.tasks-toolbar {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.tasks-toolbar__filters {
    display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap;
}
.tasks-toolbar__right {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}

.stat-chip {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.3125rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem; font-weight: 600;
    border: 1px solid transparent;
}
.stat-chip--open { background: var(--amber-50); color: var(--amber-600); border-color: var(--amber-100); }
.stat-chip--done { background: var(--emerald-50); color: var(--emerald-600); border-color: var(--emerald-100); }

.timeline { position: relative; padding-left: 10rem; }
.timeline-line {
    position: absolute; left: 8rem; top: 0.5rem; bottom: 0;
    width: 2px; background: var(--slate-200); pointer-events: none;
}

.timeline-group { position: relative; margin-bottom: 2.5rem; }

.timeline-marker {
    position: absolute; left: -2.125rem; top: 0.3125rem;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--slate-300); border: 2px solid white;
    box-shadow: 0 0 0 2px var(--slate-200);
}
.timeline-marker--today {
    background: var(--primary);
    box-shadow: 0 0 0 3px var(--indigo-100);
}

.timeline-date {
    position: absolute; left: -9.5rem; top: 0;
    width: 7rem; text-align: right; padding-right: 1.25rem; line-height: 1.2;
}
.timeline-date__weekday {
    display: block; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate-400);
}
.timeline-date__day {
    display: block; font-size: 0.875rem; font-weight: 600;
    color: var(--slate-700); margin-top: 1px;
}
.timeline-date--today .timeline-date__weekday { color: var(--primary); }
.timeline-date--today .timeline-date__day     { color: var(--slate-900); }
.timeline-date--past { opacity: 0.5; }

.timeline-today-badge {
    display: inline-block;
    font-size: 0.6rem; font-weight: 700;
    background: var(--primary); color: white;
    border-radius: 9999px; padding: 1px 5px;
    vertical-align: middle; margin-left: 3px;
    letter-spacing: 0; text-transform: none;
}

.timeline-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem; align-items: start;
}

.task-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden; display: flex; flex-direction: column;
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}
.task-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.task-card--done    { opacity: 0.72; }
.task-card--skipped { opacity: 0.45; filter: grayscale(0.3); }

.task-card__header {
    padding: 0.875rem 1rem;
    display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.task-card__apt-name { font-weight: 600; font-size: 0.9375rem; color: var(--slate-800); line-height: 1.3; }

.task-card__body {
    padding: 0.875rem 1rem; flex: 1;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.task-card__meta-row {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.8125rem; color: var(--slate-600);
}
.task-card__meta-row .assign-select { flex: 1; }

.task-card__footer {
    padding: 0.625rem 1rem;
    border-top: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; flex-wrap: wrap; background: var(--slate-50);
}
.task-card__actions { display: flex; gap: 0.25rem; }

.assign-select {
    width: 100%; padding: 0.3125rem 0.5rem;
    font-size: 0.8125rem; border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm); color: var(--slate-700);
    background: var(--slate-50); cursor: pointer; font-family: var(--font-sans);
}
.assign-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--indigo-100); }

.timeline-empty {
    text-align: center; padding: 4rem 2rem; color: var(--text-muted);
}
.timeline-empty__icon { display: block; margin: 0 auto 1.25rem; opacity: 0.2; color: var(--slate-400); }
.timeline-empty__title { font-size: 1rem; font-weight: 600; color: var(--slate-700); margin: 0 0 0.5rem; }
.timeline-empty__text  { font-size: 0.875rem; color: var(--slate-500); margin: 0 0 1.5rem; }

/* ─────────────────────────────────────────────────────────────
   16. AUTH PAGES (login / register / forgot)
   ───────────────────────────────────────────────────────────── */
.auth-layout {
    display: flex; min-height: 100dvh; overflow: hidden;
    background: var(--bg-body);
}

.auth-panel {
    flex: 0 0 auto;
    width: min(480px, 100%);
    display: flex; flex-direction: column; justify-content: center;
    padding: 3rem 3.5rem;
    background: white;
    border-right: 1px solid var(--border-color);
}

.auth-hero {
    flex: 1;
    background: var(--slate-900);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.auth-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 60% 40%, rgba(99,102,241,0.25) 0%, transparent 70%);
}
.auth-hero img {
    position: relative; z-index: 1;
    max-width: 70%; opacity: 0.9;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

.auth-logo {
    display: flex; align-items: center; gap: 0.625rem;
    margin-bottom: 2.5rem;
}
.auth-logo-mark {
    width: 2.25rem; height: 2.25rem;
    background: linear-gradient(135deg, var(--indigo-500), var(--indigo-700));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 800; font-size: 1rem;
}
.auth-logo-text {
    font-weight: 700; font-size: 1.0625rem;
    color: var(--slate-900); letter-spacing: -0.02em;
}

.auth-title {
    font-size: 1.625rem; font-weight: 700;
    color: var(--slate-900); letter-spacing: -0.02em;
    margin: 0 0 0.375rem;
}
.auth-subtitle { font-size: 0.875rem; color: var(--text-muted); margin: 0 0 2rem; }

.auth-lang-switcher {
    display: flex; gap: 0.5rem; margin-bottom: 2rem; justify-content: flex-end;
}
.auth-lang-switcher a {
    font-size: 0.75rem; font-weight: 500;
    color: var(--slate-500); padding: 0.25rem 0.5rem;
    border-radius: var(--radius-xs);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.auth-lang-switcher a:hover { background: var(--slate-100); color: var(--slate-900); }
.auth-lang-switcher a.active { background: var(--indigo-50); color: var(--indigo-700); font-weight: 700; }

.auth-error {
    background: var(--red-50); color: var(--red-600);
    border: 1px solid var(--red-100);
    padding: 0.75rem 1rem; border-radius: var(--radius-md);
    font-size: 0.875rem; margin-bottom: 1.25rem;
}

.auth-footer-link {
    text-align: center; font-size: 0.875rem;
    color: var(--slate-500); margin-top: 1.5rem;
}
.auth-footer-link a { color: var(--indigo-600); font-weight: 500; }
.auth-footer-link a:hover { color: var(--indigo-700); text-decoration: underline; }

.auth-btn { width: 100%; height: 2.75rem; font-size: 0.9375rem; font-weight: 600; }

.auth-forgot {
    text-align: right; margin-top: 0.5rem;
    font-size: 0.8125rem; color: var(--slate-500);
}
.auth-forgot a { color: var(--indigo-600); }
.auth-forgot a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────────
   17. MISCELLANEOUS COMPONENTS
   ───────────────────────────────────────────────────────────── */
/* Alert */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.alert-warning {
    background: var(--amber-50); color: var(--amber-600); border-color: var(--amber-100);
}

/* Flash messages */
.flash-msg {
    padding: 0.75rem 1rem; border-radius: var(--radius-md);
    border: 1px solid; margin-bottom: 1rem; font-size: 0.875rem;
}
.flash-success { background: var(--emerald-50); color: var(--emerald-600); border-color: var(--emerald-100); }
.flash-error   { background: var(--red-50);     color: var(--red-600);     border-color: var(--red-100); }

/* Animate pop (used in some templates) */
@keyframes animate-pop {
    0%   { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1);    opacity: 1; }
}
.animate-pop { animation: animate-pop 200ms ease-out; }

/* ─────────────────────────────────────────────────────────────
   18. MOBILE NAVIGATION
   ───────────────────────────────────────────────────────────── */
#sidebar-overlay {
    position: fixed; inset: 0;
    z-index: 40;
    backdrop-filter: blur(2px);
    background: rgba(15,23,42,0.5);
}

@media (max-width: 1024px) {
    .sidebar {
        display: flex !important;
        transform: translateX(-100%);
        transition: transform var(--transition-slow);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar::after { display: none; } /* remove gradient overlay on mobile */
    .main-wrapper { margin-left: 0; }
    .lg\:hidden { display: block !important; }
}

@media (min-width: 1025px) {
    .lg\:hidden { display: none !important; }
    #sidebar-overlay { display: none !important; }
}

/* ─────────────────────────────────────────────────────────────
   19. TIMELINE RESPONSIVE
   ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .timeline { padding-left: 0; }
    .timeline-line, .timeline-marker { display: none; }
    .timeline-date {
        position: static; width: auto; text-align: left;
        padding: 0 0 0.625rem; display: flex; align-items: baseline; gap: 0.375rem;
    }
    .timeline-group { border-top: 2px solid var(--border-color); padding-top: 1rem; margin-bottom: 1.5rem; }
    .timeline-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .tasks-toolbar { flex-direction: column; align-items: flex-start; }
    .timeline-cards { grid-template-columns: 1fr; }
    .task-card__footer { flex-direction: column; align-items: flex-start; }
    .auth-panel { padding: 2rem 1.5rem; }
    .auth-hero  { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   20. GRID & LAYOUT HELPERS
   ───────────────────────────────────────────────────────────── */
.grid-cols-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-users  { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.grid-2      { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }

@media (max-width: 1024px) {
    .grid-cols-3 { grid-template-columns: 1fr; }
    .grid-users  { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .md\:grid-cols-2 { grid-template-columns: 1fr; }
    .content-container { padding: 1.25rem 1rem 2rem; }
}

/* ─────────────────────────────────────────────────────────────
   21. TYPOGRAPHY UTILITIES
   ───────────────────────────────────────────────────────────── */
.text-xs    { font-size: 0.75rem;   }
.text-sm    { font-size: 0.8125rem; }
.text-base  { font-size: 0.9375rem; }
.text-lg    { font-size: 1.125rem;  }
.text-xl    { font-size: 1.25rem;   }
.text-2xl   { font-size: 1.5rem;    }
.text-3xl   { font-size: 1.875rem;  }
.text-4xl   { font-size: 2.25rem;   }
.text-5xl   { font-size: 3rem; line-height: 1; }
.text-6xl   { font-size: 3.75rem; line-height: 1; }
.font-mono  { font-family: var(--font-mono); }

.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.uppercase     { text-transform: uppercase; }
.tracking-widest   { letter-spacing: 0.1em; }
.tracking-tighter  { letter-spacing: -0.03em; }
.text-center   { text-align: center; }
.text-right    { text-align: right; }
.text-left     { text-align: left; }
.leading-relaxed { line-height: 1.7; }
.break-words   { word-break: break-word; overflow-wrap: break-word; }

.text-muted      { color: var(--text-muted); }
.text-white      { color: white; }
.text-slate-400  { color: var(--slate-400); }
.text-slate-500  { color: var(--slate-500); }
.text-slate-600  { color: var(--slate-600); }
.text-slate-700  { color: var(--slate-700); }
.text-slate-800  { color: var(--slate-800); }
.text-slate-900  { color: var(--slate-900); }
.text-indigo-600 { color: var(--indigo-600); }
.text-indigo-800 { color: var(--indigo-800, #3730a3); }
.text-red        { color: var(--red-600); }
.text-red-500    { color: var(--red-500); }
.text-red-600    { color: var(--red-600); }
.text-green-600  { color: var(--emerald-600); }
.text-blue-500   { color: var(--blue-500); }
.text-green-500  { color: var(--emerald-500); }
.text-orange-500 { color: #f97316; }

/* ─────────────────────────────────────────────────────────────
   22. BACKGROUND UTILITIES
   ───────────────────────────────────────────────────────────── */
.bg-white        { background: white; }
.bg-slate-50     { background: var(--slate-50); }
.bg-slate-100    { background: var(--slate-100); }
.bg-slate-200    { background: var(--slate-200); }
.bg-indigo-50    { background: var(--indigo-50); }
.bg-indigo-100   { background: var(--indigo-100); }
.bg-indigo-500   { background: var(--indigo-500); }
.bg-red-500      { background: var(--red-500); }
.bg-indigo-50\/50 { background: rgba(238,242,255,0.5); }

/* ─────────────────────────────────────────────────────────────
   23. FLEXBOX UTILITIES
   ───────────────────────────────────────────────────────────── */
.flex         { display: flex; }
.flex-1       { flex: 1; }
.flex-wrap    { flex-wrap: wrap; }
.flex-col     { flex-direction: column; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end  { justify-content: flex-end; }
.justify-center  { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Composite flex helpers used in templates */
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-end      { display: flex; align-items: center; justify-content: flex-end; }
.flex-row      { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

/* ─────────────────────────────────────────────────────────────
   24. SPACING UTILITIES
   ───────────────────────────────────────────────────────────── */
.p-0  { padding: 0; }
.p-2  { padding: 0.5rem; }
.p-3  { padding: 0.75rem; }
.p-4  { padding: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem;   padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-8 { padding-left: 2rem;   padding-right: 2rem; }
.py-1 { padding-top: 0.25rem;  padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem;   padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem;  padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem;     padding-bottom: 1rem; }
.py-8 { padding-top: 2rem;     padding-bottom: 2rem; }
.pl-6 { padding-left: 1.5rem; }
.pr-6 { padding-right: 1.5rem; }
.pt-4 { padding-top: 1rem; }

.m-0   { margin: 0; }
.mt-1  { margin-top: 0.25rem; }
.mt-2  { margin-top: 0.5rem; }
.mt-4  { margin-top: 1rem; }
.mb-1  { margin-bottom: 0.25rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mb-8  { margin-bottom: 2rem; }
.ml-1  { margin-left: 0.25rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

/* ─────────────────────────────────────────────────────────────
   25. DIMENSION UTILITIES
   ───────────────────────────────────────────────────────────── */
.w-full { width: 100%; }
.w-8    { width: 2rem; }
.w-20   { width: 5rem; }
.h-1    { height: 0.25rem; }
.h-2\.5 { height: 0.625rem; }
.h-4    { height: 1rem; }
.h-8    { height: 2rem; }
.h-16   { height: 4rem; }
.h-32   { height: 8rem; }
.h-40   { height: 10rem; }
.h-64   { height: 16rem; }
.h-fit  { height: fit-content; }
.w-2\.5 { width: 0.625rem; }
.max-w-xs  { max-width: 20rem; }
.max-w-sm  { max-width: 24rem; }
.max-w-md  { max-width: 28rem; }
.max-w-lg  { max-width: 32rem; }
.max-w-xl  { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-full { max-width: 100%; }

/* ─────────────────────────────────────────────────────────────
   26. BORDER UTILITIES
   ───────────────────────────────────────────────────────────── */
.border     { border: 1px solid var(--border-color); }
.border-0   { border: 0 !important; }
.border-2   { border-width: 2px; }
.border-b   { border-bottom: 1px solid var(--border-color); }
.border-t   { border-top:    1px solid var(--border-color); }
.border-l-4 { border-left: 4px solid; }
.border-dashed    { border-style: dashed; }
.border-white     { border-color: white; }
.border-slate-50  { border-color: var(--slate-50); }
.border-slate-100 { border-color: var(--slate-100); }
.border-slate-200 { border-color: var(--slate-200); }
.border-slate-300 { border-color: var(--slate-300); }
.border-slate-800 { border-color: var(--slate-800); }
.border-indigo-50  { border-color: var(--indigo-50); }
.border-indigo-100 { border-color: var(--indigo-100); }
.border-indigo-200 { border-color: var(--indigo-200); }
.border-indigo-500 { border-color: var(--indigo-500); }
.border-gray-200   { border-color: #e5e7eb; }
.border-indigo-500 { border-color: var(--indigo-500); }

.rounded-md   { border-radius: var(--radius-sm); }
.rounded-lg   { border-radius: var(--radius-md); }
.rounded-xl   { border-radius: var(--radius-lg); }
.rounded-2xl  { border-radius: var(--radius-xl); }
.rounded-full { border-radius: 9999px; }
.rounded-t-2xl { border-top-left-radius: var(--radius-xl); border-top-right-radius: var(--radius-xl); }

/* ─────────────────────────────────────────────────────────────
   27. SHADOW UTILITIES
   ───────────────────────────────────────────────────────────── */
.shadow-none  { box-shadow: none; }
.shadow-sm    { box-shadow: var(--shadow-sm); }
.shadow-md    { box-shadow: var(--shadow-md); }
.shadow-lg    { box-shadow: var(--shadow-lg); }
.shadow-xl    { box-shadow: var(--shadow-xl); }
.shadow-indigo-100 { --tw-shadow-color: var(--indigo-100); }
.shadow-indigo-200 { box-shadow: 0 4px 14px rgba(99,102,241,0.15); }

/* ─────────────────────────────────────────────────────────────
   28. DISPLAY & POSITION UTILITIES
   ───────────────────────────────────────────────────────────── */
.block          { display: block; }
.inline-block   { display: inline-block; }
.grid           { display: grid; }
.relative       { position: relative; }
.absolute       { position: absolute; }
.fixed          { position: fixed; }
.inset-0        { top: 0; right: 0; bottom: 0; left: 0; }
.top-0          { top: 0; }
.left-0         { left: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

.hidden { display: none !important; }

/* ─────────────────────────────────────────────────────────────
   29. CURSOR & INTERACTION
   ───────────────────────────────────────────────────────────── */
.cursor-pointer   { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.transition { transition: all var(--transition-normal); }
.duration-200 { transition-duration: 200ms; }
.hover\:scale-\[1\.02\]:hover { transform: scale(1.02); }
.hover\:scale-105:hover { transform: scale(1.05); }
.transform { transform: translateZ(0); } /* GPU hint */

/* ─────────────────────────────────────────────────────────────
   30. MISC NEEDED CLASSES
   ───────────────────────────────────────────────────────────── */
/* Divide */
.divide-y > * + *         { border-top: 1px solid var(--border-color); }
.divide-slate-50 > * + *  { border-top-color: var(--slate-50); }
.divide-slate-100 > * + * { border-top-color: var(--slate-100); }

/* Chart container placeholder */
.chart-container { width: 100%; position: relative; }

/* Grid cols for dynamic templates */
.grid-cols-1 { grid-template-columns: repeat(1,minmax(0,1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.md\:grid-cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }

/* bg-gray-200 referenced in some old templates */
.bg-gray-200 { background: #e5e7eb; }
.border-gray-200 { border-color: #e5e7eb; }

/* display-1 used in some places */
.display-1 { font-size: 3rem; font-weight: 700; letter-spacing: -0.03em; }

/* fw-bold (bootstrap compat) */
.fw-bold { font-weight: 700; }

/* Inventory & article specific */
.col-min  { width: 1px; white-space: nowrap; }
.col-qty  { width: 6rem; }
.col-sku  { width: 8rem; }
.col-target { width: 6rem; }

/* file input styling */
.file\:mr-4::file-selector-button { margin-right: 1rem; }
.file\:py-2::file-selector-button { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.file\:px-4::file-selector-button { padding-left: 1rem; padding-right: 1rem; }
.file\:rounded-md::file-selector-button { border-radius: var(--radius-sm); }
.file\:border-0::file-selector-button { border: 0; }
.file\:text-sm::file-selector-button { font-size: 0.875rem; }
.file\:font-semibold::file-selector-button { font-weight: 600; }
.file\:bg-indigo-50::file-selector-button { background: var(--indigo-50); }
.file\:text-indigo-700::file-selector-button { color: var(--indigo-700); }

/* notification unread highlight */
.bg-indigo-50\/50 { background: rgba(238,242,255,0.5); }

/* inline text colors for dynamic JS-generated HTML */
.text-\[11px\] { font-size: 11px; }
.text-\[10px\] { font-size: 10px; }

/* ─── Pinnwand: Tabs + Filter-Pills ─────────────────────────────── */
.bulletin-tab,
.bulletin-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    background: #fff;
    color: var(--slate-600);
    border: 1px solid var(--slate-200);
    transition: background 120ms, color 120ms, border-color 120ms;
}
.bulletin-tab:hover,
.bulletin-pill:hover {
    background: var(--slate-50);
    color: var(--slate-800);
    border-color: var(--slate-300);
}
.bulletin-tab.is-active,
.bulletin-pill.is-active {
    background: var(--slate-800);
    color: #fff;
    border-color: var(--slate-800);
}
.bulletin-tab.is-active:hover,
.bulletin-pill.is-active:hover {
    background: var(--slate-900);
    color: #fff;
    border-color: var(--slate-900);
}

.bulletin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}
@media (max-width: 640px) {
    .bulletin-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   Bookings (Belegungsplan) — Admin-Timeline / Gantt
   Slate · Indigo · Inter · Lucide. Kanalfarben sind die einzige
   abgeleitete Palette (auf 600er-Töne für WCAG-AA-Text gezogen).
   z-index-Skala:  Cell-BG 0 · Balken 1 · Heute-Linie 2
                   sticky Name-Spalte 20 · sticky Header 30 · Ecke 40
   ═══════════════════════════════════════════════════════════════════ */

/* ── Abgeleitete Kanal-Tokens (Text-auf-Balken: weiß, ≥4.5:1) ── */
:root {
    --bk-booking:   var(--blue-600);    /* #2563eb */
    --bk-airbnb:    #d6373c;            /* dunklere Airbnb-Koralle, AA-tauglich */
    --bk-direct:    var(--indigo-600);  /* #4f46e5 */
    --bk-other:     var(--slate-600);   /* #475569 */
}

.bk-card { padding: 0; overflow: hidden; }

/* ── Sync-Hinweis (Lazy-Sync läuft) ── */
.bk-sync-hint {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; color: var(--slate-500);
    background: var(--slate-100); border-radius: var(--radius-sm);
    padding: 0.3rem 0.65rem;
}
.bk-sync-hint i { animation: bk-spin 1s linear infinite; }
@keyframes bk-spin { to { transform: rotate(360deg); } }

/* ── Segmented Control (Tabs + Presets) ── */
.bk-segmented {
    display: inline-flex; gap: 2px;
    background: var(--slate-100); border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm); padding: 3px;
}
.bk-segmented--tabs { margin-bottom: 1.25rem; }
.bk-seg {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 0.85rem; min-height: 34px;
    font-size: 0.82rem; font-weight: 600; color: var(--slate-600);
    background: none; border: none; border-radius: var(--radius-xs);
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}
.bk-seg:hover { color: var(--slate-800); }
.bk-seg.is-active {
    background: #fff; color: var(--indigo-700);
    box-shadow: var(--shadow-xs);
}
.bk-seg:focus-visible {
    outline: 2px solid var(--indigo-500); outline-offset: 1px;
}

/* ── Toolbar (Navigation + Presets + Toggle) ── */
.bk-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
    margin-bottom: 1rem;
}
.bk-btngroup {
    display: inline-flex; align-items: stretch;
    border: 1px solid var(--slate-200); border-radius: var(--radius-sm);
    overflow: hidden; background: #fff;
}
.bk-btngroup__btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; min-height: 34px; padding: 0 0.5rem;
    color: var(--slate-600); background: #fff; cursor: pointer;
    border: none; border-right: 1px solid var(--slate-200);
    font-size: 0.82rem; font-weight: 600; text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.bk-btngroup__btn:last-child { border-right: none; }
.bk-btngroup__btn--text { padding: 0 0.85rem; }
.bk-btngroup__btn:hover { background: var(--slate-100); color: var(--slate-900); }
.bk-btngroup__btn:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: -2px; }
.bk-toggle {
    display: flex; align-items: center; gap: 0.45rem;
    font-size: 0.82rem; color: var(--slate-600);
    margin-left: auto; cursor: pointer; user-select: none;
}
.bk-toggle input { accent-color: var(--indigo-600); width: 15px; height: 15px; }

/* ── Panels ── */
.bk-panel { display: none; }
.bk-panel.is-active { display: block; }

/* ── Timeline-Grid-Container ── */
.bk-grid-wrap {
    overflow: auto; max-height: 72vh;
    background: #fff;
    scrollbar-width: thin; scrollbar-color: var(--slate-300) transparent;
    -webkit-overflow-scrolling: touch;
}
.bk-grid-wrap::-webkit-scrollbar { height: 10px; width: 10px; }
.bk-grid-wrap::-webkit-scrollbar-thumb {
    background-color: var(--slate-300); border-radius: 5px;
    border: 2px solid transparent; background-clip: content-box;
}
.bk-grid-wrap:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: -2px; }

.bk-grid { display: grid; align-items: stretch; }

/* ── Ecke links-oben (doppelt sticky) ── */
.bk-grid__corner {
    position: sticky; left: 0; top: 0; z-index: 40;
    background: var(--slate-50);
    border-right: 2px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-200);
    padding: 0 0.75rem; display: flex; align-items: center;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--slate-500);
    min-height: 34px;
}
.bk-grid__corner--month {
    top: 0; min-height: 26px; z-index: 41;
    border-bottom: none; text-transform: none;
}

/* ── Monats-Zeile (sticky, oberste Headerzeile) ── */
.bk-grid--months { position: sticky; top: 0; z-index: 31; }
.bk-grid__month {
    grid-row: 1; min-height: 26px;
    display: flex; align-items: center; padding-left: 0.6rem;
    background: var(--slate-50);
    border-bottom: 1px solid var(--slate-200);
    border-left: 2px solid var(--slate-200);
    font-size: 0.72rem; font-weight: 700; color: var(--slate-700);
    letter-spacing: 0.02em; white-space: nowrap;
}

/* ── Tag/Wochentag-Zeile (sticky, unter der Monatszeile) ── */
.bk-grid--days { position: sticky; top: 26px; z-index: 30; }
.bk-grid__day {
    grid-row: 1; grid-column: span 2;
    background: var(--slate-50);
    border-bottom: 2px solid var(--slate-200);
    border-right: 1px solid var(--slate-100);
    text-align: center; padding: 3px 0; min-height: 38px;
    display: flex; flex-direction: column; justify-content: center; gap: 1px;
}
.bk-grid__day-wd { font-size: 0.6rem; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.03em; }
.bk-grid__day-num { font-size: 0.82rem; font-weight: 600; color: var(--slate-700); font-variant-numeric: tabular-nums; }
.bk-grid__day--weekend { background: var(--slate-100); }
.bk-grid__day--weekend .bk-grid__day-num { color: var(--slate-500); }
.bk-grid__day--mstart { border-left: 2px solid var(--slate-300); }
.bk-grid__day--today {
    background: var(--indigo-600);
}
.bk-grid__day--today .bk-grid__day-num { color: #fff; }
.bk-grid__day--today .bk-grid__day-wd { color: var(--indigo-100); }

/* ── Apartment-Name-Spalte (sticky links) ── */
.bk-grid__name {
    position: sticky; left: 0; z-index: 20;
    background: #fff; border-right: 2px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-100);
    padding: 0 0.75rem; display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.82rem; font-weight: 600; color: var(--slate-700);
    overflow: hidden;
}
.bk-grid__name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-grid__name--unmapped { color: var(--amber-700); }
.bk-grid__unmapped-badge {
    display: inline-flex; align-items: center; gap: 3px;
    margin-left: auto; flex-shrink: 0; font-size: 0.62rem; font-weight: 700;
    background: var(--amber-100); color: var(--amber-700);
    padding: 1px 6px; border-radius: 10px; text-decoration: none;
}
.bk-grid__unmapped-badge:hover { background: var(--amber-200, var(--amber-100)); }

/* ── Zeile ── */
.bk-row { display: grid; align-items: stretch; }
.bk-cellbg {
    grid-column: span 2; grid-row: 1 / -1;
    border-right: 1px solid var(--slate-100);
    border-bottom: 1px solid var(--slate-100);
    z-index: 0;
}
.bk-cellbg--weekend { background: var(--slate-50); }
.bk-cellbg--today {
    /* durchgehende Heute-Markierung in jeder Zeile */
    background: var(--indigo-50);
    box-shadow: inset 2px 0 0 var(--indigo-500);
}
.bk-cellbg--mstart { border-left: 2px solid var(--slate-300); }

/* ── Buchungsbalken ── */
.bk-bar {
    align-self: center; margin: 2px 0; height: 24px;
    border-radius: 5px; padding: 0 7px;
    font-size: 0.72rem; font-weight: 600; color: #fff;
    display: flex; align-items: center; gap: 4px;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    cursor: pointer; z-index: 1;
    box-shadow: 0 1px 2px rgba(15,23,42,0.18);
    transition: filter var(--transition-fast), box-shadow var(--transition-fast);
}
.bk-bar:hover { filter: brightness(1.08); box-shadow: 0 2px 8px rgba(15,23,42,0.28); }
.bk-bar:focus-visible {
    outline: 2px solid var(--slate-900); outline-offset: 1px;
    filter: brightness(1.08);
}
.bk-bar__name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bk-bar__badge {
    margin-left: auto; flex-shrink: 0;
    background: rgba(255,255,255,0.32); border-radius: 8px;
    min-width: 16px; text-align: center;
    padding: 0 5px; font-size: 0.64rem; font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.bk-bar__clip { flex-shrink: 0; opacity: 0.9; }

.bk-bar--booking { background: var(--bk-booking); }
.bk-bar--airbnb  { background: var(--bk-airbnb); }
.bk-bar--direct  { background: var(--bk-direct); }
.bk-bar--other   { background: var(--bk-other); }
.bk-bar--blocked {
    background: repeating-linear-gradient(45deg,
        var(--slate-300), var(--slate-300) 6px,
        var(--slate-200) 6px, var(--slate-200) 12px);
    color: var(--slate-800);
    border: 1px solid var(--slate-300);
}
.bk-bar--cancelled {
    background: var(--slate-400); opacity: 0.55;
    text-decoration: line-through;
}

/* ── Legende ── */
.bk-legend {
    display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center;
    font-size: 0.78rem; color: var(--slate-600);
    padding: 0.6rem 0.9rem; border-top: 1px solid var(--slate-200);
    background: var(--slate-50);
}
.bk-legend__label { font-weight: 700; color: var(--slate-500); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.bk-legend__item { display: flex; align-items: center; gap: 0.4rem; }
.bk-legend__swatch { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.bk-legend__swatch--booking   { background: var(--bk-booking); }
.bk-legend__swatch--airbnb    { background: var(--bk-airbnb); }
.bk-legend__swatch--direct    { background: var(--bk-direct); }
.bk-legend__swatch--other     { background: var(--bk-other); }
.bk-legend__swatch--blocked   { background: repeating-linear-gradient(45deg, var(--slate-300), var(--slate-300) 4px, var(--slate-200) 4px, var(--slate-200) 8px); border: 1px solid var(--slate-300); }
.bk-legend__swatch--cancelled { background: var(--slate-400); opacity: 0.55; }

/* ── Popover ── */
.bk-popover {
    position: fixed; z-index: 1000;
    width: 320px; max-width: calc(100vw - 24px);
    background: #fff; border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    /* Bei vielen Zusatzleistungen wird der Inhalt lang → max. Höhe + Scroll,
       sonst läuft das Popover unten aus dem Viewport. overflow-x hidden hält
       die abgerundeten Ecken sauber. */
    max-height: calc(100vh - 24px);
    overflow-y: auto; overflow-x: hidden;
    overscroll-behavior: contain;
}
.bk-popover[hidden] { display: none; }
.bk-popover__head {
    padding: 0.85rem 1rem; border-bottom: 1px solid var(--slate-100);
    display: flex; align-items: center; gap: 0.55rem;
    background: var(--slate-50);
    /* Kopf bleibt beim Scrollen sichtbar (Schließen-X immer erreichbar). */
    position: sticky; top: 0; z-index: 1;
}
.bk-popover__chan { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--slate-400); }
.bk-popover__chan--booking   { background: var(--bk-booking); }
.bk-popover__chan--airbnb    { background: var(--bk-airbnb); }
.bk-popover__chan--direct    { background: var(--bk-direct); }
.bk-popover__chan--other     { background: var(--bk-other); }
.bk-popover__chan--blocked   { background: var(--slate-400); }
.bk-popover__chan--cancelled { background: var(--slate-400); }
.bk-popover__title { font-weight: 700; color: var(--slate-900); font-size: 1rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-popover__close {
    background: none; border: none; cursor: pointer; color: var(--slate-400);
    padding: 4px; display: flex; line-height: 0; border-radius: var(--radius-xs); flex-shrink: 0;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.bk-popover__close:hover { color: var(--slate-700); background: var(--slate-200); }
.bk-popover__close:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 1px; }
.bk-popover__body { padding: 0.5rem 1rem; }
.bk-popover__dl { margin: 0; }
.bk-popover__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; font-size: 0.82rem; border-bottom: 1px solid var(--slate-50); }
.bk-popover__row:last-child { border-bottom: none; }
.bk-popover__row dt { color: var(--slate-500); }
.bk-popover__row dd { margin: 0; color: var(--slate-800); font-weight: 600; text-align: right; }
.bk-popover__foot {
    padding: 0.85rem 1rem; border-top: 1px solid var(--slate-100);
    display: flex; flex-direction: column; gap: 0.55rem; background: var(--slate-50);
}
.bk-popover__action {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
    background: var(--indigo-600); color: #fff; font-size: 0.85rem; font-weight: 600;
    text-decoration: none;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}
.bk-popover__action span:first-of-type { flex: 1; }
.bk-popover__action:hover { background: var(--indigo-700); box-shadow: var(--shadow-indigo); }
.bk-popover__action:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 2px; }
.bk-popover__action .bk-status-badge { background: rgba(255,255,255,0.22); color: #fff; }
.bk-popover__hint { display: flex; align-items: center; gap: 0.3rem; font-size: 0.74rem; color: var(--slate-500); }
.bk-popover__hint--pms { color: var(--slate-400); }

/* ── Status-Badges ── */
.bk-status-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.65rem; font-weight: 700;
    padding: 2px 8px; border-radius: 10px; white-space: nowrap;
    text-decoration: none;
}
.bk-status-badge--open { background: var(--amber-100); color: var(--amber-700); }
.bk-status-badge--done { background: var(--emerald-100); color: var(--emerald-600); }
.bk-status-badge--link { transition: filter var(--transition-fast); }
.bk-status-badge--link:hover { filter: brightness(0.95); }
.bk-status-badge--link:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 1px; }

/* ── Zusatzleistungen (Add-ons) im Popover ── */
.bk-addons {
    margin-top: 0.4rem; padding-top: 0.6rem;
    border-top: 1px dashed var(--slate-200);
    display: flex; flex-direction: column; gap: 0.45rem;
}
.bk-addons__title {
    display: flex; align-items: center; gap: 0.3rem;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--slate-500);
}
.bk-addons__empty { font-size: 0.78rem; color: var(--slate-400); }
.bk-addons__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.bk-addons__item {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.8rem; color: var(--slate-700);
}
.bk-addons__type { font-weight: 600; }
.bk-addons__price { color: var(--slate-500); font-variant-numeric: tabular-nums; }
.bk-addons__item .bk-status-badge { margin-left: auto; }
.bk-addons__add {
    display: inline-flex; align-items: center; gap: 0.3rem; align-self: flex-start;
    background: var(--indigo-50); color: var(--indigo-600);
    border: 1px solid var(--indigo-200); border-radius: var(--radius-sm);
    padding: 0.35rem 0.7rem; font-size: 0.78rem; font-weight: 600; cursor: pointer;
    transition: background var(--transition-fast);
}
.bk-addons__add:hover { background: var(--indigo-100); }
/* Kompakter "Zusatzleistungen verwalten"-Button im Popover (öffnet den Dialog). */
.bk-addons__manage-btn {
    display: inline-flex; align-items: center; gap: 0.35rem; width: 100%;
    justify-content: center; margin-top: 0.4rem;
    background: var(--indigo-50); color: var(--indigo-700);
    border: 1px solid var(--indigo-200); border-radius: var(--radius-sm);
    padding: 0.45rem 0.7rem; font-size: 0.8rem; font-weight: 600; cursor: pointer;
    transition: background var(--transition-fast);
}
.bk-addons__manage-btn:hover { background: var(--indigo-100); }
.bk-addons__manage-btn:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 2px; }
/* Mehrere "+"-Buttons (Babybett/Stellplatz/Early/Late) nebeneinander, umbrechend. */
.bk-addons__addrow { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.2rem 0; }
.bk-addons__addrow .bk-addons__add { margin: 0; }
.bk-addons__add:focus-visible,
.bk-addons__submit:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 2px; }
.bk-addons__form {
    display: flex; flex-direction: column; gap: 0.3rem;
    background: #fff; border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm); padding: 0.6rem;
}
/* WICHTIG: display:flex oben überschreibt sonst das [hidden]-Attribut, dann
   wären ALLE Formulare gleichzeitig offen (genau das machte das Popover lang).
   Das Akkordeon (ein Formular offen) funktioniert nur mit diesem Override. */
.bk-addons__form[hidden] { display: none; }
.bk-addons__flabel { font-size: 0.72rem; font-weight: 600; color: var(--slate-600); }
.bk-addons__opt { font-weight: 400; color: var(--slate-400); }
.bk-addons__finput {
    width: 100%; padding: 0.4rem 0.55rem; font-size: 0.82rem;
    border: 1px solid var(--slate-200); border-radius: var(--radius-xs);
}
.bk-addons__finput--mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 0.76rem; }
.bk-addons__submit {
    margin-top: 0.2rem; align-self: flex-start;
    background: var(--indigo-600); color: #fff; border: none;
    border-radius: var(--radius-sm); padding: 0.4rem 0.9rem;
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.bk-addons__submit:hover { background: var(--indigo-700); }
.bk-addons__manage { font-size: 0.74rem; color: var(--indigo-600); text-decoration: none; align-self: flex-start; }
.bk-addons__manage:hover { text-decoration: underline; }

/* ── Babybett-Flag (Add-ons auf Reinigungs-Tasks, beide Ansichten) ── */
.addon-flag {
    display: flex; flex-direction: column; gap: 0.4rem;
    border-radius: var(--radius-sm); padding: 0.55rem 0.7rem;
    margin: 0.4rem 0;
    font-size: 0.8rem; line-height: 1.4;
    border-left: 3px solid var(--indigo-500);
    background: var(--indigo-50); color: var(--slate-700);
}
.addon-flag--remove { border-left-color: var(--amber-500); background: var(--amber-50); }
.addon-flag--drift  { border-left-color: var(--red-500);  background: var(--red-50); }
/* Early Check-in / Late Checkout: rein informativ, distinkte Blau-Optik (Uhr). */
.addon-flag--time   { border-left-color: var(--blue-500); background: var(--blue-50); color: var(--slate-700); }
.addon-flag--time .addon-flag__icon { color: var(--blue-600); }
.addon-flag--done   { opacity: 0.7; }
.addon-flag__text { display: flex; align-items: flex-start; gap: 0.4rem; }
.addon-flag__icon { font-size: 1rem; line-height: 1; flex-shrink: 0; }
.addon-flag__drift {
    display: flex; align-items: center; gap: 0.3rem;
    color: var(--red-600); font-weight: 600; font-size: 0.74rem;
}
.addon-flag__btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    align-self: flex-start;
    min-height: 32px; padding: 0.35rem 0.8rem;
    border: 1px solid var(--slate-300); border-radius: var(--radius-sm);
    background: #fff; color: var(--slate-700);
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.addon-flag__btn:hover { background: var(--slate-50); }
.addon-flag__btn:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 2px; }
.addon-flag__btn:disabled { opacity: 0.5; cursor: default; }
.addon-flag__btn--done { background: var(--emerald-100); border-color: var(--emerald-500); color: var(--emerald-600); }
/* Mitarbeiter-Ansicht (Touch): größere Tap-Fläche. */
.addon-flag--employee .addon-flag__btn { min-height: 44px; width: 100%; }

/* ── Filterzeile (Listen-Tab) ── */
.bk-filterbar {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem;
    padding: 1rem; margin-bottom: 1rem;
    background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.bk-filterbar__field { display: flex; flex-direction: column; gap: 3px; }
.bk-filterbar__field label { font-size: 0.72rem; font-weight: 600; color: var(--slate-500); }
.bk-filterbar__field .input { min-width: 160px; }
.bk-filterbar__actions { margin-left: auto; }

/* ── Listen-Tabelle ── */
.bk-list-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.bk-list-table th {
    text-align: left; padding: 0.6rem 0.85rem; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-500);
    border-bottom: 2px solid var(--slate-200); white-space: nowrap;
    position: sticky; top: 0; background: var(--slate-50); z-index: 2;
}
.bk-list-table td { padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--slate-100); color: var(--slate-700); }
.bk-list-table .bk-num { text-align: right; font-variant-numeric: tabular-nums; }
.bk-list-table tr:hover td { background: var(--slate-50); }
.bk-list-table tfoot td {
    font-weight: 700; color: var(--slate-800);
    border-top: 2px solid var(--slate-300); border-bottom: none;
    background: var(--slate-100); position: sticky; bottom: 0;
}
.bk-list-badge {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.bk-list-badge--confirmed { background: var(--emerald-100); color: var(--emerald-600); }
.bk-list-badge--blocked   { background: var(--slate-200); color: var(--slate-600); }
.bk-list-badge--cancelled,
.bk-list-badge--gone      { background: var(--red-100); color: var(--red-600); }

/* ── Empty-State ── */
.bk-empty { text-align: center; padding: 3.5rem 1rem; color: var(--slate-400); }
.bk-empty i { color: var(--slate-300); margin-bottom: 0.5rem; }
.bk-empty__title { margin: 0; font-weight: 600; color: var(--slate-600); }
.bk-empty__hint { margin: 4px 0 0; font-size: 0.85rem; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .bk-sync-hint i { animation: none; }
    .bk-bar, .bk-seg, .bk-btngroup__btn, .bk-popover__action, .bk-popover__close { transition: none; }
}

/* ── Mobile: Listen-Tabelle wird zur Card-Liste ── */
@media (max-width: 720px) {
    .bk-list-table thead { display: none; }
    .bk-list-table, .bk-list-table tbody, .bk-list-table tr, .bk-list-table td { display: block; width: 100%; }
    .bk-list-table tr { border: 1px solid var(--slate-200); border-radius: var(--radius-md); margin-bottom: 0.75rem; padding: 0.5rem; }
    .bk-list-table td { border: none; padding: 0.35rem 0.5rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
    .bk-list-table .bk-num { text-align: right; }
    .bk-list-table td::before { content: attr(data-label); font-weight: 600; color: var(--slate-500); font-size: 0.75rem; text-align: left; }
    .bk-list-table tfoot td { position: static; }
    .bk-list-table tfoot tr { background: var(--slate-50); }
    .bk-toggle { margin-left: 0; }
    .bk-filterbar__field .input { min-width: 0; width: 100%; }
    .bk-filterbar__field { flex: 1 1 100%; }
    .bk-filterbar__actions { margin-left: 0; flex: 1 1 100%; }

    /* ── Belegungsplan-Zeitstrahl mobil benutzbar machen ── */
    /* Schmalere Namensspalte + tippbar breite Halbtags-Spalten (überschreibt die
       Inline-Grid-Variablen aus dem Twig). Erzwingt sauberes horizontales Wischen
       statt gequetschter, unleserlicher Mini-Spalten. */
    .bk-grid-wrap { --bk-name-w: 116px; --bk-half-w: 18px; max-height: 76vh; }
    .bk-grid__corner { padding: 0 0.5rem; font-size: 0.6rem; }
    .bk-grid__name { padding: 0 0.5rem; font-size: 0.75rem; }

    /* Toolbar: Navigations-, Preset- und Toggle-Steuerung sauber umbrechen,
       Segmented-Controls füllen die Breite und bleiben gut tippbar. */
    .bk-toolbar { gap: 0.5rem; }
    .bk-toolbar > .bk-segmented { flex: 1 1 100%; }
    .bk-toolbar > .bk-segmented .bk-seg { flex: 1 1 0; justify-content: center; }
    .bk-btngroup { flex: 1 1 auto; }
    .bk-btngroup__btn { flex: 1 1 0; }

    /* Wisch-Affordanz: dezenter Verlauf am rechten Rand des Plans signalisiert,
       dass rechts mehr Inhalt steht (unter den Sticky-Headern, über den Zellen). */
    .bk-card { position: relative; }
    .bk-card::after {
        content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 22px;
        background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff);
        pointer-events: none; z-index: 22;
    }
}
