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

        /* While the theme is being applied on first paint, disable every
           transition/animation so the saved theme appears INSTANTLY instead of
           fading in from the default (which caused the light->dark "flash bang"
           on navigation). common.js removes .theme-loading after the first paint,
           restoring smooth transitions for the manual dark-mode toggle. */
        html.theme-loading,
        html.theme-loading * {
            transition: none !important;
            animation: none !important;
        }

        :root {
            --primary: #7332AA;
            --primary-light: #9b59d8;
            --primary-dark: #5a2888;
            --primary-subtle: rgba(115, 50, 170, 0.08);
            --success: #34A853;
            --warning: #FF9800;
            --danger: #EA4335;
            --info: #4285f4;
            --bg-light: #ffffff;
            --bg-secondary-light: #fafbfc;
            --text-light: #000000;
            --text-secondary-light: #5f6368;
            --text-tertiary-light: #9aa0a6;
            --border-light: #e8eaed;
            --card-light: #ffffff;
            --hover-light: #f8f9fa;
            --shadow-sm: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
            --shadow-md: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
            --shadow-lg: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
        }

        [data-theme="dark"] {
            --bg-light: #0a0a0a;
            --bg-secondary-light: #121212;
            --text-light: #e8eaed;
            --text-secondary-light: #9aa0a6;
            --text-tertiary-light: #5f6368;
            --border-light: #2d2d2d;
            --card-light: #1a1a1a;
            --hover-light: #212121;
            --primary-subtle: rgba(115, 50, 170, 0.15);
            --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15);
            --shadow-md: 0 1px 3px 0 rgba(0,0,0,.3), 0 4px 8px 3px rgba(0,0,0,.15);
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background-color: var(--bg-secondary-light);
            color: var(--text-light);
            line-height: 1.6;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        .dashboard-container {
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar */
        .sidebar {
            width: 280px;
            background-color: var(--card-light);
            border-right: 1px solid var(--border-light);
            padding: 0;
            position: fixed;
            height: 100vh;
            overflow-y: auto;
            transition: all 0.3s ease;
            z-index: 100;
        }

        .logo-section {
            padding: 28px 24px;
            border-bottom: 1px solid var(--border-light);
        }

        .logo {
            font-size: 22px;
            font-weight: 800;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 12px;
            letter-spacing: -0.5px;
        }

        .logo-subtitle {
            font-size: 12px;
            color: var(--text-tertiary-light);
            margin-top: 4px;
            font-weight: 500;
        }

        .nav-menu {
            list-style: none;
            padding: 16px 12px;
        }

        .nav-section-title {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-tertiary-light);
            padding: 12px 16px 8px;
        }

        .nav-item {
            margin-bottom: 2px;
        }

        .nav-link {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            color: var(--text-secondary-light);
            text-decoration: none;
            border-radius: 10px;
            transition: all 0.2s ease;
            font-weight: 500;
            font-size: 14px;
        }

        .nav-link:hover {
            background-color: var(--hover-light);
            color: var(--text-light);
        }

        .nav-link.active {
            background-color: var(--primary);
            color: white;
            box-shadow: 0 2px 8px rgba(115, 50, 170, 0.3);
        }

        .nav-link i {
            width: 20px;
            text-align: center;
            font-size: 16px;
        }

        .nav-badge {
            margin-left: auto;
            background: var(--primary-subtle);
            color: var(--primary);
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 700;
        }

        .nav-link.active .nav-badge {
            background: rgba(255,255,255,0.2);
            color: white;
        }

        /* Main Content */
        .main-content {
            flex: 1;
            margin-left: 280px;
            padding: 0;
        }

        /* Top Bar */
        .top-bar {
            background-color: var(--card-light);
            border-bottom: 1px solid var(--border-light);
            padding: 16px 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 50;
            backdrop-filter: blur(10px);
        }

        .breadcrumb {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-secondary-light);
            font-size: 14px;
        }

        .breadcrumb-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .breadcrumb-separator {
            color: var(--text-tertiary-light);
        }

        .top-bar-actions {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .search-bar {
            position: relative;
            width: 320px;
        }

        .search-bar input {
            width: 100%;
            padding: 10px 16px 10px 44px;
            border: 1px solid var(--border-light);
            border-radius: 24px;
            background: var(--bg-secondary-light);
            color: var(--text-light);
            font-size: 14px;
            transition: all 0.2s ease;
        }

        .search-bar input:focus {
            outline: none;
            border-color: var(--primary);
            background: var(--card-light);
            box-shadow: 0 0 0 4px var(--primary-subtle);
        }

        .search-bar i {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-tertiary-light);
        }

        .icon-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 1px solid var(--border-light);
            background: var(--card-light);
            color: var(--text-secondary-light);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }

        .icon-btn:hover {
            background: var(--hover-light);
            color: var(--text-light);
            border-color: var(--primary);
        }

        .icon-btn .badge-dot {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 8px;
            height: 8px;
            background: var(--danger);
            border-radius: 50%;
            border: 2px solid var(--card-light);
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 6px 12px 6px 6px;
            border-radius: 24px;
            border: 1px solid var(--border-light);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .user-profile:hover {
            background: var(--hover-light);
            border-color: var(--primary);
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 13px;
        }

        .user-info {
            display: flex;
            flex-direction: column;
        }

        .user-name {
            font-weight: 600;
            font-size: 14px;
            line-height: 1.2;
        }

        .user-role {
            font-size: 12px;
            color: var(--text-tertiary-light);
        }

        /* Content Area */
        .content-area {
            padding: 32px;
        }

        /* Page Header */
        .page-header {
            margin-bottom: 32px;
        }

        .page-title-row {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 8px;
        }

        .page-title {
            font-size: 32px;
            font-weight: 800;
            letter-spacing: -0.5px;
            margin-bottom: 8px;
        }

        .page-subtitle {
            color: var(--text-secondary-light);
            font-size: 15px;
        }

        .header-actions {
            display: flex;
            gap: 12px;
        }

        /* Buttons */
        .btn {
            padding: 11px 20px;
            border: none;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
            box-shadow: 0 2px 8px rgba(115, 50, 170, 0.25);
        }

        .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(115, 50, 170, 0.35);
        }

        .btn-secondary {
            background: var(--card-light);
            color: var(--text-light);
            border: 1px solid var(--border-light);
        }

        .btn-secondary:hover {
            background: var(--hover-light);
            border-color: var(--primary);
        }

        .btn-ghost {
            background: transparent;
            color: var(--text-secondary-light);
            border: 1px solid transparent;
        }

        .btn-ghost:hover {
            background: var(--hover-light);
            color: var(--text-light);
        }

        /* Stats Grid */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            margin-bottom: 32px;
        }

        .stat-card {
            background: var(--card-light);
            padding: 24px;
            border-radius: 16px;
            border: 1px solid var(--border-light);
            transition: all 0.2s ease;
        }

        .stat-card:hover {
            border-color: var(--primary);
            box-shadow: var(--shadow-md);
        }

        .stat-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 20px;
        }

        .stat-icon-wrapper {
            width: 56px;
            height: 56px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: white;
        }

        .stat-icon-wrapper.purple { background: linear-gradient(135deg, #7332AA, #9b59d8); }
        .stat-icon-wrapper.blue { background: linear-gradient(135deg, #4285f4, #64a5ff); }
        .stat-icon-wrapper.green { background: linear-gradient(135deg, #34A853, #5cbd70); }
        .stat-icon-wrapper.orange { background: linear-gradient(135deg, #FF9800, #ffb74d); }
        .stat-icon-wrapper.red { background: linear-gradient(135deg, #EA4335, #f36b60); }

        .stat-trend {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
        }

        .stat-trend.up {
            background: rgba(52, 168, 83, 0.1);
            color: var(--success);
        }

        .stat-trend.down {
            background: rgba(234, 67, 53, 0.1);
            color: var(--danger);
        }

        .stat-value {
            font-size: 36px;
            font-weight: 800;
            color: var(--text-light);
            margin-bottom: 4px;
            letter-spacing: -1px;
        }

        .stat-label {
            color: var(--text-secondary-light);
            font-size: 14px;
            font-weight: 500;
        }

        .stat-footer {
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid var(--border-light);
            color: var(--text-tertiary-light);
            font-size: 13px;
        }

        /* Main Grid Layout */
        .content-grid {
            display: grid;
            grid-template-columns: 1fr 420px;
            gap: 24px;
            margin-bottom: 24px;
        }

        /* Card */
        .card {
            background: var(--card-light);
            border-radius: 16px;
            border: 1px solid var(--border-light);
            overflow: hidden;
        }

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

        .card-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-light);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .card-body {
            padding: 24px;
        }

        /* Filters */
        .filter-section {
            margin-bottom: 24px;
        }

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

        .filter-label {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-light);
            margin-bottom: 10px;
            display: block;
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }

        .filter-input {
            width: 100%;
            padding: 11px 14px;
            border: 1px solid var(--border-light);
            border-radius: 10px;
            background: var(--bg-secondary-light);
            color: var(--text-light);
            font-size: 14px;
            transition: all 0.2s ease;
            font-family: inherit;
        }

        .filter-input:focus {
            outline: none;
            border-color: var(--primary);
            background: var(--card-light);
            box-shadow: 0 0 0 4px var(--primary-subtle);
        }

        .filter-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .chip {
            padding: 8px 16px;
            background: var(--bg-secondary-light);
            border: 1px solid var(--border-light);
            border-radius: 24px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
        }

        .chip:hover {
            border-color: var(--primary);
            background: var(--primary-subtle);
            color: var(--primary);
        }

        .chip.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            box-shadow: 0 2px 8px rgba(115, 50, 170, 0.3);
        }

        .filter-multi-select {
            display: flex;
            flex-direction: column;
            gap: 6px;
            max-height: 180px;
            overflow-y: auto;
            padding: 4px;
        }

        .filter-option {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .filter-option:hover {
            background: var(--hover-light);
        }

        .filter-option input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary);
        }

        .filter-option label {
            flex: 1;
            cursor: pointer;
            font-size: 14px;
        }

        .filter-count {
            font-size: 12px;
            color: var(--text-tertiary-light);
            background: var(--bg-secondary-light);
            padding: 2px 8px;
            border-radius: 12px;
        }

        /* AI Agent */
        .ai-agent-card {
            background: linear-gradient(135deg, #7332AA 0%, #9b59d8 100%);
            color: white;
            border-radius: 16px;
            padding: 28px;
            box-shadow: 0 8px 24px rgba(115, 50, 170, 0.35);
            position: relative;
            overflow: hidden;
        }

        .ai-agent-card::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            pointer-events: none;
        }

        .ai-header {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-bottom: 16px;
            position: relative;
        }

        .ai-icon {
            width: 56px;
            height: 56px;
            background: rgba(255,255,255,0.15);
            backdrop-filter: blur(10px);
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 26px;
        }

        .ai-title {
            font-size: 22px;
            font-weight: 800;
            letter-spacing: -0.5px;
        }

        .ai-subtitle {
            opacity: 0.95;
            font-size: 14px;
            margin-bottom: 24px;
            line-height: 1.5;
            position: relative;
        }

        .ai-input-container {
            position: relative;
            margin-bottom: 20px;
        }

        .ai-input {
            width: 100%;
            padding: 14px 52px 14px 16px;
            border: 1px solid rgba(255,255,255,0.25);
            border-radius: 12px;
            background: rgba(255,255,255,0.1);
            backdrop-filter: blur(10px);
            color: white;
            font-size: 14px;
            font-family: inherit;
            transition: all 0.2s ease;
        }

        .ai-input::placeholder {
            color: rgba(255,255,255,0.75);
        }

        .ai-input:focus {
            outline: none;
            background: rgba(255,255,255,0.15);
            border-color: rgba(255,255,255,0.5);
            box-shadow: 0 0 0 4px rgba(255,255,255,0.1);
        }

        .ai-send-btn {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255,255,255,0.2);
            backdrop-filter: blur(10px);
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 8px;
            color: white;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .ai-send-btn:hover {
            background: rgba(255,255,255,0.3);
            transform: translateY(-50%) scale(1.05);
        }

        .ai-suggestions-title {
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            opacity: 0.9;
            margin-bottom: 12px;
        }

        .ai-suggestions {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .ai-suggestion {
            padding: 14px 16px;
            background: rgba(255,255,255,0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 12px;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: left;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .ai-suggestion:hover {
            background: rgba(255,255,255,0.2);
            border-color: rgba(255,255,255,0.4);
            transform: translateX(4px);
        }

        .ai-suggestion i {
            opacity: 0.8;
            font-size: 14px;
        }

        /* Table */
        .table-card {
            grid-column: 1 / -1;
        }

        .table-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px;
            gap: 16px;
            flex-wrap: wrap;
        }

        .table-left-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
        }

        .table-search {
            position: relative;
            flex: 1;
            max-width: 400px;
        }

        .table-search input {
            width: 100%;
            padding: 10px 16px 10px 42px;
            border: 1px solid var(--border-light);
            border-radius: 10px;
            background: var(--bg-secondary-light);
            color: var(--text-light);
            font-size: 14px;
        }

        .table-search i {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-tertiary-light);
        }

        .table-filter-select {
            padding: 10px 14px;
            border: 1px solid var(--border-light);
            border-radius: 10px;
            background: var(--bg-secondary-light);
            color: var(--text-light);
            font-size: 14px;
            font-family: inherit;
            cursor: pointer;
            min-width: 150px;
        }

        .table-right-controls {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .selected-info {
            padding: 8px 16px;
            background: var(--primary);
            color: white;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .table-wrapper {
            overflow-x: auto;
            border-top: 1px solid var(--border-light);
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        thead {
            background: var(--bg-secondary-light);
            position: sticky;
            top: 0;
        }

        th {
            padding: 16px 20px;
            text-align: left;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--text-secondary-light);
            white-space: nowrap;
            border-bottom: 1px solid var(--border-light);
        }

        td {
            padding: 18px 20px;
            border-bottom: 1px solid var(--border-light);
            color: var(--text-light);
            font-size: 14px;
        }

        tbody tr {
            transition: background-color 0.15s ease;
        }

        tbody tr:hover {
            background: var(--hover-light);
        }

        .volunteer-cell {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .volunteer-avatar-wrapper {
            position: relative;
        }

        .volunteer-avatar {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 15px;
            font-weight: 700;
        }

        .status-dot {
            position: absolute;
            bottom: -2px;
            right: -2px;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            border: 2px solid var(--card-light);
        }

        .status-dot.active { background: var(--success); }
        .status-dot.inactive { background: var(--text-tertiary-light); }

        .volunteer-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .volunteer-name {
            font-weight: 600;
            font-size: 14px;
            color: var(--text-light);
        }

        .volunteer-email {
            font-size: 13px;
            color: var(--text-tertiary-light);
        }

        .badge {
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            display: inline-block;
            white-space: nowrap;
        }

        .badge-primary {
            background: rgba(115, 50, 170, 0.12);
            color: var(--primary);
        }

        .badge-secondary {
            background: rgba(66, 133, 244, 0.12);
            color: #4285f4;
        }

        .badge-success {
            background: rgba(52, 168, 83, 0.12);
            color: var(--success);
        }

        .badge-warning {
            background: rgba(255, 152, 0, 0.12);
            color: var(--warning);
        }

        .score-badge {
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 50px;
        }

        .score-excellent {
            background: linear-gradient(135deg, #34A853, #5cbd70);
            color: white;
            box-shadow: 0 2px 8px rgba(52, 168, 83, 0.3);
        }

        .score-good {
            background: linear-gradient(135deg, #4285f4, #64a5ff);
            color: white;
            box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
        }

        .score-average {
            background: linear-gradient(135deg, #FF9800, #ffb74d);
            color: white;
            box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
        }

        .score-low {
            background: rgba(158, 158, 158, 0.15);
            color: var(--text-tertiary-light);
            border: 1px solid var(--border-light);
        }

        .skills-list {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            max-width: 280px;
        }

        .skill-tag {
            padding: 4px 10px;
            background: var(--bg-secondary-light);
            border: 1px solid var(--border-light);
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            white-space: nowrap;
        }

        .contact-actions {
            display: flex;
            gap: 8px;
        }

        .contact-btn {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            background: var(--bg-secondary-light);
            border: 1px solid var(--border-light);
            color: var(--text-secondary-light);
        }

        .contact-btn:hover {
            transform: scale(1.1);
        }

        .contact-btn.email:hover {
            background: #EA4335;
            color: white;
            border-color: #EA4335;
        }

        .contact-btn.whatsapp:hover {
            background: #25D366;
            color: white;
            border-color: #25D366;
        }

        .contact-btn.phone:hover {
            background: var(--info);
            color: white;
            border-color: var(--info);
        }

        .checkbox {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary);
        }

        .pagination {
            padding: 20px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid var(--border-light);
        }

        .pagination-info {
            color: var(--text-secondary-light);
            font-size: 14px;
        }

        .pagination-controls {
            display: flex;
            gap: 8px;
        }

        .pagination-btn {
            padding: 8px 14px;
            border: 1px solid var(--border-light);
            border-radius: 8px;
            background: var(--card-light);
            color: var(--text-light);
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .pagination-btn:hover:not(:disabled) {
            background: var(--hover-light);
            border-color: var(--primary);
        }

        .pagination-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        .pagination-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            animation: fadeIn 0.2s ease;
        }

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

        .modal-content {
            background-color: var(--card-light);
            margin: 2% auto;
            padding: 0;
            border-radius: 16px;
            width: 90%;
            max-width: 900px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: slideUp 0.3s ease;
        }

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

        .modal-header {
            padding: 28px 32px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }

        .modal-title-section {
            flex: 1;
        }

        .modal-title {
            font-size: 24px;
            font-weight: 800;
            color: var(--text-light);
            margin-bottom: 4px;
        }

        .modal-subtitle {
            font-size: 14px;
            color: var(--text-secondary-light);
        }

        .close-modal {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            background: var(--bg-secondary-light);
            border: 1px solid var(--border-light);
            color: var(--text-secondary-light);
            font-size: 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .close-modal:hover {
            background: var(--hover-light);
            color: var(--danger);
        }

        .modal-body {
            padding: 32px;
        }

        .profile-header {
            display: flex;
            gap: 24px;
            margin-bottom: 32px;
            padding-bottom: 32px;
            border-bottom: 1px solid var(--border-light);
        }

        .profile-avatar-large {
            width: 100px;
            height: 100px;
            border-radius: 16px;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 36px;
            font-weight: 800;
            flex-shrink: 0;
        }

        .profile-info-main {
            flex: 1;
        }

        .profile-name {
            font-size: 28px;
            font-weight: 800;
            margin-bottom: 8px;
        }

        .profile-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            margin-top: 16px;
        }

        .profile-meta-item {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-secondary-light);
            font-size: 14px;
        }

        .profile-meta-item i {
            color: var(--primary);
        }

        .score-section {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 32px;
        }

        .score-card {
            background: var(--bg-secondary-light);
            padding: 20px;
            border-radius: 12px;
            text-align: center;
            border: 1px solid var(--border-light);
        }

        .score-card-icon {
            font-size: 24px;
            margin-bottom: 12px;
        }

        .score-card-value {
            font-size: 32px;
            font-weight: 800;
            margin-bottom: 4px;
        }

        .score-card-label {
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--text-tertiary-light);
        }

        .info-section {
            margin-bottom: 32px;
        }

        .section-title {
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-light);
        }

        .section-title i {
            color: var(--primary);
        }

        .info-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
        }

        .info-item {
            background: var(--bg-secondary-light);
            padding: 16px;
            border-radius: 10px;
            border: 1px solid var(--border-light);
        }

        .info-label {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--text-tertiary-light);
            margin-bottom: 6px;
        }

        .info-value {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-light);
        }

        .skills-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .skill-badge {
            padding: 8px 16px;
            background: var(--bg-secondary-light);
            border: 1px solid var(--border-light);
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            color: var(--text-light);
        }

        .extracted-signals {
            background: var(--bg-secondary-light);
            padding: 20px;
            border-radius: 12px;
            border: 1px solid var(--border-light);
        }

        .signal-item {
            padding: 10px 0;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            align-items: flex-start;
            gap: 12px;
        }

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

        .signal-icon {
            color: var(--primary);
            margin-top: 2px;
            flex-shrink: 0;
        }

        .signal-text {
            flex: 1;
            font-size: 14px;
            line-height: 1.6;
            color: var(--text-light);
        }

        .summary-box {
            background: linear-gradient(135deg, rgba(115, 50, 170, 0.08), rgba(155, 89, 216, 0.08));
            padding: 24px;
            border-radius: 12px;
            border: 1px solid var(--primary);
        }

        .summary-text {
            font-size: 15px;
            line-height: 1.8;
            color: var(--text-light);
        }

        /* Responsive */
        @media (max-width: 1400px) {
            .content-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 1024px) {
            .sidebar {
                transform: translateX(-100%);
            }

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

            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .content-area {
                padding: 20px;
            }

            .page-title {
                font-size: 24px;
            }

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

            .top-bar {
                padding: 12px 20px;
            }

            .search-bar {
                display: none;
            }

            .table-controls {
                flex-direction: column;
                align-items: stretch;
            }
        }

/* Feature-gated elements: hidden by default, revealed after permissions load */
[data-requires-feature]:not(.permission-granted) { display: none !important; }