:root {
    /* Call4Us Brand Colors - Orange/Amber Theme */
    --primary: #e67e22;
    --primary-dark: #d35400;
    --primary-light: #f39c12;
    --secondary: #64748b;
    --info: #3498db;
    --background: #fdf8f3;
    --surface: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e8ddd4;
    --success: #27ae60;
    --danger: #e74c3c;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
    
    /* Invoice specific colors */
    --invoice-header: #4a3f6b;
    --invoice-header-light: #6b5b95;
    --invoice-accent: #e67e22;
    --invoice-row-alt: #faf7f4;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem 3rem;
}

/* Navbar */
.navbar {
    background: var(--surface);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.muted {
    color: var(--text-light);
    font-size: 0.875rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: var(--surface);
    color: var(--text);
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--primary-dark);
}

button.secondary {
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

button.secondary:hover {
    background-color: var(--background);
}

.primary-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th {
    background-color: #f1f5f9;
    color: var(--text);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; gap: 1rem; }
.items-end { align-items: flex-end; }
.mt-4 { margin-top: 1rem; }
.gap-sm { gap: 0.5rem; }

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    position: relative;
}

.loading-spinner::before,
.loading-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.loading-spinner::before {
    inset: 0;
    border: 4px solid var(--border);
}

.loading-spinner::after {
    inset: 0;
    border: 4px solid transparent;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
}

.loading-subtext {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Pulse animation for loader dots */
.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
    0%, 80%, 100% { 
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Dashboard Page */
.dashboard-page {
    background: linear-gradient(180deg, #fdf5ef 0%, #f6f8fb 45%, #f4f7fb 100%);
    min-height: 100vh;
    color: var(--text);
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 5vw;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.nav-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-weight: 500;
    cursor: pointer;
}

.nav-chip svg {
    color: inherit;
}

.nav-chip.active {
    background: #fff;
    box-shadow: 0 8px 18px -14px rgba(15, 23, 42, 0.4);
    color: var(--primary);
}

.logo-mark {
    background: var(--primary);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-weight: 600;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
}

.customer-switcher {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 180px;
}

.customer-switcher label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.customer-select {
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 0.35rem 1.5rem 0.35rem 0.75rem;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 1L5 5L1 1' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.customer-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.week-indicator {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.week-indicator.inline {
    justify-content: flex-start;
}

.week-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.2rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(14,165,233,0.15));
    color: var(--primary);
    font-weight: 600;
    min-width: 120px;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.15);
    min-height: 48px;
}

.week-chip::before {
    content: '📅';
}

.week-chip.subtle {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 0.9rem;
    min-height: auto;
}

.chip-button {
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    padding: 0.35rem 1.25rem;
    font-weight: 500;
}

.chip-button.ghost {
    background: transparent;
}

.ghost-button {
    border-radius: 999px;
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--primary);
    font-weight: 500;
    padding: 0.35rem 1.5rem;
}

.ghost-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ghost-button:not(:disabled):hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.avatar-chip {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.dashboard-shell {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem 5vw 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.icon-button {
    border: none;
    background: rgba(148, 163, 184, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    color: var(--text);
}

.icon-button.ghost {
    background: transparent;
}

.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.5rem;
}

.dashboard-columns.single {
    grid-template-columns: minmax(0, 1fr);
}

/* Invoice/PDF Specific Styles */
.invoice-view {
    display: none;
    background: #fff;
    padding: 0;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--invoice-header);
}

.invoice-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--invoice-header);
    margin-bottom: 0.5rem;
}

.invoice-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.15rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text);
}

.invoice-meta dt {
    font-weight: 500;
    color: var(--text-light);
}

.invoice-meta dd {
    font-weight: 500;
}

.invoice-logo {
    max-width: 140px;
    height: auto;
}

.invoice-logo img {
    width: 100%;
    height: auto;
    max-height: 50px;
    object-fit: contain;
}

/* Invoice Table Styling */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.7rem;
}

.invoice-table th {
    background: var(--invoice-header);
    color: #fff;
    font-weight: 600;
    padding: 0.4rem 0.3rem;
    text-align: center;
    border: 1px solid var(--invoice-header);
    font-size: 0.65rem;
}

.invoice-table th.group-gesprekken {
    background: var(--invoice-header-light);
}

.invoice-table th.group-totaal {
    background: var(--invoice-header);
}

.invoice-table th.group-gesprekstijd {
    background: var(--invoice-header-light);
}

.invoice-table th.group-kosten {
    background: var(--invoice-header);
}

.invoice-table th.totaal-header {
    background: var(--invoice-accent);
    color: #fff;
}

.invoice-table td {
    padding: 0.25rem 0.3rem;
    border: 1px solid #ddd;
    text-align: right;
    font-size: 0.65rem;
}

.invoice-table td:first-child,
.invoice-table td:nth-child(2) {
    text-align: left;
}

.invoice-table tbody tr:nth-child(even) {
    background: var(--invoice-row-alt);
}

.invoice-table tfoot td {
    font-weight: 700;
    background: #f5f5f5;
    border-top: 2px solid var(--invoice-header);
}

.invoice-footer {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.invoice-totals {
    display: flex;
    gap: 2rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.invoice-total-item {
    display: flex;
    gap: 0.5rem;
}

.invoice-total-label {
    font-weight: 500;
}

.invoice-total-value {
    font-weight: 700;
    color: var(--text);
}

@media print {
    @page {
        size: A4 landscape;
        margin: 6mm;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    body {
        background: #fff !important;
        font-size: 8pt;
    }

    .app-header,
    .form-card,
    .customer-switcher,
    .primary-button,
    .ghost-button,
    .stats-grid,
    .tab-nav,
    .section-header,
    .loading-overlay,
    #tabDoorbelasting {
        display: none !important;
    }

    .dashboard-shell {
        padding: 0 !important;
        margin: 0 !important;
    }

    .dashboard-page {
        background: #fff !important;
    }

    #results {
        display: block !important;
    }

    .results-section {
        gap: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    /* Show invoice view when printing */
    .invoice-view {
        display: block !important;
        padding: 0 !important;
    }

    #tabRapportage .card {
        display: none !important;
    }

    /* Compact invoice header for print */
    .invoice-header {
        margin-bottom: 0.4rem !important;
        padding-bottom: 0.3rem !important;
    }

    .invoice-title {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }

    .invoice-meta {
        font-size: 0.65rem !important;
        gap: 0.1rem 0.5rem !important;
    }

    .invoice-logo img {
        max-height: 40px !important;
    }

    /* Compact table for print */
    .invoice-table {
        margin-top: 0.25rem !important;
    }

    .invoice-table th {
        background: var(--invoice-header) !important;
        color: #fff !important;
        padding: 0.2rem 0.15rem !important;
        font-size: 0.55rem !important;
    }

    .invoice-table td {
        padding: 0.15rem 0.15rem !important;
        font-size: 0.55rem !important;
    }

    .invoice-table th.group-gesprekken {
        background: var(--invoice-header-light) !important;
    }

    .invoice-table th.totaal-header {
        background: var(--invoice-accent) !important;
    }

    .invoice-footer {
        margin-top: 0.5rem !important;
        font-size: 0.65rem !important;
    }
}

.form-card form {
    margin-top: 1rem;
}

.form-grid.three-col {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-grid.four-col {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mailroom-card .mailroom-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.mail-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
}

.entry-actions {
    display: flex;
    gap: 0.5rem;
}

.pill {
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

.pill.success {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.results-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stats-grid.extended {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: white;
}

.stat-card.highlight .muted {
    color: rgba(255, 255, 255, 0.8);
}

.stat-card.highlight .stat-value {
    color: white;
}

.stat-card small.muted {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Doorbelasting Table */
#doorbelastingTable {
    width: 100%;
}

#doorbelastingTable tfoot .totaal-row {
    background: var(--bg-subtle);
    border-top: 2px solid var(--border);
}

#doorbelastingTable tfoot .totaal-row td {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .dashboard-shell {
        padding: 1.5rem 3vw 3rem;
    }
    
    .form-grid.four-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        padding: 1rem 3vw;
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-chip {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 860px) {
    .app-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .app-brand {
        flex: 1;
        min-width: 160px;
    }
    
    .customer-switcher {
        order: 2;
        min-width: 140px;
    }
    
    .header-actions {
        order: 1;
    }
    
    .header-nav {
        order: 4;
        margin-top: 0.5rem;
    }
    
    .form-grid.four-col {
        grid-template-columns: 1fr 1fr;
    }
    
    .stats-grid.extended {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .app-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .app-brand {
        justify-content: center;
    }
    
    .customer-switcher {
        width: 100%;
        order: 2;
    }
    
    .header-actions {
        order: 3;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .header-nav {
        order: 4;
        justify-content: center;
    }

    .greeting-panel {
        flex-direction: column;
    }

    .greeting-meta {
        width: 100%;
    }
    
    .dashboard-shell {
        padding: 1rem 1rem 2rem;
    }
    
    .card {
        padding: 1rem;
        border-radius: 0.5rem;
    }
    
    .form-grid,
    .form-grid.three-col,
    .form-grid.four-col {
        grid-template-columns: 1fr;
    }
    
    .flex.mt-4 {
        flex-direction: column;
    }
    
    .flex.mt-4 button {
        width: 100%;
    }
    
    .stats-grid,
    .stats-grid.extended {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0;
    }
    
    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Table responsive */
    .table-container {
        margin: 0 -1rem;
        padding: 0 1rem;
        border-radius: 0;
    }
    
    table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.5rem 0.35rem;
    }
    
    .week-chip {
        min-width: auto;
        padding: 0.35rem 0.9rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .logo-mark {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .brand-title {
        font-size: 0.95rem;
    }
    
    .brand-subtitle {
        font-size: 0.75rem;
    }
    
    .chip-button {
        padding: 0.3rem 0.9rem;
        font-size: 0.85rem;
    }
    
    .avatar-chip {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    .muted {
        font-size: 0.8rem;
    }
    
    input, select {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Login Page Specific */
.login-page {
    min-height: 100vh;
    background: #f5f6fb;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    width: 100%;
}

.login-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 3fr;
    border-radius: 0;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 30px 80px -35px rgba(15, 23, 42, 0.5);
}

.login-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    min-height: 100%;
    height: 100%;
}

.login-hero-media {
    position: absolute;
    inset: 0;
}

.login-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.05) 0%, rgba(15,23,42,0.85) 100%);
}

.login-hero-copy {
    position: relative;
    padding: 2.5rem;
    z-index: 2;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.75rem;
}

.login-hero-copy h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero-body {
    font-size: 1rem;
    max-width: 18rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-credit {
    font-size: 0.9rem;
    opacity: 0.7;
}

.login-panel {
    padding: 4rem 6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

.login-header .login-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.login-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
}

.login-form button {
    width: 100%;
}

.login-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-light);
}

.toggle input {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: var(--border);
    position: relative;
    transition: background 0.2s;
}

.toggle-slider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform 0.2s;
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider::after {
    transform: translateX(18px);
}

.link-muted {
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
}

.link-muted:hover {
    text-decoration: underline;
}

.login-error {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.login-button {
    background: var(--primary);
    box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.65);
}

.login-button:hover {
    background: var(--primary-dark);
}

@media (max-width: 860px) {
    .login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .login-panel {
        padding: 2.5rem;
    }

    .login-hero {
        min-height: 280px;
        display: none;
    }
}

@media (max-width: 600px) {
    .login-panel {
        padding: 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.35rem;
    }
    
    .login-header img {
        height: 44px !important;
    }
}

/* JSON Editor */
.json-editor {
    font-family: monospace;
    min-height: 400px;
}

/* Admin specific */
.project-details {
    margin-top: 1.5rem;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.slot-card {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
}

.slot-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.slot-header h4 {
    margin-bottom: 0.25rem;
}

.slot-time {
    font-size: 0.85rem;
    color: var(--text-light);
}

.help-text {
    font-size: 0.825rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.staffel-table input {
    width: 100%;
}

button.danger {
    border-color: var(--danger);
    color: var(--danger);
    background-color: #fff;
}

button.danger:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Custom Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: #fff;
    border-radius: 1rem;
    padding: 0;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.2s;
    overflow: hidden;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.modal-content {
    padding: 2rem;
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
}

.modal-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.modal-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.modal-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.modal-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.modal-header {
    margin-bottom: 0.75rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.modal-body {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-button {
    padding: 0.65rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-button.primary {
    background: var(--text);
    color: #fff;
}

.modal-button.primary:hover {
    background: #1a1a1a;
}

.modal-button.secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

.modal-button.secondary:hover {
    background: var(--background);
}

.modal-button.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.modal-button.danger:hover {
    background: rgba(239, 68, 68, 0.15);
}
