:root {
    --sidebar-width: 220px; /* Increased width for modern design aesthetic */
    --sidebar-collapsed-width: 80px;
    --transition-speed: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --background-color: #ffffff; /* Main content background */
    --sidebar-bg: #f5f5f7;       /* Sidebar background */
    --text-color: #1a1a1a;       /* Dark text for better readability */
    --text-muted: #64748b;       /* Muted text for inactive items */
    --border-color: #e2e8f0;
    --primary-color: #007bff;    /* Primary color for buttons and logo */
    --font-family: 'Stack Sans Text', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background: var(--background-color);
    color: var(--text-color);
}

/* ====================================================== */
/* === LOGIN SCREEN STYLING (Split Layout) === */
/* ====================================================== */

.login-split-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 10000; /* Zorg dat het boven alles ligt */
    display: flex;
    overflow: hidden;
}

/* --- Linker Kant (Visual) --- */
.login-left-pane {
    flex: 0 0 40%; /* 40% breedte */
    background: linear-gradient(-45deg, #001932, #0c74ff, #0051b3, #001021);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.white-logo {
    height: 32px;
    filter: brightness(0) invert(1); /* Maakt logo wit */
    opacity: 0.95;
}

.login-pane-content h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: white;
}

.login-pane-content p {
    font-size: 1.1rem;
    opacity: 0.85;
    line-height: 1.6;
    max-width: 80%;
    font-weight: 300;
}

.login-pane-footer {
    font-size: 0.9rem;
    opacity: 0.6;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

/* --- Rechter Kant (Formulier) --- */
.login-right-pane {
    flex: 1; /* Neemt de rest (60%) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: #ffffff;
    overflow-y: auto;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-header {
    margin-bottom: 40px;
    text-align: left;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Formulier Elementen */
.login-form-group {
    margin-bottom: 24px;
}

.login-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

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

.forgot-pass-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 1rem;
}

.input-icon-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 44px; /* Ruimte voor icoon */
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    font-size: 1rem;
    color: #333;
    transition: all 0.2s ease;
    background-color: #fcfcfc;
    box-sizing: border-box; /* Belangrijk voor padding */
}

.input-icon-wrapper input:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

/* Login Knop */
.btn-login {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: #0069d9; /* Iets donkerder blauw */
}

.btn-login:active {
    transform: scale(0.98);
}

/* Error Message */
.login-error-msg {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 16px;
    min-height: 20px;
    text-align: center;
}

/* Google Login Divider & Button */
.login-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.login-divider span {
    padding: 0 16px;
    color: #94a3b8;
    font-size: 14px;
}

.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-google:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-google:active {
    transform: scale(0.98);
}

.google-icon {
    flex-shrink: 0;
}

/* Footer Link */
.login-footer-link {
    margin-top: 32px;
    text-align: center;
    font-size: 0.95rem;
    color: #666;
}

.login-footer-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.login-footer-link a:hover {
    text-decoration: underline;
}

/* --- Responsive voor Mobiel --- */
@media (max-width: 900px) {
    .login-split-screen {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .login-left-pane {
        flex: none;
        width: 100%;
        padding: 40px 30px;
        min-height: 250px;
    }

    .login-pane-content h1 { font-size: 2rem; }
    .login-pane-content p { display: none; } /* Bespaar ruimte op mobiel */
    .login-pane-footer { display: none; }

    .login-right-pane {
        flex: none;
        width: 100%;
        padding: 40px 20px;
    }
}

/* ====================================================== */
/* === HIDE THE MAIN DASHBOARD BY DEFAULT FOR LOGIN FLOW === */
/* ====================================================== */
.container {
    display: none; /* This is the key change - JS will show it after login */
}
/* ====================================================== */


/* ====================================================== */
/* === SIDEBAR (COMPACT & STRAK) - FINAL FIX === */
/* ====================================================== */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid transparent;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: width var(--transition-speed);
}

/* Header Compact */
.sidebar-header {
    height: 56px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.2s;
}

#sidebarToggle {
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sidebarToggle:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--text-color);
}

/* --- Navigatie Container --- */
.main-nav {
    flex: 1; /* Vult de resterende ruimte onder de header */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.main-nav .nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    /* FIX: Zorg dat de lijst de volledige hoogte pakt zodat mt-auto werkt */
    flex: 1;
    min-height: min-content;
}

/* --- Navigatie Items --- */
.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* FIX: Zorg dat mt-auto items naar beneden duwt */
.nav-item.mt-auto {
    margin-top: auto !important;
}

.nav-item a.nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    text-decoration: none;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 400;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid transparent;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Iconen */
.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #94a3b8;
    transition: color 0.2s;
    flex-shrink: 0;
}

.nav-text {
    flex-grow: 1;
    transition: opacity 0.2s;
}

/* Pijl */
.nav-arrow {
    font-size: 0.7rem;
    margin-left: auto;
    transition: transform 0.2s;
    color: #94a3b8;
}

/* --- Hover State --- */
.nav-item a.nav-link:hover {
    background-color: rgba(0,0,0,0.04);
    color: #1e293b;
}

.nav-item:hover .nav-icon {
    color: #475569;
}

/* --- Active State --- */
.nav-item.active > a.nav-link {
    background-color: #ffffff;
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nav-item.active .nav-icon {
    color: #2563eb;
}

.nav-item.active .nav-arrow {
    transform: rotate(180deg);
}

/* --- Submenu --- */
.sub-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, margin 0.3s ease;
    width: 100%;
    opacity: 0;
}

.nav-item.active > .sub-nav-list {
    max-height: 300px;
    margin-top: 4px;
    margin-bottom: 8px;
    opacity: 1;
}

.sub-nav-item {
    width: 100%;
}

.sub-nav-item a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.5rem 0.5rem 36px;
    color: #64748b;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 6px;
    margin-left: 4px;
    width: calc(100% - 4px);
    box-sizing: border-box;
    position: relative;
}

.sub-nav-item a::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #e2e8f0;
}

.sub-nav-item a:hover {
    color: #0f172a;
    background-color: rgba(0,0,0,0.02);
}

.sub-nav-item.active a {
    color: #2563eb;
    font-weight: 500;
    background-color: #eff6ff;
}

.sub-nav-item.active a::before {
    background-color: #2563eb;
    width: 2px;
}

/* --- Dividers (HERSTELD) --- */
.nav-divider {
    height: 1px;
    background-color: #e2e8f0; /* Zichtbaar grijs */
    margin: 0.75rem 0; /* Ruimte boven en onder */
    width: 100%;
    flex-shrink: 0; /* Voorkomt dat flexbox hem platdrukt */
    list-style: none;
}

/* --- Collapsed State Aanpassingen --- */
body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .main-content,
body.sidebar-collapsed .content-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-header {
    padding: 0;
    justify-content: center;
}

body.sidebar-collapsed .sidebar-logo {
    display: none;
}

body.sidebar-collapsed .main-nav {
    padding: 0.5rem 0.5rem;
}

body.sidebar-collapsed .nav-item a.nav-link {
    justify-content: center;
    padding: 0.75rem 0;
}

body.sidebar-collapsed .nav-icon {
    margin-right: 0;
    font-size: 1.2rem;
}

body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .nav-arrow,
body.sidebar-collapsed .sub-nav-list,
body.sidebar-collapsed .notification-badge {
    display: none !important;
}

body.sidebar-collapsed .nav-dots {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    justify-content: center;
}

body.sidebar-collapsed .nav-item[data-tooltip="Activiteit"] .nav-link {
    flex-direction: column;
    gap: 2px;
}

body.sidebar-collapsed .nav-dots .dot {
    width: 5px;
    height: 5px;
    background-color: #cbd5e1;
    border-radius: 50%;
}

body.sidebar-collapsed .nav-dots .dot.active {
    background-color: #2563eb;
}

/* Styling van de bolletjes */
.nav-dots .dot {
    width: 6px;
    height: 6px;
    background-color: #cbd5e1; /* Inactief grijs */
    border-radius: 50%;
    transition: all 0.2s ease;
}

/* Actief bolletje */
.nav-dots .dot.active {
    background-color: #334155; /* donkergrijs */
    transform: scale(1.2);
}

.feature-lock-wrapper.locked > a.nav-link {
    color: #9ca3af;
    cursor: not-allowed;
    background-color: transparent !important;
}

.feature-lock-wrapper.locked > a.nav-link .nav-icon {
    color: #9ca3af;
}

.nav-count {
    font-size: 0.75rem;
    color: #64748b;        /* Grijs */
    background: #e2e8f0;   /* Lichtgrijs achtergrondje voor leesbaarheid */
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    margin-left: auto;     /* Duwt hem naar rechts */
    margin-right: 8px;     /* Ruimte voor het pijltje */
}

/* Zorg dat het pijltje niet meer zelf naar rechts duwt, anders staat het gek */
.nav-item .nav-link .nav-arrow {
    margin-left: 0;
}

/* Rode variant voor Live Agent counter */
.nav-count-red {
    color: #ffffff;
    background: #ef4444;   /* Rood */
}

.nav-link.active .nav-count-red {
    color: #ffffff;
    background: #dc2626;   /* Donkerder rood bij actief */
}

/* Verberg de teller als hij 0 is (optioneel, class toggle via JS) */
.nav-count.hidden {
    display: none;
}

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

/* --- Tooltip for Upgrade --- */
.upgrade-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background-color: #262626;
    color: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10;
    text-align: center;
}

.upgrade-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: #262626 transparent transparent transparent;
}

.feature-lock-wrapper.locked:hover .upgrade-tooltip {
    display: block;
}

.upgrade-tooltip p {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.upgrade-tooltip b {
    color: #ffffff;
}

.button-upgrade {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background-color: #2563eb;
    color: white;
    font-family: var(--font-family);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button-upgrade:hover {
    background-color: #1d4ed8;
}

/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 0 2rem;
    background-color: #ffffff; /* Wit */
    min-height: 100vh;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Uitlijnen op onderkant */
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.tab-content {
    display: none;
}

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

.panel {
    background: var(--panel-background);
    padding: 1.5rem;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

/* --- Filters & Grids --- */
.filter-select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #fff;
    font-size: 0.9rem;
}
.filter-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem;
    background: #fdfdff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
}
.filter-group-modal > div {
    flex-wrap: nowrap;
}
.filter-group > div {
    display: flex;
    align-items: center;
}
.filter-group strong {
    font-weight: 500;
}
.date-range-inputs {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
}

.date-range-inputs input[type="date"] {
    width: 100%;
    padding: 7px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 0.9rem;
}

.grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* --- UI Elements --- */
button, .button-primary {
    cursor: pointer;
    padding: 0.625rem 1.125rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background-color: #f1f5f9;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

button:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
}

.button-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.button-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.button-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
}

.list-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    position: relative;
    background: var(--panel-background);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.list-item.follow-up::before,
.list-item.solved::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 0;
    width: 8px;
    height: 8px;
    border-radius: 8px;
}

.list-item.follow-up::before {
    background-color: #007bff;
}

.list-item:hover {
    border-color: #c0c0c0;
}
.list-item:last-child { border-bottom: none; }

/* --- Master-Detail Layout --- */
.content-wrapper {
    margin-left: var(--sidebar-width);
    display: grid;
    grid-template-columns: 1fr;
}

main.main-content {
    margin-left: 0;
    min-width: 0;
}

.activity-view-active {
    grid-template-columns: minmax(450px, 1fr) 5px 1fr;
}

.detail-panel {
    background-color: var(--panel-background);
    border-left: 1px solid var(--border-color);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    display: none;
}

.activity-view-active .detail-panel {
    display: block;
}

.detail-panel h3 {
    padding: 1rem 1.5rem;
    margin: 0;
    background: #f7f7f7;
    border-bottom: 1px solid #ddd;
    font-size: 1.1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.resizer {
    background-color: var(--border-color);
    cursor: col-resize;
    display: none;
    transition: background-color 0.2s ease;
}

.activity-view-active .resizer {
    display: block;
}

.resizer:hover {
    background-color: var(--primary-color);
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
}

/* --- Geselecteerde staat voor lijstitems --- */
.list-item.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
    background-color: #f8fbff;
}
.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.list-item-icon i, .list-item-icon svg {
    color: #555;
    stroke: #555;
}
.list-item-content {
    min-width: 0;
}
.list-item-title, .list-item-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-title {
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 2px 0;
}

.list-item-subtitle {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

/* Last message preview in session list */
.last-message-preview {
    display: flex;
    gap: 0.375rem;
    align-items: baseline;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.last-message-preview .message-sender {
    flex-shrink: 0;
    font-weight: 600;
    font-size: 0.75rem;
}

.last-message-preview .message-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #64748b;
    font-size: 0.8rem;
}

/* Session header with badge */
.session-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.375rem;
}

/* Multi-line message preview - allows 2 lines */
.last-message-preview-multiline {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    font-size: 0.8rem;
    color: #64748b;
}

.last-message-preview-multiline .message-sender {
    font-weight: 600;
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.last-message-preview-multiline .message-text {
    color: #64748b;
    font-size: 0.8rem;
}

/* Meta info (count and time) stacked vertically */
.list-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    justify-content: center;
    min-width: 50px;
}

.meta-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
}

.meta-count i {
    font-size: 0.65rem;
}

.meta-time {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

.list-item-timestamp {
    font-size: 0.85em;
    color: #888;
    white-space: nowrap;
    font-weight: 200;
}
.list-item button.openSession {
    padding: 0;
    border: none;
    background: none;
    font-weight: inherit;
    color: inherit;
    font-size: inherit;
    text-align: left;
    cursor: inherit;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.button-modern-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;  /* Vaste breedte */
    height: 42px; /* Vaste hoogte (matcht met home widgets) */
    background-color: #ffffff;
    border: 1px solid #e2e8f0; /* Zelfde border als home widgets */
    border-radius: 10px;       /* Iets rondere hoeken */
    color: #64748b;            /* Muted grijs, zelfde als iconen op home */
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* Subtiele schaduw */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effect */
.button-modern-icon:hover {
    background-color: #f8fafc; /* Heel lichtgrijs bij hover */
    border-color: #cbd5e1;     /* Iets donkerdere rand */
    color: #334155;            /* Icoon wordt donkerder */
    transform: translateY(-2px); /* Komt iets omhoog */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Meer schaduw */
}

/* Active / Klik effect */
.button-modern-icon:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    background-color: #f1f5f9;
}

button.button-secondary {
    background-color: #f0f0f0;
    border-color: #ccc;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.button-tertiary {
    background-color: transparent;
    border-color: transparent;
    color: #555;
    font-weight: 500;
    margin-right: auto;
}

.button-tertiary:hover {
    background-color: #f0f2f5;
}

button.button-icon {
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
button.button-icon i, button.button-icon svg {
    color: #555;
    stroke: #555;
}

/* --- Modal Stijlen --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    display: none;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 2001;
    width: 90%;
    max-width: 600px;
    display: none;
}

.modal-overlay.active {
    display: block;
}

.modal.active {
    display: block;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
}
.modal-header .button-icon {
    font-size: 1.5rem;
    line-height: 1;
    border: none;
    background: none;
}

.modal-content {
    padding: 1.5rem;
}

.filter-group-modal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.filter-group-modal > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}
.filter-group-modal strong {
    font-weight: 500;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #f9f9f9;
    border-radius: 0 0 12px 12px;
}

/* --- KPI Panelen --- */
.kpi-panel {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.kpi-circle-container {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.kpi-circle-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.kpi-circle-track,
.kpi-circle-fill {
    fill: none;
    stroke-width: 10;
}

.kpi-circle-track {
    stroke: #f0f2f5;
}

.kpi-circle-fill {
    stroke: var(--primary-color);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease-out;
}
.kpi-circle-fill.green {
    stroke: #22c55e;
}

.kpi-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.kpi-text strong {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
}
.kpi-text span {
    font-size: 0.9rem;
    color: #666;
}

.kpi-description {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.kpi-title {
    font-weight: 500;
}

/* --- Clickable KPI Cards --- */
.clickable-kpi {
    cursor: pointer;
    position: relative; /* Nodig voor absolute positionering van pijl */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.clickable-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: #b0b0b0;
}

/* Het pijltje (FontAwesome unicode) */
.clickable-kpi::after {
    content: "\f061"; /* Pijl icoon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0;
    transform: rotate(-45deg);
    transition: all 0.2s ease;
}

/* Toon pijltje bij hover */
.clickable-kpi:hover::after {
    opacity: 1;
}

/* --- NIEUWE KPI STIJLEN --- */

/* 1. Linear Progress Bar Styles */
.kpi-panel-linear {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.linear-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.linear-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.linear-progress-container {
    margin-bottom: 15px;
}

.linear-progress-track {
    width: 100%;
    height: 12px;
    background-color: #f0f2f5;
    border-radius: 6px;
    overflow: hidden;
}

.linear-progress-fill {
    height: 100%;
    background-color: var(--primary-color); /* Gebruikt je Bytechat blauw */
    width: 0%;
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Als limiet bijna bereikt is, maak rood/oranje */
.linear-progress-fill.warning {
    background-color: #f59e0b;
}
.linear-progress-fill.danger {
    background-color: #dc3545;
}

.linear-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.linear-stats {
    font-size: 0.9rem;
    color: #666;
}

.linear-stats strong {
    font-size: 1.2rem;
    color: var(--text-color);
}

.button-small {
    padding: 4px 10px;
    font-size: 0.8rem;
}

/* --- Compacte Limiet Widget in Header --- */
.limit-header-widget {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.limit-info-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.limit-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.limit-values {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.limit-bar-wrapper {
    width: 140px; /* Vaste breedte voor de balk */
    height: 8px;
    background-color: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.limit-bar-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Kleuren voor de balk (deze classes worden al door je JS toegevoegd) */
.limit-bar-fill.warning { background-color: #f59e0b; }
.limit-bar-fill.danger { background-color: #dc3545; }

/* Upgrade knop in widget */
.limit-header-widget .button-upgrade-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    background-color: #ebf5ff;
    color: #007bff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.limit-header-widget .button-upgrade-small:hover {
    background-color: #dbeafe;
}

.header-left-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* --- Datum Selector Widget --- */
.date-selector-widget {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    height: 42px; /* Zelfde hoogte als limiet widget match */
}

.selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#globalDateFilter {
    border: none;
    background: transparent;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    outline: none;
    padding-right: 10px;
}

/* Custom Date Inputs */
.custom-date-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.75rem;
    border-left: 1px solid #e2e8f0;
    animation: fadeIn 0.3s ease;
}

.custom-date-inputs input[type="date"] {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px;
    font-family: var(--font-family);
    font-size: 0.85rem;
    color: #333;
}

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

/* 2. Gauge (Halve Cirkel) Styles */
.kpi-panel-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.gauge-wrapper {
    position: relative;
    width: 200px; /* Groter gemaakt (was 160px) */
    height: 80px;
    margin-top: -5px;
    margin-bottom: 5px;
}

.gauge-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

#solveArc {
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-percentage {
    position: absolute;
    bottom: 0px; /* Tekst helemaal naar beneden gezet */
    left: 0;
    width: 100%;
    text-align: center;
}

.gauge-percentage strong {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1;
}

.gauge-footer {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* --- NIEUWE KPI CARD STYLING (Zoals voorbeeld) --- */
.kpi-card-new {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    padding: 1.25rem;
    position: relative;
}

.kpi-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.kpi-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: #f3f4f6; /* Lichtgrijs/wit */
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
}

.kpi-title-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
}

.kpi-main-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
    margin-bottom: 4px;
}

.kpi-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.kpi-trend-container {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.trend-badge {
    color: #059669; /* Groen */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
}

.trend-badge.negative {
    color: #dc2626; /* Rood */
}

.trend-label {
    color: #6b7280; /* Grijs */
}

/* Placeholder Sparkline Graph */
.kpi-mini-chart-placeholder {
    width: 80px;
    height: 35px;
    display: flex;
    align-items: flex-end;
}

.kpi-mini-chart-placeholder svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.sparkline-path {
    fill: none;
    stroke: #10b981; /* Groen */
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 6px rgba(16, 185, 129, 0.2));
}

/* --- Info Icon & Tooltip --- */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #666;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
}

.info-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 400;
    width: max-content;
    max-width: 250px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 10;
}

.info-icon:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
}

/* --- AI Inzichten Overzicht --- */
.insights-summary {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.insights-summary p {
    margin-top: 0;
    color: #555;
    font-size: 0.9rem;
}

.summary-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 0.75rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.stat-item strong {
    font-size: 1.75rem;
    font-weight: 600;
}

.stat-item span {
    font-size: 0.9rem;
    color: #666;
}

.chart-container {
    position: relative;
    height: 450px;
    width: 100%;
}

/* --- Modern Chart Styling --- */
.chart-panel-wrapper {
    background: #fff;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    padding: 1.5rem 2rem;
    border-radius: 16px; /* Iets ronder zoals voorbeeld */
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.chart-badge {
    background-color: #f3f4f6;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
}

.chart-container-modern {
    position: relative;
    height: 350px; /* Vaste hoogte voor mooie verhouding */
    width: 100%;
}

/* --- AI Chat Interface Stijlen --- */
.ai-chat-panel {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 10rem);
    padding: 0;
}

.ai-chat-history {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-bubble, .user-bubble {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 20px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-bubble {
    background-color: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.ai-bubble {
    background-color: #f0f2f5;
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.ai-bubble.thinking {
    display: flex;
    gap: 5px;
    align-items: center;
}
.ai-bubble.thinking .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999;
    animation: bounce 1.4s infinite ease-in-out both;
}
.ai-bubble.thinking .dot:nth-child(1) { animation-delay: -0.32s; }
.ai-bubble.thinking .dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }

.ai-chat-input-container {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    background: var(--panel-background);
    border-radius: 0 0 12px 12px;
}

.suggestion-chips-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.suggestion-chip {
    padding: 6px 12px;
    font-size: 0.8rem;
    background-color: #f0f2f5;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
}
.suggestion-chip:hover {
    background-color: #e5e8ec;
}

.ai-chat-form {
    display: flex;
    gap: 0.5rem;
}
#aiChatInput {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    font-size: 1rem;
}
#aiChatInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}
.ai-chat-form button {
    padding: 8px 10px;
}

/* Chat bubbles styling (from original) */
.chat-container { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble { max-width: 85%; padding: 10px 15px; border-radius: 18px; line-height: 1.4; word-wrap: break-word; }
.chat-bubble.user { background-color: #007bff; color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-bubble.bot { background-color: #e9e9eb; color: #333; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-timestamp { font-size: 0.75em; color: #888; margin-bottom: 5px; }
.chat-bubble.user .chat-timestamp { color: #cce4ff; }
.form-table { width: 100%; margin-top: 10px; border-collapse: collapse; background: #fff; border: 1px solid #ccc; border-radius: 8px; overflow: hidden; }
.form-table th, .form-table td { border-bottom: 1px solid #ddd; padding: 10px; text-align: left; }
.form-table tr:last-child th, .form-table tr:last-child td { border-bottom: none; }
.form-table th { font-weight: bold; color: #555; }

/* Add these styles for locked navigation items */
.nav-item.locked .nav-link {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.nav-item.locked .nav-link::after {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

.nav-item.feature-lock-wrapper.locked:hover .upgrade-tooltip {
    display: block;
}


/* Language dropdown styling */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    z-index: 1000;
    display: none;
}

.language-dropdown-menu.visible {
    display: block;
}

.language-option {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: #f3f4f6;
}

.language-option.selected {
    background-color: #2563eb;
    color: white;
}

.dropdown-arrow {
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.language-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* --- Account Tab Specifieke Stijlen --- */

/* Panel Headers met Iconen */
.panel h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel h2 i {
    color: #64748b;
    font-size: 1rem;
}

.account-info-text {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.account-note-text {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.account-field-display {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    padding: 1.5rem 0;
    margin-bottom: 0;
    transition: border-color 0.2s ease;
}

.account-field-display:hover {
    border-bottom-color: #e2e8f0;
    background-color: transparent;
}

.account-field-display .account-label {
    font-weight: 500;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: block;
    text-transform: none;
    letter-spacing: 0;
}

.account-field-display .account-value {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    background-color: transparent;
    padding: 0.5rem 0;
    color: #1e293b;
    font-size: 0.95rem;
    user-select: all;
    overflow-x: auto;
    white-space: nowrap;
    font-weight: 500;
}

.account-field-display.with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-field-display.with-button .account-value {
    padding: 0;
}

.account-field-display .button-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

#account-password + .button-secondary {
    margin-left: auto;
}

/* --- NIEUW: Formulier Error Message Stijl --- */
.form-error-message {
    font-size: 0.9rem;
    color: #dc3545; /* Rood */
    margin-top: 0.5rem;
}

/* Aanpassing voor algemene form-group-modal om kolommen te stapelen */
.form-group-modal {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-group-modal:last-of-type {
    margin-bottom: 0;
}

.form-group-modal > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.form-group-modal label {
    font-size: 0.9rem;
    color: #334155;
    font-weight: 500;
}

.form-group-modal strong {
    font-weight: 500;
}

.form-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.375rem;
    font-style: italic;
}

.role-info-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.role-info-box h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0c4a6e;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-info-box ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style: none;
}

.role-info-box li {
    font-size: 0.85rem;
    color: #0c4a6e;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    position: relative;
}

.role-info-box li:last-child {
    margin-bottom: 0;
}

.role-info-box li::before {
    content: "•";
    position: absolute;
    left: -1rem;
    color: #0ea5e9;
    font-weight: bold;
}


/* Code block styling - MINIMALIST */
.code-block-container {
    position: relative;
    margin: 1.5rem 0;
    background: #0f172a;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #1e293b;
}

.code-block {
    background: transparent;
    padding: 1.25rem;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #e2e8f0;
}

.code-block code {
    background: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

.copy-code-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.copy-code-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.copy-code-button i, .copy-code-button svg {
    width: 14px;
    height: 14px;
}

#customer-id-placeholder {
    color: #60a5fa;
    font-weight: 600;
}


.lead-details {
    padding: 1rem;
}

.lead-field {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.lead-field:last-child {
    border-bottom: none;
}

.lead-field strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.lead-question {
    background-color: #f9f9f9;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.list-item[data-type="form"] .list-item-icon {
    background-color: #e8f4fd;
}

.list-item[data-type="form"] .list-item-icon i, .list-item[data-type="form"] .list-item-icon svg {
    color: #1976d2;
    stroke: #1976d2;
}



/* Account Management Styling - MINIMALIST WHITE */

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1.5rem;
}

.account-action-card {
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    box-shadow: none;
    transition: border-color 0.2s ease;
}

.account-action-card:hover {
    border-bottom-color: #e2e8f0;
}

.account-action-card.danger {
    border-bottom-color: #fee;
}

.account-action-card:last-child {
    border-bottom: none;
}

.action-header h3 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.action-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.action-content {
    margin-top: 1rem;
}

.current-plan {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #e3f2fd;
    border-radius: 4px;
    color: #1976d2;
}

.plan-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
    background: white;
}

.cancellation-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-item {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.button-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.button-danger:hover {
    background-color: #c82333;
}

.button-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Modal styling voor confirmaties */
.confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.confirmation-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}


.billing-cycle-options {
    margin-bottom: 1rem;
}

.billing-cycle-options label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.price-display {
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
}

.price-display #price-text {
    font-weight: 600;
    color: #2e7d32;
}

/* Update Account Management Styling voor binnen panel - MINIMALIST */
.panel .account-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1.5rem;
}

.panel .account-action-card {
    background: transparent;
    border-radius: 0;
    padding: 1.75rem 0;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    transition: border-color 0.2s ease;
    position: relative;
    overflow: visible;
}

.panel .account-action-card::before {
    display: none;
}

.panel .account-action-card:hover {
    border-bottom-color: #e2e8f0;
    transform: none;
    box-shadow: none;
}

.panel .account-action-card:last-child {
    border-bottom: none;
}

.panel .account-action-card.danger {
    border-bottom-color: #fee;
}

.panel .action-header h3 {
    margin: 0 0 0.375rem 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.panel .action-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.panel .action-content {
    margin-top: 1rem;
}

/* Rest van de CSS blijft hetzelfde maar met .panel prefix */
.panel .current-plan {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #e3f2fd;
    border-radius: 4px;
    color: #1976d2;
}

.panel .plan-options,
.panel .billing-cycle-options {
    margin-bottom: 1rem;
}

.panel .billing-cycle-options label,
.panel .plan-options label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.panel .plan-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.panel .price-display {
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
}

.panel .price-display #price-text {
    font-weight: 600;
    color: #2e7d32;
}

.panel .cancellation-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.panel .info-item {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.panel .info-item:last-child {
    margin-bottom: 0;
}

/* --- Nieuwe AI Model Styling --- */
.ai-model-container {
    max-width: 900px;
    margin: 0 auto;
}

.ai-model-intro {
    margin-bottom: 2rem;
    text-align: center;
}

.ai-model-intro h2 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.ai-model-intro p {
    color: #666;
    margin: 0;
}

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

/* Model Card Base */
.model-card {
    position: relative;
    cursor: pointer;
}

.model-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.model-card-content {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

/* Hover State */
.model-card:hover .model-card-content {
    border-color: #b0b0b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Selected State */
.model-card input:checked + .model-card-content {
    border-color: var(--primary-color);
    background-color: #f8fbff;
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Header Layout */
.model-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.icon-box.flash {
    background-color: #e6f4ea;
    color: #1e8e3e;
}

.icon-box.pro {
    background-color: #f3e8fd;
    color: #9333ea;
}

.model-title {
    flex-grow: 1;
}

.model-title h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
}

/* Badges */
.badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.badge-green {
    background-color: #e6f4ea;
    color: #137333;
}

.badge-purple {
    background-color: #f3e8fd;
    color: #7e22ce;
}

/* Check Indicator (Top Right) */
.check-indicator {
    color: var(--primary-color);
    font-size: 1.5rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.model-card input:checked + .model-card-content .check-indicator {
    opacity: 1;
    transform: scale(1);
}

/* Description & Features */
.model-desc {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.model-features {
    list-style: none;
    padding: 0;
    margin: auto 0 0 0; /* Pushes list to bottom if card heights differ */
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.model-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #444;
}

.model-features li i {
    color: #22c55e; /* Green checkmark */
    font-size: 0.9rem;
}

.model-features li i.warning-icon {
    color: #f59e0b; /* Orange warning */
}

/* Footer Button */
.model-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.panel .cancellation-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.panel .info-item {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.panel .info-item:last-child {
    margin-bottom: 0;
}

/* --- Nieuwe AI Model Styling --- */
.ai-model-container {
    max-width: 900px;
    margin: 0 auto;
}

.ai-model-intro {
    margin-bottom: 2rem;
    text-align: center;
}

.ai-model-intro h2 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.ai-model-intro p {
    color: #666;
    margin: 0;
}

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

/* Model Card Base */
.model-card {
    position: relative;
    cursor: pointer;
}

.model-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.model-card-content {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

/* Hover State */
.model-card:hover .model-card-content {
    border-color: #b0b0b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Selected State */
.model-card input:checked + .model-card-content {
    border-color: var(--primary-color);
    background-color: #f8fbff;
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Header Layout */
.model-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.icon-box.flash {
    background-color: #e6f4ea;
    color: #1e8e3e;
}

.icon-box.pro {
    background-color: #f3e8fd;
    color: #9333ea;
}

.model-title {
    flex-grow: 1;
}

.model-title h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
}

/* Badges */
.badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.badge-green {
    background-color: #e6f4ea;
    color: #137333;
}

.badge-purple {
    background-color: #f3e8fd;
    color: #7e22ce;
}

/* Check Indicator (Top Right) */
.check-indicator {
    color: var(--primary-color);
    font-size: 1.5rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.model-card input:checked + .model-card-content .check-indicator {
    opacity: 1;
    transform: scale(1);
}

/* Description & Features */
.model-desc {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.model-features {
    list-style: none;
    padding: 0;
    margin: auto 0 0 0; /* Pushes list to bottom if card heights differ */
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.model-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #444;
}

.model-features li i {
    color: #22c55e; /* Green checkmark */
    font-size: 0.9rem;
}

.model-features li i.warning-icon {
    color: #f59e0b; /* Orange warning */
}

/* Footer Button */
.model-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
}

.button-large {
    padding: 12px 24px;
    font-size: 1rem;
}

/* ====================================================== */
/* === LIVE AGENT INBOX STYLING === */
/* ====================================================== */

.live-agent-container {
    display: flex;
    gap: 0;
    height: calc(100vh - 180px); /* Adjust based on header height */
    min-height: 500px;
}

.live-sidebar {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
    background: #ffffff;
}

.live-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    height: 100%;
}

/* Live Agent List Items - No card styling, just dividers */
.live-list .list-item {
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
    background: transparent;
    transition: background-color 0.2s ease;
}

.live-list .list-item:hover {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: none;
}

.live-list .list-item.selected {
    background-color: #eff6ff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: none;
}

.live-list .list-item:last-child {
    border-bottom: none;
}

/* Align session headers and badges to the left in live list */
.live-list .session-header {
    justify-content: flex-start;
    align-items: center;
}

.live-list .list-item-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.live-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
}

.live-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.live-chat-input-area {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background-color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.live-chat-input-area input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.live-chat-input-area input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.live-chat-input-area input:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Send button - compact icon button */
.live-chat-input-area .button-primary {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
}

.live-chat-input-area .button-primary:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.live-chat-input-area .button-primary:disabled {
    background: #e2e8f0;
    box-shadow: none;
}

.live-chat-input-area .button-primary i {
    font-size: 1rem;
}

/* Take Over Button - Replaces input field when conversation is not taken over */
.button-take-over {
    flex: 1;
    padding: 16px 24px;
    border: 2px dashed #cbd5e1;
    border-radius: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #475569;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.button-take-over:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.button-take-over:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.button-take-over i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.button-take-over:hover i {
    transform: scale(1.1);
}

/* End Session Button - Uses button-modern-icon styling with red accent */
#end-live-session-btn {
    color: #ef4444;
    border-color: #fecaca;
}

#end-live-session-btn:hover {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.status-indicator.online {
    background-color: #dcfce7;
    color: #166534;
}

.status-indicator.online i {
    color: #22c55e;
    animation: pulse-dot 2s infinite;
}

.status-indicator.offline {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-indicator i {
    font-size: 0.5rem;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Empty States */
.empty-state {
    text-align: center;
    color: #64748b;
    padding: 2rem 1.5rem;
    font-size: 0.875rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
    margin: 0.5rem;
}

.empty-chat-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    gap: 0.75rem;
    text-align: center;
    padding: 2rem;
}

.empty-chat-placeholder i {
    font-size: 2.5rem;
    color: #cbd5e1;
}

.empty-chat-placeholder p {
    font-size: 0.9rem;
    color: #64748b;
    max-width: 280px;
    line-height: 1.5;
}

/* Chat Bubbles - Modern Design */
.live-message {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    position: relative;
    line-height: 1.5;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* User/Customer messages - left side, light gray */
.live-message.user {
    align-self: flex-start;
    background-color: #f1f5f9;
    color: #1e293b;
    border-bottom-left-radius: 4px;
}

/* AI/Bot messages - right side, primary blue */
.live-message.bot {
    align-self: flex-end;
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Human Agent messages - right side, teal/green to distinguish from AI */
.live-message.agent {
    align-self: flex-end;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Message sender label */
.live-message-sender {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.live-message.bot .live-message-sender {
    color: rgba(255, 255, 255, 0.9);
}

.live-message.agent .live-message-sender {
    color: rgba(255, 255, 255, 0.9);
}

.live-message.user .live-message-sender {
    color: #64748b;
}

.live-message-time {
    font-size: 0.7rem;
    margin-top: 4px;
    opacity: 0.7;
    text-align: right;
}

/* Message sending states */
.live-message.sending {
    opacity: 0.7;
}

.live-message.sending .live-message-time::after {
    content: ' ⏳';
}

.live-message.sent .live-message-time::after {
    content: ' ✓';
    color: rgba(255,255,255,0.7);
}

.live-message.delivered .live-message-time::after {
    content: ' ✓✓';
    color: rgba(255,255,255,0.7);
}

.live-message.failed {
    background-color: #ef4444 !important;
    cursor: pointer;
}

.live-message.failed:hover {
    opacity: 0.9;
}

.live-message.failed .live-message-time::after {
    content: ' ⚠️ Klik om opnieuw te proberen';
}

/* Read Receipt Styling */
.live-message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.read-status {
    font-size: 0.65rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.read-status.delivered {
    color: rgba(100, 116, 139, 0.8);
}

.live-message.bot .read-status.delivered,
.live-message.agent .read-status.delivered {
    color: rgba(255, 255, 255, 0.7);
}

.read-status.read {
    color: #3b82f6;
}

.live-message.bot .read-status.read,
.live-message.agent .read-status.read {
    color: rgba(255, 255, 255, 0.9);
}

.read-status.read::before {
    content: '✓✓';
    margin-right: 2px;
}

/* Typing indicator */
.typing-indicator {
    display: none;
    align-self: flex-start;
    background-color: #eef2f6;
    padding: 12px 16px;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    margin-top: 8px;
}

.typing-indicator.visible {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0s;
}

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

/* Notification Badge Styling */
.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #dc3545; /* Red */
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification-badge.hidden {
    display: none;
    transform: scale(0);
}

/* Animation for new notifications */
 @keyframes popIn {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.notification-badge:not(.hidden) {
    animation: popIn 0.3s ease-out forwards;
}

/* --- dashboard.css --- */

/* Pas de container aan zodat we elementen over elkaar kunnen leggen */
.list-item-actions {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 120px; /* Zorg voor genoeg ruimte */
    height: 100%;
}

/* 1. De Tijd: Zichtbaar, maar verdwijnt bij hover */
.list-item-timestamp {
    font-size: 0.85em;
    color: #888;
    white-space: nowrap;
    opacity: 1;
}

/* Bij hover over het hele item, verberg de tijd */
.list-item:hover .list-item-timestamp {
    opacity: 0;
    pointer-events: none;
}

/* 2. De Actie Container (Drie puntjes): Verborgen, verschijnt bij hover */
.item-hover-menu {
    position: absolute;
    right: 0;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* Bij hover, toon de menu knop */
.list-item:hover .item-hover-menu,
.item-hover-menu.active { /* Ook tonen als menu open is */
    opacity: 1;
    pointer-events: auto;
}

/* De knop met de 3 puntjes */
.menu-dots-btn {
    /* Layout */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;  /* Iets compacter dan de header (42px) voor in de lijst */
    height: 36px;

    /* Visual Style (Identiek aan header knoppen) */
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Hover & Active State (Identiek aan header knoppen) */
.menu-dots-btn:hover,
.item-hover-menu.active .menu-dots-btn {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.menu-dots-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    background-color: #f1f5f9;
}

/* 3. Het Dropdown Menu zelf */
.action-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 4px;
    z-index: 100;
    min-width: 180px;
    display: none; /* Standaard verborgen */
    margin-top: 4px;
}

.item-hover-menu.active .action-dropdown {
    display: block;
    animation: fadeInMenu 0.15s ease-out;
}

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

/* Items in de dropdown */
.dropdown-item-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    text-align: left;
    font-family: var(--font-family);
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
    border-radius: 4px;
}

.dropdown-item-btn:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.dropdown-item-btn i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

/* Kleur voor 'Los op' vs 'Markeer' */
.dropdown-item-btn.solve-action { color: #10b981; } /* Groen */
.dropdown-item-btn.unsolve-action { color: #f59e0b; } /* Oranje */

/* --- dashboard.css --- */

/* 1. Zorg dat de Activity tab de volledige hoogte pakt minus de padding van main-content */
#activity.active {
    display: flex;          /* Alleen flex als hij actief is */
    flex-direction: column;
    height: calc(100vh - 4rem);
    overflow: hidden;
}

/* 2. Zorg dat de Header vast blijft staan en niet krimpt */
#activity .main-header {
    flex-shrink: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem; /* Beetje ruimte voor de lijst begint */
}

/* 3. De lijst containers (Chats & Leads) styling strippen en scrollbaar maken */
#chatlogs, #leads {
    flex-grow: 1;      /* Vul de resterende ruimte tot de bodem */
    overflow-y: auto;  /* Maak alleen dit gedeelte scrollbaar */

    /* Reset de standaard .panel styling (zoals gevraagd) */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2px 5px 0 0 !important; /* Kleine padding rechts voor de scrollbar */
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}

/* OPTIONEEL: Maak de scrollbar iets mooier/subtieler */
#chatlogs::-webkit-scrollbar,
#leads::-webkit-scrollbar {
    width: 6px;
}

#chatlogs::-webkit-scrollbar-track,
#leads::-webkit-scrollbar-track {
    background: transparent;
}

#chatlogs::-webkit-scrollbar-thumb,
#leads::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

/* User Management Styles - MINIMALIST */
.user-accounts-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1.5rem;
}

.user-account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    transition: border-color 0.2s ease;
    box-shadow: none;
}

.user-account-item:hover {
    background: transparent;
    border-bottom-color: #e2e8f0;
    box-shadow: none;
    transform: none;
}

.user-account-item:last-child {
    border-bottom: none;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.user-email {
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-email i {
    color: #64748b;
    font-size: 0.9rem;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-blue {
    background: #dbeafe;
    color: #1e40af;
}

.badge-purple {
    background: #f3e8ff;
    color: #7c3aed;
}

.badge-gold {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.user-date {
    color: #94a3b8;
}

.admin-label {
    color: #64748b;
    font-size: 0.85rem;
    font-style: italic;
}

.owner-label {
    color: #92400e;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.role-select {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #334155;
    cursor: pointer;
    min-width: 100px;
}

.role-select:hover {
    border-color: #cbd5e1;
}

.role-select:focus {
    outline: none;
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.role-select:disabled {
    background: #f8fafc;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    font-style: italic;
}

.button-danger {
    color: #dc2626;
    border-color: #dc2626;
}

.button-danger:hover {
    background: #dc2626;
    color: white;
}

.button-delete {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.button-delete:hover {
    background: #2563eb;
}

button.button-delete i {
    color: white;
}

.current-user-badge {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 400;
    margin-left: 0.5rem;
}

/* User Management Loading States */
.button-primary:disabled,
.button-secondary:disabled,
.button-icon:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.fa-spinner {
  animation: spin 1s linear infinite;
}

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

/* Improved User Account Item Styling */
.user-account-item {
  margin-bottom: 0.75rem;
}

.user-email {
  margin-bottom: 0.25rem;
}

.user-email i {
  margin-right: 0.5rem;
}

/* Account form group styling */
.account-form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.account-form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  letter-spacing: 0.01em;
}

.account-input {
  padding: 0.65rem 0.875rem;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
  background: #ffffff;
  font-family: var(--font-family);
}

.account-input:hover {
  border-color: #cbd5e1;
}

.account-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: #ffffff;
}

.live-agent-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  max-width: fit-content;
}

.live-agent-preview img {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  background: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.live-agent-preview span {
  font-weight: 500;
  color: #1e293b;
  font-size: 0.9rem;
}

/* Account Grid - Twee kolommen met flexbox */
.account-grid-columns {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.account-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.account-column .panel {
  margin-bottom: 0;
}

/* ============================================== */
/* RESPONSIVE DESIGN - Account Tab */
/* ============================================== */

@media (max-width: 1024px) {
  /* Account grid naar 1 kolom op tablets */
  .account-grid-columns {
    flex-direction: column;
  }

  .account-column {
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Verbeter spacing op mobiel */
  .panel {
    padding: 1.25rem;
  }

  .panel h2 {
    font-size: 1rem;
  }

  .account-info-text {
    font-size: 0.875rem;
  }

  .code-block {
    font-size: 0.75rem;
    padding: 1rem;
  }

  .copy-code-button {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
  }

  .account-field-display {
    padding: 0.875rem;
  }

  .button-primary {
    width: 100%;
    justify-content: center;
  }
}

/* --- Account Tab: Abonnement Verbruik Styling --- */
.account-usage-stats {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.account-usage-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.account-usage-label {
    color: #64748b;
    font-weight: 500;
}

.account-usage-values {
    font-weight: 600;
    color: #1e293b;
}

.account-usage-bar-wrapper {
    width: 100%;
    height: 8px;
    background-color: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.account-usage-bar-fill {
    height: 100%;
    background-color: #2563eb;
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.account-usage-bar-fill.warning {
    background-color: #f59e0b !important;
}

.account-usage-bar-fill.danger {
    background-color: #dc3545 !important;
}

/* ====================================================== */
/* === BOOSTER MESSAGES SECTION === */
/* ====================================================== */

.booster-section {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.booster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.booster-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
}

.booster-title i {
    color: #3b82f6;
    font-size: 1.1rem;
}

.booster-balance {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.booster-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
}

.booster-label {
    font-size: 0.85rem;
    color: #64748b;
}

.booster-description {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.booster-purchase-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 1.25rem;
}

.booster-slider-section {
    margin-bottom: 1.25rem;
}

.booster-slider-section label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e40af;
    margin-bottom: 0.75rem;
}

.booster-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.booster-slider-wrapper input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.booster-slider-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
    transition: transform 0.15s ease;
}

.booster-slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.booster-slider-wrapper input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.booster-slider-value {
    min-width: 100px;
    text-align: right;
    font-weight: 600;
    color: #000000;
    font-size: 0.95rem;
}

.booster-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(59, 130, 246, 0.3);
}

.booster-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-per-message {
    font-size: 0.8rem;
    color: #000000;
}

.price-total {
    font-size: 0.95rem;
    color: #000000;
}

.price-total strong {
    font-size: 1.25rem;
    color: #000000;
}

.booster-buy-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.booster-buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.booster-buy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ====================================================== */
/* === INSTALL TAB STYLING === */
/* ====================================================== */

.install-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Platform Selector */
.platform-selector-wrapper {
    max-width: 500px;
    margin-bottom: 3rem;
}

.platform-selector-wrapper label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.platform-selector-wrapper label i {
    color: var(--primary-color);
}

.platform-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-color);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s ease;
}

.platform-select:hover {
    border-color: var(--primary-color);
}

.platform-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Install Guide Container */
.install-guide-container {
    margin-top: 3rem;
    animation: fadeIn 0.4s ease;
}

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

/* Video en Stappen Layout */
.video-steps-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Video Sectie */
.video-section {
    position: sticky;
    top: 2rem;
}

.video-wrapper {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
}

.video-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.video-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Stappen Sectie */
.steps-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.steps-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.steps-section h3::before {
    content: "";
    width: 4px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Stappen Lijst */
.install-steps-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Individuele Stap */
.install-step {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.install-step.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.install-step.completed {
    border-color: #22c55e;
    opacity: 0.7;
}

/* Stap Header (Altijd zichtbaar) */
.step-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.install-step.active .step-header {
    background: #f0f9ff;
}

.step-header:hover {
    background: #f8fafc;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.install-step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.install-step.completed .step-number {
    background: #22c55e;
    color: white;
}

.step-title {
    flex: 1;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.step-expand-icon {
    color: var(--text-muted);
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.install-step.active .step-expand-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}

/* Stap Content (Uitklapbaar) */
.step-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.25rem;
}

.install-step.active .step-content {
    max-height: 1000px;
    padding: 0 1.25rem 1.25rem 1.25rem;
}

.step-description {
    color: var(--text-color);
    line-height: 1.7;
    font-size: 0.95rem;
}

.step-description ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.step-description li {
    margin: 0.5rem 0;
}

.step-description code {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e11d48;
}

.step-description pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .video-steps-layout {
        grid-template-columns: 1fr;
    }

    .video-section {
        position: static;
    }
}

@media (max-width: 640px) {
    .install-intro h2 {
        font-size: 1.5rem;
    }

    .platform-selector-wrapper {
        padding: 0 1rem;
    }

    .video-steps-layout {
        gap: 1.5rem;
    }

    .steps-section {
        padding: 1rem;
    }
}

/* ====================================================== */
/* === ACCOUNT TAB WITH SIDEBAR LAYOUT (CLEAN STYLE) === */
/* ====================================================== */

.account-layout {
    display: flex;
    gap: 2.5rem; /* Minder extreme ruimte */
    height: 100%;
    min-height: calc(100vh - 140px);
    margin: 0 auto;
    padding-top: 2rem;
}

/* --- Account Sidebar --- */
.account-sidebar {
    width: 240px; /* Iets smaller */
    background: transparent;
    border: none;
    flex-shrink: 0;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Iets compacter */
    position: sticky;
    top: 2rem;
}

/* Titel boven de sidebar */
.account-nav::before {
    content: 'Account instellingen';
    display: block;
    font-size: 1rem;
    font-weight: 600; /* Minder dikgedrukt (was 700) */
    color: #64748b; /* Iets zachter van kleur */
    margin-bottom: 1.25rem;
    padding-left: 12px;
    font-family: var(--font-family);
}

.account-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 10px 14px; /* Iets compacter */
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 400; /* Minder dikgedrukt (was 500) */
    border: none;
    cursor: pointer;
}

.account-nav-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: #94a3b8;
    transition: color 0.2s;
}

/* Hover State */
.account-nav-item:hover {
    background-color: #f8fafc;
    color: #1e293b;
}

/* Active State (GRIJS + ZWART) */
.account-nav-item.active {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 500; /* Minder dikgedrukt (was 600) */
}

.account-nav-item.active i {
    color: #0f172a;
}

/* --- Account Content Area --- */
.account-content-area {
    flex: 1;
    padding: 0;
    overflow-y: visible;
}

/* Secties tonen/verbergen */
.account-section {
    display: none !important;
}

.account-section.active {
    display: block !important;
    animation: fadeInAccount 0.2s ease-out;
}

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

/* --- Headers (Clean) --- */
.account-section-header {
    margin-bottom: 2rem; /* Minder ruimte */
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1.25rem;
}

.account-section-header h2 {
    font-size: 1.5rem; /* Iets kleiner */
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.account-section-header p {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

/* --- Content Styling (MODERN DISPLAY) --- */
.account-section-body {
    max-width: 100%;
}

/* Nieuwe opmaak voor display velden */
.account-field-display {
    background-color: #f8fafc; /* Lichte achtergrond */
    border: 1px solid #e2e8f0; /* Subtiele rand */
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-field-display:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

.account-field-display .account-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.account-field-display .account-value {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 500;
    padding: 0;
    word-break: break-all;
}

/* Inputs strakker maken */
.account-form-group {
    margin-bottom: 1.5rem; /* Minder ruimte */
}

.account-form-group label {
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 0.5rem;
    font-weight: 500; /* Minder dikgedrukt (was 600) */
    display: block;
}

.account-input {
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 10px 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.account-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Remove 'Panel' styles inside account tab if accidentally applied */
.account-content-area .panel {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

/* Plan Selection Grid */
.plan-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 1.5rem 0;
}

.plan-option {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-option:hover:not(.current) {
    border-color: #3b82f6;
    background: #f0f7ff;
    transform: translateY(-1px);
}

.plan-option.current {
    border-color: #22c55e;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    cursor: default;
}

.plan-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.plan-option-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
}

.plan-option-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

.plan-option-badge.current-badge {
    background: #22c55e;
    color: white;
}

.plan-option-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.plan-option:hover:not(.current) .plan-option-name {
    color: #3b82f6;
}

.plan-option.selected:not(.current) {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.plan-option.selected:not(.current) .plan-option-name {
    color: #3b82f6;
}

.plan-change-action {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-top: 0.5rem;
    animation: fadeIn 0.2s ease-out;
}

.plan-change-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

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

.plan-change-text {
    margin: 0;
    color: #1e40af;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-change-text i {
    color: #3b82f6;
}

.plan-change-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.billing-cycle-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
}

.cycle-label {
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s;
}

.cycle-label.active {
    color: #1e40af;
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3b82f6;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #22c55e;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.plan-change-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.timing-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timing-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timing-option:hover {
    border-color: #cbd5e1;
    background: white;
}

.timing-option:has(input:checked) {
    border-color: #3b82f6;
    background: #f0f7ff;
}

.timing-option input {
    display: none;
}

.timing-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: all 0.2s ease;
}

.timing-option:has(input:checked) .timing-radio {
    border-color: #3b82f6;
}

.timing-option:has(input:checked) .timing-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
}

.timing-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timing-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.timing-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.plan-change-action .button-primary {
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 8px;
}

@media (max-width: 600px) {
    .plan-selection-grid {
        grid-template-columns: 1fr;
    }

    .plan-change-action {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .plan-change-controls {
        flex-direction: column;
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .account-layout {
        flex-direction: column;
        gap: 2rem;
    }
    .account-sidebar { width: 100%; }
    .account-nav::before { display: none; }
    .account-nav {
        flex-direction: row;
        overflow-x: auto;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 1rem;
    }
    .account-nav-item { white-space: nowrap; }
}

/* ============================================== */
/* GEBRUIKERSBEHEER - Business Only Feature      */
/* ============================================== */

/* Nav item locked state for non-business users */
.users-nav-item.locked {
    opacity: 0.5;
    position: relative;
}

.users-nav-item.locked i,
.users-nav-item.locked span:not(.users-upgrade-tooltip) {
    color: #9ca3af;
}

/* Hover tooltip for locked nav item */
.users-upgrade-tooltip {
    display: none;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 12px;
    background: #1e293b;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.users-upgrade-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #1e293b;
}

.users-nav-item.locked:hover .users-upgrade-tooltip {
    display: block;
}

/* Upgrade notice panel for non-business users */
.users-upgrade-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.upgrade-notice-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.upgrade-notice-content > i {
    font-size: 1.5rem;
    color: #d97706;
    flex-shrink: 0;
    margin-top: 2px;
}

.upgrade-notice-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #92400e;
}

.upgrade-notice-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #a16207;
    line-height: 1.5;
}

.users-upgrade-notice .button-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
}

.users-upgrade-notice .button-primary:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Team member limit text */
.users-limit-text {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 4px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
}

.users-limit-text.warning {
    background: #fef3c7;
    color: #d97706;
}

.users-limit-text.danger {
    background: #fee2e2;
    color: #dc2626;
}

/* Limit reached warning */
.users-limit-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    color: #92400e;
    font-size: 0.875rem;
}

.users-limit-warning i {
    color: #f59e0b;
}

/* Hide create button when limit reached */
#create-viewer-btn.hidden {
    display: none;
}

/* ====================================================== */
/* === NOTIFICATIONS & INTEGRATIONS STYLES === */
/* ====================================================== */

/* Quick Add Buttons */
.notifications-quick-add {
    margin-bottom: 1.5rem;
}

.quick-add-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.quick-add-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-add-btn:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
    color: var(--primary-color);
}

.quick-add-btn i {
    font-size: 1rem;
}

.quick-add-btn[data-platform="slack"] i { color: #4A154B; }
.quick-add-btn[data-platform="discord"] i { color: #5865F2; }
.quick-add-btn[data-platform="telegram"] i { color: #0088cc; }
.quick-add-btn[data-platform="email"] i { color: #EA4335; }
.quick-add-btn[data-platform="webhook"] i { color: #64748b; }

/* Integrations List */
.integrations-list-container {
    margin-top: 1.5rem;
}

.integrations-list-container h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.integrations-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.integration-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.integration-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.integration-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.integration-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.25rem;
}

.integration-icon.slack { background: #f3e8f4; color: #4A154B; }
.integration-icon.discord { background: #eef0ff; color: #5865F2; }
.integration-icon.telegram { background: #e6f4fb; color: #0088cc; }
.integration-icon.email { background: #fce8e8; color: #EA4335; }
.integration-icon.webhook { background: #f1f5f9; color: #64748b; }

.integration-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.integration-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.integration-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.integration-badge.live-only {
    background: #fef3c7;
    color: #92400e;
}

.integration-badge.all-messages {
    background: #dbeafe;
    color: #1e40af;
}

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

.integration-toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

.integration-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.integration-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.integration-toggle .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.integration-toggle input:checked + .slider {
    background-color: #22c55e;
}

.integration-toggle input:checked + .slider:before {
    transform: translateX(20px);
}

.integration-edit-btn {
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.integration-edit-btn:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

/* Live Agent - Removed notifications panel CSS (now managed via header button) */

/* Modal Form Styles for Integration Modal */
#integrationModal .form-group {
    margin-bottom: 1.25rem;
}

#integrationModal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-color);
}

#integrationModal .form-input,
#integrationModal .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#integrationModal .form-input:focus,
#integrationModal .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.platform-help {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.platform-help a {
    color: var(--primary-color);
    text-decoration: none;
}

.platform-help a:hover {
    text-decoration: underline;
}

.platform-help i {
    color: var(--primary-color);
    margin-right: 0.25rem;
}

.form-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.form-hint i {
    color: var(--primary-color);
    margin-top: 2px;
}

/* Button Danger Style */
.button-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.button-danger:hover {
    background: #fecaca;
    border-color: #f87171;
}

/* Button Small */
.button-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

/* ====================================================== */
/* === LIVE AGENT MOBILE-FIRST RESPONSIVE DESIGN ===     */
/* ====================================================== */

/* Header left group for back button + title */
.header-left-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Mobile back button - hidden by default */
.mobile-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.mobile-back-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

/* Hide on mobile utility class */
.hide-on-mobile {
    display: flex;
}

/* Mobile breakpoint for Live Agent */
@media (max-width: 768px) {
    /* Hide sidebar when Live Agent tab is active */
    body.live-agent-mobile-active .sidebar {
        display: none !important;
    }

    /* Adjust content wrapper for no sidebar */
    body.live-agent-mobile-active .content-wrapper {
        margin-left: 0 !important;
    }

    body.live-agent-mobile-active .main-content {
        padding: 0;
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Hide notification button on mobile */
    .hide-on-mobile {
        display: none !important;
    }

    /* Live Agent Header adjustments */
    .live-agent-header {
        margin: 0;
        padding: 0.75rem 1rem;
        background: #fff;
        border-bottom: 1px solid var(--border-color);
    }

    .live-agent-header .header-content {
        gap: 0.5rem;
    }

    .live-agent-header h1 {
        font-size: 1.1rem;
        margin-bottom: 0;
    }

    /* Show back button on mobile when in chat view */
    body.live-agent-chat-active .mobile-back-btn {
        display: flex;
    }

    /* Live Agent Container - Stack vertically on mobile */
    .live-agent-container {
        flex-direction: column;
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px); /* Dynamic viewport for mobile browsers */
        gap: 0;
        position: relative;
        margin: 0;
        border-radius: 0;
        overflow-x: hidden;
        overflow-y: hidden;
    }

    /* Sessions sidebar on mobile - full width */
    .live-sidebar {
        flex: none;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 10;
        background: #fff;
        border-radius: 0;
        border-right: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* When chat is active, hide the sidebar */
    body.live-agent-chat-active .live-sidebar {
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
    }

    /* Chat area on mobile - full width and full height */
    .live-chat-area {
        flex: none;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 5;
        border-radius: 0;
        transform: translateX(100%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* When chat is active, show the chat area */
    body.live-agent-chat-active .live-chat-area {
        transform: translateX(0);
        opacity: 1;
        z-index: 15;
    }

    /* Show sidebar when not in chat view */
    body:not(.live-agent-chat-active) .live-sidebar {
        transform: translateX(0);
        opacity: 1;
    }

    /* Adjust chat messages area for mobile */
    .live-chat-messages {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    /* Adjust message bubbles for mobile */
    .live-message {
        max-width: 85%;
        padding: 10px 14px;
        font-size: 0.875rem;
    }

    /* Input area adjustments */
    .live-chat-input-area {
        padding: 0.625rem 0.75rem;
        gap: 0.5rem;
        border-top: 1px solid #e2e8f0;
        width: 100%;
        box-sizing: border-box;
    }

    .live-chat-input-area input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 14px;
        flex: 1;
        min-width: 0; /* Allows flex item to shrink below content size */
    }

    /* Buttons smaller on mobile */
    .live-chat-input-area .button-primary,
    .live-chat-input-area .button-modern-icon {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .live-chat-input-area .button-primary i,
    .live-chat-input-area .button-modern-icon i {
        font-size: 0.9rem;
    }

    /* Take over button responsive */
    .button-take-over {
        font-size: 0.875rem;
        padding: 12px 16px;
    }

    .button-take-over span {
        font-size: 0.875rem;
    }

    /* Session list adjustments */
    .live-list {
        padding: 0.5rem 0.5rem;
        overflow-x: hidden;
    }

    .live-sidebar h3 {
        padding: 0.875rem 0.75rem;
        font-size: 0.9rem;
        background: #f8fafc;
    }

    /* List items in sessions - improved spacing */
    .live-sidebar .list-item {
        padding: 0.75rem;
        gap: 0.625rem;
        margin-bottom: 0.375rem;
        border-radius: 10px;
    }

    .live-sidebar .list-item-icon {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .live-sidebar .list-item-title {
        font-size: 0.875rem;
    }

    .live-sidebar .list-item-subtitle {
        font-size: 0.75rem;
    }

    /* Chat header adjustments */
    .live-chat-header {
        padding: 0.75rem 1rem;
        background: #f8fafc;
    }

    .live-chat-header h3 {
        font-size: 0.9rem;
    }

    /* Status indicator - SHOW text on mobile */
    .status-indicator {
        font-size: 0.75rem;
        padding: 4px 10px;
        gap: 5px;
    }

    .status-indicator #live-status-text {
        display: inline !important; /* Force show status text */
    }

    .status-indicator i {
        font-size: 0.5rem;
    }

    /* Empty state adjustments */
    .empty-state {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
    }

    .empty-chat-placeholder {
        padding: 2rem 1rem;
    }

    .empty-chat-placeholder i {
        font-size: 2rem;
        color: #cbd5e1;
    }

    .empty-chat-placeholder p {
        font-size: 0.85rem;
        color: #94a3b8;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    body.live-agent-mobile-active .main-content {
        padding: 0;
    }

    .live-agent-header {
        padding: 0.625rem 0.75rem;
    }

    .live-agent-header h1 {
        font-size: 1rem;
    }

    .live-agent-container {
        height: calc(100vh - 55px);
        height: calc(100dvh - 55px);
    }

    .live-message {
        max-width: 88%;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .live-chat-input-area {
        padding: 0.5rem;
    }

    .live-chat-input-area input {
        padding: 8px 12px;
    }

    .live-chat-input-area .button-primary {
        width: 36px;
        height: 36px;
    }

    .live-chat-input-area .button-primary i {
        font-size: 0.85rem;
    }

    .button-modern-icon {
        width: 36px;
        height: 36px;
    }

    .mobile-back-btn {
        width: 36px;
        height: 36px;
    }

    .status-indicator {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* ====================================================== */
/* === SATISFACTION ANALYTICS SECTION === */
/* ====================================================== */

.satisfaction-analytics-section {
    margin-top: 1.5rem;
}

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

.satisfaction-analytics-section .section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.satisfaction-analytics-section .section-header h2 i {
    color: #f59e0b;
}

.satisfaction-period-badge {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.satisfaction-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.satisfaction-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.satisfaction-card-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.satisfaction-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.satisfaction-icon.csat {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.satisfaction-icon.responses {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.satisfaction-icon.tags {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #9333ea;
}

.satisfaction-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
}

.satisfaction-main-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.satisfaction-unit {
    font-size: 1rem;
    font-weight: 500;
    color: #94a3b8;
}

.satisfaction-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.satisfaction-chart-placeholder {
    margin-top: auto;
    min-height: 40px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.satisfaction-bar {
    flex: 1;
    background: #e2e8f0;
    border-radius: 3px 3px 0 0;
    min-height: 8px;
    transition: height 0.3s ease;
    position: relative;
}

.satisfaction-bar.filled {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
}

.satisfaction-bar:hover::after {
    content: attr(data-count);
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
}

.satisfaction-trend {
    margin-top: auto;
    height: 40px;
}

/* Tags Card */
.satisfaction-tags-card {
    min-height: 180px;
}

.satisfaction-tags-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.satisfaction-tag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.85rem;
}

.satisfaction-tag-item .tag-name {
    color: var(--text-color);
    font-weight: 500;
}

.satisfaction-tag-item .tag-count {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.empty-tags-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    color: #94a3b8;
}

.empty-tags-state i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.empty-tags-state p {
    font-size: 0.85rem;
    margin: 0;
}

/* Feedback Table */
.satisfaction-feedback-panel {
    padding: 0;
    overflow: hidden;
}

.feedback-panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.feedback-panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.feedback-panel-header h3 i {
    color: #64748b;
}

.feedback-table-wrapper {
    overflow-x: auto;
}

.feedback-table {
    width: 100%;
    border-collapse: collapse;
}

.feedback-table thead {
    background: #f8fafc;
}

.feedback-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 1px solid #e2e8f0;
}

.feedback-table td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: var(--text-color);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.feedback-table tbody tr:hover {
    background: #f8fafc;
}

.feedback-rating {
    display: flex;
    gap: 2px;
}

.feedback-rating .star {
    color: #e2e8f0;
    font-size: 0.9rem;
}

.feedback-rating .star.filled {
    color: #fbbf24;
}

.feedback-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.feedback-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.feedback-text {
    max-width: 300px;
    color: #64748b;
    font-style: italic;
}

.empty-feedback-row td {
    padding: 2rem !important;
}

.empty-feedback-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #94a3b8;
}

.empty-feedback-state i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

.empty-feedback-state p {
    font-size: 0.9rem;
    margin: 0 0 0.25rem;
    color: #64748b;
}

.empty-feedback-state span {
    font-size: 0.8rem;
}

/* Responsive satisfaction section */
@media (max-width: 1024px) {
    .satisfaction-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .satisfaction-tags-card {
        grid-column: span 2;
    }
}

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

    .satisfaction-tags-card {
        grid-column: span 1;
    }

    .satisfaction-analytics-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .feedback-table th:nth-child(4),
    .feedback-table td:nth-child(4) {
        display: none;
    }
}

/* ============================================
   SERVER STATUS MONITOR STYLES
   ============================================ */

.server-status-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.server-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.server-status-indicator i {
    font-size: 0.75rem;
}

.server-status-indicator.healthy {
    color: #22c55e;
}

.server-status-indicator.healthy i {
    animation: pulse-green 2s infinite;
}

.server-status-indicator.degraded {
    color: #eab308;
}

.server-status-indicator.degraded i {
    animation: pulse-yellow 2s infinite;
}

.server-status-indicator.unhealthy,
.server-status-indicator.unreachable {
    color: #ef4444;
}

.server-status-indicator.unhealthy i,
.server-status-indicator.unreachable i {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse-yellow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.server-status-updated {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Service Cards Section */
.server-services-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.server-service-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.server-service-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.service-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-info > i {
    font-size: 1.25rem;
    color: #667eea;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea15, #764ba215);
    border-radius: 8px;
}

.service-info-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 0.25rem 0;
}

.service-latency {
    font-size: 0.8rem;
    color: #64748b;
}

.service-current-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    animation: pulse-status 2s ease-in-out infinite;
}

.status-dot.healthy {
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
}

.status-dot.degraded {
    background: #eab308;
    box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.4);
}

.status-dot.unhealthy,
.status-dot.unreachable {
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
}

@keyframes pulse-status {
    0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
    50% { box-shadow: 0 0 0 6px transparent; opacity: 0.8; }
    100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
}

.status-dot.healthy { color: rgba(34, 197, 94, 0.4); }
.status-dot.degraded { color: rgba(234, 179, 8, 0.4); }
.status-dot.unhealthy, .status-dot.unreachable { color: rgba(239, 68, 68, 0.4); }

.service-status-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.service-status-text.healthy { color: #22c55e; }
.service-status-text.degraded { color: #eab308; }
.service-status-text.unhealthy, .service-status-text.unreachable { color: #ef4444; }

/* Service Graph */
.service-graph-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.graph-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.graph-bars {
    display: flex;
    gap: 2px;
    height: 28px;
    background: #f3f4f6;
    border-radius: 6px;
    overflow: hidden;
}

.graph-bar {
    flex: 1;
    background: #e5e7eb;
    transition: background 0.3s ease;
    position: relative;
    cursor: pointer;
}

.graph-bar.healthy { background: #22c55e; }
.graph-bar.degraded { background: #eab308; }
.graph-bar.unhealthy, .graph-bar.unreachable { background: #ef4444; }
.graph-bar.no-data { background: #e5e7eb; }

.graph-bar:hover {
    opacity: 0.8;
}

.graph-bar[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 4px;
    pointer-events: none;
}

.graph-time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 4px;
}

/* Uptime Section */
.server-uptime-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.server-uptime-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 1rem 0;
    text-align: center;
}

.uptime-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.uptime-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.uptime-period {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.uptime-percentage {
    font-size: 1.75rem;
    font-weight: 700;
    color: #334155;
}

.uptime-percentage.good { color: #22c55e; }
.uptime-percentage.warning { color: #eab308; }
.uptime-percentage.bad { color: #ef4444; }

.uptime-checks {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Uptime Info */
.server-uptime-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #64748b;
}

.server-uptime-info i {
    color: #22c55e;
}

.server-uptime-info #server-uptime {
    font-weight: 600;
    color: #334155;
}

/* Responsive */
@media (max-width: 768px) {
    .server-status-overview {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .uptime-grid {
        grid-template-columns: 1fr;
    }

    .service-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ======================================================
   REFERRAL/AFFILIATE PROGRAM STYLES
   ====================================================== */

/* Loading State */
.referral-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem;
    color: #64748b;
    font-size: 0.95rem;
}

.referral-loading i {
    font-size: 1.25rem;
    color: #667eea;
}

/* Not Eligible Notice */
.referral-upgrade-notice {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.referral-upgrade-notice .upgrade-notice-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.referral-upgrade-notice .upgrade-notice-content > i {
    font-size: 1.75rem;
    color: #f59e0b;
}

.referral-upgrade-notice h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 0.25rem 0;
}

.referral-upgrade-notice p {
    font-size: 0.9rem;
    color: #b45309;
    margin: 0;
}

/* Referral Link Card */
.referral-link-card {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.referral-link-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.referral-link-display {
    display: flex;
    gap: 0.75rem;
}

.referral-link-display input {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.9rem;
    font-family: inherit;
}

.referral-link-display input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.referral-link-display button {
    background: white;
    color: #007bff;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.referral-link-display button:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.referral-link-note {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Stats Grid */
.referral-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.referral-stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.referral-stat-card.highlight {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
}

.referral-stat-card .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #64748b;
}

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

.referral-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

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

.referral-stat-card .stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
}

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

/* Payout Section */
.referral-payout-section {
    margin-bottom: 2rem;
}

.referral-payout-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.connect-status-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.connect-status-card.success {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.connect-status-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.connect-status-content > i {
    font-size: 1.5rem;
    color: #94a3b8;
}

.connect-status-card.success .connect-status-content > i {
    color: #10b981;
}

.connect-status-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.connect-status-content p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

/* Payout Balance Card */
.payout-balance-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.balance-row:not(:last-of-type) {
    border-bottom: 1px solid #f1f5f9;
}

.balance-row.pending {
    opacity: 0.7;
}

.balance-label {
    font-size: 0.9rem;
    color: #64748b;
}

.balance-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.payout-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Commission History Table */
.referral-history-section {
    margin-bottom: 2rem;
}

.referral-history-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.referral-table-wrapper {
    overflow-x: auto;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.referral-table {
    width: 100%;
    border-collapse: collapse;
}

.referral-table th,
.referral-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.referral-table th {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8fafc;
}

.referral-table td {
    font-size: 0.9rem;
    color: #1e293b;
}

.referral-table tbody tr:last-child td {
    border-bottom: none;
}

.referral-table tbody tr:hover {
    background: #f8fafc;
}

.referral-table .empty-row td {
    padding: 2rem;
}

.referral-table .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
}

.referral-table .empty-state i {
    font-size: 2rem;
    opacity: 0.5;
}

.referral-table .empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.available {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.processing {
    background: #e0e7ff;
    color: #4338ca;
}

.status-badge.paid {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.refunded {
    background: #fee2e2;
    color: #991b1b;
}

/* Terms */
.referral-terms {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.referral-terms h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

.referral-terms ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.referral-terms li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

.referral-terms li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .referral-link-display {
        flex-direction: column;
    }

    .referral-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .referral-upgrade-notice {
        flex-direction: column;
        align-items: flex-start;
    }

    .connect-status-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .referral-table th,
    .referral-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .referral-stats-grid {
        grid-template-columns: 1fr;
    }

    .referral-stat-card .stat-value {
        font-size: 1.5rem;
    }
}
