/* LeadHub Admin - Data Command Center Aesthetic */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@700,500,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Core palette - Deep space with electric accents */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --bg-card: #14141c;
    --bg-elevated: #1c1c28;

    /* Text hierarchy */
    --text-primary: #f4f4f6;
    --text-secondary: #8b8b9e;
    --text-muted: #5a5a6e;

    /* Accent colors - Electric spectrum */
    --accent-primary: #00d4aa;
    --accent-primary-glow: rgba(0, 212, 170, 0.4);
    --accent-secondary: #6366f1;
    --accent-warning: #fbbf24;
    --accent-danger: #ef4444;
    --accent-info: #38bdf8;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00d4aa 0%, #00a8cc 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    --gradient-border: linear-gradient(135deg, rgba(0, 212, 170, 0.5) 0%, rgba(99, 102, 241, 0.5) 100%);

    /* Sizing */
    --sidebar-width: 260px;
    --header-height: 72px;
    --border-radius: 12px;
    --border-radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px var(--accent-primary-glow);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   LAYOUT
   ============================================ */

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

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.content {
    flex: 1;
    padding: 2rem;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--accent-primary) 20%,
        var(--accent-primary) 80%,
        transparent
    );
    opacity: 0.3;
}

.sidebar-header {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    letter-spacing: -0.02em;
}

.sidebar-brand i {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--bg-primary);
    box-shadow: var(--shadow-glow);
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
}

.sidebar-nav .nav {
    padding: 0 0.75rem;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link {
    color: var(--text-secondary);
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
    overflow: hidden;
}

.sidebar-nav .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: var(--accent-primary);
    border-radius: 0 2px 2px 0;
    transition: transform 0.2s ease;
}

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

.sidebar-nav .nav-link.active {
    color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.08);
}

.sidebar-nav .nav-link.active::before {
    transform: translateY(-50%) scaleY(1);
}

.sidebar-nav .nav-link i {
    font-size: 1.125rem;
    width: 22px;
    opacity: 0.8;
}

.sidebar-nav .nav-link.active i {
    opacity: 1;
}

.sidebar-nav hr {
    border-color: rgba(255, 255, 255, 0.06);
    margin: 1rem 0.75rem;
}

/* ============================================
   TOP NAVBAR
   ============================================ */

.navbar {
    height: var(--header-height);
    background: rgba(10, 10, 15, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 0 2rem !important;
}

.sidebar-toggle {
    color: var(--text-secondary) !important;
    padding: 0.5rem !important;
}

.navbar .text-muted {
    color: var(--text-secondary) !important;
    font-size: 0.875rem;
}

.navbar .bi-person-circle {
    font-size: 1.125rem;
    margin-right: 0.5rem;
    opacity: 0.7;
}

.navbar .btn-outline-secondary {
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.1);
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

/* ============================================
   PAGE HEADER
   ============================================ */

.content > .d-flex:first-child h1,
.content > h1:first-child {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.content > .d-flex:first-child .text-muted {
    color: var(--text-muted) !important;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
}

/* ============================================
   STAT CARDS
   ============================================ */

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius-lg);
    padding: 1px;
    background: var(--gradient-border);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
}

.stat-card .stat-icon.bg-primary-soft {
    background: rgba(0, 212, 170, 0.12);
    color: var(--accent-primary);
}

.stat-card .stat-icon.bg-success-soft {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.stat-card .stat-icon.bg-warning-soft {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-warning);
}

.stat-card .stat-icon.bg-info-soft {
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-info);
}

.stat-card .stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 0.375rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   CARDS & TABLES
   ============================================ */

.table-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.table-card .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.25rem 1.5rem;
}

.table-card .card-header h5 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.table-card .card-body {
    padding: 1.5rem;
}

.table-card .card-footer,
.card-footer {
    background: var(--bg-card) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
}

.card-footer.bg-white {
    background: var(--bg-card) !important;
}

.table {
    margin-bottom: 0;
    color: var(--text-primary);
    background: var(--bg-card) !important;
}

.table-responsive {
    background: var(--bg-card) !important;
}

.table thead {
    background: var(--bg-tertiary) !important;
}

.table thead th {
    background: var(--bg-tertiary) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 1.25rem;
}

.table tbody {
    background: var(--bg-card) !important;
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary) !important;
    background: var(--bg-card) !important;
}

.table tbody td strong {
    color: #fff !important;
    font-weight: 600;
}

.table tbody td a {
    color: var(--accent-primary);
}

.table tbody td .text-muted {
    color: var(--text-secondary) !important;
}

.table tbody tr {
    transition: background 0.15s ease;
    background: var(--bg-card) !important;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

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

/* ============================================
   BADGES
   ============================================ */

.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    font-size: 0.6875rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: 'JetBrains Mono', monospace;
}

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

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

.badge-info {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
}

.badge-secondary,
.badge.bg-light {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-secondary) !important;
}

.badge.bg-primary {
    background: var(--gradient-primary) !important;
    color: var(--bg-primary) !important;
    font-weight: 600;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: var(--bg-primary);
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px var(--accent-primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-primary-glow);
    background: var(--gradient-primary);
}

.btn-outline-primary {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: transparent;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.btn-outline-primary:hover {
    background: rgba(0, 212, 170, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

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

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

/* ============================================
   FORMS
   ============================================ */

.form-control,
.form-select {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
    color: var(--text-primary);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.form-check-input {
    background-color: var(--bg-tertiary);
    border-color: rgba(255, 255, 255, 0.15);
}

.form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.input-group .btn {
    border-color: rgba(255, 255, 255, 0.08);
}

/* ============================================
   CHARTS
   ============================================ */

.chart-container {
    position: relative;
    height: 280px;
    padding: 0.5rem;
}

/* ============================================
   LIST GROUPS
   ============================================ */

.list-group-item {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    padding: 1rem 0;
}

.list-group-item .fw-medium {
    color: var(--text-primary);
    font-weight: 500;
}

.list-group-flush > .list-group-item:last-child {
    border-bottom: none;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    gap: 0.375rem;
}

.pagination .page-link {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--bg-primary);
}

.pagination .page-item.disabled .page-link {
    background: transparent;
    color: var(--text-muted);
    opacity: 0.5;
}

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-lg);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1rem 1.5rem;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 0.8;
}

/* ============================================
   LEAD DETAILS
   ============================================ */

.lead-detail-row {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.875rem 0;
}

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

.lead-detail-label {
    width: 130px;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lead-detail-value {
    flex: 1;
    color: var(--text-primary);
}

/* ============================================
   API KEY DISPLAY
   ============================================ */

.api-key-display {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-tertiary);
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    word-break: break-all;
    color: var(--accent-primary);
    border: 1px solid rgba(0, 212, 170, 0.2);
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 170, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.login-card .subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    color: var(--accent-primary);
}

.empty-state p {
    font-size: 0.9375rem;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
    color: var(--text-primary);
}

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

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

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
    color: #fcd34d;
}

.alert-info {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.2);
    color: #7dd3fc;
}

.alert-dismissible .btn-close {
    filter: none;
    opacity: 0.6;
}

/* ============================================
   DROPDOWNS
   ============================================ */

.dropdown-menu {
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

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

.dropdown-item i {
    margin-right: 0.5rem;
    opacity: 0.7;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

/* ============================================
   PRIVACY BLUR
   ============================================ */

.sensitive-data {
    filter: blur(5px);
    transition: filter 0.3s ease;
    user-select: none;
    color: #fff !important;
}

.sensitive-data:hover {
    filter: blur(3px);
}

body.privacy-off .sensitive-data {
    filter: none;
    user-select: auto;
    color: #fff !important;
}

/* Ensure sensitive data in tables is visible */
.table tbody td .sensitive-data,
.table tbody td strong.sensitive-data {
    color: #fff !important;
}

.privacy-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.privacy-toggle:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.privacy-toggle .toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    transition: background 0.2s ease;
}

.privacy-toggle .toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.privacy-toggle.active .toggle-switch {
    background: var(--accent-primary);
}

.privacy-toggle.active .toggle-switch::after {
    left: 21px;
    background: var(--bg-primary);
}

.privacy-toggle i {
    font-size: 1rem;
}

.text-muted {
    color: var(--text-muted) !important;
}

small.text-muted,
.small.text-muted {
    color: var(--text-muted) !important;
}

hr {
    border-color: rgba(255, 255, 255, 0.06);
    opacity: 1;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
}

a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

code {
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-primary);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
}

pre {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 1rem;
    color: var(--text-secondary);
}

/* ============================================
   INDEXATION BADGES
   ============================================ */

.indexation-section {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.75rem;
}

.indexation-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

.indexation-badge .variation {
    font-weight: 600;
}

.indexation-badge .indexation-rate {
    font-weight: 700;
    margin-left: 0.25rem;
}

.indexation-badge.indexation-stable {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

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

.indexation-badge.indexation-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
}

.indexation-badge.indexation-alert {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    animation: alertPulse 2s ease-in-out infinite;
}

.indexation-badge.indexation-pending {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

.indexation-badge.indexation-error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.indexation-badge.indexation-none {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

.indexation-check-btn {
    padding: 0.25rem 0.5rem !important;
    border-radius: 6px !important;
}

.indexation-check-btn:disabled {
    opacity: 0.5;
}

.indexation-variation {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-dismiss-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    margin-left: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.15s ease;
    font-size: 10px;
    line-height: 1;
}

.btn-dismiss-alert:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.indexation-badge .btn-dismiss-alert {
    margin-left: 0.5rem;
}

@keyframes alertPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

.stat-card {
    animation: fadeInUp 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.3s; }

.row > [class*="col-"]:nth-child(1) .stat-card { animation-delay: 0s; }
.row > [class*="col-"]:nth-child(2) .stat-card { animation-delay: 0.1s; }
.row > [class*="col-"]:nth-child(3) .stat-card { animation-delay: 0.2s; }
.row > [class*="col-"]:nth-child(4) .stat-card { animation-delay: 0.3s; }

/* Live indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
}

.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--accent-primary-glow);
}

/* ============================================
   RESPONSIVE
   ============================================ */

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

    .sidebar.show {
        transform: translateX(0);
    }

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

    .content {
        padding: 1.25rem;
    }

    .stat-card .stat-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .navbar {
        padding: 0 1rem !important;
    }

    .stat-card {
        padding: 1.25rem;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

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