/* Customer Portal Styles – één thema voor alle dashboard-pagina's */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* CRITICAL: Force sidebar to always be visible on desktop - MUST BE FIRST */
.sidebar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1000 !important;
}
.sidebar-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.sidebar-menu .menu-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.sidebar-menu .menu-item {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-direction: row !important;
    align-items: center !important;
}

body,
body.customer-portal-page {
    font-family: var(--brand-font, Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    display: flex;
    min-height: 100vh;
    color: var(--text-primary, #0f172a);
}

/* Isolatie: eigen layout wint op eventuele parent/theme-CSS */
body.customer-portal-page {
    margin: 0;
    padding: 0;
}

/* ========== Toegankelijkheid (a11y) ========== */
/* Focus-visible: toon focus-ring alleen bij toetsenbordnavigatie */
:focus { outline: 2px solid var(--brand-primary, #0d9488); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--brand-primary, #0d9488); outline-offset: 2px; }
/* Reduced motion: respecteer gebruikersvoorkeur (WCAG 2.1) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
    .menu-item:hover, .action-card:hover, .sidebar { transition-duration: 0.01ms !important; }
}

/* Skip to content – toegankelijkheid: verborgen tot focus, boven admin-banner */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100000;
    padding: 0.75rem 1.25rem;
    background: var(--brand-primary, #0d9488);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.skip-to-content:focus {
    left: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}
/* Main content: extra top padding when admin banner is present */
body.admin-impersonation-active .main-content {
    padding-top: 0.25rem;
}

.sidebar {
    width: 280px;
    background: var(--sidebar-bg, linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #334155 100%));
    color: white;
    padding: 0;
    position: fixed !important;
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-shadow: 2px 0 20px rgba(0,0,0,0.3);
    z-index: 1000 !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
    transition: all 0.3s ease;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
    max-height: none !important;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar-header {
    padding: 1.75rem 1.5rem;
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo-section h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.95) 50%, rgba(255,255,255,0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.sidebar-logo-link { display: block; }
.sidebar-logo-img { max-height: 40px; width: auto; max-width: 100%; display: block; object-fit: contain; }

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.2);
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.7;
    color: rgba(255,255,255,0.8);
    margin-top: 0.15rem;
}

.sidebar-menu {
    padding: 0.5rem 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.menu-section {
    padding: 1rem 1.5rem 0.5rem;
    margin-top: 0.75rem;
    position: relative;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.menu-section:first-of-type {
    margin-top: 0.5rem;
}

.section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.5;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    display: block;
}

.menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 1rem 1.5rem;
}

.menu-item {
    display: flex !important;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    font-size: 0.9rem;
    position: relative;
    margin: 0.15rem 0.5rem;
    border-radius: 8px;
    gap: 0.75rem;
    visibility: visible !important;
    opacity: 1 !important;
}

.menu-item:hover {
    background: rgba(255,255,255,0.08);
    border-left-color: var(--brand-primary, #0d9488);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.2) 0%, rgba(13, 148, 136, 0.08) 100%);
    border-left-color: var(--brand-primary, #0d9488);
    color: white;
    font-weight: 600;
    box-shadow: inset 0 0 24px rgba(13, 148, 136, 0.12);
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--brand-primary, #0d9488) 0%, var(--brand-secondary, #0f766e) 100%);
    box-shadow: 0 0 16px rgba(13, 148, 136, 0.4);
    border-radius: 0 3px 3px 0;
}

.menu-item .icon {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.menu-item:hover .icon {
    transform: scale(1.1);
}

.menu-item.active .icon {
    transform: scale(1.15);
}

.menu-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-item.logout {
    margin-top: 0.5rem;
    color: rgba(231, 76, 60, 0.9);
    background: rgba(231, 76, 60, 0.05);
}

.menu-item.logout:hover {
    background: rgba(231, 76, 60, 0.2);
    border-left-color: #e74c3c;
    color: #e74c3c;
    transform: translateX(4px);
}

.menu-item.logout.active {
    background: rgba(231, 76, 60, 0.15);
    border-left-color: #e74c3c;
}

/* Customer Portal Header Bar - Responsive, compact, volledige breedte content-gebied */
.customer-header-bar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 4px 24px rgba(0,0,0,.04);
    margin: -2rem -2rem 1.5rem -2rem;
    padding: 0 1.5rem;
    overflow-x: hidden;
}
.customer-header-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    min-height: 56px;
    max-width: 100%;
}
.customer-header-bar-logo {
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    text-decoration: none;
    font-size: 1.15rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s ease;
}
.customer-header-bar-logo:hover { color: var(--brand-primary, #0d9488); }
.customer-header-bar-logo-img { max-height: 32px; width: auto; max-width: 160px; vertical-align: middle; object-fit: contain; }
.customer-header-bar-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    flex: 1 1 auto;
    justify-content: flex-end;
}
.customer-header-bar-btn {
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm, 8px);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
    background: #f8fafc;
    color: var(--text-primary, #334155);
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}
.customer-header-bar-btn:hover { background: #f1f5f9; color: var(--brand-primary, #0d9488); border-color: rgba(13, 148, 136, 0.3); }
.customer-header-bar-logout { background: #dc2626; color: #fff; border-color: #dc2626; }
.customer-header-bar-logout:hover { background: #b91c1c; color: #fff; }
.customer-header-bar-login { background: var(--brand-primary, #0d9488); color: #fff; border-color: var(--brand-primary, #0d9488); }
.customer-header-bar-login:hover { background: #0f766e; color: #fff; }
.customer-header-bar-btn:focus-visible, .customer-header-bar-user:focus-visible, .customer-header-toggle:focus-visible, .customer-header-toggle-desktop:focus-visible {
    outline: 2px solid var(--brand-primary, #0d9488); outline-offset: 2px;
}
.customer-header-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.customer-header-bar-account { display: inline-flex; align-items: center; gap: 0.35rem; color: #64748b; text-decoration: none; padding: 0.4rem 0.5rem; border-radius: 8px; transition: color 0.2s, background 0.2s; }
.customer-header-bar-account:hover { color: var(--brand-primary, #0d9488); background: rgba(13, 148, 136, 0.08); }
.customer-header-account-icon { flex-shrink: 0; }
.customer-header-account-label { font-size: 0.85rem; font-weight: 500; }
@media (min-width: 769px) {
    .customer-header-account-label { display: none; }
}
@media (max-width: 768px) {
    .customer-header-bar-account { min-width: 44px; min-height: 44px; justify-content: center; }
    .customer-header-account-label { display: inline; }
}
.customer-header-bar-user { color: #64748b; font-size: 0.85rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.customer-header-bar-user:hover { color: var(--brand-primary, #0d9488); }
.customer-header-bar-user small { color: #94a3b8; font-weight: 400; font-size: 0.8rem; }

/* Desktop sidebar toggle button - visible on desktop */
.customer-header-toggle-desktop {
    display: none;
    border: none;
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.customer-header-toggle-desktop:hover { 
    background: #e2e8f0; 
}
body.sidebar-collapsed .customer-header-toggle-desktop svg #customerSidebarToggleIcon {
    transform: rotate(180deg);
    transform-origin: center;
}

/* Mobile header toggle (hamburger) */
.customer-header-toggle {
    display: none;
    border: none;
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}
.customer-header-toggle:hover { background: #e2e8f0; }
.customer-header-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #334155;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
/* Hamburger → X when menu open */
body.sidebar-mobile-open .customer-header-toggle span:nth-child(1),
.customer-header-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
body.sidebar-mobile-open .customer-header-toggle span:nth-child(2),
.customer-header-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
body.sidebar-mobile-open .customer-header-toggle span:nth-child(3),
.customer-header-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

.main-content {
    flex: 1;
    margin-left: 280px !important;
    padding: 2rem;
    padding-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    z-index: 10;
    max-width: 100%;
}
.main-content-inner {
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.customer-footer {
    position: relative;
    margin-top: auto;
    margin-left: -2rem;
    margin-right: -2rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: rgba(255,255,255,0.9);
    font-size: 0.875rem;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,.12);
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.customer-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
}

.customer-footer .footer-copyright {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
}

.customer-footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 0.15rem 0;
}

.customer-footer a:hover { color: #fff; text-decoration: underline; }
.customer-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    justify-content: flex-end;
    align-items: center;
}
.customer-footer .footer-links a {
    white-space: nowrap;
    font-size: 0.8rem;
}

.header {
    background: var(--surface, #ffffff);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md, 12px);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,.06));
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0,0,0,.04);
}

.header h2 {
    color: var(--text-primary, #0f172a);
    font-weight: 600;
}

.card {
    background: var(--surface, #ffffff);
    color: var(--text-primary, #1e293b);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.08));
    margin-bottom: 2rem;
    position: relative;
    z-index: 5;
    border: 1px solid rgba(0,0,0,.04);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.1); transform: translateY(-1px); }
.card h1, .card h2, .card h3, .card h4 {
    color: var(--text-primary, #0f172a);
    font-weight: 600;
}
.card p, .card label, .card span, .card td, .card li {
    color: var(--text-secondary, #334155);
}
.card a:not(.btn) {
    color: var(--brand-primary, #0d9488);
}
/* Hero-sectie in cards: iets meer hoogte/ruimte */
.card .hero-section,
.card [data-section="hero"] {
    min-height: 140px;
    padding: 1.25rem 0;
}

/* Section cards (context hint, info blokken): leesbare tekst, op voorgrond */
.section-card {
    color: #1e293b !important;
    position: relative;
    z-index: 5;
}
.section-card h1, .section-card h2, .section-card h3, .section-card h4,
.section-card p, .section-card span, .section-card div {
    color: inherit;
}
.section-card a { color: var(--brand-primary, #0d9488); }

/* Elementen-sheet categorie-headers: donkere tekst op lichte achtergrond */
.elem-cat-header {
    color: #0f172a !important;
}

/* Diensten-/stats-/tools-grids: cards volledig zichtbaar op mobiel en desktop */
.stats-grid, .tools-grid, [class*="diensten"], .website-data-grid-container {
    position: relative;
    z-index: 2;
}
.stats-grid .card, .tools-grid .card {
    color: #1e293b;
    z-index: 5;
}
.website-data-table, .website-data-table th, .website-data-table td {
    color: #334155;
}
.website-data-table th { color: #0f172a; }

/* Dashboard hero (intro-banner): iets ruimer zodat niet te kort */
.dashboard-intro {
    min-height: 100px;
}

.btn {
    padding: 0.65rem 1.35rem;
    background: var(--brand-primary, #0d9488);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s ease;
    margin: 0.25rem 0.25rem 0.25rem 0;
    display: inline-block;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

.btn:focus-visible { outline: 2px solid var(--brand-primary, #0d9488); outline-offset: 2px; }
.btn:hover {
    background: var(--brand-secondary, #0f766e);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}

.btn-success {
    background: var(--brand-primary, #0d9488);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

.btn-success:hover {
    background: var(--brand-secondary, #0f766e);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface, #ffffff);
    padding: 1.75rem;
    border-radius: var(--radius-md, 12px);
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.08));
    border: 1px solid rgba(0,0,0,.04);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary, #0d9488), var(--brand-secondary, #0f766e));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

.stat-card:hover::before { opacity: 1; }

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--brand-primary, #0d9488), var(--brand-secondary, #0f766e));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .label {
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Kennisbank & help-view: geen dubbele header – sidebar user-block verbergen (staat al in header-bar) */
body.page-kennisbank .sidebar .sidebar-header .user-info,
body.page-help-view .sidebar .sidebar-header .user-info {
    display: none;
}
body.page-kennisbank .sidebar .sidebar-header,
body.page-help-view .sidebar .sidebar-header {
    padding-bottom: 0.5rem;
    border-bottom: none;
}
body.page-kennisbank .sidebar .logo-section,
body.page-help-view .sidebar .logo-section {
    margin-bottom: 0;
}

/* Sidebar overlay (mobile) – sluit sidebar bij klik buiten */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 950;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Responsive Design – op mobiel: sidebar verborgen (zoals WordPress), alleen open via hamburger */
@media (max-width: 768px) {
    .sidebar-overlay {
        display: block;
    }
    .sidebar.mobile-open + .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }
    /* !important om base .sidebar transform te overrulen – sidebar standaard weg op mobiel */
    .sidebar {
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 30px rgba(0,0,0,0.5);
    }
    .sidebar.mobile-open {
        transform: translateX(0) !important;
    }
    /* Hamburger altijd zichtbaar op mobiel */
    .customer-header-toggle {
        display: inline-flex !important;
    }
    .customer-header-toggle-desktop {
        display: none !important;
    }
    /* Header: op mobiel alleen logo + hamburger (nav in sidebar); voorkom overflow */
    .customer-header-bar-nav {
        display: none !important;
    }
    .customer-header-bar-user {
        max-width: 100px;
        font-size: 0.8rem;
    }
    .customer-header-bar-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    /* Fix: main-content volle breedte op mobiel (geen 280px ruimte voor sidebar) */
    .main-content {
        margin-left: 0 !important;
        padding-left: 1rem;
        padding-right: 1rem;
        z-index: 10;
    }
    .card {
        padding: 1.25rem;
        border-radius: 10px;
    }
    /* Touch targets en safe area */
    .main-content input[type="text"],
    .main-content input[type="email"],
    .main-content input[type="password"],
    .main-content select,
    .main-content button:not(.customer-header-toggle) {
        min-height: 44px;
        font-size: 16px;
    }
    .main-content {
        padding-left: calc(1rem + env(safe-area-inset-left, 0));
        padding-right: calc(1rem + env(safe-area-inset-right, 0));
    }
}

/* Sidebar-knop om in te klappen (desktop) */
.sidebar .sidebar-toggle-in {
    display: none;
}
@media (min-width: 769px) {
    .sidebar .sidebar-toggle-in {
        display: flex !important;
    }
    body.sidebar-collapsed .sidebar .sidebar-toggle-in {
        right: 0.25rem;
    }
}
.sidebar .sidebar-toggle-in:hover {
    background: rgba(255,255,255,0.2);
}

/* Desktop: sidebar altijd zichtbaar + toggle button */
@media (min-width: 769px) {
    .customer-header-toggle-desktop {
        display: inline-flex !important;
    }
    .sidebar {
        display: block !important;
        transform: translateX(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    body.sidebar-collapsed .sidebar {
        width: 70px !important;
    }
    body.sidebar-collapsed .sidebar .menu-text,
    body.sidebar-collapsed .sidebar .user-details,
    body.sidebar-collapsed .sidebar .logo-section h1,
    body.sidebar-collapsed .sidebar .menu-section-summary,
    body.sidebar-collapsed .sidebar .section-label {
        opacity: 0;
        visibility: hidden;
        width: 0;
        overflow: hidden;
        white-space: nowrap;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }
    body.sidebar-collapsed .sidebar .menu-item {
        justify-content: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    body.sidebar-collapsed .sidebar .icon {
        margin-right: 0;
    }
    body.sidebar-collapsed .sidebar .menu-section-details {
        border: none;
    }
    body.sidebar-collapsed .sidebar .menu-section-details summary {
        padding: 0.75rem 0.5rem;
        justify-content: center;
    }
    body.sidebar-collapsed .main-content {
        margin-left: 70px !important;
    }
    .sidebar-menu {
        display: block !important;
        visibility: visible !important;
    }
    .menu-section {
        display: block !important;
        visibility: visible !important;
    }
    .menu-item {
        display: flex !important;
        visibility: visible !important;
    }
    
    .main-content {
        margin-left: 280px !important;
        padding: 1rem;
    }
    
    .sidebar-header {
        padding: 1.25rem 1rem;
    }
    
    .menu-item {
        padding: 0.75rem 1rem;
        margin: 0.1rem 0.25rem;
    }
    
    .menu-section {
        padding: 0.75rem 1rem 0.5rem;
    }
    
    .customer-header-bar {
        padding: 0 1rem;
        margin: -1rem -1rem 1rem -1rem;
    }
    .customer-header-bar-inner {
        gap: 0.5rem;
    }
    .customer-header-bar-nav {
        /* display: none; - REMOVED - sidebar should always be visible */
    }
    .customer-header-bar-user {
        /* display: none; - REMOVED - sidebar should always be visible */
    }
    .customer-header-bar-right {
        margin-left: auto;
    }
    .customer-header-toggle {
        display: inline-flex;
    }
    .customer-footer {
        padding: 1rem 1rem;
        margin-left: -1rem;
        margin-right: -1rem;
    }
    .customer-footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.75rem;
    }
    .customer-footer .footer-links {
        justify-content: center;
        gap: 0.3rem 0.75rem;
    }
    .customer-footer .footer-links a {
        font-size: 0.75rem;
    }
}

/* Tablet: header nav wrap, smaller buttons */
@media (max-width: 1024px) {
    .customer-header-bar-nav {
        gap: 0.25rem;
    }
    .customer-header-bar-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }
    .customer-header-bar-user {
        max-width: 120px;
        font-size: 0.8rem;
    }
}

/* Small tablet: hide secondary nav, keep Dashboard/Bestellingen/Domeinen/Uitloggen */
@media (max-width: 900px) {
    .customer-header-bar-nav .nav-secondary {
        /* display: none; - REMOVED - sidebar should always be visible */
    }
}

/* Focus states voor accessibility */
/* Force sidebar visibility alleen op desktop – op mobiel blijft sidebar verborgen tot hamburger open */
@media (min-width: 769px) {
    .sidebar {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
    .sidebar-menu, .menu-section, .menu-item {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .menu-item {
        display: flex !important;
    }
}

.menu-item:focus-visible {
    outline: 2px solid rgba(255,255,255,0.9);
    outline-offset: 2px;
}
/* Brede klikbare gebieden voor touch/toegankelijkheid */
.menu-item { min-height: 44px; padding-top: 0.5rem; padding-bottom: 0.5rem; }

/* Customer Portal specific styles */
.welcome-card {
    background: linear-gradient(135deg, var(--surface, #fff) 0%, rgba(248,250,252,0.95) 100%);
    border-radius: var(--radius-lg, 16px);
    padding: 3rem;
    box-shadow: var(--shadow-lg, 0 8px 32px rgba(0,0,0,.1));
    border: 1px solid rgba(13, 148, 136, 0.1);
    margin-bottom: 2rem;
}

.welcome-card h1 {
    color: var(--brand-primary, #0d9488);
    margin-bottom: 1rem;
    font-weight: 700;
}

.welcome-card p {
    color: var(--text-secondary, #475569);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.action-card {
    background: var(--surface, #ffffff);
    border-radius: var(--radius-lg, 16px);
    padding: 2rem;
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.08));
    border: 1px solid rgba(0,0,0,.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,.12);
    border-color: rgba(13, 148, 136, 0.15);
}

.action-card h3 {
    color: var(--brand-primary, #0d9488);
    margin-bottom: 1rem;
    font-size: 1.35rem;
    font-weight: 600;
}

.action-card p {
    color: var(--text-secondary, #64748b);
    margin-bottom: 1.5rem;
}

.domain-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    margin: 0.5rem 0.5rem 0.5rem 0;
}

.ssl-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
}

.ssl-section h2 {
    color: var(--brand-primary, #0d9488);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.ssl-domain-list {
    display: grid;
    gap: 1rem;
}

.ssl-domain-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid #ddd;
    transition: all 0.3s;
}

.ssl-domain-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.ssl-domain-item.ssl-active {
    border-left-color: #28a745;
}

.ssl-domain-item.ssl-inactive {
    border-left-color: #dc3545;
}

.ssl-domain-item.ssl-pending {
    border-left-color: #ffc107;
}

.ssl-domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ssl-domain-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.ssl-status-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.ssl-status-active {
    background: #d4edda;
    color: #155724;
}

.ssl-status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.ssl-status-pending {
    background: #fff3cd;
    color: #856404;
}

.ssl-info {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.ssl-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Dashboard Section Card */
.section-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.section-card h2 {
    color: var(--brand-primary, #0d9488);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}
