/* ============================================================
   LOA Gästelisten-Tool – App Styles
   Mobile-first · DM Sans · Festival meets Professional
   ============================================================ */

/* --- CSS Variables --- */
:root {
    /* Brand */
    --color-primary:     #1b6b3a;
    --color-primary-rgb: 27, 107, 58;
    --color-primary-light: #e8f5ed;
    --color-primary-dark: #145a2e;
    --color-accent:      #e8a826;
    --color-accent-light: #fef6e0;

    /* Status */
    --color-success:     #1b9e4b;
    --color-success-bg:  #eafaf0;
    --color-warning:     #d4880f;
    --color-warning-bg:  #fef6e0;
    --color-danger:      #c9342e;
    --color-danger-bg:   #fdeaea;
    --color-info:        #2a7fb8;
    --color-info-bg:     #e6f2fa;

    /* Neutral */
    --color-bg:          #f4f2ee;
    --color-surface:     #ffffff;
    --color-border:      #e0ddd6;
    --color-text:        #1a1a18;
    --color-text-muted:  #6b6860;
    --color-text-light:  #9b978e;

    /* Sidebar */
    --sidebar-width:     260px;
    --sidebar-bg:        #1a1a18;
    --sidebar-text:      #ccc9c0;
    --sidebar-active:    var(--color-accent);

    /* Layout */
    --radius:            8px;
    --radius-lg:         12px;
    --shadow-sm:         0 1px 3px rgba(0,0,0,.06);
    --shadow:            0 2px 8px rgba(0,0,0,.08);
    --shadow-lg:         0 4px 20px rgba(0,0,0,.1);
    --transition:        .2s ease;

    /* Type */
    --font-sans:         'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:         'JetBrains Mono', monospace;
}


/* =================== RESET =================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a   { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }


/* =================== LAYOUT =================== */
.main {
    padding: 1.25rem;
    min-height: 100vh;
}

body.has-sidebar .main {
    padding-top: 4rem; /* Platz für Mobile-Toggle */
}


/* =================== SIDEBAR =================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform .3s ease;
    overflow-y: auto;
}

.sidebar.is-open {
    transform: translateX(0);
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1.25rem .75rem;
}

.sidebar__logo {
    font-size: 1.75rem;
}

.sidebar__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .02em;
}

.sidebar__title--sub {
    color: var(--color-accent);
    font-weight: 400;
}

.sidebar__nav {
    flex: 1;
    padding: .5rem .75rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .75rem;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    font-size: .9rem;
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
    text-decoration: none;
}

.nav-item--active {
    background: rgba(255,255,255,.1);
    color: var(--sidebar-active);
}

.nav-item--active .nav-item__icon {
    filter: none;
}

.nav-item__icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: .5rem 0;
}

.sidebar__footer {
    padding: .75rem;
    border-top: 1px solid rgba(255,255,255,.06);
}

.sidebar__user {
    display: flex;
    flex-direction: column;
    padding: .5rem .75rem;
    margin-bottom: .25rem;
}

.sidebar__user-name {
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
}

.sidebar__user-role {
    font-size: .75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.nav-item--logout {
    color: var(--color-danger);
}
.nav-item--logout:hover {
    background: rgba(201, 52, 46, .1);
    color: #ff6b6b;
}


/* --- Mobile Toggle --- */
.sidebar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    position: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 1001;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    padding: 10px;
}

.sidebar-toggle span {
    display: block;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 999;
}

.sidebar-overlay.is-visible {
    display: block;
}


/* =================== DESKTOP SIDEBAR =================== */
@media (min-width: 1024px) {
    .sidebar {
        transform: translateX(0);
    }

    body.has-sidebar .main {
        margin-left: var(--sidebar-width);
        padding: 2rem 2.5rem;
        padding-top: 2rem;
    }

    .sidebar-toggle,
    .sidebar-overlay {
        display: none !important;
    }
}


/* =================== PAGE HEADER =================== */
.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.page-header__badge {
    display: inline-block;
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: .25rem .75rem;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 600;
}


/* =================== STAT CARDS =================== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1400px) {
    .stats-grid { grid-template-columns: repeat(6, 1fr); }
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: box-shadow var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow);
}

.stat-card--highlight {
    border-color: var(--color-primary);
    border-width: 2px;
}

.stat-card--accent {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    border: none;
}

.stat-card--accent .stat-card__label,
.stat-card--accent .stat-card__detail {
    color: rgba(255,255,255,.7);
}

.stat-card__value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.2;
}

.stat-card__label {
    font-size: .85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-top: .125rem;
}

.stat-card__detail {
    font-size: .75rem;
    color: var(--color-text-light);
    margin-top: .5rem;
}

.stat-card__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 2px;
}

.stat-card__dot--warning { background: var(--color-warning); }
.stat-card__dot--success { background: var(--color-success); }

.stat-card__progress {
    height: 4px;
    background: rgba(0,0,0,.06);
    border-radius: 2px;
    margin-top: .75rem;
    overflow: hidden;
}

.stat-card__progress-bar {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    transition: width .6s ease;
}

.stat-card--accent .stat-card__progress {
    background: rgba(255,255,255,.2);
}

.stat-card--accent .stat-card__progress-bar {
    background: var(--color-accent);
}


/* =================== SECTIONS =================== */
.section {
    margin-bottom: 2rem;
}

.section__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -.01em;
}


/* =================== QUICK ACTIONS =================== */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}

@media (min-width: 640px) {
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
    .quick-actions { grid-template-columns: repeat(4, 1fr); }
}

.quick-action {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-weight: 500;
    font-size: .9rem;
    color: var(--color-text);
    transition: all var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.quick-action:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.quick-action--warning {
    border-color: var(--color-warning);
    background: var(--color-warning-bg);
}

.quick-action__icon {
    font-size: 1.4rem;
}


/* =================== ACTIVITY FEED =================== */
.activity-feed {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    font-size: .875rem;
}

.activity-item:last-child { border-bottom: none; }

.activity-item__text {
    flex: 1;
}

.activity-item__time {
    color: var(--color-text-light);
    font-size: .75rem;
    white-space: nowrap;
    margin-left: 1rem;
    font-family: var(--font-mono);
}


/* =================== CARDS =================== */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}


/* =================== FORMS =================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: .375rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: .65rem .875rem;
    font-family: var(--font-sans);
    font-size: .9rem;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .12);
}

.form-input::placeholder {
    color: var(--color-text-light);
}

.form-hint {
    display: block;
    margin-top: .25rem;
    font-size: .78rem;
    color: var(--color-text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    font-size: .9rem;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: var(--color-primary);
    cursor: pointer;
}


/* =================== BUTTONS =================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1.25rem;
    font-family: var(--font-sans);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; }

.btn--primary {
    background: var(--color-primary);
    color: #fff;
}
.btn--primary:hover {
    background: var(--color-primary-dark);
}

.btn--secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn--secondary:hover {
    background: var(--color-bg);
}

.btn--danger {
    background: var(--color-danger);
    color: #fff;
}
.btn--danger:hover {
    background: #a82b26;
}

.btn--ghost {
    background: transparent;
    color: var(--color-primary);
}
.btn--ghost:hover {
    background: var(--color-primary-light);
}

.btn--sm {
    padding: .4rem .75rem;
    font-size: .8rem;
}

.btn--block {
    width: 100%;
}

/* Touch-optimierte Buttons für Check-in */
.btn--touch {
    min-width: 48px;
    min-height: 48px;
    padding: .75rem 1.5rem;
    font-size: 1rem;
    touch-action: manipulation;
}


/* =================== BADGES =================== */
.badge {
    display: inline-block;
    padding: .2rem .6rem;
    font-size: .75rem;
    font-weight: 600;
    border-radius: 100px;
    line-height: 1.4;
}

.badge--success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge--warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge--danger {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.badge--default {
    background: var(--color-bg);
    color: var(--color-text-muted);
}

.badge--info {
    background: var(--color-info-bg);
    color: var(--color-info);
}


/* =================== TABLES =================== */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.data-table th {
    text-align: left;
    padding: .75rem 1rem;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.data-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: rgba(var(--color-primary-rgb), .03);
}

.data-table .actions {
    display: flex;
    gap: .375rem;
    flex-wrap: wrap;
}


/* =================== FLASH MESSAGES =================== */
.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .875rem 1.25rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    animation: flashIn .3s ease;
}

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.flash--success { background: var(--color-success-bg); color: var(--color-success); }
.flash--error   { background: var(--color-danger-bg);  color: var(--color-danger); }
.flash--warning { background: var(--color-warning-bg); color: var(--color-warning); }
.flash--info    { background: var(--color-info-bg);    color: var(--color-info); }

.flash__close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: .5;
    padding: .25rem;
    line-height: 1;
}
.flash__close:hover { opacity: 1; }


/* =================== EMPTY STATE =================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state__icon {
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

.empty-state p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}


/* =================== LOGIN PAGE =================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(var(--color-primary-rgb), .06) 0%, transparent 60%),
        var(--color-bg);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1.5rem;
}

.login-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 2.5rem;
    display: block;
    margin-bottom: .5rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.login-subtitle {
    color: var(--color-text-muted);
    font-size: .9rem;
    margin-top: .25rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form .btn {
    margin-top: .5rem;
}

.login-footer {
    text-align: center;
    color: var(--color-text-light);
    font-size: .78rem;
    margin-top: 1.5rem;
}


/* =================== SEARCH / FILTERS =================== */
.toolbar {
    display: flex;
    gap: .75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: .55rem .875rem .55rem 2.25rem;
    font-family: var(--font-sans);
    font-size: .875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239b978e' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E")
        no-repeat .75rem center var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .12);
}

.filter-select {
    padding: .55rem .875rem;
    font-family: var(--font-sans);
    font-size: .875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    cursor: pointer;
}


/* =================== RESPONSIVE TABLE (cards on mobile) =================== */
@media (max-width: 768px) {
    .data-table thead   { display: none; }
    .data-table tr      { display: block; margin-bottom: .75rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
    .data-table td      { display: flex; justify-content: space-between; align-items: center; padding: .5rem 1rem; border-bottom: 1px solid var(--color-border); }
    .data-table td::before { content: attr(data-label); font-weight: 600; font-size: .8rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .03em; margin-right: 1rem; }
    .data-table td:last-child { border-bottom: none; }
    .data-table .actions { justify-content: flex-end; }

    .table-wrap {
        border: none;
        background: transparent;
    }
}


/* =================== UTILITY =================== */
.text-muted   { color: var(--color-text-muted); }
.text-small   { font-size: .8rem; }
.text-mono    { font-family: var(--font-mono); }
.text-center  { text-align: center; }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem; }
.mb-1  { margin-bottom: .5rem; }
.mb-2  { margin-bottom: 1rem; }
.gap-1 { gap: .5rem; }
.flex  { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

.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;
}


/* =================== TOAST NOTIFICATIONS =================== */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: .875rem 1.5rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    transition: all .3s ease;
}

.toast--visible {
    transform: translateY(0);
    opacity: 1;
}

.toast--success { background: var(--color-success); color: #fff; }
.toast--error   { background: var(--color-danger);  color: #fff; }
.toast--info    { background: var(--color-info);    color: #fff; }


/* =================== PRINT =================== */
@media print {
    .sidebar, .sidebar-toggle, .sidebar-overlay,
    .flash, .quick-actions, .btn, .toolbar { display: none !important; }

    body.has-sidebar .main { margin-left: 0; }

    .data-table { font-size: .8rem; }
    .data-table th, .data-table td { padding: .375rem .5rem; }
}


/* =================== PHASE 2: TOOLBAR =================== */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.toolbar .search-input {
    flex: 1 1 200px;
    min-width: 180px;
    padding: .5rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: .875rem;
    transition: border-color .2s;
}
.toolbar .search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .12);
}

.toolbar .filter-select {
    padding: .5rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: .875rem;
    background: #fff;
    cursor: pointer;
    min-width: 140px;
}

/* =================== PAGE HEADER BADGE =================== */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.page-header__badge {
    display: inline-block;
    padding: .25rem .75rem;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
}

/* =================== FORM COMPONENTS =================== */
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: .35rem;
    color: var(--color-text);
}
.form-input,
.form-textarea {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: .9rem;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
}
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .12);
}
.form-textarea {
    resize: vertical;
    min-height: 80px;
}
.form-hint {
    display: block;
    margin-top: .25rem;
    font-size: .78rem;
    color: var(--color-muted);
}
.form-checkbox {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    padding: .5rem;
    border-radius: var(--radius);
    transition: background .15s;
}
.form-checkbox:hover {
    background: var(--color-bg);
}
.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

/* =================== ACTION BUTTON GROUPS =================== */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
}

.btn--ghost {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
}
.btn--ghost:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

.btn--danger {
    background: var(--color-danger);
    color: #fff;
}
.btn--danger:hover {
    background: #a12a25;
}

.btn--wa {
    background: #25D366;
    color: #fff;
    border: none;
}
.btn--wa:hover {
    background: #1da851;
    color: #fff;
}

.badge--wa {
    background: #e6f9ee;
    color: #25D366;
    border: 1px solid #25D366;
}

/* =================== TEXT UTILITIES =================== */
.text-mono { font-family: 'JetBrains Mono', monospace; }
.text-small { font-size: .8rem; }
.text-muted { color: var(--color-muted); }
.mb-2 { margin-bottom: .75rem; }

/* =================== RESPONSIVE FORMS =================== */
@media (max-width: 600px) {
    .toolbar {
        flex-direction: column;
    }
    .toolbar .search-input,
    .toolbar .filter-select {
        flex: 1 1 100%;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .actions {
        flex-direction: column;
    }
    .actions .btn {
        width: 100%;
        text-align: center;
    }
}


/* =================== COMPACT STATS GRID =================== */
.stats-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.stats-grid--compact .stat-card {
    padding: 1rem;
}
.stats-grid--compact .stat-card__value {
    font-size: 1.5rem;
}

/* =================== BUTTON SIZES =================== */
.btn--sm {
    padding: .35rem .65rem;
    font-size: .78rem;
}
.btn--lg {
    padding: .75rem 1.5rem;
    font-size: 1rem;
}

/* =================== SCANNER =================== */
.scanner-wrap {
    max-width: 560px;
}

.scan-result {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem;
    border-radius: var(--radius-lg, 12px);
    margin-bottom: 1.25rem;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all .3s ease;
}
.scan-result__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.scan-result--idle {
    background: var(--color-bg);
    color: var(--color-muted);
    border: 2px dashed var(--color-border);
}
.scan-result--info {
    background: var(--color-info-bg);
    color: var(--color-info);
    border: 2px solid var(--color-info);
}
.scan-result--success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 2px solid var(--color-success);
    animation: scan-pulse .4s ease;
}
.scan-result--warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border: 2px solid var(--color-warning);
}
.scan-result--error {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 2px solid var(--color-danger);
}

@keyframes scan-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.scanner-container {
    margin-bottom: 1.25rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}
.scanner-container #loa-reader {
    width: 100%;
}
.scanner-container #loa-reader video {
    border-radius: var(--radius);
}

.scanner-controls {
    display: flex;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.scanner-manual {
    background: var(--color-surface);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

/* Scan-Verlauf */
.scan-history {
    background: var(--color-surface);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.scan-history h3 {
    font-size: .9rem;
    margin-bottom: .75rem;
    color: var(--color-muted);
}

.scan-history__item {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--color-bg);
    font-size: .82rem;
    align-items: center;
}
.scan-history__item:last-child {
    border-bottom: none;
}
.scan-history__time {
    color: var(--color-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: .75rem;
}
.scan-history__code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}
.scan-history__item--success .scan-history__msg { color: var(--color-success); }
.scan-history__item--warning .scan-history__msg { color: var(--color-warning); }
.scan-history__item--error   .scan-history__msg { color: var(--color-danger); }

/* =================== CHECK-IN TABLE =================== */
.checkin-plus-row td {
    background: var(--color-bg);
    font-size: .88rem;
}

/* =================== RESPONSIVE SCANNER =================== */
@media (max-width: 600px) {
    .scanner-wrap {
        max-width: 100%;
    }
    .scan-result {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    .scanner-controls {
        flex-direction: column;
    }
    .scanner-controls .btn {
        width: 100%;
    }
}


/* =================== PAGINATION =================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}
