/* ============================================
   Albero Servicedesk
   Brand: alberoscholen.nl
   Primary #d5075e · Accent #a7cc45
   Inspired by Albero + TOPdesk
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Albero Brand */
    --primary: #d5075e;
    --primary-dark: #a40548;
    --primary-light: #fdf0f5;
    --primary-lighter: #fef8fa;
    --primary-darker: #7a0335;
    --primary-rgb: 213, 7, 94;

    --accent: #a7cc45;
    --accent-dark: #8ab434;
    --accent-light: #f3f9e4;
    --accent-rgb: 167, 204, 69;

    /* Sidebar Albero gradient theme */
    --sidebar-bg: linear-gradient(180deg, #6b0a30 0%, #4a0825 35%, #2e0518 100%);
    --sidebar-bg-flat: #4a0825;
    --sidebar-bg-hover: rgba(255, 255, 255, 0.08);
    --sidebar-bg-active: rgba(167, 204, 69, 0.12);
    --sidebar-text: rgba(255, 255, 255, 0.65);
    --sidebar-text-active: #ffffff;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-header-bg: linear-gradient(135deg, #7a0e38 0%, #5c0a2b 100%);

    /* Neutrals */
    --bg-body: #f0f2f8;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1e2028;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-on-primary: #ffffff;
    --border-color: #e2e5ef;
    --border-light: #f0f1f5;

    /* Status */
    --status-open: #10b981;
    --status-open-bg: #dcfce7;
    --status-in-behandeling: #f59e0b;
    --status-in-behandeling-bg: #fef3c7;
    --status-gesloten: #9ca3af;
    --status-gesloten-bg: #f3f4f6;

    /* Priority */
    --priority-laag: #9ca3af;
    --priority-normaal: #3b82f6;
    --priority-hoog: #f59e0b;
    --priority-urgent: #ef4444;

    /* Layout */
    --sidebar-width: 268px;
    --sidebar-collapsed: 72px;
    --topbar-height: 60px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.1);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(var(--primary-rgb), 0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes progressFill {
    from { width: 0; }
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes borderPulse {
    0%, 100% { border-color: rgba(var(--primary-rgb), 0.3); }
    50% { border-color: rgba(var(--primary-rgb), 0.6); }
}

/* Animation utility classes */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.animate-delay-1 { transition-delay: 0.05s !important; }
.animate-delay-2 { transition-delay: 0.1s !important; }
.animate-delay-3 { transition-delay: 0.15s !important; }
.animate-delay-4 { transition-delay: 0.2s !important; }
.animate-delay-5 { transition-delay: 0.25s !important; }
.animate-delay-6 { transition-delay: 0.3s !important; }

.animate-fade-in {
    animation: fadeIn 0.4s ease both;
}

.animate-scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ---- Base ---- */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 0.875rem;
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* ===========================================
   SIDEBAR — Albero Brand Gradient
   =========================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border-right: none;
    box-shadow: 4px 0 30px rgba(74, 8, 37, 0.25);
}

/* Decorative green accent line at the very top */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark), var(--primary));
    z-index: 1;
}

/* Subtle decorative glow in bottom-right */
.sidebar::after {
    content: '';
    position: absolute;
    bottom: 80px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 204, 69, 0.06), transparent 70%);
    pointer-events: none;
}

.sidebar-header {
    padding: 1.1rem 1.35rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-height: 100px;
    background: var(--sidebar-header-bg);
    border-bottom: 1px solid var(--sidebar-border);
    position: relative;
    overflow: hidden;
}

/* Decorative circles in header */
.sidebar-header::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(167, 204, 69, 0.07);
    pointer-events: none;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: 40px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(213, 7, 94, 0.08);
    pointer-events: none;
}

.sidebar-header .sidebar-logo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.25)) brightness(1.1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.sidebar-header:hover .sidebar-logo {
    transform: scale(1.1) rotate(2deg);
}

.sidebar-header .logo-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    color: var(--accent);
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    color: #ffffff;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.sidebar-header a {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.sidebar-header h4 small {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-top: 2px;
}

.sidebar-section {
    padding: 0.85rem 0;
    flex: 1;
}

.sidebar-section-label {
    padding: 0.65rem 1.35rem 0.4rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(167, 204, 69, 0.5);
    font-weight: 700;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.62rem 1.1rem;
    border-radius: var(--radius);
    margin: 2px 0.85rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.84rem;
    white-space: nowrap;
    font-weight: 450;
    position: relative;
    border-left: 3px solid transparent;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 1.3rem;
    text-align: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar .nav-link:hover {
    background: var(--sidebar-bg-hover);
    color: #ffffff;
    border-left-color: var(--accent);
}

.sidebar .nav-link:hover i {
    color: var(--accent);
}

.sidebar .nav-link.active {
    background: var(--sidebar-bg-active);
    color: #ffffff;
    font-weight: 600;
    border-left-color: var(--accent);
}

.sidebar .nav-link.active i {
    color: var(--accent);
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    right: -0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 55%;
    background: var(--accent);
    border-radius: 3px 0 0 3px;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 0.85rem 1.1rem;
    border-top: 1px solid var(--sidebar-border);
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.8rem;
    min-width: 0;
}

.sidebar-footer .user-details { min-width: 0; }

.sidebar-footer .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    color: #1a1d2e;
    box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.3);
    transition: var(--transition);
}

.sidebar-footer:hover .user-avatar {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.4);
}

.sidebar-footer .user-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
    color: #ffffff;
}

.sidebar-footer .user-role {
    font-size: 0.68rem;
    color: var(--accent);
    font-weight: 500;
}

.sidebar-footer .user-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.sidebar-footer .user-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.88rem;
}

.sidebar-footer .user-action-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Sidebar collapsed */
.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar.collapsed .sidebar-header h4,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .sidebar-footer .user-name,
.sidebar.collapsed .sidebar-footer .user-role { display: none; }

.sidebar.collapsed .sidebar-footer {
    flex-direction: column;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .sidebar-footer .user-details { display: none; }

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.6rem;
    margin: 2px 8px;
    border-left-width: 0;
}

.sidebar.collapsed .nav-link.active::before {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 1.1rem 0.5rem;
}

/* ===========================================
   MAIN CONTENT
   =========================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
    background: var(--bg-body);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed);
}

/* ===========================================
   TOPBAR
   =========================================== */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    animation: fadeInDown 0.4s ease both;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar .btn-sidebar-toggle {
    border: none;
    background: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.topbar .btn-sidebar-toggle:hover {
    background: var(--bg-body);
    color: var(--primary);
    transform: scale(1.05);
}

.topbar .page-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.topbar .breadcrumb {
    margin: 0;
    font-size: 0.82rem;
}

/* ===========================================
   CONTENT WRAPPER
   =========================================== */
.content-wrapper {
    padding: 1.75rem;
    max-width: 1440px;
}

/* ===========================================
   CARDS
   =========================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: var(--transition);
}

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

.card-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header i {
    color: var(--primary);
}

.card-body {
    padding: 1.25rem;
}

/* ===========================================
   STAT CARDS — Enhanced with colored icons
   Must have low z-index so dropdowns appear above
   =========================================== */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.25rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: visible;
    box-shadow: var(--shadow-card);
    z-index: 1;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.stat-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
}

.stat-card.stat-locations::before { background: linear-gradient(90deg, var(--primary), var(--primary-dark)); }
.stat-card.stat-devices::before { background: linear-gradient(90deg, var(--accent), var(--accent-dark)); }
.stat-card.stat-coaches::before { background: linear-gradient(90deg, var(--priority-normaal), #2563eb); }
.stat-card.stat-urgent::before { background: linear-gradient(90deg, var(--priority-urgent), #dc2626); }
.stat-card.stat-open::before { background: linear-gradient(90deg, var(--status-open), #059669); }
.stat-card.stat-in-behandeling::before { background: linear-gradient(90deg, var(--status-in-behandeling), #d97706); }
.stat-card.stat-gesloten::before { background: linear-gradient(90deg, var(--status-gesloten), #6b7280); }

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-card.stat-open .stat-number { color: var(--status-open); }
.stat-card.stat-in-behandeling .stat-number { color: var(--status-in-behandeling); }
.stat-card.stat-gesloten .stat-number { color: var(--status-gesloten); }
.stat-card.stat-urgent .stat-number { color: var(--priority-urgent); }

.stat-label {
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.4rem;
    font-weight: 600;
}

.stat-icon {
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.stat-card.stat-locations .stat-icon {
    background: var(--primary-light);
    color: var(--primary);
}
.stat-card.stat-devices .stat-icon {
    background: var(--accent-light);
    color: var(--accent-dark);
}
.stat-card.stat-coaches .stat-icon {
    background: #dbeafe;
    color: var(--priority-normaal);
}
.stat-card.stat-urgent .stat-icon {
    background: #fee2e2;
    color: var(--priority-urgent);
}

.stat-card.stat-feedback::before { background: linear-gradient(90deg, #0ea5e9, #0284c7); }
.stat-card.stat-feedback .stat-number { color: #0284c7; }
.stat-card.stat-feedback .stat-icon {
    background: #e0f2fe;
    color: #0284c7;
}

.stat-card.stat-breach::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.stat-card.stat-breach .stat-number { color: #d97706; }
.stat-card.stat-breach .stat-icon {
    background: #fef3c7;
    color: #d97706;
}

.stat-card.stat-reservations::before { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.stat-card.stat-reservations .stat-number { color: #7c3aed; }
.stat-card.stat-reservations .stat-icon {
    background: #ede9fe;
    color: #7c3aed;
}

.stat-card.stat-vvo::before { background: linear-gradient(90deg, #ec4899, #db2777); }
.stat-card.stat-vvo .stat-number { color: #db2777; }
.stat-card.stat-vvo .stat-icon {
    background: #fce7f3;
    color: #db2777;
}
.stat-card.stat-open .stat-icon {
    background: var(--status-open-bg);
    color: var(--status-open);
}
.stat-card.stat-in-behandeling .stat-icon {
    background: var(--status-in-behandeling-bg);
    color: var(--status-in-behandeling);
}
.stat-card.stat-gesloten .stat-icon {
    background: var(--status-gesloten-bg);
    color: var(--status-gesloten);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

/* Stat card clickable link overlay */
.stat-card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* ===========================================
   DASHBOARD: WELCOME BANNER
   Must have high z-index so dropdown appears above stat cards
   =========================================== */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-darker) 60%, #2e0518 100%);
    color: white;
    border-radius: var(--radius-xl);
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: visible;
    animation: fadeInUp 0.5s ease both;
    z-index: 1000;
}

.dashboard-welcome::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(167, 204, 69, 0.08);
    pointer-events: none;
}

.dashboard-welcome::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: 30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.dashboard-welcome h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    position: relative;
}

.dashboard-welcome p {
    opacity: 0.8;
    margin-bottom: 0;
    font-size: 0.88rem;
    position: relative;
}

/* ===========================================
   DASHBOARD: STATUS SUMMARY
   =========================================== */
.status-summary-item { margin-bottom: 1.25rem; }
.status-summary-item:last-child { margin-bottom: 0; }

.status-summary-label {
    font-size: 0.82rem;
    font-weight: 500;
}

.status-summary-count {
    font-size: 0.95rem;
    font-weight: 700;
}

.status-bar {
    height: 8px;
    background: var(--bg-body);
    border-radius: 4px;
    overflow: hidden;
}

.status-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 2px;
    animation: progressFill 1s ease both;
    position: relative;
}

.status-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
}

/* ===========================================
   DASHBOARD: QUICK ACTIONS
   =========================================== */
.quick-action-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.84rem;
    transition: var(--transition);
    position: relative;
}

.quick-action-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    transition: width 0.2s ease;
}

.quick-action-link:hover {
    background: var(--primary-lighter);
    color: var(--primary);
    padding-left: 1.5rem;
}

.quick-action-link:hover::before {
    width: 3px;
}

.quick-action-link i:first-child {
    font-size: 1.05rem;
    color: var(--text-muted);
    width: 1.3rem;
    text-align: center;
    transition: var(--transition);
}

.quick-action-link:hover i:first-child {
    color: var(--primary);
}

.quick-action-link span:nth-child(2) { flex: 1; }

.quick-action-count {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2em 0.6em;
    border-radius: 50px;
    transition: var(--transition);
}

.quick-action-link:hover .quick-action-count {
    background: var(--primary);
    color: white;
}

.quick-action-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: var(--transition);
}

.quick-action-link:hover .quick-action-arrow {
    color: var(--primary);
    transform: translateX(3px);
}

/* ===========================================
   BADGES
   =========================================== */
.badge-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3em 0.7em;
    border-radius: 50px;
    text-transform: capitalize;
    transition: var(--transition-fast);
}

.badge-status-open { background: #dcfce7; color: #166534; }
.badge-status-in_behandeling { background: #fef3c7; color: #92400e; }
.badge-status-gesloten { background: #f3f4f6; color: #4b5563; }

.badge-priority {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25em 0.6em;
    border-radius: 4px;
}

.badge-priority-laag { background: #f3f4f6; color: #6b7280; }
.badge-priority-normaal { background: #dbeafe; color: #1e40af; }
.badge-priority-hoog { background: #fef3c7; color: #b45309; }
.badge-priority-urgent {
    background: #fee2e2;
    color: #b91c1c;
    animation: borderPulse 2s infinite;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-device-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25em 0.65em;
    border-radius: 50px;
}

.badge-device-actief { background: #dcfce7; color: #166534; }
.badge-device-in_reparatie { background: #fef3c7; color: #92400e; }
.badge-device-buiten_gebruik { background: #fee2e2; color: #991b1b; }

/* ===========================================
   TABLES
   =========================================== */
.table-wrapper {
    overflow-x: auto;
}

.table { margin-bottom: 0; }

.table thead th {
    background: var(--bg-body);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 0.7rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.7rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.84rem;
    transition: background 0.15s;
}

.table tbody tr:hover {
    background: var(--primary-lighter);
}

.table tbody tr.clickable-row {
    cursor: pointer;
    transition: var(--transition-fast);
}

.table tbody tr.clickable-row:hover {
    background: var(--primary-light);
}

.table tbody tr.clickable-row:active {
    transform: scale(0.998);
}

/* ===========================================
   FORMS
   =========================================== */
.form-label {
    font-weight: 500;
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.form-control,
.form-select {
    font-size: 0.84rem;
    border-color: var(--border-color);
    border-radius: var(--radius);
    padding: 0.55rem 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    background: var(--bg-white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
    transform: translateY(-1px);
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn {
    font-size: 0.84rem;
    font-weight: 500;
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    border-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}

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

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-dark), #749e2a);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-1px);
}

/* ===========================================
   MESSAGE THREAD
   =========================================== */
.message-thread {
    max-height: 500px;
    overflow-y: auto;
    padding: 1.25rem;
    background: var(--bg-body);
    border-radius: var(--radius-lg);
}

.message-bubble {
    max-width: 75%;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 0.85rem;
    position: relative;
    word-wrap: break-word;
    animation: fadeInUp 0.3s ease both;
    transition: var(--transition-fast);
}

.message-bubble:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.message-bubble.eindgebruiker {
    background: linear-gradient(135deg, var(--primary-light), #fce7ef);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message-bubble.staff {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message-author {
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.message-bubble.eindgebruiker .message-author { color: var(--primary); }
.message-bubble.staff .message-author { color: var(--text-primary); }

.message-text {
    font-size: 0.84rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.message-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* ===========================================
   TICKET DESCRIPTION
   =========================================== */
.ticket-description {
    background: linear-gradient(135deg, var(--bg-body), #f5f0f8);
    border-radius: var(--radius);
    padding: 1.1rem 1.35rem;
    border-left: 4px solid var(--primary);
    white-space: pre-wrap;
    line-height: 1.65;
    font-size: 0.875rem;
}

/* ===========================================
   DEVICE LINK BOX
   =========================================== */
.device-link-box {
    background: linear-gradient(135deg, var(--accent-light), #edf5d5);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: var(--radius-lg);
    padding: 0.95rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.device-link-box input {
    flex: 1;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.5rem 0.7rem;
    font-family: 'Consolas', 'Fira Code', monospace;
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.device-link-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

/* ===========================================
   MISC COMPONENTS
   =========================================== */
.flash-container { margin-bottom: 1rem; }

.alert {
    border-radius: var(--radius-lg);
    animation: fadeInDown 0.4s ease both;
    border: none;
    box-shadow: var(--shadow-sm);
}

.empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.25;
    display: block;
    animation: float 3s ease-in-out infinite;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    animation: fadeInLeft 0.4s ease both;
}

.page-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* ===========================================
   LOGIN PAGE — Premium feel
   =========================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #2e0518 100%);
    border-radius: 0 0 50px 50px;
}

.login-page::after {
    content: '';
    position: absolute;
    top: 5%;
    right: 10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(167, 204, 69, 0.06);
    pointer-events: none;
}

.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.02);
    width: 100%;
    max-width: 420px;
    padding: 2.75rem 2.25rem;
    position: relative;
    z-index: 1;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

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

.login-card .login-header .login-logo {
    width: 158px;
    height: 158px;
    object-fit: contain;
    margin-bottom: 1.15rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
    animation: float 4s ease-in-out infinite;
}

.login-card .login-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.login-card .login-header p {
    color: var(--text-secondary);
    font-size: 0.84rem;
    margin: 0;
}

.login-card .login-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.login-card .btn-primary {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.login-card .form-control {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    border-radius: var(--radius-lg);
}

/* ===========================================
   FILTER BAR
   =========================================== */
.filter-bar {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1rem 1.15rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.15rem;
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    align-items: end;
    box-shadow: var(--shadow-xs);
    animation: fadeInDown 0.3s ease both;
}

.filter-bar .form-group {
    flex: 1;
    min-width: 140px;
}

.filter-bar label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: block;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 992px) {
    .sidebar { width: var(--sidebar-collapsed); }
    .sidebar .sidebar-header h4,
    .sidebar .sidebar-section-label,
    .sidebar .nav-link span,
    .sidebar .sidebar-footer .user-name,
    .sidebar .sidebar-footer .user-role { display: none; }
    .sidebar .nav-link {
        justify-content: center;
        padding: 0.6rem;
        margin: 2px 8px;
        border-left-width: 0;
    }
    .sidebar .nav-link.active::before { display: none; }
    .sidebar .sidebar-header { justify-content: center; }
    .main-content { margin-left: var(--sidebar-collapsed); }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .sidebar.show { transform: translateX(0); }
    .sidebar.show ~ .sidebar-overlay { display: block; }
    .sidebar .sidebar-header h4,
    .sidebar .sidebar-section-label,
    .sidebar .nav-link span,
    .sidebar .sidebar-footer .user-name,
    .sidebar .sidebar-footer .user-role { display: block; }
    .sidebar .nav-link {
        justify-content: flex-start;
        padding: 0.6rem 1.1rem;
        margin: 2px 0.85rem;
        border-left-width: 3px;
    }
    .sidebar .nav-link.active::before { display: block; }
    .sidebar .sidebar-header { justify-content: flex-start; }
    .main-content { margin-left: 0; }
    .content-wrapper { padding: 1rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .stat-number { font-size: 1.5rem; }
    .message-bubble { max-width: 90%; }
    .dashboard-welcome { padding: 1.5rem; }
    .dashboard-welcome h2 { font-size: 1.15rem; }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1035;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
}

/* ===========================================
   UTILITIES
   =========================================== */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer { cursor: pointer; }

/* Scrollbars */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(167, 204, 69, 0.2); border-radius: 2px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(167, 204, 69, 0.35); }

.message-thread::-webkit-scrollbar { width: 5px; }
.message-thread::-webkit-scrollbar-track { background: transparent; }
.message-thread::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

.btn-copy.copied {
    color: var(--status-open) !important;
    border-color: var(--status-open) !important;
}

/* ===========================================
   DROPDOWN Z-INDEX FIX - CRITICAL
   Override Bootstrap's inline styles
   Must be higher than feedback widget (9999)
   =========================================== */
/* Force dropdown menus to appear above everything */
.dropdown-menu.show {
    z-index: 10001 !important;
}

/* Ensure dropdown container is positioned correctly */
.dropdown {
    position: relative !important;
}

/* ===========================================
   LOCATION DROPDOWN FIXES
   =========================================== */
.location-dropdown {
    position: relative !important;
}

.location-dropdown .dropdown-toggle {
    z-index: 1001;
}

.location-dropdown .dropdown-menu {
    max-height: 350px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Override Bootstrap's inline z-index on dropdown menu */
.location-dropdown .dropdown-menu.show {
    z-index: 10001 !important;
}

/* Dashboard welcome banner dropdown styling */
.dashboard-welcome .location-dropdown .btn-outline-light {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.dashboard-welcome .location-dropdown .btn-outline-light:hover,
.dashboard-welcome .location-dropdown .btn-outline-light.show {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* Mobile fixes for location dropdown */
@media (max-width: 991px) {
    .location-dropdown .dropdown-menu.show {
        position: fixed !important;
        right: 1rem !important;
        left: auto !important;
        bottom: 1rem !important;
        top: auto !important;
        max-height: 60vh;
        width: 280px;
        margin: 0;
        z-index: 10001 !important;
    }
}

/* ===========================================
   SELECTION & FOCUS
   =========================================== */
::selection {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary-dark);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   MDM CARD STYLING (Intune & Google)
   ============================================ */

/* MDM Card Container */
.mdm-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

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

/* Google-specific styling - soft green tones */
.mdm-card-google {
    border-color: rgba(52, 211, 153, 0.3);
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.05) 0%, rgba(16, 185, 129, 0.03) 100%);
}

.mdm-card-intune {
    border-color: rgba(96, 165, 250, 0.3);
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.05) 0%, rgba(59, 130, 246, 0.03) 100%);
}

.mdm-card-jamf {
    border-color: rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.03) 100%);
}

/* MDM Card Headers */
.mdm-card-header {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.mdm-header-google {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white;
    border-bottom: none;
}

.mdm-header-google i {
    font-size: 1.1rem;
}

.mdm-header-intune {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
    border-bottom: none;
}

.mdm-header-intune i {
    font-size: 1.1rem;
}

.mdm-header-jamf {
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
    color: white;
    border-bottom: none;
}

.mdm-header-jamf i {
    font-size: 1.1rem;
}

/* JAMF Badge */
.mdm-badge-jamf {
    background: linear-gradient(135deg, #666666 0%, #333333 100%);
    color: white;
    padding: 0.35em 0.65em;
    font-size: 0.8rem;
    font-weight: 500;
}

/* MDM Card Body */
.mdm-card-body {
    padding: 1rem;
}

/* MDM Badges - soft tones */
.mdm-badge-google {
    background: linear-gradient(135deg, #6ee7b7 0%, #34d399 100%);
    color: #065f46;
    padding: 0.35em 0.65em;
    font-size: 0.8rem;
    font-weight: 500;
}

.mdm-badge-intune {
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
    color: #1e40af;
    padding: 0.35em 0.65em;
    font-size: 0.8rem;
    font-weight: 500;
}

/* MDM Code styling */
.mdm-code {
    background: rgba(0, 0, 0, 0.04);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-all;
}

/* ============================================
   COMPLIANCE BADGE STYLING
   ============================================ */

.compliance-badge {
    padding: 0.35em 0.75em;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.compliance-compliant {
    background: var(--status-open-bg);
    color: var(--status-open);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.compliance-compliant i {
    font-size: 0.9rem;
}

.compliance-noncompliant {
    background: rgba(239, 68, 68, 0.1);
    color: var(--priority-urgent);
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: pulseWarning 2s infinite;
}

.compliance-noncompliant i {
    font-size: 0.9rem;
}

.compliance-unknown {
    background: var(--status-gesloten-bg);
    color: var(--text-secondary);
    border: 1px solid rgba(156, 163, 175, 0.2);
}

.compliance-unknown i {
    font-size: 0.9rem;
}

/* Pulse animation for non-compliant */
@keyframes pulseWarning {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
}

/* ============================================
   DEVICE STATUS BADGES
   ============================================ */

.badge-device-status {
    padding: 0.35em 0.65em;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-device-actief {
    background: var(--status-open-bg);
    color: var(--status-open);
}

.badge-device-inactief {
    background: var(--status-gesloten-bg);
    color: var(--status-gesloten);
}

.badge-device-in_reparatie {
    background: rgba(245, 158, 11, 0.1);
    color: var(--status-in-behandeling);
}

.badge-device-vervangen {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

/* ============================================
   DEVICE LINK BOX
   ============================================ */

.device-link-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.device-link-box input {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}
