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

body,
body.customer-portal-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    display: flex;
    min-height: 100vh;
}

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

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1a1f2e 0%, #2c3e50 100%);
    color: white;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 2px 0 20px rgba(0,0,0,0.3);
    z-index: 1000;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
    transition: all 0.3s ease;
}

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

.menu-section {
    padding: 1rem 1.5rem 0.5rem;
    margin-top: 0.75rem;
    position: relative;
}

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

.menu-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: #3498db;
    color: white;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.2) 0%, rgba(52, 152, 219, 0.1) 100%);
    border-left-color: #3498db;
    color: white;
    font-weight: 600;
    box-shadow: inset 0 0 20px rgba(52, 152, 219, 0.1);
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 0 12px rgba(52, 152, 219, 0.6);
    border-radius: 0 2px 2px 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 - Consistent met Admin Portal */
.customer-header-bar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    margin: -2rem -2rem 1.5rem -2rem;
    padding: 0 2rem;
}
.customer-header-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.75rem;
    min-height: 52px;
}
.customer-header-bar-logo {
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.1rem;
    white-space: nowrap;
}
.customer-header-bar-logo:hover { color: var(--brand-primary, #667eea); }
.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.5rem; flex-wrap: nowrap; }
.customer-header-bar-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background .2s, color .2s;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e0e0e0;
}
.customer-header-bar-btn:hover { background: #e9ecef; color: #667eea; }
.customer-header-bar-logout { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.customer-header-bar-logout:hover { background: #c0392b; color: #fff; }
.customer-header-bar-user { color: #555; font-size: 0.9rem; }
.customer-header-bar-user small { color: #888; font-weight: 400; }

/* Mobile header toggle (hamburger) */
.customer-header-toggle {
    display: none;
    border: none;
    background: transparent;
    padding: 0.35rem;
    border-radius: 6px;
    cursor: pointer;
}
.customer-header-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #2c3e50;
    margin: 3px 0;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

.customer-footer {
    position: relative;
    margin-top: auto;
    padding: 1rem 2rem;
    background: #1a1f2e;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    border-radius: 8px 8px 0 0;
}

.customer-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

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

.customer-footer a:hover { color: #fff; }
.customer-footer .footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }

.header {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h2 {
    color: #333;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.btn {
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    margin: 0.25rem 0.25rem 0.25rem 0;
    display: inline-block;
    font-size: 0.9rem;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.stat-card .number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-card .label {
    color: #666;
    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;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        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);
    }
    
    .main-content {
        margin-left: 0;
        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;
    }
    .customer-header-bar-user {
        display: none;
    }
    .customer-header-toggle {
        display: inline-flex;
    }
}

/* Focus states voor accessibility */
.menu-item:focus {
    outline: 2px solid rgba(52, 152, 219, 0.5);
    outline-offset: -2px;
}

/* Customer Portal specific styles */
.welcome-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
}

.welcome-card h1 {
    color: #667eea;
    margin-bottom: 1rem;
}

.welcome-card p {
    color: #666;
    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: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.action-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.action-card p {
    color: #666;
    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: #667eea;
    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: #667eea;
    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;
}
