/**
 * style.css - FTTH Terminmanagement- und Kampagnenplattform
 * Custom Design System, Component Styles and Utility Classes
 */

/* ==========================================================================
   CSS Custom Properties (Variables) & Themes
   ========================================================================== */
:root {
    /* Brand Colors & Accents */
    --color-brand-primary: #22D3EE;     /* Turquoise / Cyan */
    --color-brand-secondary: #3B82F6;   /* Royal Blue Accent */
    --color-hover: #06B6D4;             /* Darker turquoise */
    --color-telekom-magenta: #e20074;   /* Keep for customer simulator portal */
    
    /* General Interface Backgrounds (Dark Mode - Liquid Glass Edition) */
    --bg-app: #030509;                  /* Extreme dark base background */
    --bg-sidebar: rgba(255, 255, 255, 0.015); /* Translucent sidebar base */
    --bg-card: rgba(255, 255, 255, 0.02);     /* Glass cards base */
    --bg-card-hover: rgba(255, 255, 255, 0.04); /* Glass cards hover base */
    --bg-input: rgba(255, 255, 255, 0.015);   /* Inputs glass background */
    --bg-header: rgba(255, 255, 255, 0.01);    /* Translucent header base */
    
    /* Borders & Lines */
    --border-color: rgba(255, 255, 255, 0.06); /* Fine glass reflection edge */
    --border-color-hover: rgba(255, 255, 255, 0.12);
    
    /* Typography Colors (Ensuring maximum contrast & readability) */
    --text-primary: #F8FAFC;            /* Clean light grey */
    --text-secondary: #CBD5E1;          /* High contrast secondary */
    --text-muted: #94A3B8;              /* Soft muted grey */
    
    /* Status Colors */
    --color-status-imported: #94A3B8;
    --color-status-mailed: #22D3EE;
    --color-status-booked: #10B981;
    --color-status-cancelled: #EF4444;
    --color-status-done: #10B981;
    
    --color-capacity-green: rgba(16, 185, 129, 0.08);
    --color-capacity-yellow: rgba(245, 158, 11, 0.08);
    --color-capacity-red: rgba(239, 68, 68, 0.08);
    
    --text-capacity-green: #10B981;
    --text-capacity-yellow: #F59E0B;
    --text-capacity-red: #EF4444;

    /* Fonts & Radii (Apple macOS Tahoe spacing) */
    --font-sans: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    
    /* Layer-based Ambient Occlusion (Apple Shadow Stack) */
    --shadow-ambient-sidebar: 2px 0 24px rgba(0, 0, 0, 0.4), inset -1px 0 0 rgba(255, 255, 255, 0.02);
    --shadow-ambient-header: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --shadow-ambient-card: 0 12px 36px -4px rgba(0, 0, 0, 0.3), 
                           0 4px 12px -2px rgba(0, 0, 0, 0.25), 
                           inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --shadow-ambient-card-hover: 0 24px 50px -6px rgba(0, 0, 0, 0.45), 
                                 0 8px 24px -4px rgba(0, 0, 0, 0.35), 
                                 inset 0 1px 0 rgba(255, 255, 255, 0.15);
    --shadow-ambient-dialog: 0 32px 72px -12px rgba(0, 0, 0, 0.6), 
                             0 12px 36px -4px rgba(0, 0, 0, 0.4), 
                             inset 0 1px 0 rgba(255, 255, 255, 0.12);
    
    /* Layout Sizes */
    --sidebar-width: 280px;
    --header-height: 76px;
    
    /* Physical Noise Texture overlay */
    --noise-overlay: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.015'/%3E%3C/svg%3E");
}

/* Light Theme Variables (Liquid Glass Light) */
body.light-theme {
    --bg-app: #F1F5F9;
    --bg-sidebar: rgba(255, 255, 255, 0.55);
    --bg-card: rgba(255, 255, 255, 0.65);
    --bg-card-hover: rgba(255, 255, 255, 0.85);
    --bg-input: rgba(0, 0, 0, 0.02);
    --bg-header: rgba(255, 255, 255, 0.55);
    
    --border-color: rgba(15, 23, 42, 0.05);
    --border-color-hover: rgba(15, 23, 42, 0.1);
    
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    
    --color-capacity-green: rgba(16, 185, 129, 0.06);
    --color-capacity-yellow: rgba(245, 158, 11, 0.06);
    --color-capacity-red: rgba(239, 68, 68, 0.06);
    
    --shadow-ambient-sidebar: 2px 0 16px rgba(0, 0, 0, 0.03), inset -1px 0 0 rgba(15, 23, 42, 0.04);
    --shadow-ambient-header: 0 4px 16px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    --shadow-ambient-card: 0 8px 24px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --shadow-ambient-card-hover: 0 16px 36px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    --shadow-ambient-dialog: 0 24px 48px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   Base Elements reset & Typography
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: 
        radial-gradient(circle at 5% 45%, rgba(14, 116, 144, 0.16) 0%, transparent 60%),     /* Petrol left */
        radial-gradient(circle at 50% 5%, rgba(34, 211, 238, 0.16) 0%, transparent 60%),     /* Cyan top */
        radial-gradient(circle at 95% 45%, rgba(67, 56, 202, 0.16) 0%, transparent 65%),     /* Indigo right */
        radial-gradient(circle at 50% 95%, rgba(190, 24, 93, 0.1) 0%, transparent 60%),      /* Magenta bottom */
        #020407;                                                                             /* Fast schwarz base */
    background-attachment: fixed;
    color: var(--text-primary);
    overflow: hidden;
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100vh;
}

body.light-theme {
    background: 
        radial-gradient(circle at 5% 45%, rgba(14, 116, 144, 0.05) 0%, transparent 60%),
        radial-gradient(circle at 50% 5%, rgba(34, 211, 238, 0.05) 0%, transparent 60%),
        radial-gradient(circle at 95% 45%, rgba(67, 56, 202, 0.05) 0%, transparent 65%),
        radial-gradient(circle at 50% 95%, rgba(190, 24, 93, 0.03) 0%, transparent 60%),
        var(--bg-app);
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
}

/* ==========================================================================
   Layout Architecture
   ========================================================================== */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    background-image: var(--noise-overlay), 
                      radial-gradient(circle at 100% 10%, rgba(34, 211, 238, 0.03) 0%, transparent 60%),
                      radial-gradient(circle at 0% 90%, rgba(124, 58, 237, 0.03) 0%, transparent 60%);
    backdrop-filter: blur(45px) saturate(220%);
    -webkit-backdrop-filter: blur(45px) saturate(220%);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    border-right: none;
    box-shadow: var(--shadow-ambient-sidebar);
    flex-shrink: 0;
    z-index: 100;
    position: relative;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: -20px;
    width: 20px;
    height: 100%;
    background: linear-gradient(to right, rgba(3, 5, 9, 0.45) 0%, rgba(3, 5, 9, 0) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: -10px 0 20px -10px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    z-index: 101;
}

body.light-theme .sidebar::after {
    background: linear-gradient(to right, rgba(241, 245, 249, 0.45) 0%, rgba(241, 245, 249, 0) 100%);
    box-shadow: -10px 0 20px -10px rgba(0, 0, 0, 0.08);
}

.sidebar-header {
    padding: 34px 28px 20px 28px;
}

.sidebar-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.8px;
    display: flex;
    align-items: center;
}

.sidebar-subtitle {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--color-brand-primary);
    margin-top: 8px;
    font-weight: 700;
    opacity: 0.9;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
}

.sidebar-nav .nav-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--text-muted);
    padding: 24px 20px 10px 20px;
    font-weight: 700;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 12px;
    position: relative;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-nav a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

.sidebar-nav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.14), 
                inset 0 1px 0 rgba(255, 255, 255, 0.15),
                inset 0 0 0 1px rgba(34, 211, 238, 0.06);
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 25%;
    height: 50%;
    width: 3px;
    border-radius: 4px;
    background-color: var(--color-brand-primary);
    box-shadow: 0 0 14px var(--color-brand-primary);
    animation: sidebarPulse 2s infinite ease-in-out;
}

@keyframes sidebarPulse {
    0%, 100% { opacity: 0.8; box-shadow: 0 0 8px var(--color-brand-primary); }
    50% { opacity: 1; box-shadow: 0 0 18px var(--color-brand-primary); }
}

.nav-icon {
    margin-right: 12px;
    font-size: 15px;
    width: 20px;
    text-align: center;
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.2s ease;
}

.sidebar-nav a:hover .nav-icon {
    filter: grayscale(100%) opacity(0.9);
}

.sidebar-nav a.active .nav-icon {
    filter: none;
    opacity: 1;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}

.sim-badge {
    margin-left: auto;
    font-size: 9px;
    background-color: var(--color-telekom-magenta);
    color: white;
    padding: 2px 6px;
    border-radius: 20px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: transparent;
}

.app-header {
    height: 64px;
    background-color: var(--bg-header);
    background-image: var(--noise-overlay),
                      radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.03) 0%, transparent 60%),
                      radial-gradient(circle at 90% 90%, rgba(99, 102, 241, 0.03) 0%, transparent 60%);
    backdrop-filter: blur(35px) saturate(190%);
    -webkit-backdrop-filter: blur(35px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    margin: 24px 32px 0 32px;
    box-shadow: var(--shadow-ambient-header);
    flex-shrink: 0;
    z-index: 90;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-title-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.role-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 20px;
}

.role-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.select-role {
    font-weight: 600;
    border-color: var(--color-brand-secondary) !important;
}

.header-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-btn:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: scale(1.05);
}

.relative {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    border: 2px solid var(--bg-card);
}

.app-content {
    flex: 1;
    padding: 32px 48px 48px 48px;
    overflow-y: auto;
    background: transparent;
}

/* ==========================================================================
   UI Components (Buttons, Badges, Inputs)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 13px;
    border-radius: 99px; /* Liquid Capsule Pill */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    cursor: pointer;
    height: 40px; /* Thicker pill */
    white-space: nowrap;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-bottom: 1px solid rgba(0, 0, 0, 0.45);
    color: #93c5fd;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(37, 99, 235, 0.18) 100%);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.03);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.35);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1.5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.12);
    background-image: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(239, 68, 68, 0.04) 100%);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(0, 0, 0, 0.35);
    color: #fca5a5;
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11.5px;
    height: 30px;
    border-radius: 8px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 10.5px;
    height: 24px;
    border-radius: 6px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-brand-primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 12px;
    transition: color 0.15s ease;
}

.btn-text:hover {
    color: var(--color-hover);
    text-decoration: none;
}

.badge {
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.15) !important;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.15) !important;
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.08) !important;
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.15) !important;
}

.badge-info {
    background-color: rgba(34, 211, 238, 0.08) !important;
    color: #22d3ee !important;
    border-color: rgba(34, 211, 238, 0.15) !important;
}

.badge-slate {
    background-color: rgba(148, 163, 184, 0.08) !important;
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.15) !important;
}

.subcontractor-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff !important;
    background-color: rgba(20, 24, 33, 0.85);
    border: 1px solid var(--subcon-color-border, rgba(255, 255, 255, 0.12));
    position: relative;
    overflow: hidden;
    gap: 8px;
    box-shadow: 0 0 6px var(--subcon-color-glow, rgba(0, 0, 0, 0.2));
    transition: all 0.2s ease;
    vertical-align: middle;
}

.subcontractor-badge::before {
    content: '';
    display: block;
    width: 4px;
    height: 100%;
    background-color: var(--subcon-color, #3b82f6);
    position: absolute;
    left: 0;
    top: 0;
}

.select, .input, .textarea {
    width: 100%;
    padding: 8px 14px;
    background-color: rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    height: 38px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: border-color 300ms cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 300ms cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 300ms cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

.select:focus, .input:focus, .textarea:focus {
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: rgba(0, 0, 0, 0.45);
    background-color: rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.select-sm, .input-sm {
    padding: 6px 10px;
    font-size: 12px;
    height: 32px;
}

.textarea {
    height: auto;
    min-height: 80px;
}

/* Checkboxes (Apple styling) */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    background-color: var(--bg-input);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.15s ease;
}

input[type="checkbox"]:checked {
    background-color: var(--color-brand-primary);
    border-color: var(--color-brand-primary);
}

input[type="checkbox"]:checked::after {
    content: "✓";
    font-size: 10px;
    color: #070B14;
    font-weight: 900;
}

input[type="checkbox"]:focus {
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.15);
}

/* Form Groups */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* ==========================================================================
   Table & Grid utilities
   ========================================================================== */
.card {
    background-color: var(--bg-card);
    background-image: var(--noise-overlay), 
                      radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.04) 0%, transparent 60%),
                      radial-gradient(circle at 100% 100%, rgba(99, 102, 241, 0.04) 0%, transparent 60%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-ambient-card);
    padding: 38px;
    margin-bottom: 32px;
    backdrop-filter: blur(40px) saturate(210%);
    -webkit-backdrop-filter: blur(40px) saturate(210%);
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 400ms cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 400ms cubic-bezier(0.16, 1, 0.3, 1),
                background-color 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.25);
    background-color: var(--bg-card-hover);
    background-image: var(--noise-overlay), 
                      radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.06) 0%, transparent 60%),
                      radial-gradient(circle at 100% 100%, rgba(99, 102, 241, 0.06) 0%, transparent 60%);
    box-shadow: var(--shadow-ambient-card-hover);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

.table-responsive {
    width: 100%;
    overflow: visible;
    position: relative;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    font-size: 13px;
}

.table th {
    padding: 12px 24px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-primary);
    background: rgba(18, 27, 45, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 20;
}

body.light-theme .table th {
    background: rgba(241, 245, 249, 0.9);
}

.table td {
    padding: 18px 24px;
    text-align: left;
    background-color: rgba(255, 255, 255, 0.015);
    background-image: var(--noise-overlay);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    border-left: none;
    border-right: none;
    transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.table td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table td:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.table tbody tr {
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.table tbody tr:hover {
    transform: translateY(-4px);
}

.table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.035);
    border-top-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Compact & modern table styles for campaigns table (Sprint 2.2) */
#campaigns-table td {
    padding: 8px 12px;
    font-size: 12px;
}
#campaigns-table th {
    padding: 8px 12px;
    font-size: 11px;
}
#campaigns-table .filter-row th {
    padding: 4px 6px;
}
.table-td-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* ==========================================================================
   Dashboard Widgets
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.stat-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

/* SVG Chart details */
.chart-container {
    height: 250px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg-chart {
    width: 100%;
    height: 100%;
}

.svg-bar {
    transition: fill 0.3s ease;
}

.svg-bar:hover {
    filter: brightness(1.2);
}

.chart-tooltip {
    position: absolute;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Modern Scrollbars global styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.16);
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
}
body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.16);
}

/* ==========================================================================
   Campaign Panel (Upload / Imports)
   ========================================================================== */
.campaign-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.campaign-search-filters {
    display: flex;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 320px;
}

.import-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.01);
    transition: all 0.2s ease;
    margin-bottom: 24px;
    position: relative;
}

.import-dropzone:hover, .import-dropzone.drag-active, .import-dropzone.dragover {
    border-color: var(--color-brand-secondary);
    background-color: rgba(0, 240, 255, 0.02);
}

.import-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.import-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

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

.file-input-hidden {
    display: none;
}

/* ==========================================================================
   Interactive Calendar
   ========================================================================== */
.calendar-view {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 170px);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.calendar-title-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-controls .btn.active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.25) 0%, rgba(34, 211, 238, 0.08) 100%) !important;
    color: #22d3ee !important;
    border-color: rgba(34, 211, 238, 0.45) !important;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.15);
}

.calendar-legend {
    background: rgba(255, 255, 255, 0.015) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 12px 18px !important;
    margin-bottom: 24px !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.calendar-grid-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding-bottom: 12px;
}

.calendar-grid-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 140px;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
}

.calendar-day-cell {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 300ms cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 300ms cubic-bezier(0.16, 1, 0.3, 1),
                background-color 300ms cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    height: 140px;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.calendar-day-cell:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 
                inset 0 1px 0 rgba(255, 255, 255, 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.calendar-day-cell.today {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.15), 
                0 4px 12px rgba(0, 0, 0, 0.15), 
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.calendar-day-cell.today .day-number {
    color: var(--color-brand-primary);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
}

.calendar-day-cell.other-month {
    opacity: 0.25;
}

.calendar-day-cell.weekend {
    background: rgba(255, 255, 255, 0.005);
}

.day-number-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.day-number {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.capacity-indicator {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.capacity-indicator-compact {
    font-size: 10px !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
}

.capacity-indicator.green {
    background-color: rgba(16, 185, 129, 0.08);
    color: var(--text-capacity-green);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.capacity-indicator.yellow {
    background-color: rgba(245, 158, 11, 0.08);
    color: var(--text-capacity-yellow);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.capacity-indicator.red {
    background-color: rgba(239, 68, 68, 0.08);
    color: var(--text-capacity-red);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.calendar-appointments-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    overflow-y: auto;
}

.calendar-apt-item {
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 250ms ease, 
                border-color 250ms ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.calendar-apt-item:hover {
    transform: scale(1.03) translateY(-1px);
    filter: brightness(1.15);
}

.calendar-apt-item.booked {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    border-left: 4px solid #10b981 !important;
}

.calendar-apt-item.blocked {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: var(--text-secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: 4px solid rgba(255, 255, 255, 0.25) !important;
}

/* ==========================================================================
   Email Template Editor
   ========================================================================== */
.template-editor-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .template-editor-layout {
        grid-template-columns: 1fr;
    }
}

.placeholder-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.placeholder-chip {
    font-size: 11px;
    background-color: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

.placeholder-chip:hover {
    border-color: var(--color-brand-secondary);
}

.preview-pane {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    min-height: 250px;
    overflow-y: auto;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--text-primary);
}

.preview-subject {
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 14px;
}

/* ==========================================================================
   Customer Portal Inbox Simulator & Booking Wizard
   ========================================================================== */
.inbox-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    height: calc(100vh - 180px);
}

@media (max-width: 768px) {
    .inbox-layout {
        grid-template-columns: 1fr;
    }
}

.inbox-list {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    overflow-y: auto;
}

.inbox-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.inbox-item:hover, .inbox-item.active {
    background-color: rgba(255, 255, 255, 0.03);
}

.inbox-item.active {
    border-left: 3px solid var(--color-brand-secondary);
}

.inbox-item-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.inbox-sender {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
}

.inbox-subject {
    font-weight: 600;
    font-size: 12px;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-empty {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.inbox-preview {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inbox-preview-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.inbox-preview-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.inbox-preview-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.6;
}

.inbox-link {
    display: inline-block;
    background-color: var(--color-telekom-magenta);
    color: white;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    margin-top: 15px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(226, 0, 116, 0.2);
    transition: all 0.2s ease;
}

.inbox-link:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* CUSTOMER PORTAL WIZARD (STUNNING VERTICAL PHONE MOCK / SECURE VIEW) */
.portal-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.portal-header {
    background: linear-gradient(135deg, #121B2F, #070C15);
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.portal-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.telekom-logo-sim {
    color: var(--color-telekom-magenta);
    font-weight: 900;
    font-size: 24px;
    letter-spacing: 1px;
}

.lg-partner-logo {
    font-size: 11px;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.portal-title {
    font-size: 20px;
    font-weight: 800;
    color: white;
}

.portal-body {
    padding: 30px;
}

.portal-alert {
    background-color: rgba(245, 158, 11, 0.08);
    border-left: 4px solid var(--text-capacity-yellow);
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 24px;
    color: #eab308;
}

.portal-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.portal-dates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}

.portal-date-btn {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portal-date-btn:hover:not(:disabled) {
    border-color: var(--color-brand-secondary);
    background-color: var(--bg-card-hover);
}

.portal-date-btn.active {
    background-color: rgba(0, 240, 255, 0.1);
    border-color: var(--color-brand-secondary);
    color: white;
    font-weight: 700;
}

.portal-date-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.date-day-name {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.date-day-num {
    font-size: 16px;
    font-weight: 700;
    margin: 2px 0;
}

.date-month-name {
    font-size: 10px;
}

/* Access radios styling */
.access-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.access-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

.access-radio-label:hover {
    border-color: var(--border-color-hover);
}

.access-radio-label input[type="radio"] {
    accent-color: var(--color-brand-secondary);
}

/* ==========================================================================
   Notification Panel & Toast Styles
   ========================================================================== */
.dropdown-panel {
    position: absolute;
    top: 48px;
    right: 0;
    width: 360px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: none;
    overflow: hidden;
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    z-index: 200;
}

.dropdown-panel.active {
    display: block;
    animation: slideDown 0.15s ease-out;
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header h3 {
    font-size: 14px;
    font-weight: 700;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.notification-item.unread {
    background-color: rgba(0, 240, 255, 0.03);
}

.notif-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-body {
    flex: 1;
}

.notif-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 3px;
}

.notif-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notif-time {
    font-size: 10px;
    color: var(--text-muted);
}

.notif-mark-read {
    background: none;
    border: none;
    color: var(--color-brand-secondary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    align-self: center;
}

.notification-empty {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* Toast styling */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: calc(100vw - 40px);
}

.toast {
    background-color: #1e293b; /* Solid background to prevent see-through clipping */
    background-image: var(--noise-overlay);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 16px;
    display: flex;
    gap: 12px;
    animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    z-index: 999999 !important;
}

body.light-theme .toast {
    background-color: #ffffff; /* Solid white background in light theme */
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
}

.toast-success::before { background-color: var(--color-status-done); }
.toast-warning::before { background-color: var(--text-capacity-yellow); }
.toast-error::before { background-color: var(--color-status-cancelled); }
.toast-info::before { background-color: var(--color-status-mailed); }

.toast-icon { font-size: 18px; }
.toast-content { flex: 1; }
.toast-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.toast-message { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; line-height: 1; }
.toast-close:hover { color: var(--text-primary); }

.toast-fadeout {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ==========================================================================
   Modals & Details Overlay
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light theme modal and portal calendar consistency overrides */
body.light-theme .modal-overlay {
    background-color: rgba(15, 23, 42, 0.25);
}

body.light-theme .modal-content {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
}

body.light-theme .portal-date-btn {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

body.light-theme .portal-date-btn:hover:not(:disabled) {
    background-color: #e2e8f0;
    border-color: var(--color-brand-primary);
}

body.light-theme .portal-date-btn.active {
    background-color: rgba(34, 211, 238, 0.15);
    border-color: var(--color-brand-primary);
    color: #0f172a;
    font-weight: 700;
}

/* Campaign row clickable styles */
.campaign-row {
    cursor: pointer;
    transition: background-color 150ms ease;
}

.campaign-row:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

body.light-theme .campaign-row:hover {
    background-color: rgba(15, 23, 42, 0.025) !important;
}

.modal-header {
    padding: 28px 32px 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 12px 32px 24px 32px;
}

.modal-footer {
    padding: 16px 32px 28px 32px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   Role Management Visibility Utilities
   ========================================================================== */
.role-disabled {
    pointer-events: none !important;
    opacity: 0.4 !important;
    position: relative;
    cursor: not-allowed !important;
}

.role-disabled-hint {
    border: 1px dashed var(--color-status-cancelled) !important;
    position: relative;
}

.role-disabled-hint::after {
    content: 'Keine Bearbeitungsrechte (Rolle wechseln)';
    position: absolute;
    top: -12px;
    right: 10px;
    font-size: 9px;
    background-color: var(--color-status-cancelled);
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: bold;
    pointer-events: none;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Responsiveness
   ========================================================================== */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 10px;
    }
    
    .sidebar-nav .nav-label {
        display: none;
    }
    
    .sidebar-nav a {
        margin-bottom: 0;
        margin-right: 8px;
        white-space: nowrap;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .main-wrapper {
        height: calc(100vh - 120px);
    }
    
    .app-header {
        padding: 0 15px;
    }
    
    .app-content {
        padding: 15px;
    }
}

/* ==========================================================================
   Action Dropdown Menu
   ========================================================================== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.dropdown-menu, .dropdown-actions-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: rgba(18, 27, 45, 0.95);
    background-image: var(--noise-overlay);
    backdrop-filter: blur(50px) saturate(240%);
    -webkit-backdrop-filter: blur(50px) saturate(240%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.45);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 1050;
    min-width: 190px;
    padding: 6px 0;
    margin-top: 8px;
    box-sizing: border-box;
    animation: scaleIn 0.15s ease-out;
}

body.light-theme .dropdown-menu, body.light-theme .dropdown-actions-content {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.dropdown-menu.show, .dropdown-actions-content.active {
    display: block !important;
}

.dropdown-item, .dropdown-actions-content a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 8px;
}

.dropdown-item:hover, .dropdown-actions-content a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

body.light-theme .dropdown-item:hover, body.light-theme .dropdown-actions-content a:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
}

.dropdown-item:active, .dropdown-actions-content a:active {
    background-color: rgba(255, 255, 255, 0.08);
}

.tabs-container {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 28px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tab-btn {
    padding: 8px 16px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 13px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    font-weight: 500;
}

.detail-tab-btn {
    padding: 8px 12px !important;
    font-size: 12px !important;
    border-bottom-width: 2px !important;
}

.role-list-item:hover {
    border-color: var(--border-color-hover) !important;
    background-color: rgba(255, 255, 255, 0.01) !important;
}

.role-list-item.active {
    border-color: var(--color-brand-primary) !important;
    background-color: rgba(34, 211, 238, 0.05) !important;
}

/* ==========================================================================
   Collapsed Sidebar Rules
   ========================================================================== */
.sidebar.collapsed {
    width: 68px !important;
}

.sidebar.collapsed .sidebar-header {
    padding: 16px 8px;
    text-align: center;
}

.sidebar.collapsed .sidebar-logo {
    justify-content: center;
}

.sidebar.collapsed .logo-accent {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-subtitle {
    display: none !important;
}

.sidebar.collapsed .sidebar-logo .logo-text {
    display: none !important;
}

.sidebar.collapsed .nav-label {
    display: none !important;
}

.sidebar.collapsed .nav-text {
    display: none !important;
}

.sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 12px;
    margin: 4px 8px;
}

.sidebar.collapsed .sidebar-nav a .nav-icon {
    margin-right: 0;
    font-size: 20px;
}

.sidebar.collapsed .sidebar-footer {
    padding: 12px 8px;
}

.sidebar.collapsed #reset-data-btn {
    font-size: 0 !important;
    padding: 8px !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar.collapsed #reset-data-btn::after {
    content: "🔄" !important;
    font-size: 16px !important;
}

/* ==========================================================================
   Sprint D.2 Premium Dashboard Redesign Classes
   ========================================================================== */
.premium-dashboard {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-bottom: 48px;
}

/* Modern Filter Panel */
.premium-filter-bar {
    background: rgba(18, 27, 47, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 20px 32px;
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Hero Metrics */
.premium-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.premium-kpi-card {
    background-color: var(--bg-card);
    background-image: var(--noise-overlay);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-lg);
    padding: 34px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(40px) saturate(210%);
    -webkit-backdrop-filter: blur(40px) saturate(210%);
    box-shadow: var(--shadow-ambient-card);
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 400ms cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 400ms cubic-bezier(0.16, 1, 0.3, 1),
                background-color 400ms cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 168px;
}

/* Colorful light reflections for widgets */
.premium-kpi-card.kpi-violet {
    background-image: var(--noise-overlay), 
                      linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(99, 102, 241, 0.02) 100%),
                      radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
    border-color: rgba(139, 92, 246, 0.15);
    border-top-color: rgba(139, 92, 246, 0.3);
}
.premium-kpi-card.kpi-blue {
    background-image: var(--noise-overlay), 
                      linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.02) 100%),
                      radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
    border-color: rgba(59, 130, 246, 0.15);
    border-top-color: rgba(59, 130, 246, 0.3);
}
.premium-kpi-card.kpi-emerald {
    background-image: var(--noise-overlay), 
                      linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.02) 100%),
                      radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
    border-color: rgba(16, 185, 129, 0.15);
    border-top-color: rgba(16, 185, 129, 0.3);
}
.premium-kpi-card.kpi-pink {
    background-image: var(--noise-overlay), 
                      linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, rgba(219, 39, 119, 0.02) 100%),
                      radial-gradient(circle at 0% 0%, rgba(236, 72, 153, 0.08) 0%, transparent 60%);
    border-color: rgba(236, 72, 153, 0.15);
    border-top-color: rgba(236, 72, 153, 0.3);
}

.premium-kpi-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-ambient-card-hover);
}

.premium-kpi-card.kpi-violet:hover { 
    border-color: rgba(139, 92, 246, 0.25); 
    border-top-color: rgba(139, 92, 246, 0.45); 
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: 0 16px 40px rgba(139, 92, 246, 0.1), var(--shadow-ambient-card-hover);
}
.premium-kpi-card.kpi-blue:hover { 
    border-color: rgba(59, 130, 246, 0.25); 
    border-top-color: rgba(59, 130, 246, 0.45); 
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: 0 16px 40px rgba(59, 130, 246, 0.1), var(--shadow-ambient-card-hover);
}
.premium-kpi-card.kpi-emerald:hover { 
    border-color: rgba(16, 185, 129, 0.25); 
    border-top-color: rgba(16, 185, 129, 0.45); 
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: 0 16px 40px rgba(16, 185, 129, 0.1), var(--shadow-ambient-card-hover);
}
.premium-kpi-card.kpi-pink:hover { 
    border-color: rgba(236, 72, 153, 0.25); 
    border-top-color: rgba(236, 72, 153, 0.45); 
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: 0 16px 40px rgba(236, 72, 153, 0.08), var(--shadow-ambient-card-hover);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.kpi-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.25s ease;
}

.premium-kpi-card:hover .kpi-icon-box {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.kpi-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.1px;
}

.kpi-value {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -1.2px;
}

.kpi-desc {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Sub KPI Bar Row */
/* Sub KPI Bar Row */
.sub-kpi-bar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    background: transparent;
    border: none;
    padding: 0;
}

.sub-kpi-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 20px;
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 250ms ease-in-out, 
                box-shadow 250ms ease-in-out;
}

.sub-kpi-item:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sub-kpi-item.sub-kpi-turquoise {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(34, 211, 238, 0.02) 100%);
    border-color: rgba(34, 211, 238, 0.15);
}
.sub-kpi-item.sub-kpi-turquoise:hover {
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 12px 36px rgba(34, 211, 238, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sub-kpi-item.sub-kpi-amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.02) 100%);
    border-color: rgba(245, 158, 11, 0.15);
}
.sub-kpi-item.sub-kpi-amber:hover {
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 12px 36px rgba(245, 158, 11, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sub-kpi-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 500;
}

.sub-kpi-value {
    font-size: 20px;
    font-weight: 600;
}

.sub-kpi-desc {
    font-size: 10px;
    color: var(--text-muted);
}

/* Dashboard Split Workspace Layout */
.dashboard-grid-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 32px;
}

.dashboard-main-pane {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.dashboard-side-pane {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Auftraggeber Auswertung Component */
.progress-ring-card-body {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 32px;
    align-items: center;
}

.progress-ring-container {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.progress-ring-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-ring-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.progress-ring-label {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Mini Progress rows in evaluation */
.evaluation-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.evaluation-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.evaluation-row-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.evaluation-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    overflow: hidden;
}

.evaluation-progress-fill {
    height: 100%;
    border-radius: 3px;
}

/* Apple Storage Layout for ATS Areas */
.ats-storage-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ats-storage-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ats-storage-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ats-storage-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
}

.ats-storage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ats-storage-pct {
    font-size: 12.5px;
    font-weight: 600;
}

.ats-storage-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.ats-storage-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.ats-storage-footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

/* Employee custom cards list */
.employee-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.employee-row-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.employee-row-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.employee-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.employee-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.employee-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.employee-name {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
}

.employee-sub-stats {
    font-size: 11px;
    color: var(--text-muted);
}

.employee-success-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

/* Wiedervorlagen list-based items */
.wv-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wv-card-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wv-card-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.wv-card-item.overdue {
    border-left: 3px solid #ef4444;
}

.wv-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wv-card-date {
    font-size: 11.5px;
    font-weight: 600;
}

.wv-card-body {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Charts Grid */
.premium-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.premium-chart-card {
    background-color: var(--bg-card);
    background-image: var(--noise-overlay), 
                      radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.04) 0%, transparent 60%),
                      radial-gradient(circle at 100% 100%, rgba(99, 102, 241, 0.04) 0%, transparent 60%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-lg);
    padding: 38px;
    backdrop-filter: blur(40px) saturate(210%);
    -webkit-backdrop-filter: blur(40px) saturate(210%);
    box-shadow: var(--shadow-ambient-card);
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 400ms cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 400ms cubic-bezier(0.16, 1, 0.3, 1),
                background-color 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-chart-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.25);
    background-color: var(--bg-card-hover);
    background-image: var(--noise-overlay), 
                      radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.06) 0%, transparent 60%),
                      radial-gradient(circle at 100% 100%, rgba(99, 102, 241, 0.06) 0%, transparent 60%);
    box-shadow: var(--shadow-ambient-card-hover);
}

.chart-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.chart-title-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-desc-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.chart-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.chart-action-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Page Transitions & VisionOS Microdetails
   ========================================================================== */
@keyframes viewSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.995);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.app-content > * {
    animation: viewSlideUp 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Pulse animation for active appointments and indicators */
.calendar-apt-item.booked {
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.calendar-apt-item.booked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transform: translateX(-100%);
    animation: shine 3s infinite ease-in-out;
}

@keyframes shine {
    100% {
        transform: translateX(100%);
    }
}

/* Glass dropdown polish */
.dropdown-panel {
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.5), 
                inset 0 1px 0 rgba(255, 255, 255, 0.08),
                inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    background: rgba(20, 27, 45, 0.85) !important;
    backdrop-filter: blur(35px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(200%) !important;
    border-radius: var(--radius-md) !important;
}

/* Notification item animations */
.notification-item {
    transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.notification-item:hover {
    transform: translateX(2px);
    background-color: rgba(255, 255, 255, 0.03);
}

/* Toast high-end material look */
.toast {
    background: rgba(18, 27, 45, 0.85) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
    border-radius: 16px !important;
}

/* Quick Hover Card (Layer 5 Material) */
.quick-hover-card {
    position: fixed;
    width: 290px;
    background: rgba(18, 27, 45, 0.96);
    background-image: var(--noise-overlay);
    backdrop-filter: blur(50px) saturate(240%);
    -webkit-backdrop-filter: blur(50px) saturate(240%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.45);
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 16px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: var(--font-sans);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 200ms cubic-bezier(0.16, 1, 0.3, 1), transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 100000;
}
.quick-hover-card.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
.quick-hover-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
    color: var(--color-brand-primary);
}
.quick-hover-card .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}
.quick-hover-card .info-label {
    color: var(--text-muted);
}
.quick-hover-card .info-value {
    font-weight: 600;
    text-align: right;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Floating popovers (Layer 5 Material) */
.col-filter-popover {
    position: absolute;
    width: 250px;
    background: rgba(18, 27, 45, 0.98);
    background-image: var(--noise-overlay);
    backdrop-filter: blur(50px) saturate(240%);
    -webkit-backdrop-filter: blur(50px) saturate(240%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.45);
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 14px;
    z-index: 1070;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: scaleIn 0.15s ease-out;
}
.col-filter-popover.hidden {
    display: none !important;
}

/* Light Theme overrides for hover card and popovers */
body.light-theme .quick-hover-card,
body.light-theme .col-filter-popover {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(15, 23, 42, 0.08);
    color: var(--text-primary);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Duplicate Indicator Pill */
.duplicate-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.1px;
    transition: all 0.2s;
    user-select: none;
    margin-top: 2px;
}
.duplicate-indicator.high {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.duplicate-indicator.medium {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.duplicate-indicator.low {
    background-color: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.duplicate-indicator:hover {
    transform: scale(1.05);
    filter: brightness(1.15);
}

/* Duplicate Indicator Types */
.duplicate-indicator.household {
    background-color: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.3);
}
.duplicate-indicator.company {
    background-color: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.duplicate-indicator.duplicate {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Priority Badges */
.prio-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    user-select: none;
}
.prio-badge.prio-1 {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.prio-badge.prio-2 {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.prio-badge.prio-3 {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}
.prio-badge.prio-empty {
    background-color: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Resizable columns styling */
th.resizable-col {
    position: relative;
}
.col-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 30;
}
.col-resizer:hover, .col-resizer.resizing {
    background: rgba(34, 211, 238, 0.6);
}

/* Permanent Filter Row in Headers */
.filter-row th {
    padding: 6px 12px !important;
    background: rgba(15, 23, 42, 0.8) !important;
    border-bottom: 2px solid var(--border-color) !important;
}
.filter-row .input, .filter-row .select {
    width: 100%;
    height: 28px;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}
.filter-row .input:focus, .filter-row .select:focus {
    border-color: var(--color-brand-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Keyboard cell focus styling */
.table td:focus {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: -2px;
}

/* Global macOS Tahoe Dropdown Portal Menu */
.global-dropdown-portal {
    position: fixed;
    z-index: 999999 !important;
    background: rgba(18, 27, 45, 0.95);
    backdrop-filter: blur(50px) saturate(240%);
    -webkit-backdrop-filter: blur(50px) saturate(240%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.45);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    min-width: 190px;
    width: max-content;
    max-width: 320px;
    padding: 6px;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    gap: 2px;
    animation: scaleIn 0.12s ease-out;
}
.global-dropdown-portal.show {
    display: flex;
}
body.light-theme .global-dropdown-portal {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.global-dropdown-portal .dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border-radius: 6px;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s;
    gap: 8px;
}
.global-dropdown-portal .dropdown-item:hover {
    background-color: var(--color-brand-primary);
    color: #ffffff;
}
body.light-theme .global-dropdown-portal .dropdown-item:hover {
    background-color: var(--color-brand-primary);
    color: #ffffff;
}

/* Statistics Bar */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    align-items: center;
}
.stats-item {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
    height: 32px;
}
.stats-divider {
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
}

/* Collapsible Campaign Summary Bar (Sprint D.6.2 Refinements) */
.campaign-summary-container {
    display: flex;
    flex-direction: column;
}

.campaign-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    margin: 0 -12px;
    border-radius: 8px;
    background-color: transparent;
    transition: background-color 400ms cubic-bezier(0.16, 1, 0.3, 1),
                backdrop-filter 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.campaign-summary-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: brightness(1.15) saturate(1.1);
    -webkit-backdrop-filter: brightness(1.15) saturate(1.1);
}

.summary-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.arrow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-secondary);
}

/* Rotate arrow to point right when collapsed */
.campaign-summary-container.collapsed .arrow-icon {
    transform: rotate(-90deg);
}

.summary-header-right {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.8;
    transition: opacity 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.campaign-summary-body {
    overflow: hidden;
    transition: height 400ms cubic-bezier(0.16, 1, 0.3, 1),
                opacity 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-top: 18px; /* Spacing between header and statistics increased by 6px */
    padding-bottom: 0px; /* Reduced spacing below the stats panel */
    width: 100%;
}

.campaign-workspace-card:hover {
    transform: none;
    box-shadow: var(--shadow-ambient-card);
}

/* ==========================================================================
   Operative Tagesdisposition (Sprint D.7)
   ========================================================================== */
.operative-sidebar {
    position: fixed;
    top: 0;
    right: -440px;
    width: 420px;
    height: 100vh;
    z-index: 1010;
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.96) 0%, rgba(10, 10, 15, 0.99) 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px) saturate(180%);
    -webkit-backdrop-filter: blur(0px) saturate(180%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    transition: right 350ms cubic-bezier(0.25, 0.1, 0.25, 1),
                opacity 300ms ease-out,
                backdrop-filter 350ms ease-out,
                -webkit-backdrop-filter 350ms ease-out,
                box-shadow 350ms ease-out;
    box-sizing: border-box;
}

.operative-sidebar.open {
    right: 0;
    opacity: 1;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8), inset 1px 0 0 rgba(255, 255, 255, 0.1);
}

.operative-sidebar-header {
    padding: 24px 28px 16px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.operative-sidebar-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.operative-sidebar-header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.operative-sidebar-header-date {
    font-size: 14px;
    color: var(--text-secondary);
}

.operative-sidebar-header-stats {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.operative-sidebar-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.operative-sidebar-close-btn:hover {
    color: var(--text-primary);
}

.operative-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Appointment list styles */
.operative-apt-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Appointment card styling */
.operative-apt-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.operative-apt-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.operative-apt-card.active {
    border-color: #22d3ee;
    background: rgba(34, 211, 238, 0.04);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.1);
}

.operative-apt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.operative-apt-card-owner {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.operative-apt-card-prio {
    font-size: 11px;
    font-weight: 700;
}

.operative-apt-card-street {
    font-size: 13px;
    color: var(--text-secondary);
}

.operative-apt-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.operative-apt-card-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
    margin-top: 4px;
    font-size: 12px;
}

.operative-construction-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.operative-construction-badge.Pending {
    background-color: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
}

.operative-construction-badge.Completed {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.operative-construction-badge.Not-completed, .operative-construction-badge.Not\ completed {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Detail panel styling */
.operative-detail-panel {
    position: fixed;
    top: 0;
    right: -440px;
    width: 420px;
    height: 100vh;
    z-index: 1010;
    background: linear-gradient(135deg, rgba(25, 25, 30, 0.96) 0%, rgba(15, 15, 20, 0.99) 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px) saturate(180%);
    -webkit-backdrop-filter: blur(0px) saturate(180%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    transition: right 350ms cubic-bezier(0.25, 0.1, 0.25, 1),
                opacity 300ms ease-out,
                backdrop-filter 350ms ease-out,
                -webkit-backdrop-filter 350ms ease-out,
                box-shadow 350ms ease-out;
    box-sizing: border-box;
}

.operative-detail-panel.open {
    right: 0;
    opacity: 1;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8), inset 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* Grouped Detail layout (Sprint D.8.1) */
.detail-section {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
    margin-bottom: 4px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 12px;
}

.operative-detail-panel-header {
    padding: 24px 28px 16px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.operative-detail-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.operative-detail-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    line-height: 1.5;
}

.operative-status-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.operative-status-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-align: center;
}

.operative-status-btn.pending {
    background: rgba(156, 163, 175, 0.08);
    color: #9ca3af;
    border-color: rgba(156, 163, 175, 0.15);
}
.operative-status-btn.pending.active {
    background: rgba(156, 163, 175, 0.18);
    border-color: #9ca3af;
    box-shadow: 0 0 12px rgba(156, 163, 175, 0.25);
    color: #f3f4f6;
}

.operative-status-btn.completed {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.15);
}
.operative-status-btn.completed.active {
    background: rgba(16, 185, 129, 0.18);
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
    color: #f3f4f6;
}

.operative-status-btn.failed {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.15);
}
.operative-status-btn.failed.active {
    background: rgba(239, 68, 68, 0.18);
    border-color: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
    color: #f3f4f6;
}

/* Day Summary style */
.day-summary-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.day-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.day-summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.day-summary-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.day-summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.day-progress-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
    position: relative;
}

.day-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #22d3ee, #3b82f6);
    width: 0%;
    transition: width 0.4s ease;
}

/* Stacking for small screens */
@media (max-width: 900px) {
    .operative-sidebar, .operative-detail-panel {
        width: 100%;
        right: -100%;
    }
    .operative-sidebar.open, .operative-detail-panel.open {
        right: 0;
        z-index: 1020;
    }
}

/* Sprint D.8 - Context Menu & Subcontractor Assignment */
.operative-context-menu {
    position: absolute;
    z-index: 2000;
    min-width: 200px;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    padding: 6px 0;
    animation: operativeMenuFadeIn 0.15s ease-out;
}

@keyframes operativeMenuFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.operative-context-menu .menu-item {
    padding: 10px 16px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.15s, color 0.15s;
    position: relative;
    user-select: none;
}

.operative-context-menu .menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.operative-context-menu .menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.operative-context-menu .menu-item.disabled:hover {
    background-color: transparent;
    color: var(--text-secondary);
}

.operative-context-menu .menu-separator {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.06);
    margin: 6px 0;
}

/* Submenu layout */
.operative-context-menu .menu-item .submenu {
    display: none;
    position: absolute;
    left: 98%;
    top: -6px;
    min-width: 190px;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    padding: 6px 0;
    z-index: 2010;
}

.operative-context-menu .menu-item.submenu-trigger:hover .submenu {
    display: block;
}

.operative-context-menu .submenu-item {
    padding: 8px 16px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    transition: background-color 0.15s, color 0.15s;
}

.operative-context-menu .submenu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.operative-context-menu .submenu-item.separator {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.06);
    margin: 4px 0;
    padding: 0;
    cursor: default;
}

.subcon-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.subcon-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Drag & Drop Styles (Sprint D.9.1) */
.calendar-day-cell.drag-over {
    background-color: rgba(34, 211, 238, 0.08) !important;
    border: 1px solid rgba(34, 211, 238, 0.6) !important;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.35), inset 0 0 8px rgba(34, 211, 238, 0.15) !important;
}
.calendar-apt-item.booked.dragging {
    opacity: 0.35 !important;
    transform: scale(0.96);
    cursor: grabbing;
}

/* Workflow & Subcontractor Recommendation Styles (Sprint D.12 + D.13) */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.workflow-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.workflow-step-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.workflow-step-card.active {
    background-color: rgba(245, 158, 11, 0.04);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.05);
}

.workflow-step-card.completed {
    background-color: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.25);
}

.workflow-step-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.workflow-step-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.workflow-step-circle.open {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.workflow-step-circle.active {
    background-color: #f59e0b;
    color: #1e1b4b;
    animation: pulse 2s infinite ease-in-out;
}

.workflow-step-circle.completed {
    background-color: #10b981;
    color: #ffffff;
}

.workflow-step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workflow-step-card.completed .workflow-step-label {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.8;
}

.workflow-step-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Custom tools dropdown with high opacity and contrast (Dark-Glass-Look) */
.tools-dropdown-menu {
    background: rgba(15, 23, 42, 0.94) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
}

body.light-theme .tools-dropdown-menu {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(15, 23, 42, 0.15) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

/* ==========================================================================
   Employee & Scheduling Performance Analysis
   ========================================================================== */
.analysis-container {
    animation: fadeIn 0.25s ease-out;
}

.analysis-filter-btn {
    transition: all 0.15s ease;
}

.analysis-filter-btn.active {
    background-color: var(--color-brand-primary) !important;
    color: #030509 !important;
    font-weight: 700;
}

/* Inactivity Modal scale animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

