/* Commission Tracker - Glassmorphism Dark Theme */

:root {
    /* Core palette */
    --bg-base: #111827;
    --bg-sidebar: #000000;
    --bg-grid: #1a2744;

    /* Accent colors */
    --primary: #ef4444;
    --primary-dark: #dc2626;
    --primary-light: rgba(239, 68, 68, 0.15);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --info: #8b5cf6;
    --info-light: rgba(139, 92, 246, 0.15);

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;

    /* Glass surfaces */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-bg-active: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-light: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --glass-shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.2);

    /* Table */
    --row-bg: rgba(255, 255, 255, 0.02);
    --row-hover: rgba(255, 255, 255, 0.05);
    --row-border: rgba(255, 255, 255, 0.04);
    --header-bg: rgba(239, 68, 68, 0.15);

    /* Gray scale */
    --gray-50: #f8fafc;
    --gray-400: #94a3b8;

    /* Misc */
    --accent-primary: #3b82f6;
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 4px;
    --transition: 150ms ease;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* ============ LOGIN PAGE ============ */
.login-page {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-base);
}
.login-card {
    width: 100%; max-width: 480px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
    padding: 40px 32px;
    text-align: center;
}
.login-logo { width: 80%; margin: 0 auto 24px; display: block; object-fit: contain; }

.login-field { text-align: left; margin-bottom: 16px; }
.login-field label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.login-field input {
    width: 100%; padding: 10px 12px; font-size: 14px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    color: var(--text-primary); outline: none; transition: border-color 0.2s;
    font-family: inherit;
}
.login-field input:focus { border-color: var(--primary); }
.login-field input::placeholder { color: var(--text-dim); }
.login-password-wrap { position: relative; }
.login-password-wrap input { width: 100%; padding-right: 40px; }
.login-eye-btn {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; padding: 4px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0.5; transition: opacity 0.2s;
}
.login-eye-btn:hover { opacity: 1; }

.login-btn {
    width: 100%; padding: 12px; font-size: 14px; font-weight: 600;
    border: none; border-radius: var(--radius-sm); cursor: pointer;
    font-family: inherit; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.login-btn-primary { background: var(--primary); color: white; margin-top: 4px; }
.login-btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.login-btn-microsoft {
    background: transparent; color: var(--text-primary);
    border: 1px solid var(--glass-border-light);
}
.login-btn-microsoft:hover:not(:disabled) { background: rgba(255,255,255,0.05); }
.login-btn-microsoft .login-btn-text { display: flex; align-items: center; gap: 10px; }

.login-divider {
    display: flex; align-items: center; gap: 12px; margin: 20px 0;
    color: var(--text-dim); font-size: 12px;
}
.login-divider::before, .login-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--glass-border);
}

.login-forgot { display: block; margin-top: 20px; font-size: 12px; color: var(--text-muted); text-decoration: none; }
.login-forgot:hover { color: var(--text-secondary); }

.login-msg { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; text-align: left; }
.login-msg-error { background: var(--danger-light); color: var(--danger); }
.login-msg-success { background: var(--success-light); color: var(--success); }

.login-spinner {
    width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white; border-radius: 50%;
    animation: login-spin 0.6s linear infinite;
}
@keyframes login-spin { to { transform: rotate(360deg); } }

/* ============ SIDEBAR USER STRIP ============ */
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; margin: auto 8px 8px;
    background: rgba(255,255,255,0.04); border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user-avatar {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    overflow: hidden; position: relative;
    background: rgba(255,255,255,0.1);
}
.user-avatar-img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
    display: none;
}
.user-avatar-img[src]:not([src=""]) { display: block; }
.user-avatar-img[src]:not([src=""]) + .user-avatar-placeholder { display: none; }
.user-avatar-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: var(--text-primary);
    background: linear-gradient(135deg, rgba(99,102,241,0.4), rgba(139,92,246,0.4));
}
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sidebar-user-name { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-admin { color: var(--warning); }
.role-agent { color: var(--text-muted); }
.sidebar-action-btn {
    background: none; border: none; cursor: pointer; padding: 4px 8px;
    color: var(--text-muted); transition: color 0.2s; flex-shrink: 0;
    display: flex; align-items: center; border-radius: var(--radius-sm);
}
.sidebar-action-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.sidebar-action-btn svg { width: 14px; height: 14px; }

.sidebar-signout {
    background: none; border: none; cursor: pointer; padding: 4px 8px;
    color: var(--text-muted); transition: color 0.2s; flex-shrink: 0;
    display: flex; align-items: center; gap: 4px;
    font-size: 11px; font-family: inherit; border-radius: var(--radius-sm);
}
.sidebar-signout:hover { color: var(--danger); background: rgba(255,255,255,0.05); }
.sidebar-signout svg { width: 14px; height: 14px; }

/* Sign-out modal */
.signout-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
}
.signout-modal {
    background: rgba(20, 25, 45, 0.95); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius); padding: 28px 32px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    min-width: 300px; text-align: center;
}
.signout-modal-text {
    font-size: 15px; font-weight: 500; color: var(--text-primary);
    margin: 0 0 24px;
}
.signout-modal-actions { display: flex; gap: 10px; justify-content: center; }
.signout-modal-btn {
    padding: 8px 20px; border-radius: var(--radius-sm); border: none;
    font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: background 0.2s, color 0.2s;
}
.signout-modal-cancel {
    background: rgba(255,255,255,0.08); color: var(--text-secondary);
}
.signout-modal-cancel:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }
.signout-modal-confirm {
    background: var(--danger); color: #fff;
}
.signout-modal-confirm:hover { background: #dc2626; }

/* User Management */
.users-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }

/* Buttons — glass style consistent with salesperson side */
.users-btn {
    padding: 7px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.08);
    font-size: 12px; font-weight: 500; cursor: pointer; font-family: inherit;
    transition: all 0.2s ease; letter-spacing: 0.02em;
}
.users-btn-primary {
    background: rgba(99,102,241,0.15); color: #a5b4fc; border-color: rgba(99,102,241,0.25);
}
.users-btn-primary:hover { background: rgba(99,102,241,0.25); color: #c7d2fe; }
.users-btn-secondary {
    background: rgba(255,255,255,0.04); color: var(--text-muted);
}
.users-btn-secondary:hover { background: rgba(255,255,255,0.08); color: var(--text-secondary); }

/* Table action buttons — compact inline style */
.users-actions { display: flex; gap: 6px; align-items: center; }
.users-action-btn {
    padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.06);
    font-size: 11px; font-weight: 500; cursor: pointer; font-family: inherit;
    transition: all 0.2s ease; background: transparent; color: var(--text-muted);
}
.users-action-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.users-action-btn.action-disable { color: #fbbf24; border-color: rgba(251,191,36,0.15); }
.users-action-btn.action-disable:hover { background: rgba(251,191,36,0.1); color: #fcd34d; }
.users-action-btn.action-enable { color: #4ade80; border-color: rgba(74,222,128,0.15); }
.users-action-btn.action-enable:hover { background: rgba(74,222,128,0.1); color: #86efac; }
.users-action-btn.action-delete { color: var(--text-muted); }
.users-action-btn.action-delete:hover { background: rgba(239,68,68,0.1); color: #f87171; border-color: rgba(239,68,68,0.2); }

/* Legacy danger btn (for Disable in toggle) */
.users-btn-danger { background: rgba(239,68,68,0.12); color: #f87171; border-color: rgba(239,68,68,0.2); }
.users-btn-danger:hover { background: rgba(239,68,68,0.2); }

/* Badges — pill style, softer */
.users-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.users-badge-admin { background: rgba(139,92,246,0.12); color: #c4b5fd; }
.users-badge-agent { background: rgba(59,130,246,0.1); color: #93c5fd; }
.users-badge-active { background: rgba(34,197,94,0.1); color: #86efac; }
.users-badge-disabled { background: rgba(239,68,68,0.1); color: #fca5a5; }

/* Avatar */
.users-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.15));
    border: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: #c4b5fd; flex-shrink: 0;
}

/* Modal — glass panel */
.users-modal-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.5); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; }
.users-modal {
    background: rgba(15, 20, 40, 0.97); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px; padding: 28px 28px; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    width: 420px; max-width: 90vw; max-height: 85vh; overflow-y: auto;
}
.users-modal h3 { margin: 0 0 20px; color: var(--text-primary); font-size: 15px; font-weight: 600; }
.users-modal-field { margin-bottom: 14px; }
.users-modal-field label {
    display: block; font-size: 11px; font-weight: 600; color: var(--text-muted);
    margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.06em;
}
.users-modal-field input, .users-modal-field select, .users-modal-field textarea {
    width: 100%; padding: 9px 12px; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    color: var(--text-primary); font-size: 13px; font-family: inherit;
    box-sizing: border-box; color-scheme: dark; transition: border-color 0.2s;
}
.users-modal-field select option { background: #1a1f35; color: #f1f5f9; }
.users-modal-field input:focus, .users-modal-field select:focus, .users-modal-field textarea:focus {
    outline: none; border-color: rgba(99,102,241,0.5);
}
.users-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.users-modal-actions .users-btn { min-width: 80px; }

.users-bulk-area textarea { min-height: 120px; resize: vertical; font-family: 'Courier New', monospace; font-size: 12px; }
.users-bulk-area .users-bulk-help { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Stats cards — glass */
.users-stats { display: flex; gap: 12px; margin-bottom: 20px; }
.users-stat {
    padding: 14px 18px; background: rgba(255,255,255,0.03);
    border-radius: 10px; border: 1px solid rgba(255,255,255,0.06);
}
.users-stat-value { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.users-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* Architectural Grid Background */
.main-content {
    flex: 1;
    margin-left: 252px;
    padding: 6px 32px 24px;
    max-width: calc(100vw - 252px);
    position: relative;
    background:
        linear-gradient(rgba(26, 39, 68, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 39, 68, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: -1px -1px;
}
/* Glassmorphism ambient backdrop — colour orbs behind glass panels */
.main-content::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        rgba(59, 130, 246, 0.08);
    pointer-events: none;
    z-index: 0;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.sidebar {
    width: 240px;
    background: rgba(10, 15, 30, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 6px;
    left: 6px;
    height: calc(100vh - 12px);
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.sidebar-header {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.sidebar-logo {
    width: 110%;
    display: block;
    margin: 0 auto;
    padding: 20px 0;
    box-sizing: border-box;
    margin-left: -5%;
}


.view-toggle {
    display: flex;
    gap: 3px;
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
}
.btn-view {
    flex: 1;
    padding: 6px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
}
.btn-view:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}
.btn-view.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.25);
    color: var(--primary);
}
.ebu-picker {
    padding: 8px 16px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ebu-picker select {
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition);
}
.ebu-picker select:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}
.ebu-picker select option {
    background: #0f1629;
    color: var(--text-primary);
}

.sidebar-fy {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-fy-label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.sidebar-fy select {
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all var(--transition);
}

.sidebar-fy select:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-fy select option {
    background: #0f1629;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(239, 68, 68, 0.15);
    color: var(--primary);
    border-left-color: var(--primary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-link .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-link .nav-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.75;
}

/* Collapsible nav groups */
.nav-group {
    position: relative;
}

.nav-parent {
    position: relative;
}

.nav-parent .nav-chevron {
    margin-left: auto;
    display: flex;
    align-items: center;
    transition: transform 200ms ease;
}

.nav-parent .nav-chevron svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.nav-parent.expanded .nav-chevron {
    transform: rotate(180deg);
}


.nav-parent.parent-active {
    color: var(--primary);
}

.nav-children {
    overflow: hidden;
    max-height: 0;
    transition: max-height 250ms ease;
}

.nav-children.open {
    max-height: 500px;
}

.nav-child {
    padding-left: 36px !important;
    font-size: 15px !important;
    border-left: 3px solid transparent;
}

.nav-child .nav-icon {
    width: 16px;
    height: 16px;
}

.nav-child .nav-icon svg {
    width: 14px;
    height: 14px;
}

.sidebar-admin {
    padding: 8px 0 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}


/* ============ SECTIONS ============ */
.section {
    display: none;
}

.section.active {
    display: block;
    position: relative;
    z-index: 1;
}

.section-header {
    margin-bottom: 24px;
    text-align: center;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section-header p {
    display: none;
}

/* Glass wrapper — invisible container, cards inside do the visual work */
.section.glass-wrap {
    background: none;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 24px;
    box-shadow: none;
}
.section.glass-wrap > .section-header { margin-bottom: 20px; }

/* Cards inside glass wrapper — darken to avoid washed-out look on lighter bg */
.section.glass-wrap .card {
    background: rgba(15, 23, 42, 0.6);
    box-shadow: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sp-header { text-align: center; }
.sp-header h2 { font-size: 32px; font-weight: 800; }

/* ============ METRIC CARDS ============ */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--glass-bg);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.metric-card:hover {
    border-color: var(--glass-border-light);
    background: var(--glass-bg-hover);
}

/* Metric type classes (colour bars removed) */

.metric-label {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.metric-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Compact variant for 5-column layouts */
.metrics-grid-compact {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.metrics-grid-compact .metric-card {
    padding: 14px 16px;
}

.metrics-grid-compact .metric-label {
    font-size: 11px;
    margin-bottom: 4px;
}

.metrics-grid-compact .metric-value {
    font-size: 20px;
    letter-spacing: -0.3px;
}

.metrics-grid-compact .metric-sub {
    font-size: 11px;
    margin-top: 4px;
}

/* ============ GLASS CARDS ============ */
.card {
    background: linear-gradient(135deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.01) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 16px 24px;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 24px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============ TABLES ============ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: var(--header-bg);
    border-bottom: 1px solid rgba(239, 68, 68, 0.2);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.data-table th:hover {
    color: #f87171;
}

.data-table th.sort-asc::after { content: ' \25B2 '; font-size: 12px; }
.data-table th.sort-desc::after { content: ' \25BC '; font-size: 12px; }

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--row-border);
    color: var(--text-secondary);
}

.data-table tbody tr {
    background: var(--row-bg);
}

.data-table tbody tr:hover {
    background: var(--row-hover);
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

.truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.table-summary {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
}

/* Transaction Summary Bar */
/* Transaction scope toggle */
.txn-scope-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.txn-scope-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.txn-summary-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: stretch;
}

.txn-summary-stat {
    flex: 1;
    min-width: 160px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 12px 16px;
    box-shadow: var(--glass-shadow-sm);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.txn-summary-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 4px;
}

.txn-summary-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Accent colour bars removed */

/* Transaction Filters */
.txn-filter-bar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.txn-filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.txn-filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-left: auto;
}

/* ============ FORM CONTROLS ============ */
.filter-input, .filter-select {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.8);
    transition: all var(--transition);
}

.filter-input:focus, .filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.filter-input {
    min-width: 180px;
}

.filter-input-sm {
    min-width: 90px;
    max-width: 110px;
}

.filter-select {
    min-width: 150px;
}

.filter-select option {
    background: #0f1629;
    color: var(--text-primary);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-group-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    padding-left: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-group-sep {
    color: var(--text-muted);
    font-size: 15px;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-collapse {
    width: 100%;
    border: none;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: background 0.15s ease;
}

.btn-collapse:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-tab {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: rgba(255,255,255,0.1); border-radius: 22px; transition: 0.2s;
}
.toggle-slider::before {
    content: ''; position: absolute; width: 16px; height: 16px;
    left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

.btn-tab.active {
    background: rgba(239, 68, 68, 0.15);
    color: var(--primary);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ============ BADGES ============ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-blue {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-orange {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.badge-yellow {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
}

.badge-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
}

.award-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============ IMPORT ZONE ============ */
.import-zone {
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: rgba(255, 255, 255, 0.02);
}

.import-zone:hover, .import-zone.dragover {
    border-color: var(--primary);
    background: rgba(239, 68, 68, 0.08);
}

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

.import-existing {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============ ALERTS ============ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 16px 0;
    font-size: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.alert-info {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ============ DETAIL VIEW ============ */
.detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.detail-header h2 {
    font-size: 22px;
    color: var(--text-primary);
}

.detail-header code {
    font-size: 16px;
    color: var(--text-muted);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
    margin-bottom: 16px;
}

/* ============ PROGRESS BAR ============ */
.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--glass-border);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 6px;
    transition: width 0.3s ease;
    min-width: 2px;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* ============ REPORT TABS ============ */
.report-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

/* ============ TIER SECTION ============ */
.tier-section {
    margin-bottom: 24px;
}

.tier-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.tier-agents {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.tier-agent-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    transition: all var(--transition);
}

.tier-agent-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--glass-border-light);
}

.tier-agent-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.tier-agent-gci {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
}

/* ============ LEADERBOARDS ============ */
.leaderboard-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.01) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.leaderboard-header {
    padding: 16px 24px;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard-body {
    padding: 0;
}

.leaderboard-table {
    font-size: 14px;
}

.leaderboard-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--row-border);
}

.leaderboard-table tbody tr:last-child td {
    border-bottom: none;
}

.lb-rank {
    width: 36px;
    text-align: center;
    font-size: 16px;
}

.lb-name {
    min-width: 120px;
}

.lb-value {
    text-align: right;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.leaver-row td {
    text-decoration: line-through;
    opacity: 0.5;
}

.leaver-row .lb-rank {
    text-decoration: none;
}

.highlight-row td { background: rgba(99, 102, 241, 0.1); }
.highlight-row td:first-child { border-left: 3px solid rgba(99, 102, 241, 0.7); }

.lb-sub {
    text-align: right;
    color: var(--text-muted);
    font-size: 14px;
    white-space: nowrap;
}

/* ============ GROWTH REPORT ============ */
td.growth-positive, .growth-positive { color: #27ae60; font-weight: 600; }
td.growth-negative, .growth-negative { color: #e74c3c; font-weight: 600; }
td.growth-neutral, .growth-neutral { color: var(--gray-400); }
.growth-new { color: var(--primary); font-style: italic; }

.growth-table { font-size: 15px; }
.growth-table th { white-space: nowrap; font-size: 13px; text-transform: uppercase; letter-spacing: 0.3px; }
.growth-table td { padding: 8px 10px; }
.growth-table .rank-col { width: 36px; text-align: center; font-weight: 700; color: var(--gray-400); }
.growth-table .ebu-col { min-width: 140px; }
.growth-table .type-col { width: 70px; }
.growth-table .gci-col { text-align: right; white-space: nowrap; }
.growth-table .growth-col { text-align: right; white-space: nowrap; }
.growth-table .txn-col { text-align: center; width: 50px; }

.growth-table .separator-col {
    width: 2px;
    padding: 0 !important;
    background: var(--glass-border);
}

.growth-summary-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    font-size: 15px;
}

.growth-summary-bar .stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.growth-summary-bar .stat-label {
    color: var(--gray-400);
}

.growth-summary-bar .stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ============ GROWERS / DECLINERS LIST ============ */
.gd-list-divider {
    margin-top: 8px;
    border-top: 1px solid var(--glass-border);
}
.gd-list {
    margin-top: 6px;
    max-height: 240px;
    overflow-y: auto;
}
.gd-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.gd-list-row:last-child { border-bottom: none; }
.gd-list-name {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}
.gd-list-value {
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ============ CLICKABLE METRIC CARDS ============ */
.metric-card.clickable-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.metric-card.clickable-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.trend-link {
    color: var(--primary);
    font-weight: 500;
}

.metric-card.clickable-card:hover .trend-link {
    text-decoration: underline;
}

.conversion-card.clickable-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.conversion-card.clickable-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* ============ TRENDS ============ */
.trends-year-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.trends-year-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.trends-year-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.trends-year-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.trends-year-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 0 0 0 4px;
    line-height: 1;
}

.trends-year-remove:hover {
    color: var(--danger);
}

.trends-year-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trends-year-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.trends-year-right .filter-select {
    padding: 6px 10px;
    font-size: 15px;
}

.trends-compare-toggle {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.trends-toggle-btn {
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.trends-toggle-btn.active {
    background: var(--primary);
    color: #fff;
}

.trends-toggle-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.chart-container {
    position: relative;
    height: 350px;
}

.trends-single-chart {
    height: 480px;
}

.trends-metric-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.trends-category-bar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.trends-category-bar .filter-select {
    flex-shrink: 0;
    min-width: 180px;
}

.trends-category-bar .trends-metric-tabs {
    margin-bottom: 0;
}

.trends-metric-tab {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.trends-metric-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.trends-metric-tab.active {
    background: rgba(239, 68, 68, 0.15);
    color: var(--primary);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ============ GOALS FORM ============ */
.goals-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.goal-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.goal-label {
    font-weight: 600;
    font-size: 14px;
    min-width: 180px;
    color: var(--text-primary);
}

.goal-toggle {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.goal-derived {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

.goal-derived-gci {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    background: rgba(255, 215, 0, 0.08);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.goal-gci-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffd700;
}

.goal-formula {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    background: #0f1629;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 18px;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
    transition: color var(--transition);
}

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

.modal-body {
    padding: 20px;
}

/* ============ UTILITY ============ */
.text-muted { color: var(--text-muted); }

code {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 14px;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============ DASHBOARD GAUGES ============ */
.dashboard-toggle-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}

.dashboard-toggle {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.dashboard-toggle-btn {
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
}

.dashboard-toggle-btn.active {
    background: var(--primary);
    color: #fff;
}

.dashboard-toggle-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.dashboard-month-select {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    background: #1e293b;
    color: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    outline: none;
}

.dashboard-month-select option {
    background: #1e293b;
    color: #fff;
}

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

.dashboard-month-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.dashboard-period-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: auto;
    font-family: 'Inter', sans-serif;
}

.gci-hero-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 180, 0, 0.04) 50%, var(--glass-bg) 100%);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.06), 0 4px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.gci-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.6), transparent);
}

.gci-hero-card:hover {
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 180, 0, 0.06) 50%, var(--glass-bg-hover) 100%);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.1), 0 6px 32px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.gci-hero-label {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 215, 0, 0.85);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.gci-hero-value {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 2px 12px rgba(255, 215, 0, 0.15);
}

.gci-hero-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.gauge-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.gauge-card {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    border-radius: var(--radius);
    padding: 24px 16px 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s ease;
}

.gauge-card:hover {
    border-color: var(--glass-border-light);
    background: var(--glass-bg-hover);
}

.gauge-card.clickable-card {
    cursor: pointer;
}

.gauge-card.clickable-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.gauge-svg {
    width: 100%;
    max-width: 220px;
    height: auto;
}

.gauge-progress {
    transition: stroke-dashoffset 0.8s ease-out;
}

.gauge-title {
    order: -1;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    margin-bottom: 4px;
    text-align: center;
}

.conversion-row {
    margin-bottom: 16px;
}

.conversion-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.conversion-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.conversion-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.conversion-card-warn {
    border-color: rgba(239, 68, 68, 0.25);
}

.conversion-card-warn .conversion-value {
    color: #ef4444;
}

.gci-progress-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

/* ============ GROWTH TABLE ============ */
.growth-table-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.growth-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.growth-table thead th {
    padding: 10px 12px;
    text-align: right;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}

.growth-table thead th:first-child {
    text-align: left;
}

.growth-group-header td {
    padding: 10px 12px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    border-top: 1px solid var(--glass-border);
}

.growth-table tbody tr:first-child.growth-group-header td {
    border-top: none;
}

.growth-table td {
    padding: 5px 12px;
    text-align: right;
    color: var(--text-secondary);
}

.growth-row-label {
    text-align: left !important;
    color: var(--text-muted) !important;
    font-size: 12px;
}

.growth-pct-row td {
    padding-bottom: 10px;
    font-weight: 600;
}

.growth-pos {
    color: #22c55e;
}

.growth-neg {
    color: #ef4444;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar-header .subtitle,
    .nav-link span:not(.nav-icon),
    .sidebar-fy-label {
        display: none;
    }

    .view-toggle {
        flex-direction: column;
        padding: 4px 4px 2px;
        gap: 2px;
    }
    .btn-view {
        font-size: 8px;
        padding: 4px 1px;
        letter-spacing: 0;
        border-radius: 4px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ebu-picker {
        padding: 4px 4px 4px;
    }
    .ebu-picker .sidebar-fy-label {
        display: none;
    }
    .ebu-picker select {
        font-size: 10px;
        padding: 3px 1px;
    }

    .sidebar-fy {
        padding: 8px 10px;
    }

    .sidebar-fy select {
        font-size: 13px;
        padding: 4px 2px;
    }

    .nav-link {
        padding: 12px;
        justify-content: center;
        border-left: none;
    }

    .main-content {
        margin-left: 60px;
        padding: 16px;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .metrics-grid-compact {
        grid-template-columns: 1fr 1fr;
    }

    .gauge-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gauge-svg {
        max-width: 180px;
    }

    .dashboard-toggle-bar {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    .dashboard-period-label {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .gci-hero-value {
        font-size: 36px;
    }
    .gci-hero-card {
        padding: 20px 16px;
    }

    .trends-year-bar {
        flex-wrap: wrap;
    }
    .trends-year-right {
        margin-left: 0;
        flex-wrap: wrap;
    }

    .conversion-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .conversion-value {
        font-size: 22px;
    }

    .table-controls {
        flex-direction: column;
    }

    .filter-input, .filter-select {
        width: 100%;
    }

    .filter-input-sm {
        min-width: unset;
        max-width: unset;
        width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group-inputs {
        width: 100%;
    }

    .txn-summary-bar {
        gap: 8px;
    }

    .txn-summary-stat {
        min-width: 120px;
    }

    .txn-summary-stat-value {
        font-size: 16px;
    }

    .txn-filter-row {
        flex-direction: column;
    }

    .txn-filter-actions {
        margin-left: 0;
        width: 100%;
    }
}

/* ============ HISTORICAL ROSTERS ============ */
.roster-member-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 50;
    background: #0f1629;
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-height: 220px;
    overflow-y: auto;
    min-width: 240px;
    padding: 6px 0;
}

.roster-member-dropdown label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    font-size: 15px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
}

.roster-member-dropdown label:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.roster-member-dropdown input[type="checkbox"] {
    accent-color: var(--primary);
}

.roster-picker-btn {
    min-width: 160px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roster-current-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.roster-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 15px;
}

.roster-entry.roster-current {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
}

.badge-historical {
    background: transparent;
    border: 1px dashed rgba(245, 158, 11, 0.5);
    color: var(--warning);
    font-size: 12px;
    padding: 1px 6px;
    margin-left: 6px;
    vertical-align: middle;
}

.historical-row {
    background: rgba(245, 158, 11, 0.03) !important;
}

.historical-row:hover {
    background: rgba(245, 158, 11, 0.06) !important;
}

/* ============ AWARD BANDS ============ */
.band-input {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transition: all 0.15s;
}

.band-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.band-input[type="number"] {
    width: 130px;
    text-align: right;
}

.band-input[type="text"] {
    width: 130px;
}

#awards-content .data-table td {
    padding: 6px 10px;
    vertical-align: middle;
}

#awards-content .data-table th {
    padding: 8px 10px;
}

.band-color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.band-max-col {
    font-size: 15px;
    color: var(--text-muted);
    white-space: nowrap;
}

.band-add-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============ BACKUP BAR (shared) ============ */
.backup-bar {
    padding: 10px 14px;
    margin: 12px 0;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.backup-bar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.backup-pin-btn {
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #f59e0b !important;
    font-weight: 600;
    padding: 4px 10px !important;
}

.backup-pin-btn:hover {
    background: rgba(245, 158, 11, 0.25) !important;
}

.backup-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.backup-section:last-child {
    margin-bottom: 0;
}

.backup-section-label {
    color: var(--text-muted);
    font-size: 13px;
    min-width: 85px;
}

.backup-pin-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-xs);
}

.backup-pin-icon {
    font-size: 12px;
}

.backup-pin-name {
    font-weight: 600;
    color: #f59e0b;
    font-size: 13px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.backup-pin-badge {
    font-size: 11px;
    color: var(--text-muted);
}

.backup-pin-action {
    padding: 1px 6px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============ EBU REGISTRY ============ */
.ebu-registry-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ebu-registry-table-container {
    max-height: 500px;
    overflow-y: auto;
    border-radius: 8px;
}

.ebu-registry-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #161225;
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.ebu-registry-table td {
    font-size: 15px;
    padding: 6px 10px;
}

.ebu-registry-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.ebu-unresolved {
    background: rgba(239, 68, 68, 0.04);
}

.ebu-code {
    font-size: 12px;
    color: var(--gray-400);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
}

.ebu-add-form {
    animation: fadeIn 0.15s ease-out;
}

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

/* ============ METHODOLOGY ACCORDION ============ */
.methodology-section-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 20px 0 8px;
    margin-top: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}
.methodology-section-heading:first-child {
    margin-top: 0;
    padding-top: 0;
}
.methodology-topic {
    margin-bottom: 8px;
}

.methodology-topic-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: none;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background var(--transition);
    text-align: left;
}

.methodology-topic-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.methodology-topic-arrow {
    color: var(--text-muted);
    font-size: 13px;
    flex-shrink: 0;
    margin-left: 12px;
}

.methodology-topic-body {
    padding: 16px 20px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.methodology-topic-body p {
    margin-bottom: 12px;
}

.methodology-topic-body p:last-child {
    margin-bottom: 0;
}

.methodology-topic-body ul,
.methodology-topic-body ol {
    margin: 8px 0 12px 20px;
    color: var(--text-secondary);
}

.methodology-topic-body li {
    margin-bottom: 6px;
}

.methodology-topic-body strong {
    color: var(--text-primary);
}

/* ============ DETAIL HEADER CARD ============ */
.detail-header-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--glass-shadow);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    transition: all var(--transition);
    margin-bottom: 12px;
}

.detail-back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.detail-header-centered {
    text-align: center;
}

.detail-hero-name {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.detail-hero-sub {
    margin-top: 8px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-secondary);
}

.ebu-hero-link {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dashed var(--text-dim);
    transition: border-color 0.2s, color 0.2s;
    font-weight: 600;
}
.ebu-hero-link:hover {
    color: var(--text-primary);
    border-bottom-color: var(--primary);
}

.detail-hero-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.detail-header-sep {
    color: var(--text-dim);
    font-size: 12px;
}

/* ============ AWARD PROGRESS BAR ============ */
/* ============ AWARD JOURNEY (tier progress) ============ */
.award-journey {
    text-align: center;
    padding: 8px 0 16px;
}

/* Hero callout — the motivational centre */
.award-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 28px;
}
.award-hero-amount {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.02em;
}
.award-hero-gap {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
}
.award-hero-deals {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-top: 4px;
}
.award-hero-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.04em;
}
.award-hero-pace {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.35);
    margin-top: 4px;
}
/* Compact hero — dashboard version */
.award-hero-compact { gap: 4px; }
.award-hero-deals-big {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}
.award-hero-time {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.4);
}

/* Track — progress line */
.award-track-wrap {
    position: relative;
    height: 115px;
    margin: 0 50px;
}
.award-track {
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}
.award-track-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 2px;
    box-shadow: 0 0 12px rgba(255,255,255,0.25);
}

/* Waypoint — marker above track, stem through, labels below */
.award-waypoint {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.award-wp-marker {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 34px;
}
.award-wp-stem {
    width: 1px;
    height: 20px;
    flex-shrink: 0;
}
/* SVG tick for achieved tiers */
.award-wp-tick, .award-wp-ring {
    flex-shrink: 0;
}
/* Hollow circle for unachieved tiers */
.award-wp-dot-empty {
    border-radius: 50%;
    border: 1.5px solid;
    background: transparent;
    flex-shrink: 0;
}
.award-wp-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    margin-top: 4px;
}
.award-wp-amount {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    font-weight: 500;
}
.award-wp-current .award-wp-label { font-size: 12px; font-weight: 800; }
.award-wp-next .award-wp-label { font-size: 11px; font-weight: 700; }
.award-wp-reached .award-wp-label { color: rgba(255,255,255,0.6); }

.award-glow {
    animation: award-glow-pulse 3s ease-in-out infinite;
}
@keyframes award-glow-pulse {
    0%, 100% { text-shadow: 0 0 2px rgba(255,255,255,0.4); }
    50% { text-shadow: 0 0 8px rgba(255,255,255,0.7); }
}

/* Legacy compat — keep badge style */

/* ============ BENCHMARKING CARD ============ */
.benchmark-card {
    margin-bottom: 16px;
}

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

.benchmark-card-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Dropdown selector */
.benchmark-dropdown {
    color-scheme: dark;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 30px 6px 12px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.benchmark-dropdown:hover {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.12);
}

.benchmark-dropdown:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.benchmark-dropdown option {
    background: #1e2330;
    color: #e2e8f0;
    padding: 6px 8px;
}

/* Each comparison row */
.benchmark-comp-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.benchmark-comp-row + .benchmark-comp-row {
    padding-top: 2px;
}

/* "You" row emphasis */
.benchmark-you-row {
    padding-bottom: 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--glass-border);
}

.benchmark-you-row .benchmark-comp-value {
    font-size: 18px;
    font-weight: 800;
}

.benchmark-you-row .benchmark-comp-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Meta row: label + value + badge */
.benchmark-comp-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.benchmark-comp-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.benchmark-comp-fy {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.benchmark-comp-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.benchmark-comp-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Colour-coded labels */
.benchmark-bar-avg-label   { color: #38bdf8; }
.benchmark-bar-pb-label    { color: #a78bfa; }
.benchmark-bar-top-label   { color: #fb923c; }
.benchmark-bar-record-label { color: #fbbf24; }

/* Contextual badge */
.benchmark-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.benchmark-badge-great  { background: rgba(16,185,129,0.20); color: #10b981; }
.benchmark-badge-above  { background: rgba(56,189,248,0.15); color: #38bdf8; }
.benchmark-badge-avg    { background: rgba(148,163,184,0.12); color: var(--text-secondary); }
.benchmark-badge-below  { background: rgba(239,68,68,0.12);  color: #f87171; }

/* Horizontal bar track */
.benchmark-comp-track {
    position: relative;
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

/* Bar fill — each colour-coded */
.benchmark-comp-bar {
    height: 100%;
    border-radius: 5px;
    min-width: 3px;
    transition: width 0.4s ease;
    position: relative;
}

.benchmark-comp-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 100%);
    border-radius: 5px 5px 0 0;
}

.benchmark-bar-you    { background: linear-gradient(90deg, var(--primary-dark), var(--primary)); }
.benchmark-bar-avg    { background: linear-gradient(90deg, #1d8cbf, #38bdf8); }
.benchmark-bar-pb     { background: linear-gradient(90deg, #7c5cc4, #a78bfa); }
.benchmark-bar-top    { background: linear-gradient(90deg, #d97b1a, #fb923c); }
.benchmark-bar-record { background: linear-gradient(90deg, #d4991a, #fbbf24); }

@media (max-width: 768px) {
    .benchmark-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .benchmark-dropdown {
        width: 100%;
    }

    .benchmark-comp-value {
        font-size: 13px;
    }

    .benchmark-you-row .benchmark-comp-value {
        font-size: 16px;
    }
}

/* ============ ACTIVITY SUMMARY CARDS ============ */
.activity-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.activity-summary-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
}
.activity-summary-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.activity-summary-count {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 8px;
}
.activity-summary-value {
    font-size: 13px;
    color: #34d399;
    margin-bottom: 4px;
    line-height: 1.4;
}
.activity-summary-trend {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.activity-summary-prior {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
@media (max-width: 768px) {
    .activity-summary-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ============ INSIGHTS / PIPELINE CARD ============ */
.insights-card {
    margin-bottom: 16px;
}

.insights-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}


/* Hero funnel card — single prominent display */
.funnel-hero {
    text-align: center;
    padding: 24px 16px;
}
.funnel-hero-intro {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.funnel-hero-num {
    font-size: 56px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 2px;
}
.funnel-hero-label {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.funnel-hero-target {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.funnel-hero-context {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.funnel-hero-context strong {
    color: var(--text-primary);
}
.funnel-hero-hint {
    font-size: 14px;
    color: var(--warning);
    margin-top: 6px;
    line-height: 1.4;
}
.funnel-hero-hint.funnel-hint-good {
    color: var(--success);
}
.funnel-hero-hint.funnel-hint-neutral {
    color: var(--text-muted);
}

/* Clickable funnel card */
.funnel-card-click {
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.funnel-card-click:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Dot indicators for funnel view cycling */
.funnel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}
.funnel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.2s;
}
.funnel-dot.active {
    background: var(--primary);
}

/* Sub-insights under each column */
.funnel-sub {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 10px;
    line-height: 1.4;
}

.funnel-sub strong {
    color: var(--text-primary);
}

.funnel-sub-label {
    color: var(--text-muted);
    font-weight: 400;
}

.funnel-sub-vs {
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 400;
}

.funnel-sub-good {
    color: var(--success);
}

.funnel-sub-weak {
    color: var(--warning);
}

.funnel-sub-hint {
    font-size: 12px;
    font-style: italic;
    color: var(--warning);
    margin-top: 5px;
    line-height: 1.3;
}

.funnel-sub-hint.funnel-hint-good {
    color: var(--success);
}

.funnel-sub-hint.funnel-hint-neutral {
    color: var(--text-muted);
}

/* Pace line with rocket */
.funnel-pace {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 14px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.funnel-pace strong {
    color: var(--text-primary);
}

.funnel-pace-rocket {
    font-size: 22px;
    display: inline-block;
    animation: rocket-bob 2s ease-in-out infinite;
}

.funnel-pace-rates {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.funnel-pace-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.funnel-pace-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.funnel-pace-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
}

.funnel-pace-status {
    width: 100%;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 12px;
    font-weight: 500;
}

.funnel-pace-ontrack {
    color: #4ade80;
}

.funnel-pace-behind {
    color: #fb923c;
}

@keyframes rocket-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Achieved state */
.funnel-achieved {
    text-align: center;
    padding: 20px 16px;
}

.funnel-achieved-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.funnel-achieved-headline {
    font-size: 20px;
    font-weight: 900;
    color: var(--success);
    margin-bottom: 6px;
}

.funnel-achieved-detail {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.funnel-achieved-surplus {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: var(--success);
    padding: 4px 14px;
    background: var(--success-light);
    border-radius: 20px;
}

@media (max-width: 768px) {
    .funnel-col-num {
        font-size: 26px;
    }
}

/* ============================
   COACHING INSIGHTS CARD
   ============================ */

.coaching-card {
    margin-bottom: 16px;
}
.coaching-card.coaching-collapsed {
    cursor: pointer;
    transition: all 0.2s ease;
}
.coaching-card.coaching-collapsed:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.coaching-card-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.coaching-card-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.coaching-toggle-icon {
    font-size: 11px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

/* Collapsible: summary stays, detail area cards hide */
.coaching-collapsed .coaching-areas {
    display: none;
}

.coaching-body {
    padding: 16px 20px 20px;
}

.coaching-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 32px 16px;
    font-size: 13px;
}

/* Top recommendation banner */
.coaching-top-recommendation {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.1), rgba(251, 146, 60, 0.04));
    border: 1px solid rgba(251, 146, 60, 0.2);
    border-radius: var(--radius-md);
}

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

.coaching-top-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #fb923c;
    margin-bottom: 4px;
}

.coaching-top-area {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.coaching-top-reason {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.coaching-top-reason strong {
    color: var(--text-primary);
}

/* Strengths summary banner */
.coaching-strengths-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.15);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
}

.coaching-strength-check {
    color: #4ade80;
    font-size: 16px;
    font-weight: 700;
}

.coaching-strengths-banner strong {
    color: #4ade80;
}

/* Area cards container */
.coaching-areas {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual coaching area card */
.coaching-area-card {
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s;
}

.coaching-area-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.coaching-area-weak {
    border-left: 3px solid #fb923c;
}

.coaching-area-neutral {
    border-left: 3px solid #60a5fa;
}

.coaching-area-strong {
    border-left: 3px solid #4ade80;
}

.coaching-area-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.coaching-area-icon {
    font-size: 18px;
}

.coaching-area-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

/* Coaching badges */
.coaching-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.coaching-badge-strength {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
}

.coaching-badge-ontrack {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.12);
}

.coaching-badge-focus {
    color: #fb923c;
    background: rgba(251, 146, 60, 0.12);
}

/* Stat comparison line */
.coaching-area-stat {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.coaching-area-stat strong {
    color: var(--text-primary);
    font-size: 14px;
}

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

/* Recommendation prose */
.coaching-area-rec {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.coaching-area-rec strong {
    color: var(--text-primary);
}

.coaching-area-rec em {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-style: normal;
    font-size: 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .coaching-top-recommendation {
        flex-direction: column;
        gap: 8px;
    }
    .coaching-area-header {
        flex-wrap: wrap;
    }
}

/* ============================
   COACHING PAGE (Salesperson)
   ============================ */

.coaching-page-card {
    margin-bottom: 20px;
}

/* Sparklines grid */
.coaching-spark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}
.coaching-spark-card {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.coaching-spark-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}
.coaching-spark-wrap {
    position: relative;
    height: 60px;
    width: 100%;
}

/* Pipeline Calculator */
.coaching-target-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.coaching-pipeline-achieved {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.15);
    border-radius: var(--radius-md);
}
.coaching-pipeline-check {
    font-size: 32px;
    color: #4ade80;
}
.coaching-pipeline-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.coaching-pipeline-bar {
    flex: 1;
    height: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.coaching-pipeline-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
    transition: width 0.3s ease;
}
.coaching-pipeline-fill.achieved {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}
.coaching-pipeline-pct {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 40px;
}

.coaching-funnel-steps {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}
.coaching-funnel-step {
    flex: 1;
    min-width: 140px;
    display: flex;
    gap: 10px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
}
.coaching-funnel-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.coaching-funnel-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 2px;
}
.coaching-funnel-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.coaching-funnel-sub {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.coaching-funnel-arrow {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 18px;
    padding-top: 20px;
}

/* Monthly Scorecard */
.coaching-scorecard {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.coaching-scorecard th, .coaching-scorecard td {
    padding: 8px 6px;
    text-align: center;
}
.coaching-sc-label {
    text-align: left !important;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 120px;
}
.coaching-sc-month {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
}
.coaching-sc-trend {
    font-size: 16px;
    min-width: 40px;
}
.coaching-sc-cell {
    position: relative;
}
.coaching-sc-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}
.coaching-sc-strong .coaching-sc-dot { background: #4ade80; }
.coaching-sc-neutral .coaching-sc-dot { background: #60a5fa; }
.coaching-sc-weak .coaching-sc-dot { background: #fb923c; }
.coaching-sc-empty .coaching-sc-dot { background: rgba(255, 255, 255, 0.06); }

.coaching-sc-legend {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-muted);
}
.coaching-sc-legend > span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.coaching-sc-legend .coaching-sc-dot {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

/* Personal Bests */
.coaching-bests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.coaching-best-card {
    padding: 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}
.coaching-best-icon {
    font-size: 24px;
    margin-bottom: 6px;
}
.coaching-best-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}
.coaching-best-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.coaching-best-fy {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.coaching-best-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}
.coaching-best-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.coaching-best-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.coaching-best-pct {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Peer Positioning */
.coaching-peer-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.coaching-peer-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.coaching-peer-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.coaching-peer-dim {
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
}
.coaching-peer-val {
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.coaching-peer-bar-cell {
    width: 30%;
}
.coaching-peer-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.coaching-peer-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}
.coaching-peer-rank {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}
.coaching-peer-total {
    font-weight: 400;
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .coaching-funnel-steps {
        flex-direction: column;
    }
    .coaching-funnel-arrow {
        display: none;
    }
    .coaching-spark-grid {
        grid-template-columns: 1fr 1fr;
    }
    .coaching-bests-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ====== GOALS TAB & REPORT ====== */


/* Goal Progress */
.goal-progress-card { margin-top: 16px; }
.goal-progress-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.goal-stat {
    text-align: center;
    padding: 10px;
    background: var(--glass-bg);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}
.goal-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.goal-stat-value { font-size: 18px; font-weight: 700; margin-top: 2px; }
.goal-progress-bar-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.goal-progress-bar {
    flex: 1;
    height: 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    position: relative;
    overflow: visible;
}
.goal-progress-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transition: width 0.4s ease;
}
.goal-progress-fill.achieved {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}
.goal-progress-pct { font-weight: 700; font-size: 16px; min-width: 48px; }
.goal-progress-marker {
    position: absolute;
    top: -4px;
    transform: translateX(-50%);
}
.goal-marker-line {
    width: 2px;
    height: 20px;
    background: rgba(255,255,255,0.4);
    margin: 0 auto;
}
.goal-marker-label {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 2px;
}
.goal-status {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}
.goal-status-achieved { background: rgba(34,197,94,0.1); color: #4ade80; }
.goal-status-ahead { background: rgba(34,197,94,0.06); }
.goal-status-behind { background: rgba(239,68,68,0.06); }

/* Driver Cards */
.goal-drivers-card { margin-top: 16px; }
/* Goal Focus Card — Top of Goals section */
.goal-focus-card { margin-bottom: 16px; }
.focus-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.focus-slot {
    padding: 20px 24px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 4px solid;
}
.focus-slot-primary { border-left-color: #ef4444; }
.focus-slot-secondary { border-left-color: #f59e0b; }
.focus-slot-positive { border-left-color: #4ade80; }
.focus-slot-watch { border-left-color: #60a5fa; }

.focus-slot-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 8px;
}
.focus-slot-primary .focus-slot-label { color: #ef4444; }
.focus-slot-secondary .focus-slot-label { color: #f59e0b; }
.focus-slot-positive .focus-slot-label { color: #4ade80; }
.focus-slot-watch .focus-slot-label { color: #60a5fa; }

.focus-slot-icon { margin-right: 4px; }

.focus-slot-hero {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
}
.focus-slot-primary .focus-slot-hero { color: #fca5a5; }
.focus-slot-secondary .focus-slot-hero { color: #fcd34d; }
.focus-slot-positive .focus-slot-hero { color: #86efac; }
.focus-slot-watch .focus-slot-hero { color: #93c5fd; }

.focus-slot-sub {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.focus-slot-context {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

/* Goal Drivers — Two-Column Strengths/Opportunities Layout */
.driver-banner {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border-radius: 10px;
    font-size: 14px;
}
.driver-banner-item { flex: 1; min-width: 180px; }
.driver-banner-neg { color: #ef4444; }
.driver-banner-pos { color: #4ade80; }

.driver-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.driver-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.driver-col-header {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
}
.driver-col-strengths .driver-col-header { color: #4ade80; }
.driver-col-opportunities .driver-col-header { color: #ef4444; }
.driver-col-icon { margin-right: 6px; }

.driver-row {
    padding: 12px 14px;
    background: var(--glass-bg);
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid transparent;
}
.driver-col-strengths .driver-row { border-left-color: #4ade80; }
.driver-col-opportunities .driver-row { border-left-color: #ef4444; }

.driver-row-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.driver-row-name {
    font-weight: 600;
    font-size: 14px;
}
.driver-row-values {
    font-size: 13px;
    color: var(--text-secondary);
}
.driver-row-vs {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 4px;
}

/* Gap bar — benchmark as background track, actual as foreground */
.driver-row-bar {
    position: relative;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}
.driver-row-bar-bench {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 3px;
    opacity: 0.35;
}
.driver-row-bar-actual {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.driver-row-tip {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    font-style: italic;
}

/* Legacy compat — keep old classes for manager report mini drivers */
.driver-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 14px; background: var(--glass-bg); border-radius: 8px; font-size: 13px; }
.driver-summary-neg { color: #ef4444; }
.driver-summary-pos { color: #4ade80; }
.driver-summary-sep { color: var(--text-muted); }

/* Goal Funnel */
.goal-funnel-card { margin-top: 16px; }

/* Company Goal Alignment Card */
.goal-alignment-card { margin-bottom: 20px; }
.align-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.align-stat {
    text-align: center;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}
.align-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.align-stat-value { font-size: 20px; font-weight: 700; margin-top: 2px; }
.align-bars { margin-bottom: 12px; }
.align-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.align-bar-label {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 110px;
    text-align: right;
}
.align-bar-track {
    flex: 1;
    height: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
    position: relative;
    overflow: visible;
}
.align-bar-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #f59e0b, #fb923c);
    transition: width 0.4s ease;
}
.align-bar-fill.achieved {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}
.align-bar-fill.behind {
    background: linear-gradient(90deg, #ef4444, #f87171);
}
.align-bar-fill.align-progress {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.align-bar-fill.align-progress.behind {
    background: linear-gradient(90deg, #ef4444, #f87171);
}
.align-bar-pct {
    font-size: 13px;
    font-weight: 700;
    min-width: 40px;
}
.align-gap-note {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    margin-bottom: 6px;
}
.align-ebu-note {
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 12px;
}

/* Manager Goals Report */
.goal-report-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.goal-report-stat {
    text-align: center;
    padding: 14px 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}
.goal-report-stat-value { font-size: 22px; font-weight: 700; }
.goal-report-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.03em; }

.goal-report-table { font-size: 0.9em; }
.goal-report-name {
    font-weight: 600;
    white-space: nowrap;
}
.goal-expand-icon {
    display: inline-block;
    width: 16px;
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.15s;
}
.goal-mini-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.goal-mini-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    min-width: 60px;
}
.goal-mini-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.goal-mini-fill.goal-achieved { background: #4ade80; }
.goal-mini-fill.goal-ahead { background: #4ade80; }
.goal-mini-fill.goal-behind { background: #ef4444; }
.goal-pace-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.goal-pace-badge.goal-achieved { background: rgba(34,197,94,0.15); color: #4ade80; }
.goal-pace-badge.goal-ahead { background: rgba(34,197,94,0.1); color: #4ade80; }
.goal-pace-badge.goal-behind { background: rgba(239,68,68,0.1); color: #ef4444; }

.driver-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.driver-tag-neg { background: rgba(239,68,68,0.1); color: #ef4444; }
.driver-tag-pos { background: rgba(34,197,94,0.1); color: #4ade80; }

/* Goal Detail Row (expanded) */
.goal-detail-cell { padding: 0 !important; }
.goal-detail-content {
    padding: 16px 20px;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--glass-border);
}
.goal-detail-pace {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}
.goal-detail-funnel {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--glass-bg);
    border-radius: 6px;
}
.driver-grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
}
.driver-card-mini {
    padding: 10px 12px;
    background: var(--glass-bg);
    border-radius: 8px;
    border-left: 3px solid;
    font-size: 12px;
}
.driver-card-mini.driver-positive { border-left-color: #4ade80; }
.driver-card-mini.driver-negative { border-left-color: #ef4444; }
.driver-mini-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 4px;
}
.driver-mini-impact { font-weight: 700; }
.driver-card-mini.driver-positive .driver-mini-impact { color: #4ade80; }
.driver-card-mini.driver-negative .driver-mini-impact { color: #ef4444; }
.driver-mini-compare { color: var(--text-muted); margin-bottom: 4px; }
.driver-mini-tip { color: var(--text-muted); font-style: italic; line-height: 1.3; }

@media (max-width: 768px) {
    .goal-progress-stats { grid-template-columns: repeat(2, 1fr); }
    .goal-report-summary { grid-template-columns: repeat(2, 1fr); }
    .driver-columns { grid-template-columns: 1fr; }
}

/* Dashboard collapsible tables */
.dash-table-collapsed tbody tr:nth-child(n+6) {
    display: none;
}
.dash-table-toggle {
    display: block;
    width: 100%;
    padding: 8px;
    background: none;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--primary);
    font-size: 0.85em;
    cursor: pointer;
    text-align: center;
}
.dash-table-toggle:hover {
    background: rgba(255, 255, 255, 0.03);
}


/* ============ DASHBOARD V2 — Salesperson ============ */
.dash2 { max-width: 1100px; margin: 0 auto; }

/* --- Hero Strip --- */
.dash2-hero {
    display: flex; align-items: center; justify-content: space-between;
    gap: 32px; padding: 20px 0 28px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dash2-hero-gci { flex-shrink: 0; }
.dash2-ban {
    font-size: 52px; font-weight: 800; color: var(--text-primary);
    letter-spacing: -1.5px; line-height: 1;
}
.dash2-ban-label {
    font-size: 13px; font-weight: 500; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-top: 6px;
}
.dash2-hero-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dash2-hero-rank { font-size: 36px; font-weight: 800; color: #818cf8; line-height: 1; }
.dash2-hero-rank-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }

/* Goal mini bar */
.dash2-hero-goal-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 2px; }
.dash2-goal-bar-wrap { display: flex; align-items: center; gap: 8px; }
.dash2-goal-bar {
    width: 120px; height: 8px; border-radius: 4px;
    background: rgba(255,255,255,0.08); overflow: hidden;
}
.dash2-goal-bar-fill {
    height: 100%; border-radius: 4px; transition: width 0.4s ease;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 40%, #22c55e 80%, #4ade80 100%);
    background-size: 500% 100%;
}
.dash2-goal-bar-fill.achieved { background: #4ade80; }
.dash2-goal-pct { font-size: 14px; font-weight: 700; color: var(--text-secondary); }

/* Tier ring */
.dash2-tier-badge {
    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 10px;
    color: #fff; text-transform: uppercase; letter-spacing: 0.5px;
}
.dash2-tier-next { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.dash2-tier-ring-wrap { position: relative; width: 36px; height: 36px; }
.dash2-tier-ring { width: 36px; height: 36px; transform: rotate(-90deg); }
.dash2-tier-ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 3; }
.dash2-tier-ring-fill { fill: none; stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray 0.4s ease; }
.dash2-tier-ring-pct {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 9px; font-weight: 700; color: var(--text-secondary);
}
.dash2-tier-next-label { font-size: 12px; color: var(--text-muted); }

/* --- Section Labels --- */
.dash2-section { margin-top: 28px; }
.dash2-section-label {
    font-size: 14px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px;
}

/* --- Monthly Pulse Cards --- */
.dash2-pulse-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px;
}
.dash2-pulse-card {
    background: rgba(255,255,255,0.03); border-radius: 12px;
    padding: 20px; text-align: center; border-left: 4px solid transparent;
    transition: border-color 0.3s;
}
.dash2-pulse-green { border-left-color: #4ade80; }
.dash2-pulse-amber { border-left-color: #f59e0b; }
.dash2-pulse-red { border-left-color: #ef4444; }
.dash2-pulse-neutral { border-left-color: rgba(255,255,255,0.1); }

.dash2-pulse-label {
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}
.dash2-pulse-value { font-size: 32px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.dash2-pulse-target { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.dash2-pulse-pace { font-size: 11px; font-weight: 600; display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 8px; }
.pace-good { color: #4ade80; background: rgba(74, 222, 128, 0.1); }
.pace-behind { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

/* --- Motivation Row --- */
.dash2-motive-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
}
.dash2-motive-card {
    background: rgba(255,255,255,0.03); border-radius: 12px; padding: 20px;
}
.dash2-motive-label {
    font-size: 13px; font-weight: 600; color: var(--text-muted);
    margin-bottom: 12px;
}
.dash2-motive-body { font-size: 15px; color: var(--text-secondary); line-height: 1.5; }

/* Recent wins */
.dash2-wins-list { display: flex; flex-direction: column; gap: 8px; }
.dash2-win-row {
    display: flex; align-items: center; gap: 12px;
    font-size: 14px; color: var(--text-secondary);
}
.dash2-win-date { flex-shrink: 0; font-size: 12px; color: var(--text-muted); width: 50px; }
.dash2-win-addr { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash2-win-gci { flex-shrink: 0; font-weight: 700; color: #4ade80; }

/* Responsive */
@media (max-width: 768px) {
    .dash2-hero { flex-direction: column; align-items: flex-start; gap: 20px; }
    .dash2-ban { font-size: 40px; }
    .dash2-pulse-grid { grid-template-columns: repeat(2, 1fr); }
    .dash2-motive-grid { grid-template-columns: 1fr; }
}

/* ==================== DASHBOARD V3 — LIFESTATS ==================== */

/* Outer envelope — invisible container, panels inside do the visual work */
.d3-outer {
    position: relative;
    background: none;
    border: none;
    border-radius: 0;
    padding: 32px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    max-width: 1260px;
}
.d3-outer-header {
    text-align: center; margin-bottom: 28px; position: relative;
    display: flex; align-items: center; justify-content: center;
}
.d3-global-month {
    position: absolute; right: 0; top: 50%; transform: translateY(-50%);
}
.d3-outer-header h2 {
    font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.5px;
}
.d3-back-btn {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.35);
    background: none; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    padding: 5px 12px; cursor: pointer; transition: all 0.2s;
    font-family: inherit;
}
.d3-back-btn:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

/* Dashboard identity header */
.d3-dash-header { flex-direction: column; gap: 4px; }
.d3-dash-identity { text-align: center; }
.d3-dash-names { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -0.5px; margin: 0; }
.d3-dash-meta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; }
.d3-dash-team-badge { font-size: 13px; color: rgba(255,255,255,0.45); font-weight: 500; }
.d3-dash-comm-badge { font-size: 11px; font-weight: 600; color: rgba(239,68,68,0.9); background: rgba(239,68,68,0.12); border-radius: 10px; padding: 2px 10px; }

.d3 { display: flex; flex-direction: column; gap: 20px; }

/* --- Hero Strip --- */
/* Hero row — left stacked cards + right award journey */
.d3-hero-row {
    display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 12px;
}
.d3-hero-grid {
    display: flex; flex-direction: column; align-self: start; min-width: 0; overflow: hidden;
}
.d3-hero-left {
    display: grid; grid-template-rows: auto auto auto; gap: 12px;
}
.d3-hero-award {
    position: relative;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px; backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
    padding: 24px 32px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; min-height: 0; min-width: 0;
}
.d3-hero-award { cursor: pointer; transition: border-color 0.2s; }
.d3-hero-award:hover { border-color: rgba(239, 68, 68, 0.5); }
.d3-hero-award .award-journey { width: 100%; }
.d3-hero-award .award-track-wrap { margin-left: 24px; margin-right: 24px; }
/* Toggle switch in top-right */
.d3-hero-toggle {
    position: absolute; top: 12px; right: 16px;
    display: flex; gap: 2px;
    background: rgba(255,255,255,0.06); border-radius: 8px; padding: 2px;
}
.d3-hero-toggle-btn {
    background: none; border: none; color: rgba(255,255,255,0.35);
    font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
    padding: 4px 10px; border-radius: 6px; cursor: pointer; transition: all 0.2s;
}
.d3-hero-toggle-btn:hover { color: rgba(255,255,255,0.6); }
.d3-hero-toggle-btn.active {
    background: rgba(255,255,255,0.1); color: #fff;
}
/* Award tier icon on hero card */
.d3-hero-card-award {
    display: flex; align-items: center; justify-content: space-between;
}
.d3-hero-card-left { flex: 1; min-width: 0; }
.award-tier-icon { flex-shrink: 0; }
.award-shimmer-overlay { display: none; }
/* YTD row — side by side below hero */
.d3-ytd-row {
    display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px;
}
.d3-hero-card {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px; backdrop-filter: blur(20px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    cursor: pointer; transition: border-color 0.2s;
    min-width: 0; overflow: hidden;
}
.d3-hero-card:hover { border-color: rgba(239, 68, 68, 0.5); }
.d3-hero-val { font-size: 36px; font-weight: 800; color: #fff; line-height: 1.1; letter-spacing: -1.5px; }
.d3-hero-val-row { display: flex; align-items: baseline; gap: 10px; }
.d3-hero-pcp { font-size: 13px; font-weight: 700; white-space: nowrap; }
.d3-hero-left .d3-hero-card:last-child .d3-hero-val { font-size: 24px; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Leaderboard row at bottom — full width, 3 cards */
.d3-leaderboard-row {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 0;
}
.d3-hero-leaderboard { min-width: 0; display: flex; flex-direction: column; overflow: hidden; padding: 20px; }
.d3-lb-empty-row { opacity: 0.3; }
.d3-hero-label { font-size: 10px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; margin-top: 6px; }
.d3-lb-heading { font-size: 10px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 8px; }
.d3-lb-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 12px; color: rgba(255,255,255,0.5); min-width: 0; }
.d3-lb-me { color: #fff; background: rgba(99, 102, 241, 0.1); border-left: 3px solid rgba(99, 102, 241, 0.7); border-radius: 4px; }
.d3-lb-rank { width: 16px; font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.5); flex-shrink: 0; text-align: right; }
.d3-lb-me .d3-lb-rank { color: #4ade80; }
.d3-lb-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d3-lb-val { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.5); flex-shrink: 0; }
.d3-lb-me .d3-lb-val { color: rgba(255,255,255,0.7); }
.d3-lb-empty { font-size: 11px; color: rgba(255,255,255,0.2); font-style: italic; }

/* --- Dashboard leaderboard (full-width single card with 3 columns) --- */
.d3-dash-leaderboard .d3-panel-header { margin-bottom: 16px; }
.d3-dash-lb-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.d3-dash-lb-col-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 4px; }
.d3-dash-lb-cols .d3-lb-row { padding: 6px 4px; font-size: 13px; }
.d3-dash-lb-cols .d3-lb-rank { font-size: 13px; width: 20px; }
.d3-dash-lb-cols .d3-lb-name { font-size: 13px; }
.d3-dash-lb-cols .d3-lb-val { font-size: 13px; font-weight: 700; }
.d3-dash-lb-cols .d3-lb-me { padding: 6px 8px; }

/* --- Panels (glass cards — lighter since they're inside the outer card) --- */
.d3-panel {
    background: linear-gradient(135deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px; padding: 28px; backdrop-filter: blur(20px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: border-color 0.2s;
}
.d3-clickable { cursor: pointer; }
.d3-clickable:hover { border-color: rgba(239, 68, 68, 0.5); }
.d3-panel-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}
.d3-panel-title { font-size: 20px; font-weight: 700; color: #fff; }
.d3-panel-period {
    font-size: 12px; color: rgba(255,255,255,0.4); font-weight: 500;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.06);
    padding: 5px 14px; border-radius: 14px;
}
.d3-month-picker {
    font-size: 12px; font-weight: 600; color: #fff; font-family: inherit;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
    padding: 5px 12px; border-radius: 14px; cursor: pointer;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    padding-right: 28px;
}
.d3-month-picker:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); }
.d3-month-picker:focus { outline: none; border-color: rgba(99,102,241,0.5); box-shadow: 0 0 0 2px rgba(99,102,241,0.15); }
.d3-month-picker option { background: #1e1e2e; color: #fff; }

/* --- Main grid: Activity | Overview (2-column) --- */
.d3-main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }

/* --- Activity panel (left) --- */
.d3-panel-activity { display: flex; flex-direction: column; }
.d3-activity-body { display: flex; gap: 0; flex: 1; align-items: stretch; }

/* --- Dot matrix weekly activity --- */
.d3-dot-matrix { display: flex; flex-direction: column; gap: 4px; padding: 12px 0 8px; flex: 1; justify-content: center; }
.d3-dot-row { display: grid; grid-template-columns: 90px repeat(7, 1fr) 56px; align-items: center; gap: 0; }
.d3-dot-header { margin-bottom: 6px; }
.d3-dot-label { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.4); white-space: nowrap; }
.d3-dot-day { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.25); text-align: center; text-transform: uppercase; }
.d3-dot-day.today { color: #fff; font-weight: 700; }
.d3-dot-cell { display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.d3-dot { width: 14px; height: 14px; border-radius: 50%; transition: opacity 0.3s ease; }
.d3-dot-total { font-size: 18px; font-weight: 700; color: #fff; white-space: nowrap; line-height: 14px; display: flex; align-items: baseline; }
.d3-dot-count { width: 28px; text-align: right; flex-shrink: 0; }
.d3-dot-goal { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.25); }
.d3-activity-body .d3-bar-chart { flex: 1; }
.d3-bar-chart {
    display: flex; align-items: flex-end; gap: 8px;
    min-height: 180px; position: relative;
}
.d3-bar-col {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    height: 100%; justify-content: flex-end; gap: 0; min-height: 180px;
}
.d3-bar-val {
    font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
}
.d3-bar {
    width: 100%; max-width: 42px; border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.06) 100%);
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 8px;
}
.d3-bar-empty {
    background: rgba(255,255,255,0.04);
}
.d3-bar-today {
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.10) 100%);
}
.d3-bar-stacked {
    width: 100%; max-width: 42px; border-radius: 10px;
    display: flex; flex-direction: column; overflow: hidden;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 8px;
}
.d3-bar-stacked.d3-bar-today { box-shadow: 0 0 0 2px rgba(255,255,255,0.2); }
.d3-seg { width: 100%; min-height: 4px; }
.d3-seg-appr { background: #8b5cf6; }
.d3-seg-list { background: #3b82f6; }
.d3-seg-sale { background: #10b981; }
.d3-bar-label { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 8px; font-weight: 500; }
.d3-bar-label.today { color: #fff; font-weight: 700; }

/* --- Weekly stats column (right side of Activity panel) --- */
.d3-weekly-stats {
    display: flex; flex-direction: column; justify-content: center; gap: 20px;
    border-left: 1px solid rgba(255,255,255,0.05);
    padding-left: 24px; margin-left: 24px;
    min-width: 100px;
}
.d3-weekly-stat { text-align: center; }
.d3-weekly-stat-val { font-size: 28px; font-weight: 800; color: #fff; line-height: 1; }
.d3-weekly-stat-label { font-size: 11px; color: rgba(255,255,255,0.35); font-weight: 500; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.d3-legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.d3-weekly-insight { font-size: 12px; color: rgba(255,255,255,0.45); font-weight: 500; margin-left: auto; }

/* --- Overview panel (right) --- */
.d3-overview-month { position: absolute; right: 20px; top: 20px; z-index: 2; }
.d3-overview-body { display: flex; gap: 28px; align-items: center; }

/* Progress ring */
.d3-ring-wrap { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.d3-ring { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.d3-ring-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 3.5; }
.d3-ring-fill {
    fill: none; stroke-width: 3.5; stroke-linecap: round;
    transition: stroke-dasharray 1s cubic-bezier(0.4, 0, 0.2, 1);
    /* no glow */
}
.d3-ring-inner {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center;
}
.d3-ring-pct { font-size: 22px; font-weight: 800; color: #fff; line-height: 1; }
.d3-ring-sub { font-size: 13px; color: rgba(255,255,255,0.35); margin-top: 5px; font-weight: 600; }

/* Overview stats */
.d3-overview-stats { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.d3-ov-stat { display: flex; flex-direction: column; gap: 4px; }
.d3-ov-info { display: flex; align-items: baseline; justify-content: space-between; }
.d3-ov-label { font-size: 12px; color: rgba(255,255,255,0.35); font-weight: 500; }
.d3-ov-val { font-size: 22px; font-weight: 800; color: #fff; line-height: 1; }
.d3-ov-progress { display: flex; align-items: center; gap: 10px; }
.d3-ov-progress-bar {
    flex: 1; height: 5px; background: rgba(255,255,255,0.06);
    border-radius: 3px; overflow: hidden;
}
.d3-ov-progress-fill {
    height: 100%; border-radius: 3px; transition: width 0.5s ease;
}
.d3-ov-progress-text {
    font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.35);
    white-space: nowrap; min-width: 40px; text-align: right;
}

/* --- Mid grid: Lead cards+Focus left, YTD Activity right --- */
.d3-mid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.d3-mid-left { display: flex; flex-direction: column; gap: 20px; }
.d3-mid-right { display: flex; flex-direction: column; gap: 20px; }
.d3-mid-right > .d3-panel { flex: 1; }
.d3-sp-lead-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* --- Bottom grid: Leaderboards + Milestone --- */
.d3-bottom-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; align-items: stretch; }
.d3-bottom-left { display: flex; flex-direction: column; gap: 20px; }
.d3-bottom-right { display: flex; flex-direction: column; gap: 20px; }
.d3-bottom-right .d3-panel-milestone { flex: 1; }

/* Performance panel — condensed metric bars */
.d3-panel-perf { display: flex; flex-direction: column; }
.d3-perf-metrics { display: flex; flex-direction: column; gap: 0; flex: 1; justify-content: space-between; }
.d3-perf-metric {
    display: grid; grid-template-columns: minmax(100px, 0.8fr) auto 1fr auto;
    align-items: center; gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.d3-perf-metric:last-child { border-bottom: none; }
.d3-perf-metric-label {
    font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.5);
    white-space: nowrap;
}
.d3-perf-metric-val {
    font-size: 13px; font-weight: 800; color: #fff;
    text-align: right; white-space: nowrap; min-width: 70px;
}
.d3-perf-metric-bar {
    height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px;
    overflow: hidden; min-width: 0; width: 100%;
}
.d3-perf-metric-fill {
    height: 100%; border-radius: 3px;
    transition: width 0.5s ease;
}
.d3-perf-metric-rank {
    font-size: 13px; font-weight: 700; white-space: nowrap;
    text-align: right; min-width: 44px;
}
.d3-perf-metric-of {
    font-weight: 500; font-size: 11px; color: rgba(255,255,255,0.25);
}

/* Milestone panel */
.d3-milestones { display: flex; flex-direction: column; gap: 0; }
.d3-milestone-row {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.d3-milestone-row:last-child { border-bottom: none; }
.d3-ms-ring { width: 32px; height: 32px; flex-shrink: 0; }
.d3-ms-text { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.d3-ms-label { font-size: 13px; font-weight: 700; color: #fff; }
.d3-ms-detail { font-size: 12px; color: rgba(255,255,255,0.4); font-weight: 500; text-align: right; }
.d3-ms-achieved { font-size: 12px; color: rgba(255,255,255,0.5); font-weight: 600; }
.d3-ms-lead { font-size: 12px; color: rgba(255,255,255,0.5); font-weight: 600; }

/* Focus card */
.d3-focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.d3-focus-col { padding: 6px 0 0; }
.d3-focus-col:first-child { padding-right: 16px; border-right: 1px solid rgba(255,255,255,0.06); }
.d3-focus-col:last-child { padding-left: 16px; }
.d3-focus-sharpen .d3-focus-type { color: #f59e0b; }
.d3-focus-strength .d3-focus-type { color: #4ade80; }
.d3-focus-type { font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; margin-bottom: 4px; }
.d3-focus-area { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.d3-focus-stat { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.d3-focus-vs { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.4); }
.d3-focus-action { font-size: 11px; color: rgba(255,255,255,0.55); font-weight: 500; line-height: 1.4; }
.d3-focus-goal { font-size: 10px; color: rgba(255,255,255,0.35); font-weight: 500; margin-top: 6px; font-style: italic; }

/* Pipeline card — compact when full-width on dashboard */
.d3 > .d3-panel-pipeline { padding: 20px 28px; }
.d3 > .d3-panel-pipeline .d3-panel-header { margin-bottom: 8px; }
.d3 > .d3-panel-pipeline .d3-pipe-headline { padding: 0 0 2px; }
.d3 > .d3-panel-pipeline .d3-pipe-months { padding: 8px 0 4px; }

.d3-pipe-subtitle { font-size: 12px; color: rgba(255,255,255,0.4); font-weight: 500; }
.d3-pipe-headline { text-align: center; padding: 8px 0 4px; }
.d3-pipe-total { font-size: 28px; font-weight: 800; color: #fff; line-height: 1; }
.d3-pipe-arrow { font-size: 18px; margin-left: 6px; vertical-align: middle; }
.d3-pipe-total-label { font-size: 11px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; margin-top: 4px; }
.d3-pipe-months { display: flex; gap: 8px; padding: 12px 0 4px; }
.d3-pipe-month { flex: 1; text-align: center; }
.d3-pipe-month-gci { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.d3-pipe-month-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.d3-pipe-month-fill { height: 100%; background: rgba(255,255,255,0.35); border-radius: 2px; transition: width 0.3s; }
.d3-pipe-bar-green { background: rgba(74, 222, 128, 0.5); }
.d3-pipe-bar-amber { background: rgba(251, 191, 36, 0.5); }
.d3-pipe-month-name { font-size: 11px; color: rgba(255,255,255,0.4); font-weight: 600; margin-top: 5px; text-transform: uppercase; letter-spacing: 0.3px; }
.d3-pipe-meta { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 10px; margin-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 0; }
.d3-pipe-meta .d3-pipe-detail { flex: 1; text-align: center; }
.d3-pipe-meta .d3-pipe-detail:first-child { text-align: left; }
.d3-pipe-meta .d3-pipe-detail:last-child { text-align: right; }
.d3-pipe-meta .d3-pipe-detail + .d3-pipe-detail { border-left: 1px solid rgba(255,255,255,0.08); }
.d3-pipe-meta .d3-pipe-detail { padding: 2px 16px; }
.d3-pipe-detail { font-size: 12px; color: rgba(255,255,255,0.45); font-weight: 500; padding: 2px 0; }
.d3-pipe-detail strong { color: rgba(255,255,255,0.7); font-weight: 700; }

/* YTD Activity gauges */
.d3-ytd-gauges { display: flex; justify-content: space-evenly; gap: 8px; padding: 8px 0 4px; }
.d3-ytd-gauge { text-align: center; flex: 1; }
.d3-ytd-svg { width: 160px; height: 160px; }
.d3-ytd-gauge-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); margin-top: -8px; }

/* YTD Ratios */
.d3-ytd-ratios { display: flex; gap: 12px; margin-top: 16px; }
.d3-ytd-ratio { flex: 1; text-align: center; background: rgba(255,255,255,0.03); border-radius: 8px; padding: 14px 8px; }
.d3-ytd-ratio-val { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.1; }
.d3-ytd-ratio-val.d3-ytd-ratio-warn { color: #ef4444; }
.d3-ytd-ratio-label { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; color: rgba(255,255,255,0.35); margin-top: 6px; }

/* Year in Review chart */
.d3-year-chart-wrap { height: 220px; position: relative; }

/* GCI Progress bar */
.d3-gci-progress { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.05); }
.d3-gci-progress-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.d3-gci-progress-label { font-size: 12px; color: rgba(255,255,255,0.5); font-weight: 500; }
.d3-gci-progress-pct { font-size: 14px; font-weight: 700; }
.d3-gci-progress-track { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.d3-gci-progress-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.d3-gci-progress-footer { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 4px; text-align: right; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .d3-main-grid { grid-template-columns: 1fr; }
    .d3-mid-grid { grid-template-columns: 1fr; }
    .d3-bottom-grid { grid-template-columns: 1fr; }
    .d3-hero-row { grid-template-columns: 1fr; }
    .d3-ytd-row { grid-template-columns: 1fr; }
    .d3-leaderboard-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .d3-hero-row { grid-template-columns: 1fr; }
    .d3-hero-val { font-size: 32px; }

    .d3-bar-col { min-height: 120px; }
    .d3-ring-wrap { width: 110px; height: 110px; }
    .d3-ring-pct { font-size: 22px; }
    .d3-panel { padding: 20px; }
    .d3-activity-body { flex-direction: column; }
    .d3-weekly-stats { flex-direction: row; border-left: none; padding-left: 0; margin-left: 0; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 16px; margin-top: 16px; min-width: auto; }
    .d3-weekly-stat { flex: 1; }
    .d3-ytd-gauges { flex-direction: row; }
    .d3-ytd-svg { width: 90px; height: 90px; }
}

/* ===== D3 Insights Page (d3i-) ===== */
.d3i-hero {
    display: flex; align-items: flex-start; gap: 20px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.08) 0%, rgba(251, 146, 60, 0.02) 100%);
    border: 1px solid rgba(251, 146, 60, 0.15);
    border-radius: 16px;
}
.d3i-hero-icon { font-size: 32px; flex-shrink: 0; margin-top: 2px; }
.d3i-hero-body { flex: 1; }
.d3i-hero-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
    color: #fb923c; margin-bottom: 6px;
}
.d3i-hero-title { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.d3i-hero-reason { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.6; }
.d3i-hero-reason strong { color: #fff; }

.d3i-strengths {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 20px; border-radius: 12px;
    background: rgba(74, 222, 128, 0.05);
    border: 1px solid rgba(74, 222, 128, 0.12);
    font-size: 13px; color: rgba(255,255,255,0.5);
}
.d3i-strengths-icon { color: #4ade80; font-size: 16px; font-weight: 700; }
.d3i-strengths strong { color: #4ade80; }

.d3i-cards { display: flex; flex-direction: column; gap: 16px; }

.d3i-card { transition: border-color 0.2s; }
.d3i-card-weak { border-left: 3px solid #fb923c; }
.d3i-card-neutral { border-left: 3px solid #60a5fa; }
.d3i-card-strength { border-left: 3px solid #4ade80; }

.d3i-card-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}
.d3i-card-left { display: flex; align-items: center; gap: 10px; }
.d3i-card-icon { font-size: 20px; }
.d3i-card-title { font-size: 18px; font-weight: 700; color: #fff; }

.d3i-badge {
    font-size: 11px; font-weight: 700; padding: 4px 14px; border-radius: 14px;
    letter-spacing: 0.3px; white-space: nowrap;
}
.d3i-badge-strength { color: #4ade80; background: rgba(74, 222, 128, 0.10); }
.d3i-badge-ontrack { color: #60a5fa; background: rgba(96, 165, 250, 0.10); }
.d3i-badge-focus { color: #fb923c; background: rgba(251, 146, 60, 0.10); }

.d3i-card-stat {
    font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 16px;
    padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.d3i-card-stat strong { color: #fff; font-size: 16px; font-weight: 700; }

.d3i-card-rec {
    font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.7;
}
.d3i-card-rec strong { color: rgba(255,255,255,0.7); }
.d3i-card-rec em {
    display: block; margin-top: 10px; padding: 10px 14px;
    background: rgba(255,255,255,0.025); border-radius: 10px;
    color: rgba(255,255,255,0.4); font-style: normal; font-size: 12px;
    border-left: 2px solid rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
    .d3i-hero { flex-direction: column; gap: 10px; padding: 20px; }
    .d3i-card-header { flex-wrap: wrap; gap: 8px; }
}

/* ===== D3 Pipeline Page (d3p-) ===== */

/* Hero: Momentum + Monthly Forecast + Funnel */
.d3p-hero { display: flex; align-items: stretch; gap: 28px; }
.d3p-hero-right { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; min-width: 140px; }

/* Momentum indicator */
.d3p-momentum { padding: 16px 20px; border-left: 1px solid rgba(255,255,255,0.04); }
.d3p-mom-icon { font-size: 32px; line-height: 1; }
.d3p-mom-pct { font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.d3p-mom-label { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; }
.d3p-mom-streak { font-size: 11px; color: #4ade80; font-weight: 600; margin-top: 4px; }
.d3p-mom-sub { font-size: 10px; color: rgba(255,255,255,0.2); text-align: center; margin-top: 4px; }

.d3p-hero-centre { flex: 1; display: flex; flex-direction: column; gap: 16px; }

/* Monthly forecast bar chart (vertical bars) */
.d3p-hm-grid { display: flex; gap: 10px; flex: 1; align-items: flex-end; }
.d3p-hm-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.d3p-hm-gci { font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; }
.d3p-hm-bar-track { width: 100%; height: 80px; background: rgba(255,255,255,0.03); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.d3p-hm-bar-fill { width: 100%; border-radius: 6px 6px 0 0; transition: height 0.4s ease; min-height: 4px; }
.d3p-hm-month { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.4px; }
.d3p-hm-count { font-size: 10px; color: rgba(255,255,255,0.2); }
.d3p-hm-empty { font-size: 13px; color: rgba(255,255,255,0.25); text-align: center; padding: 30px 0; }

/* Funnel stats row */
.d3p-funnel-row { display: flex; align-items: center; justify-content: space-evenly; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.04); }
.d3p-fun-item { text-align: center; padding: 4px 16px; }
.d3p-fun-val { font-size: 22px; font-weight: 800; color: #fff; line-height: 1; }
.d3p-fun-result .d3p-fun-val { font-size: 20px; }
.d3p-fun-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.7px; color: rgba(255,255,255,0.25); font-weight: 600; margin-top: 2px; }
.d3p-fun-arrow { color: rgba(255,255,255,0.12); font-size: 16px; flex-shrink: 0; }

/* Forecast chart */
.d3p-chart-wrap { height: 280px; margin-bottom: 20px; }

/* Inline scenarios row beneath chart */
.d3p-scenarios { display: flex; gap: 0; justify-content: space-evenly; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.04); }
.d3p-sc-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; }
.d3p-sc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.d3p-sc-body { display: flex; flex-direction: column; }
.d3p-sc-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255,255,255,0.3); font-weight: 600; }
.d3p-sc-val { font-size: 16px; font-weight: 700; color: rgba(255,255,255,0.6); }
.d3p-sc-primary .d3p-sc-val { font-size: 24px; font-weight: 800; color: #fff; }
.d3p-sc-primary .d3p-sc-label { color: rgba(255,255,255,0.5); }
.d3p-sc-primary .d3p-sc-dot { width: 12px; height: 12px; }
.d3p-sc-rate { font-size: 11px; color: rgba(255,255,255,0.25); margin-top: 2px; }
.d3p-sc-spread { text-align: center; font-size: 12px; color: rgba(255,255,255,0.3); padding-top: 12px; font-weight: 500; }
.d3p-sc-spread strong { color: rgba(255,255,255,0.6); }

/* Bottom 2-col grid */
.d3p-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* Engine panel */
.d3p-vel-grid { display: flex; flex-direction: column; gap: 0; }
.d3p-vel-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.d3p-vel-row:last-child { border-bottom: none; }
.d3p-vel-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.5); display: flex; align-items: center; gap: 8px; }
.d3p-vel-right { display: flex; flex-direction: column; align-items: flex-end; }
.d3p-vel-val { font-size: 18px; font-weight: 800; color: #fff; }
.d3p-vel-sub { font-size: 11px; color: rgba(255,255,255,0.25); margin-top: 2px; }

/* Health dots */
.d3p-health-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.d3p-dot-ok { background: #4ade80; }
.d3p-dot-warn { background: #f59e0b; }

.d3p-health-summary {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; margin-top: 12px; border-radius: 10px;
    background: rgba(255,255,255,0.02); font-size: 12px; color: rgba(255,255,255,0.4);
}
.d3p-health-actual { margin-left: auto; font-weight: 600; color: rgba(255,255,255,0.5); }

/* Aging compact */
.d3p-aging { margin-top: 16px; }
.d3p-aging-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: rgba(255,255,255,0.25); font-weight: 600; margin-bottom: 8px; }
.d3p-age-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin-bottom: 8px; }
.d3p-age-seg { min-width: 4px; transition: width 0.3s ease; }
.d3p-age-legend { display: flex; flex-wrap: wrap; gap: 10px; }
.d3p-age-tag { font-size: 11px; color: rgba(255,255,255,0.35); display: flex; align-items: center; gap: 4px; }
.d3p-age-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* GAP Calculator (What-If) */
.d3p-wi-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.d3p-wi-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.d3p-wi-label { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.4); min-width: 90px; }
.d3p-wi-input-row { display: flex; align-items: center; gap: 6px; }
.d3p-wi-prefix { font-size: 14px; color: rgba(255,255,255,0.3); font-weight: 600; }
.d3p-wi-input {
    width: 90px; padding: 8px 10px; font-size: 16px; font-weight: 700;
    text-align: center; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
    color: #fff; outline: none; transition: border-color 0.2s;
    -moz-appearance: textfield; font-family: inherit;
}
.d3p-wi-input::-webkit-outer-spin-button,
.d3p-wi-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.d3p-wi-input:focus { border-color: rgba(99,102,241,0.5); box-shadow: 0 0 0 2px rgba(99,102,241,0.15); }

.d3p-wi-delta { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.d3p-wi-delta.positive { color: #4ade80; background: rgba(74,222,128,0.1); }
.d3p-wi-delta.negative { color: #ef4444; background: rgba(239,68,68,0.1); }

.d3p-wi-result {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 20px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.05);
}
.d3p-wi-result-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.3); font-weight: 600; margin-bottom: 6px; }
.d3p-wi-result-val { font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 8px; letter-spacing: -1px; }
.d3p-wi-result-details { display: flex; gap: 14px; margin-bottom: 12px; }
.d3p-wi-detail { font-size: 12px; font-weight: 600; }
.d3p-wi-detail.positive { color: #4ade80; }
.d3p-wi-detail.negative { color: #ef4444; }
.d3p-wi-reset {
    font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; padding: 6px 16px; cursor: pointer; transition: all 0.2s;
    font-family: inherit;
}
.d3p-wi-reset:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }

@media (max-width: 768px) {
    .d3p-hero { flex-direction: column; gap: 20px; }
    .d3p-funnel-row { flex-direction: column; gap: 8px; }
    .d3p-fun-arrow { transform: rotate(90deg); }
    .d3p-hm-grid { flex-wrap: wrap; }
    .d3p-bottom-grid { grid-template-columns: 1fr; }
    .d3p-scenarios { flex-direction: column; gap: 10px; }
}

/* ===== D3 Goals Page (d3g-) ===== */

/* Big goal status card */
.d3g-goal-card {
    padding: 28px 32px; margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px; backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}
.d3g-goal-val { font-size: 36px; font-weight: 800; color: #fff; line-height: 1; letter-spacing: -1.5px; }
.d3g-goal-label { font-size: 11px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; margin-top: 8px; }
.d3g-goal-edit { font-size: 12px; color: rgba(255,255,255,0.25); text-decoration: none; margin-top: 8px; display: inline-block; transition: color 0.2s; }
.d3g-goal-edit:hover { color: #818cf8; }

/* No-goal warning card */
.d3g-no-goal-card {
    padding: 28px 32px; margin-bottom: 20px;
    background: rgba(245,158,11,0.04);
    border: 1px solid rgba(245,158,11,0.15);
    border-left: 4px solid #f59e0b;
    border-radius: 16px;
}
.d3g-no-goal-icon { font-size: 32px; margin-bottom: 8px; }
.d3g-no-goal-title { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.d3g-no-goal-sub { font-size: 13px; color: rgba(255,255,255,0.4); line-height: 1.5; margin-bottom: 16px; }
.d3g-no-goal-btn {
    padding: 10px 20px; border-radius: 10px; font-size: 13px; font-weight: 700;
    background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.4);
    color: #818cf8; cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.d3g-no-goal-btn:hover { background: rgba(99,102,241,0.25); }

/* Measure Against card */
.d3g-measure-card {
    padding: 20px 24px; margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
}
.d3g-measure-title {
    font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.3);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}
.d3g-measure-card .d3g-pills { margin-bottom: 0; }

/* Target pills */
.d3g-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.d3g-pill {
    padding: 7px 16px; border-radius: 20px; font-size: 12px; font-weight: 600;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.d3g-pill:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.d3g-pill-active { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.4); color: #818cf8; }
.d3g-pill-sub { font-size: 0.85em; opacity: 0.6; }

/* Progress hero panel */
.d3g-progress-top { display: flex; align-items: center; gap: 28px; position: relative; }
.d3g-progress-ring { flex-shrink: 0; }
.d3g-progress-stats { display: flex; gap: 24px; flex: 1; flex-wrap: wrap; }
.d3g-stat { display: flex; flex-direction: column; gap: 2px; }
.d3g-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.7px; color: rgba(255,255,255,0.25); font-weight: 600; }
.d3g-stat-val { font-size: 20px; font-weight: 800; color: #fff; }

.d3g-rank-badge {
    position: absolute; top: 0; right: 0;
    font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 4px 12px;
}

.d3g-pace { display: block; font-size: 13px; font-weight: 600; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.04); }

/* Goal progress track — forecast marker (drops DOWN from above track) */
.d3g-forecast-wp {
    position: absolute; top: 0; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; z-index: 3;
}
.d3g-forecast-label {
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; white-space: nowrap; margin-bottom: 3px;
}
.d3g-forecast-line {
    width: 2px; height: 26px; border-radius: 1px;
}
/* Behind — amber (our "average" colour) */
.d3g-forecast-behind .d3g-forecast-line { background: #f59e0b; box-shadow: 0 0 4px rgba(245,158,11,0.3); }
.d3g-forecast-behind .d3g-forecast-label { color: #f59e0b; }
/* Close — within 10%, amber with stronger glow */
.d3g-forecast-close .d3g-forecast-line { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.5); }
.d3g-forecast-close .d3g-forecast-label { color: #f59e0b; }
/* On track — green glow */
.d3g-forecast-ontrack .d3g-forecast-line { background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.5); }
.d3g-forecast-ontrack .d3g-forecast-label { color: #4ade80; }

/* Funnel steps (compact inline) */
.d3g-funnel { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.04); flex-wrap: wrap; }
.d3g-funnel-step { text-align: center; min-width: 80px; }
.d3g-funnel-val { font-size: 22px; font-weight: 800; color: #fff; line-height: 1; }
.d3g-funnel-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.6px; color: rgba(255,255,255,0.25); font-weight: 600; margin-top: 3px; }
.d3g-funnel-pace { font-size: 10px; color: rgba(255,255,255,0.2); margin-top: 2px; }
.d3g-funnel-arrow { color: rgba(255,255,255,0.1); font-size: 16px; }

/* Focus cards */
.d3g-focus-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.d3g-focus-card {
    padding: 24px; border-left: 3px solid rgba(255,255,255,0.1);
}
.d3g-focus-card.focus-slot-primary { border-left-color: #ef4444; }
.d3g-focus-card.focus-slot-secondary { border-left-color: #f59e0b; }
.d3g-focus-card.focus-slot-positive { border-left-color: #4ade80; }
.d3g-focus-card.focus-slot-watch { border-left-color: #f59e0b; }
.d3g-focus-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; color: rgba(255,255,255,0.35); margin-bottom: 4px; }
.d3g-focus-hint { font-size: 11px; color: rgba(255,255,255,0.25); margin-bottom: 12px; }
.focus-slot-primary .d3g-focus-tag { color: #ef4444; }
.focus-slot-secondary .d3g-focus-tag { color: #f59e0b; }
.focus-slot-positive .d3g-focus-tag { color: #4ade80; }
.d3g-focus-hero { font-size: 28px; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 4px; }
.d3g-focus-vs { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.35); margin-left: 8px; }
.d3g-focus-sub { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255,255,255,0.3); font-weight: 600; margin-bottom: 8px; }
.d3g-focus-context { font-size: 12px; color: rgba(255,255,255,0.35); line-height: 1.4; }

/* Goals bottom row — chart left, focus cards stacked right */
.d3g-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.d3g-bottom-right-stack { display: flex; flex-direction: column; gap: 16px; }
.d3g-bottom-right-stack .d3g-focus-layout { grid-template-columns: 1fr; }

/* Admin Goal Setter Page */
.d3g-admin-setter { display: flex; flex-direction: column; gap: 24px; }
.d3g-admin-mode { display: flex; gap: 8px; }
.d3g-admin-tab {
    padding: 8px 20px; border-radius: 10px; font-size: 13px; font-weight: 600;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.4); cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.d3g-admin-tab:hover { background: rgba(255,255,255,0.08); }
.d3g-tab-active { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.3); color: #818cf8; }

.d3g-setter-field { display: flex; flex-direction: column; gap: 6px; }
.d3g-setter-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; color: rgba(255,255,255,0.3); }
.d3g-setter-input-row { display: flex; align-items: center; gap: 8px; }
.d3g-setter-prefix, .d3g-setter-suffix { font-size: 18px; font-weight: 700; color: rgba(255,255,255,0.3); }
.d3g-setter-input {
    width: 200px; padding: 12px 16px; font-size: 22px; font-weight: 800;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px; color: #fff; outline: none; font-family: inherit;
    -moz-appearance: textfield;
}
.d3g-setter-input::-webkit-outer-spin-button,
.d3g-setter-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.d3g-setter-input:focus { border-color: rgba(99,102,241,0.5); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

.d3g-setter-resolved {
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 20px; border-radius: 14px;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05);
}
.d3g-setter-resolved-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.7px; color: rgba(255,255,255,0.25); font-weight: 600; }
.d3g-setter-resolved-val { font-size: 28px; font-weight: 800; color: #fff; }
.d3g-setter-resolved-sub { font-size: 12px; color: rgba(255,255,255,0.35); }

/* Reference grid */
.d3g-ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.d3g-ref-item { display: flex; flex-direction: column; gap: 3px; }
.d3g-ref-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: rgba(255,255,255,0.25); font-weight: 600; }
.d3g-ref-val { font-size: 18px; font-weight: 700; color: rgba(255,255,255,0.6); }
.d3g-ref-achieved { color: #4ade80; }

@media (max-width: 768px) {
    .d3g-progress-top { flex-direction: column; align-items: center; }
    .d3g-progress-stats { justify-content: center; }
    .d3g-focus-layout { grid-template-columns: 1fr; }
    .d3g-bottom-row { grid-template-columns: 1fr; }
    .d3g-funnel { flex-direction: column; }
    .d3g-ref-grid { grid-template-columns: 1fr 1fr; }
}

/* Salesperson KPI Panel */
.sp-kpi-outer {
    position: relative;
    background: none;
    border: none;
    border-radius: 0;
    padding: 32px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    max-width: 1260px;
}
.sp-kpi-heading {
    text-align: center; font-size: 28px; font-weight: 800; color: #fff;
    margin: 0 0 16px; letter-spacing: -0.5px; position: relative;
}
.sp-kpi-data-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 18px 20px;
}
.sp-kpi-table {
    width: 100%; border-collapse: collapse; font-size: 0.88em;
}
.sp-kpi-table thead th {
    color: rgba(255,255,255,0.4); font-weight: 600; font-size: 0.85em;
    letter-spacing: 0.03em; text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sp-kpi-table thead th:first-child { text-align: left; padding: 10px 14px; }
.sp-kpi-group-header td {
    font-size: 0.95em; font-weight: 700; color: rgba(255,255,255,0.9);
    letter-spacing: 0.03em;
    border-left: 3px solid rgba(255,255,255,0.25);
    border-bottom: none;
}
.sp-kpi-row td {
    color: rgba(255,255,255,0.85);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sp-kpi-row:hover td { background: rgba(255,255,255,0.04); }
.sp-kpi-row td:first-child { color: rgba(255,255,255,0.55); }
.sp-kpi-pill {
    padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
    background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.08); cursor: pointer;
    transition: all 0.15s ease;
}
.sp-kpi-pill:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
.sp-kpi-pill.active {
    background: rgba(255,255,255,0.12); color: #fff;
    border-color: rgba(255,255,255,0.2);
}

/* ---- Salesperson Trends (glass card style) ---- */
.sp-trends-outer {
    position: relative;
    background: none;
    border: none;
    border-radius: 0;
    padding: 32px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    max-width: 1260px;
}
.sp-trends-heading {
    text-align: center; font-size: 28px; font-weight: 800; color: #fff;
    margin: 0 0 20px; letter-spacing: -0.5px;
}
.sp-trends-data-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 20px 24px;
}
.sp-trends-chart-title {
    font-size: 0.95em; font-weight: 600; color: rgba(255,255,255,0.7);
    margin-bottom: 12px; letter-spacing: 0.02em;
}
.sp-trends-year-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.sp-trends-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.sp-trends-pills-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.sp-trends-pills-scroll::-webkit-scrollbar { display: none; }
.sp-trends-pill {
    padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
    background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.08); cursor: pointer;
    transition: all 0.15s ease; white-space: nowrap;
}
.sp-trends-pill:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
.sp-trends-pill.active {
    background: rgba(255,255,255,0.12); color: #fff;
    border-color: rgba(255,255,255,0.2);
}

/* ---- Salesperson Sales (glass card style) ---- */
.sp-sales-outer {
    position: relative;
    background: none;
    border: none;
    border-radius: 0;
    padding: 32px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    max-width: 1260px;
}
.sp-sales-heading {
    text-align: center; font-size: 28px; font-weight: 800; color: #fff;
    margin: 0 0 20px; letter-spacing: -0.5px;
}
.sp-sales-data-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 20px 24px;
}
/* Tweak inner elements when inside sp-sales wrapper */
.sp-sales-data-card .txn-scope-bar { margin-bottom: 16px; }
.sp-sales-data-card .txn-summary-bar { margin-bottom: 16px; }
.sp-sales-data-card .txn-summary-stat {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.06);
}
.sp-sales-data-card .txn-filter-bar {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.06);
}
.sp-sales-data-card .data-table th {
    background: rgba(255,255,255,0.03);
}
.sp-sales-data-card .data-table td {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ---- Salesperson Suburbs (glass card style) ---- */
.sp-suburbs-outer {
    position: relative;
    background: none;
    border: none;
    border-radius: 0;
    padding: 32px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    max-width: 1260px;
}
.sp-suburbs-heading {
    text-align: center; font-size: 28px; font-weight: 800; color: #fff;
    margin: 0 0 20px; letter-spacing: -0.5px; position: relative;
}
.sp-suburbs-data-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 20px 24px;
}

/* ---- Salesperson Leaderboards (glass card style) ---- */
.sp-lb-outer {
    position: relative;
    background: none;
    border: none;
    border-radius: 0;
    padding: 32px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    max-width: 1260px;
}
.sp-lb-heading {
    text-align: center; font-size: 28px; font-weight: 800; color: #fff;
    margin: 0 0 20px; letter-spacing: -0.5px; position: relative;
}
.sp-lb-data-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 20px 24px;
}
.sp-lb-data-card .leaderboard-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-top: none;
    padding: 0;
    overflow: visible;
}
.sp-lb-data-card .leaderboard-header {
    padding: 12px 12px 10px;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sp-lb-data-card .leaderboard-body {
    padding: 0;
}
.sp-lb-data-card .leaderboard-table {
    font-size: 14px;
}
.sp-lb-data-card .leaderboard-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sp-lb-data-card .lb-rank {
    font-size: 14px;
    width: 32px;
}
.sp-lb-data-card .lb-sub {
    font-size: 13px;
}
.sp-lb-data-card .dashboard-grid {
    gap: 24px;
}

/* ---- Salesperson Performance (glass card style) ---- */
.sp-perf-outer {
    position: relative;
    background: none;
    border: none;
    border-radius: 0;
    padding: 32px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    max-width: 1260px;
}
.sp-perf-heading {
    text-align: center; font-size: 28px; font-weight: 800; color: #fff;
    margin: 0 0 20px; letter-spacing: -0.5px; position: relative;
}
/* Award card (full width) */
.sp-perf-award-card {
    margin-bottom: 16px;
}
/* Award/Goal toggle */
.sp-perf-toggle {
    display: inline-flex;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}
.sp-perf-toggle-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.sp-perf-toggle-btn:hover { color: rgba(255,255,255,0.7); }
.sp-perf-toggle-btn.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
/* Two-column grid: comparison left, PBs right */
.sp-perf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 900px) {
    .sp-perf-grid { grid-template-columns: 1fr; }
}
.sp-perf-card {
    padding: 20px 24px;
    align-self: stretch;
}
.sp-perf-section {
    margin-bottom: 0;
}
.sp-perf-section-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
/* Override coaching cards inside perf cards */
.sp-perf-card .coaching-page-card {
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 0;
    backdrop-filter: none;
}
.sp-perf-card .card-header {
    display: none;
}
.sp-perf-card .card-body {
    padding: 0;
}
/* Peer table refinement */
.sp-perf-card .coaching-peer-table {
    font-size: 14px;
}
.sp-perf-card .coaching-peer-table td {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
/* Scorecard refinement */
.sp-perf-card .coaching-scorecard {
    font-size: 14px;
}

/* Personal Bests — grid of stat cards with arcs */
.pb-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (max-width: 700px) { .pb-grid { grid-template-columns: 1fr; } }
.pb-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
}
.pb-arc {
    flex-shrink: 0;
}
.pb-card-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.pb-card-value {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}
.pb-card-label {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pb-card-fy {
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    font-weight: 500;
}

/* ==================== MANAGEMENT DASHBOARD V2 (d3m-) ==================== */

/* Outer wrapper — wider than salesperson, with subtle background image */
.d3m-dashboard {
    max-width: 1340px;
    position: relative;
    overflow: hidden;
}

/* --- Row layouts --- */
.d3m-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.d3m-main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.d3m-mid-grid { display: grid; grid-template-columns: 2fr 3fr; gap: 20px; margin-top: 20px; align-items: stretch; }
.d3m-mid-left { display: flex; flex-direction: column; }
.d3m-mid-left .d3m-feature-cards { flex: 1; }
.d3m-mid-left .d3m-feature-cards .d3-panel { display: flex; flex-direction: column; justify-content: center; }
.d3m-mid-right { display: flex; flex-direction: column; }
.d3m-mid-right > .d3-panel { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.d3m-dashboard > .d3-panel-pipeline { margin-top: 20px; }
.d3m-dashboard > .d3m-main-grid .d3m-movers-grid { margin-top: 0; }
.d3m-row4 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.d3m-feature-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.d3m-dashboard > .d3m-feature-cards { margin-top: 20px; }

/* --- Activity Dials Panel --- */
.d3m-dials-panel { display: flex; flex-direction: column; gap: 0; }

/* --- Progress Panel (Goal/PCP toggle) --- */
.d3m-progress-panel { display: flex; flex-direction: column; }
.d3m-track-toggle {
    display: flex; gap: 2px;
    background: rgba(255,255,255,0.06); border-radius: 8px; padding: 2px;
}
.d3m-toggle-btn {
    background: none; border: none; color: rgba(255,255,255,0.35);
    font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
    padding: 4px 12px; border-radius: 6px; cursor: pointer; transition: all 0.2s;
    font-family: inherit;
}
.d3m-toggle-btn:hover { color: rgba(255,255,255,0.6); }
.d3m-toggle-btn.active { background: rgba(255,255,255,0.1); color: #fff; }

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

/* --- Leaderboard Panel --- */
.d3m-leaderboard { display: flex; flex-direction: column; }
.d3m-lb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 0 14px; min-width: 0; overflow: hidden; }
.d3m-lb-cols > div { min-width: 0; overflow: hidden; }
.d3m-lb-col-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 0 6px; }
.d3m-lb-list { display: flex; flex-direction: column; gap: 0; }

/* --- Movers Grid (Growers / Decliners) --- */
.d3m-movers-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    margin-top: 20px;
}
.d3m-mover-card { transition: border-color 0.2s; }
.d3m-mover-card:hover { border-color: rgba(255,255,255,0.15); }

/* --- Activity Card --- */
.d3m-activity-card { display: flex; flex-direction: column; }
.d3m-dashboard > .d3m-activity-card { margin-top: 20px; }
.d3m-act-header, .d3m-act-row {
    display: grid;
    grid-template-columns: 1fr 48px 48px 48px;
    gap: 4px;
    padding: 6px 14px;
    align-items: center;
}
.d3m-act-header { padding: 8px 14px 4px; border-bottom: 1px solid var(--glass-border); }
.d3m-act-row { border-bottom: 1px solid rgba(255,255,255,0.03); transition: background 0.15s; }
.d3m-act-row:hover { background: rgba(255,255,255,0.04); }
.d3m-act-row:last-child { border-bottom: none; }
.d3m-act-name { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d3m-act-val { font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.d3m-act-scroll { max-height: 340px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }
.d3m-act-scroll::-webkit-scrollbar { width: 4px; }
.d3m-act-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* --- YoY badge (inline) --- */
.d3m-yoy { font-size: 13px; font-weight: 700; white-space: nowrap; }
.d3m-yoy-wrap { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.d3m-yoy-pcp { font-size: 12px; font-weight: 400; color: var(--text-muted); }

/* --- Salespeople Panel --- */
.d3m-kpi-panel { padding-bottom: 8px; flex: 1; }
.d3m-kpi-panel .d3-panel-header { padding: 10px 14px 4px; }
.d3m-kpi-grid { display: grid; gap: 4px 12px; padding: 4px 14px; }
.d3m-kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.d3m-kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
.d3m-kpi-cell { padding: 6px 0; }
.d3m-kpi-val { font-size: 22px; font-weight: 700; color: #fff; line-height: 1.2; white-space: nowrap; }
.d3m-kpi-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-top: 2px; }
.d3m-kpi-sub { font-size: 10px; color: var(--text-secondary); margin-top: 1px; }

/* --- Pipeline Market Condition Cards --- */
.d3m-main-grid > .d3-panel { min-width: 0; }
.d3m-market-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.d3m-market-card {
    padding: 16px 20px;
}
.d3m-pipe-market-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.d3m-pipe-market-val {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 4px;
}
.d3m-pipe-market-badges {
    display: flex;
    gap: 0;
    align-items: center;
    font-size: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.d3m-pipe-market-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .d3m-row2 { grid-template-columns: 1fr; }
    .d3m-main-grid { grid-template-columns: 1fr; }
    .d3m-mid-grid { grid-template-columns: 1fr; }
    .d3m-row4 { grid-template-columns: 1fr; }
    .d3m-feature-cards { grid-template-columns: repeat(3, 1fr); }
    .d3m-movers-grid { grid-template-columns: 1fr; }
    .d3m-market-row { grid-template-columns: 1fr; }
}
