/* =========================================
   Chegg Auto Login - Premium Dashboard CSS
   ========================================= */

:root {
    /* Color Palette - Deep Purple & Cyan Theme */
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary: #06b6d4;
    --secondary-light: #22d3ee;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Dark Theme Background */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(26, 26, 46, 0.8);
    --bg-card-hover: rgba(26, 26, 46, 0.95);

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Borders & Shadows */
    --border-color: rgba(139, 92, 246, 0.2);
    --border-glow: rgba(139, 92, 246, 0.5);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.3);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 20px;

    /* Spacing */
    --sidebar-width: 280px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(139, 92, 246, 0.4), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(6, 182, 212, 0.3), transparent),
        radial-gradient(2px 2px at 50px 160px, rgba(139, 92, 246, 0.3), transparent),
        radial-gradient(2px 2px at 90px 40px, rgba(6, 182, 212, 0.4), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(139, 92, 246, 0.3), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(6, 182, 212, 0.3), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-200px);
    }
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    list-style: none;
    padding: 16px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.1));
    color: var(--primary-light);
    border: 1px solid var(--border-color);
}

.nav-item.active svg {
    color: var(--primary);
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
}

.extension-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-dot.disconnected {
    background: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Press & Hold Status */
.press-hold-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--warning);
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-dot.warning {
    background: var(--warning);
    box-shadow: 0 0 10px var(--warning);
}

.status-dot.pulse {
    animation: pulseGlow 1s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px var(--warning);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 20px var(--warning), 0 0 30px var(--warning);
    }
}

/* Press & Hold Overlay */
.press-hold-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.press-hold-content {
    background: var(--bg-card);
    border: 2px solid var(--warning);
    border-radius: var(--radius-lg);
    padding: 40px 50px;
    text-align: center;
    max-width: 450px;
    box-shadow: 0 0 50px rgba(245, 158, 11, 0.3);
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.press-hold-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--warning);
    animation: pulseIcon 1.5s infinite;
}

.press-hold-icon svg {
    width: 100%;
    height: 100%;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.press-hold-content h3 {
    color: var(--warning);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.press-hold-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.press-hold-timer {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    font-family: 'Courier New', monospace;
}

.press-hold-timer span {
    color: var(--warning);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 32px;
    min-height: 100vh;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-icon.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    color: var(--info);
}

.stat-icon.green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    color: var(--success);
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
    color: var(--primary);
}

.stat-icon.orange {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    color: var(--warning);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: visible;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--glass-bg);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.badge-pending {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8125rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--glass-bg);
    color: var(--primary);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 8px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Login Container */
.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.login-card,
.status-card {
    height: fit-content;
}

.account-preview {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.preview-item:not(:last-child) {
    border-bottom: 1px solid var(--glass-border);
}

.preview-item .label {
    font-size: 0.875rem;
    color: var(--text-muted);
    min-width: 100px;
}

.preview-item .value {
    flex: 1;
    font-weight: 500;
}

.preview-item .value.password {
    font-family: monospace;
    letter-spacing: 2px;
}

/* Login Steps */
.login-steps {
    position: relative;
}

.step {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    opacity: 0.5;
    transition: all var(--transition-normal);
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step.completed .step-indicator {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.step.active .step-indicator {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    animation: stepPulse 1.5s infinite;
}

.step.error .step-indicator {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

@keyframes stepPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.5);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
}

.step-indicator {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.step-number {
    font-weight: 600;
    font-size: 0.875rem;
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.step-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.otp-display {
    margin-top: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
}

.otp-code {
    font-size: 2rem;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-result {
    margin-top: 24px;
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
}

.login-result.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
}

.login-result.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: auto;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--glass-bg);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    min-width: 300px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlide 0.3s ease;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast-message {
    flex: 1;
    font-size: 0.9375rem;
}

/* Activity List */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--glass-border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.activity-icon.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.activity-icon.failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.activity-icon svg {
    width: 20px;
    height: 20px;
}

.activity-content {
    flex: 1;
}

.activity-content strong {
    display: block;
    margin-bottom: 2px;
}

.activity-content span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.activity-time {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Loading Placeholder */
.loading-placeholder {
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .login-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* URL Links */
.url-link {
    color: var(--secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    word-break: break-all;
}

.url-link:hover {
    color: var(--secondary-light);
    text-decoration: underline;
}

/* Secondary Badge */
.badge-secondary {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-secondary);
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

/* =========================================
   FAQ / Accordion Style (Organic URLs)
   ========================================= */

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.faq-item.active {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-glow);
}

/* Header */
.faq-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.faq-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.faq-account {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.faq-preview {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.faq-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.faq-toggle-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: transform var(--transition-normal), background var(--transition-fast);
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(180deg);
    background: var(--primary);
    color: white;
}

.faq-toggle-icon svg {
    width: 16px;
    height: 16px;
}

/* Body */
.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    background: rgba(0, 0, 0, 0.1);
}

.faq-item.active .faq-body {
    max-height: 600px;
    /* Adjust based on content */
    border-top: 1px solid var(--glass-border);
}

.faq-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-row .label {
    min-width: 100px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.faq-row .value {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.faq-row .value.link {
    color: var(--secondary);
    text-decoration: none;
    word-break: break-all;
}

.faq-row .value.link:hover {
    text-decoration: underline;
    color: var(--secondary-light);
}

.btn-icon-small {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.btn-icon-small:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.btn-icon-small svg {
    width: 14px;
    height: 14px;
}

/* Inner URL List Items */
.url-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.url-row-item:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.url-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.url-link-text {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 600px;
}

.url-link-text:hover {
    text-decoration: underline;
    color: var(--secondary-light);
}

.url-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.url-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-icon-small.danger {
    color: var(--danger);
}

.btn-icon-small.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.badge-sm {
    font-size: 0.7rem;
    padding: 2px 8px;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-controls .btn-sm {
    min-width: 36px;
    padding: 6px 10px;
    font-size: 0.75rem;
}

.pagination-controls .btn-sm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Expert Links Table */
#expertLinksTableBody a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

#expertLinksTableBody a:hover {
    color: var(--secondary-light);
    text-decoration: underline;
}

#expertLinksTableBody td {
    vertical-align: middle;
}