/**
 * Authority Nexus Admin Dashboard - Lovable Design System
 * Phase 1: Base CSS Foundation
 * Inspired by Lovable Dashboard UI
 */

:root {
    /* ═══════════════════════════════════════════════════════════
       🎨 LOVABLE COLOR PALETTE
       ═══════════════════════════════════════════════════════════ */

    /* Primary Colors */
    --lovable-blue: #3b82f6;
    --lovable-blue-light: #60a5fa;
    --lovable-blue-dark: #2563eb;
    --lovable-cyan: #06b6d4;

    /* Accent Colors */
    --lovable-gold: #fbbf24;
    --lovable-gold-light: #fcd34d;
    --lovable-gold-dark: #f59e0b;

    /* Status Colors */
    --lovable-green: #10b981;
    --lovable-green-light: #34d399;
    --lovable-red: #ef4444;
    --lovable-red-light: #f87171;
    --lovable-orange: #f97316;
    --lovable-purple: #8b5cf6;

    /* Neutral Colors */
    --lovable-white: #ffffff;
    --lovable-bg: #f0f9ff;
    --lovable-bg-alt: #e0f2fe;
    --lovable-gray-50: #f8fafc;
    --lovable-gray-100: #f1f5f9;
    --lovable-gray-200: #e2e8f0;
    --lovable-gray-300: #cbd5e1;
    --lovable-gray-400: #94a3b8;
    --lovable-gray-500: #64748b;
    --lovable-gray-600: #475569;
    --lovable-gray-700: #334155;
    --lovable-gray-800: #1e293b;
    --lovable-gray-900: #0f172a;

    /* ═══════════════════════════════════════════════════════════
       📐 DESIGN TOKENS
       ═══════════════════════════════════════════════════════════ */

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 2px 8px rgba(59, 130, 246, 0.08);
    --shadow-card-hover: 0 8px 25px rgba(59, 130, 246, 0.15);

    /* Typography - LARGE & CLEAR */
    --font-family: 'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 13px;
    --font-size-sm: 15px;
    --font-size-md: 17px;
    --font-size-lg: 20px;
    --font-size-xl: 26px;
    --font-size-2xl: 32px;
    --font-size-3xl: 40px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.35s ease;
}

/* ═══════════════════════════════════════════════════════════════
   🌐 GLOBAL RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════ */

.nexus-dashboard-wrapper {
    background: linear-gradient(135deg, var(--lovable-bg) 0%, var(--lovable-bg-alt) 100%);
    font-family: var(--font-family);
    color: var(--lovable-gray-800);
    min-height: 100vh;
    padding: var(--spacing-lg);
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

.nexus-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

/* Hide WP Default Elements */
#wpbody-content>.wrap>h1:first-of-type,
#wpbody-content>.wrap>.notice:not(.nexus-notice),
#wpbody-content>.wrap>.nav-tab-wrapper {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   📊 STATS CARDS (Top Row)
   ═══════════════════════════════════════════════════════════════ */

.nexus-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.nexus-stat-card {
    background: var(--lovable-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
    border: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nexus-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--lovable-blue), var(--lovable-cyan));
}

.nexus-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.nexus-stat-card.gold::before {
    background: linear-gradient(90deg, var(--lovable-gold), var(--lovable-orange));
}

.nexus-stat-card.green::before {
    background: linear-gradient(90deg, var(--lovable-green), var(--lovable-cyan));
}

.nexus-stat-card.purple::before {
    background: linear-gradient(90deg, var(--lovable-purple), var(--lovable-blue));
}

.nexus-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, var(--lovable-blue-light) 0%, var(--lovable-blue) 100%);
    color: var(--lovable-white);
}

.nexus-stat-icon.gold {
    background: linear-gradient(135deg, var(--lovable-gold-light) 0%, var(--lovable-gold) 100%);
}

.nexus-stat-icon.green {
    background: linear-gradient(135deg, var(--lovable-green-light) 0%, var(--lovable-green) 100%);
}

.nexus-stat-icon.purple {
    background: linear-gradient(135deg, #a78bfa 0%, var(--lovable-purple) 100%);
}

.nexus-stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--lovable-gray-900);
    line-height: 1.2;
}

.nexus-stat-label {
    font-size: var(--font-size-sm);
    color: var(--lovable-gray-500);
    font-weight: 500;
}

.nexus-stat-change {
    font-size: var(--font-size-xs);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

.nexus-stat-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--lovable-green);
}

.nexus-stat-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--lovable-red);
}

/* ═══════════════════════════════════════════════════════════════
   🎛️ HEADER SECTION
   ═══════════════════════════════════════════════════════════════ */

.nexus-content-header-lovable {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    background: var(--lovable-white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nexus-menu-toggle {
    font-size: 20px;
    color: var(--lovable-gray-500);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nexus-menu-toggle:hover {
    background: var(--lovable-gray-100);
    color: var(--lovable-blue);
}

.nexus-search-bar {
    display: flex;
    align-items: center;
    background: var(--lovable-gray-50);
    border-radius: var(--radius-md);
    padding: 4px var(--spacing-md);
    width: 350px;
    border: none;
    transition: all var(--transition-fast);
}

.nexus-search-bar:focus-within {
    border-color: var(--lovable-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.nexus-search-bar input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: var(--spacing-sm) !important;
    width: 100%;
    font-size: var(--font-size-sm);
}

.nexus-search-bar .search-icon {
    color: var(--lovable-gray-400);
    font-size: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nexus-version-badge {
    background: linear-gradient(135deg, var(--lovable-blue) 0%, var(--lovable-blue-dark) 100%);
    color: var(--lovable-white);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nexus-brand-title {
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--lovable-gray-800);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nexus-brand-title .brand-icon {
    font-size: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   📋 STATUS PANEL
   ═══════════════════════════════════════════════════════════════ */

.nexus-status-panel {
    background: var(--lovable-white);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.nexus-status-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--lovable-blue), var(--lovable-cyan), var(--lovable-green));
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--lovable-gray-800);
}

.status-header .dashicons,
.status-header .status-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--lovable-blue);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.status-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--lovable-gray-700);
    font-weight: 500;
    padding: var(--spacing-md);
    background: var(--lovable-gray-50);
    border-radius: var(--radius-md);
    border: none;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.active {
    background: var(--lovable-green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.status-dot.inactive {
    background: var(--lovable-gray-300);
}

.status-dot.warning {
    background: var(--lovable-orange);
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}

.status-value {
    font-weight: 700;
    color: var(--lovable-gray-900);
}

.status-note {
    text-align: right;
    font-size: var(--font-size-xs);
    color: var(--lovable-gray-400);
    margin-top: var(--spacing-lg);
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-xs);
}

/* ═══════════════════════════════════════════════════════════════
   📑 TABS NAVIGATION (Pill Style)
   ═══════════════════════════════════════════════════════════════ */

.nexus-pill-nav {
    display: flex;
    gap: 4px;
    margin-bottom: var(--spacing-lg);
    background: var(--lovable-white);
    padding: 6px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: none;
    flex-wrap: wrap;
    justify-content: center;
}

.nexus-pill-item {
    padding: 14px 22px;
    border-radius: var(--radius-md);
    color: var(--lovable-gray-700);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nexus-pill-item:hover {
    color: var(--lovable-blue);
    background: var(--lovable-gray-50);
}

.nexus-pill-item.active {
    background: var(--lovable-blue);
    color: var(--lovable-white);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.nexus-pill-item .tab-icon {
    font-size: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   📦 MAIN CONTENT CARD
   ═══════════════════════════════════════════════════════════════ */

.nexus-main-content-card {
    background: var(--lovable-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-card);
    border: none;
    clear: both;
    margin-bottom: var(--spacing-xl);
}

.nexus-main-content-card .card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    background: transparent !important;
}

.nexus-main-content-card h3,
.nexus-section-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--lovable-gray-800);
    border: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nexus-section-title .section-icon {
    font-size: 24px;
}

.nexus-section-subtitle {
    font-size: var(--font-size-sm);
    color: var(--lovable-gray-500);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   📝 FORM ELEMENTS
   ═══════════════════════════════════════════════════════════════ */

.form-table th {
    padding: var(--spacing-md) 0 var(--spacing-md) var(--spacing-md);
    width: 220px;
    color: var(--lovable-gray-700);
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-align: right;
    vertical-align: top;
}

.nexus-main-content-card input[type="text"],
.nexus-main-content-card input[type="email"],
.nexus-main-content-card input[type="url"],
.nexus-main-content-card input[type="number"],
.nexus-main-content-card textarea,
.nexus-main-content-card select,
.nexus-input {
    background: var(--lovable-gray-50) !important;
    border: 2px solid var(--lovable-gray-200) !important;
    border-radius: var(--radius-md) !important;
    padding: 12px var(--spacing-md) !important;
    box-shadow: none !important;
    width: 100%;
    max-width: 600px;
    font-size: var(--font-size-sm);
    color: var(--lovable-gray-800);
    transition: all var(--transition-fast);
}

.nexus-main-content-card input:focus,
.nexus-main-content-card textarea:focus,
.nexus-main-content-card select:focus,
.nexus-input:focus {
    border-color: var(--lovable-blue) !important;
    background: var(--lovable-white) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
    outline: none;
}

.nexus-main-content-card textarea {
    min-height: 120px;
    resize: vertical;
}

/* Toggle Switch */
.nexus-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    display: inline-block;
}

.nexus-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.nexus-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--lovable-gray-300);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.nexus-toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--lovable-white);
    border-radius: 50%;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nexus-toggle input:checked+.nexus-toggle-slider {
    background: var(--lovable-blue);
}

.nexus-toggle input:checked+.nexus-toggle-slider::before {
    transform: translateX(24px);
}

/* Color Picker */
.color-picker-wrap {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--lovable-gray-50);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    width: fit-content;
    border: 1px solid var(--lovable-gray-200);
}

/* ═══════════════════════════════════════════════════════════════
   🔘 BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.button-primary,
.nexus-btn-primary {
    background: linear-gradient(135deg, var(--lovable-gold) 0%, var(--lovable-gold-dark) 100%) !important;
    border: none !important;
    padding: 12px 28px !important;
    font-weight: 700 !important;
    font-size: var(--font-size-sm) !important;
    border-radius: var(--radius-md) !important;
    color: var(--lovable-gray-900) !important;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3) !important;
    transition: all var(--transition-normal) !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.button-primary:hover,
.nexus-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4) !important;
    background: linear-gradient(135deg, var(--lovable-gold-light) 0%, var(--lovable-gold) 100%) !important;
}

.nexus-btn-secondary {
    background: var(--lovable-white) !important;
    border: 2px solid var(--lovable-blue) !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    font-size: var(--font-size-sm) !important;
    border-radius: var(--radius-md) !important;
    color: var(--lovable-blue) !important;
    transition: all var(--transition-normal) !important;
    cursor: pointer;
}

.nexus-btn-secondary:hover {
    background: var(--lovable-blue) !important;
    color: var(--lovable-white) !important;
}

.nexus-btn-danger {
    background: linear-gradient(135deg, var(--lovable-red-light) 0%, var(--lovable-red) 100%) !important;
    border: none !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    font-size: var(--font-size-sm) !important;
    border-radius: var(--radius-md) !important;
    color: var(--lovable-white) !important;
    transition: all var(--transition-normal) !important;
    cursor: pointer;
}

.nexus-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3) !important;
}

/* ═══════════════════════════════════════════════════════════════
   🔗 QUICK LINKS GRID
   ═══════════════════════════════════════════════════════════════ */

.nexus-quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.quick-link-card {
    background: var(--lovable-gray-50);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--lovable-gray-600);
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: all var(--transition-normal);
}

.quick-link-card:hover {
    background: var(--lovable-white);
    border-color: var(--lovable-blue);
    color: var(--lovable-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-link-card .dashicons,
.quick-link-card .link-icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   📊 CHARTS & DATA VISUALIZATION
   ═══════════════════════════════════════════════════════════════ */

.nexus-chart-card {
    background: var(--lovable-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
    border: none;
}

.nexus-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.nexus-chart-title {
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--lovable-gray-800);
}

.nexus-chart-legend {
    display: flex;
    gap: var(--spacing-lg);
}

.nexus-legend-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-xs);
    color: var(--lovable-gray-500);
}

.nexus-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.nexus-legend-dot.blue {
    background: var(--lovable-blue);
}

.nexus-legend-dot.gold {
    background: var(--lovable-gold);
}

.nexus-legend-dot.green {
    background: var(--lovable-green);
}

.nexus-legend-dot.cyan {
    background: var(--lovable-cyan);
}

/* Bar Chart */
.nexus-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-lg);
    height: 200px;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--lovable-gray-200);
}

.nexus-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.nexus-bar-wrapper {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 160px;
}

.nexus-bar {
    width: 20px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--transition-normal);
}

.nexus-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.02);
}

.nexus-bar.blue {
    background: linear-gradient(180deg, var(--lovable-blue-light), var(--lovable-blue));
}

.nexus-bar.gold {
    background: linear-gradient(180deg, var(--lovable-gold-light), var(--lovable-gold));
}

.nexus-bar.cyan {
    background: linear-gradient(180deg, var(--lovable-cyan), #0891b2);
}

.nexus-bar-label {
    font-size: var(--font-size-xs);
    color: var(--lovable-gray-500);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   📋 TABLES
   ═══════════════════════════════════════════════════════════════ */

.nexus-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.nexus-table thead {
    background: var(--lovable-gray-50);
}

.nexus-table th {
    padding: var(--spacing-md);
    text-align: right;
    font-weight: 600;
    color: var(--lovable-gray-600);
    border-bottom: 2px solid var(--lovable-gray-200);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nexus-table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--lovable-gray-100);
    color: var(--lovable-gray-700);
}

.nexus-table tbody tr {
    transition: background var(--transition-fast);
}

.nexus-table tbody tr:hover {
    background: var(--lovable-gray-50);
}

/* Table Row Actions */
.nexus-table-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

.nexus-table-action {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nexus-table-action.edit {
    background: var(--lovable-blue);
    color: var(--lovable-white);
}

.nexus-table-action.edit:hover {
    background: var(--lovable-blue-dark);
}

.nexus-table-action.delete {
    background: var(--lovable-red-light);
    color: var(--lovable-white);
}

.nexus-table-action.delete:hover {
    background: var(--lovable-red);
}

/* Table Status Cell */
.nexus-table-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.nexus-table-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--lovable-green);
}

.nexus-table-status.inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--lovable-red);
}

.nexus-table-status.pending {
    background: rgba(251, 191, 36, 0.15);
    color: var(--lovable-gold-dark);
}

/* ═══════════════════════════════════════════════════════════════
   📄 PAGINATION
   ═══════════════════════════════════════════════════════════════ */

.nexus-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
}

.nexus-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--spacing-sm);
    border: 1px solid var(--lovable-gray-200);
    border-radius: var(--radius-md);
    background: var(--lovable-white);
    color: var(--lovable-gray-600);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nexus-pagination-btn:hover:not(:disabled) {
    background: var(--lovable-blue);
    color: var(--lovable-white);
    border-color: var(--lovable-blue);
}

.nexus-pagination-btn.active {
    background: var(--lovable-blue);
    color: var(--lovable-white);
    border-color: var(--lovable-blue);
}

.nexus-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nexus-pagination-info {
    color: var(--lovable-gray-500);
    font-size: var(--font-size-sm);
    margin: 0 var(--spacing-md);
}

/* ═══════════════════════════════════════════════════════════════
   📊 DATA LISTS
   ═══════════════════════════════════════════════════════════════ */

.nexus-data-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nexus-data-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--lovable-gray-100);
    transition: background var(--transition-fast);
}

.nexus-data-list-item:hover {
    background: var(--lovable-gray-50);
}

.nexus-data-list-item:last-child {
    border-bottom: none;
}

.nexus-data-list-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nexus-data-list-title {
    font-weight: 600;
    color: var(--lovable-gray-800);
    font-size: var(--font-size-md);
}

.nexus-data-list-subtitle {
    color: var(--lovable-gray-500);
    font-size: var(--font-size-sm);
}

/* ═══════════════════════════════════════════════════════════════
   🔔 ALERTS & NOTICES
   ═══════════════════════════════════════════════════════════════ */

.nexus-alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.nexus-alert.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--lovable-green);
}

.nexus-alert.warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: var(--lovable-gold-dark);
}

.nexus-alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--lovable-red);
}

.nexus-alert.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--lovable-blue);
}

/* ═══════════════════════════════════════════════════════════════
   📱 RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .nexus-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .nexus-search-bar {
        width: 200px;
    }

    .nexus-quick-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .nexus-pill-nav {
        float: none;
        width: 100%;
        justify-content: center;
    }

    .nexus-content-header-lovable {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}

@media (max-width: 600px) {
    .nexus-stats-row {
        grid-template-columns: 1fr;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .nexus-quick-links {
        grid-template-columns: 1fr;
    }

    .nexus-dashboard-wrapper {
        padding: var(--spacing-md);
    }
}

/* ═══════════════════════════════════════════════════════════════
   🔄 RTL ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════ */

[dir="rtl"] .nexus-pill-nav {
    float: none;
    justify-content: center;
}

[dir="rtl"] .status-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .status-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .nexus-stat-card::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .nexus-toggle-slider::before {
    left: auto;
    right: 3px;
}

[dir="rtl"] .nexus-toggle input:checked+.nexus-toggle-slider::before {
    transform: translateX(-24px);
}

[dir="rtl"] .form-table th {
    text-align: left;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 0;
}

[dir="rtl"] .nexus-table th,
[dir="rtl"] .nexus-table td {
    text-align: left;
}

/* ═══════════════════════════════════════════════════════════════
   ✨ 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;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.nexus-animate-fadeInUp {
    animation: fadeInUp 0.4s ease-out;
}

.nexus-loading {
    background: linear-gradient(90deg, var(--lovable-gray-200) 25%, var(--lovable-gray-100) 50%, var(--lovable-gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Progress Bar */
.nexus-progress {
    height: 8px;
    background: var(--lovable-gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.nexus-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--lovable-blue), var(--lovable-cyan));
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

.nexus-progress-bar.gold {
    background: linear-gradient(90deg, var(--lovable-gold), var(--lovable-orange));
}

.nexus-progress-bar.green {
    background: linear-gradient(90deg, var(--lovable-green), var(--lovable-cyan));
}

/* ═══════════════════════════════════════════════════════════════
   📦 NEXUS CARDS (Content Cards)
   ═══════════════════════════════════════════════════════════════ */

.nexus-card {
    background: var(--lovable-white);
    border-radius: var(--radius-xl);
    padding: 0;
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--lovable-gray-200);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.nexus-card:hover {
    box-shadow: var(--shadow-lg);
}

.nexus-card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--lovable-gray-100);
    background: linear-gradient(135deg, var(--lovable-gray-50) 0%, var(--lovable-white) 100%);
}

.nexus-card-header h3 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--lovable-gray-800);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nexus-card-desc {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--lovable-gray-500);
    line-height: 1.6;
}

.nexus-form-section {
    padding: var(--spacing-lg);
}

.nexus-form-row {
    margin-bottom: var(--spacing-lg);
}

.nexus-form-row:last-child {
    margin-bottom: 0;
}

.nexus-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--lovable-gray-700);
    margin-bottom: var(--spacing-sm);
}

.nexus-label-icon {
    font-size: 16px;
}

.nexus-field-desc {
    margin: var(--spacing-xs) 0 0 0;
    font-size: var(--font-size-xs);
    color: var(--lovable-gray-400);
}

/* ═══════════════════════════════════════════════════════════════
   🎨 ENHANCED FORM INPUTS
   ═══════════════════════════════════════════════════════════════ */

.nexus-text-input,
.nexus-textarea,
.nexus-select {
    width: 100%;
    max-width: 600px;
    padding: 12px var(--spacing-md);
    border: 2px solid var(--lovable-gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    color: var(--lovable-gray-800);
    background: var(--lovable-gray-50);
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

.nexus-text-input:hover,
.nexus-textarea:hover,
.nexus-select:hover {
    border-color: var(--lovable-gray-300);
}

.nexus-text-input:focus,
.nexus-textarea:focus,
.nexus-select:focus {
    border-color: var(--lovable-blue);
    background: var(--lovable-white);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.nexus-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.nexus-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b'%3E%3Cpath d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Color Picker Enhanced */
.nexus-color-picker-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--lovable-gray-50);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    border: 2px solid var(--lovable-gray-200);
    width: fit-content;
}

.nexus-color-input {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
}

.nexus-hex-input {
    width: 100px;
    padding: 8px 12px !important;
    border: 1px solid var(--lovable-gray-200) !important;
    border-radius: var(--radius-sm) !important;
    font-family: monospace;
    font-size: var(--font-size-sm);
    background: var(--lovable-white) !important;
}

/* ═══════════════════════════════════════════════════════════════
   🔘 TOGGLE SWITCHES (Enhanced)
   ═══════════════════════════════════════════════════════════════ */

.nexus-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--lovable-gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--lovable-gray-100);
    margin-bottom: var(--spacing-sm);
    max-width: 600px;
    transition: all var(--transition-fast);
}

.nexus-switch-row:hover {
    background: var(--lovable-white);
    border-color: var(--lovable-blue);
}

.nexus-switch-info {
    flex: 1;
}

.nexus-switch-label {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--lovable-gray-800);
    display: block;
    margin-bottom: 2px;
}

.nexus-switch-desc {
    font-size: var(--font-size-xs);
    color: var(--lovable-gray-500);
}

.nexus-switch {
    position: relative;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

.nexus-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.nexus-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--lovable-gray-300);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.nexus-switch-slider::before {
    content: '';
    position: absolute;
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background: var(--lovable-white);
    border-radius: 50%;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nexus-switch input:checked+.nexus-switch-slider {
    background: linear-gradient(135deg, var(--lovable-blue) 0%, var(--lovable-cyan) 100%);
}

.nexus-switch input:checked+.nexus-switch-slider::before {
    transform: translateX(26px);
}

.nexus-switch input:focus+.nexus-switch-slider {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   🎯 UNIFIED CARD DESIGN - WHITE/GRAY ONLY
   All cards now use consistent white/light gray styling
   ═══════════════════════════════════════════════════════════════ */

/* Override ALL gradient cards to white/gray */
.nexus-card.blue-gradient,
.nexus-card.gold-gradient,
.nexus-card.green-gradient,
.nexus-card.purple-gradient,
.nexus-card.red-gradient,
.nexus-card.teal-gradient,
.nexus-card.cyan-gradient {
    background: var(--lovable-white) !important;
    border: 1px solid var(--lovable-gray-200) !important;
    box-shadow: var(--shadow-card) !important;
}

.nexus-card.blue-gradient .nexus-card-header,
.nexus-card.gold-gradient .nexus-card-header,
.nexus-card.green-gradient .nexus-card-header,
.nexus-card.purple-gradient .nexus-card-header,
.nexus-card.red-gradient .nexus-card-header {
    background: linear-gradient(135deg, var(--lovable-gray-50) 0%, var(--lovable-white) 100%) !important;
    border-bottom: 1px solid var(--lovable-gray-100) !important;
}

.nexus-card.blue-gradient h3,
.nexus-card.gold-gradient h3,
.nexus-card.green-gradient h3,
.nexus-card.purple-gradient h3,
.nexus-card.red-gradient h3 {
    color: var(--lovable-gray-800) !important;
}

.nexus-card.blue-gradient .nexus-card-desc,
.nexus-card.gold-gradient .nexus-card-desc,
.nexus-card.green-gradient .nexus-card-desc,
.nexus-card.purple-gradient .nexus-card-desc,
.nexus-card.red-gradient .nexus-card-desc {
    color: var(--lovable-gray-500) !important;
}

.nexus-card.blue-gradient .nexus-label,
.nexus-card.gold-gradient .nexus-label,
.nexus-card.green-gradient .nexus-label,
.nexus-card.purple-gradient .nexus-label,
.nexus-card.red-gradient .nexus-label {
    color: var(--lovable-gray-700) !important;
}

/* Toggle items in formerly-gradient cards - now white/gray */
.nexus-card.blue-gradient .nexus-toggle-item,
.nexus-card.gold-gradient .nexus-toggle-item,
.nexus-card.green-gradient .nexus-toggle-item,
.nexus-card.purple-gradient .nexus-toggle-item,
.nexus-card.red-gradient .nexus-toggle-item {
    background: var(--lovable-gray-50) !important;
    border-color: var(--lovable-gray-200) !important;
}

.nexus-card.blue-gradient .nexus-toggle-title,
.nexus-card.gold-gradient .nexus-toggle-title,
.nexus-card.green-gradient .nexus-toggle-title,
.nexus-card.purple-gradient .nexus-toggle-title,
.nexus-card.red-gradient .nexus-toggle-title {
    color: var(--lovable-gray-800) !important;
}

.nexus-card.blue-gradient .nexus-toggle-desc,
.nexus-card.gold-gradient .nexus-toggle-desc,
.nexus-card.green-gradient .nexus-toggle-desc,
.nexus-card.purple-gradient .nexus-toggle-desc,
.nexus-card.red-gradient .nexus-toggle-desc {
    color: var(--lovable-gray-500) !important;
}

/* ═══════════════════════════════════════════════════════════════
   📋 FORM GRID LAYOUTS
   ═══════════════════════════════════════════════════════════════ */

.nexus-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.nexus-form-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.nexus-form-grid.four-cols {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {

    .nexus-form-grid,
    .nexus-form-grid.three-cols,
    .nexus-form-grid.four-cols {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   🔔 BADGES & TAGS
   ═══════════════════════════════════════════════════════════════ */

.nexus-badge-new {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--lovable-green) 0%, var(--lovable-cyan) 100%);
    color: var(--lovable-white);
    font-size: var(--font-size-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nexus-badge-pro {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--lovable-gold) 0%, var(--lovable-orange) 100%);
    color: var(--lovable-gray-900);
    font-size: var(--font-size-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nexus-badge-beta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--lovable-purple) 0%, #6366f1 100%);
    color: var(--lovable-white);
    font-size: var(--font-size-xs);
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════
   📁 FILE UPLOAD AREA
   ═══════════════════════════════════════════════════════════════ */

.nexus-upload-area {
    border: 2px dashed var(--lovable-gray-300);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    background: var(--lovable-gray-50);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.nexus-upload-area:hover {
    border-color: var(--lovable-blue);
    background: rgba(59, 130, 246, 0.05);
}

.nexus-upload-area.dragover {
    border-color: var(--lovable-blue);
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.nexus-upload-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
    opacity: 0.6;
}

.nexus-upload-text {
    font-size: var(--font-size-md);
    color: var(--lovable-gray-600);
    margin-bottom: var(--spacing-sm);
}

.nexus-upload-hint {
    font-size: var(--font-size-xs);
    color: var(--lovable-gray-400);
}

/* ═══════════════════════════════════════════════════════════════
   💬 TOOLTIPS
   ═══════════════════════════════════════════════════════════════ */

.nexus-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--lovable-gray-200);
    color: var(--lovable-gray-600);
    border-radius: 50%;
    font-size: 12px;
    cursor: help;
    margin-inline-start: var(--spacing-xs);
}

.nexus-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--lovable-gray-800);
    color: var(--lovable-white);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1000;
}

.nexus-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════════════
   🎨 SAVE BUTTON ENHANCED
   ═══════════════════════════════════════════════════════════════ */

.nexus-save-section {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, var(--lovable-white) 20%);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
    text-align: center;
}

.nexus-save-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--lovable-gold) 0%, var(--lovable-gold-dark) 100%);
    color: var(--lovable-gray-900);
    font-size: var(--font-size-md);
    font-weight: 700;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    transition: all var(--transition-normal);
}

.nexus-save-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.5);
}

.nexus-save-btn:active {
    transform: translateY(-1px);
}

.nexus-save-btn .save-icon {
    font-size: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   🔒 FOOTER
   ═══════════════════════════════════════════════════════════════ */

.nexus-footer {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--lovable-gray-400);
    font-size: var(--font-size-sm);
}

.nexus-footer a {
    color: var(--lovable-blue);
    text-decoration: none;
}

.nexus-footer a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   🔘 TOGGLE ITEMS INSIDE GRADIENT CARDS
   ═══════════════════════════════════════════════════════════════ */

/* Light toggle items for use inside gradient cards */
.nexus-toggle-item.light {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.nexus-toggle-item.light .nexus-toggle-title,
.nexus-toggle-item.light .nexus-toggle-label {
    color: var(--lovable-white);
}

.nexus-toggle-item.light .nexus-toggle-desc {
    color: rgba(255, 255, 255, 0.8);
}

.nexus-toggle-item.light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Transparent toggle items */
.nexus-toggle-item.transparent {
    background: transparent;
    border: none;
    padding: 0;
}

/* Toggle list styling for gradient cards */
.blue-gradient .nexus-toggle-list .nexus-toggle-item,
.green-gradient .nexus-toggle-list .nexus-toggle-item,
.gold-gradient .nexus-toggle-list .nexus-toggle-item,
.purple-gradient .nexus-toggle-list .nexus-toggle-item {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.blue-gradient .nexus-toggle-title,
.green-gradient .nexus-toggle-title,
.gold-gradient .nexus-toggle-title,
.purple-gradient .nexus-toggle-title {
    color: var(--lovable-white);
}

.blue-gradient .nexus-toggle-desc,
.green-gradient .nexus-toggle-desc,
.gold-gradient .nexus-toggle-desc,
.purple-gradient .nexus-toggle-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════════════════════════
   📐 ADDITIONAL LAYOUT HELPERS
   ═══════════════════════════════════════════════════════════════ */

.nexus-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nexus-flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nexus-gap-sm {
    gap: var(--spacing-sm);
}

.nexus-gap-md {
    gap: var(--spacing-md);
}

.nexus-gap-lg {
    gap: var(--spacing-lg);
}

.nexus-mt-sm {
    margin-top: var(--spacing-sm);
}

.nexus-mt-md {
    margin-top: var(--spacing-md);
}

.nexus-mt-lg {
    margin-top: var(--spacing-lg);
}

.nexus-mt-xl {
    margin-top: 25px;
}

.nexus-mb-sm {
    margin-bottom: var(--spacing-sm);
}

.nexus-mb-md {
    margin-bottom: var(--spacing-md);
}

.nexus-mb-lg {
    margin-bottom: var(--spacing-lg);
}

.nexus-p-sm {
    padding: var(--spacing-sm);
}

.nexus-p-md {
    padding: var(--spacing-md);
}

.nexus-p-lg {
    padding: var(--spacing-lg);
}

/* ═══════════════════════════════════════════════════════════════
   🎭 TEXT COLORS FOR GRADIENT CARDS
   ═══════════════════════════════════════════════════════════════ */

.nexus-text-white {
    color: var(--lovable-white) !important;
}

.nexus-text-white-80 {
    color: rgba(255, 255, 255, 0.8) !important;
}

.nexus-text-white-70 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ═══════════════════════════════════════════════════════════════
   🎨 GLOBAL CONSISTENCY STYLES
   Ensures all tabs and sections have unified appearance
   ═══════════════════════════════════════════════════════════════ */

/* Section Titles - All tabs - LARGE & CLEAR */
.nexus-dashboard-wrapper h2,
.nexus-dashboard-wrapper h3:not(.nexus-card-header h3) {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--lovable-gray-800) !important;
    margin-bottom: 12px !important;
    line-height: 1.4 !important;
}

.nexus-dashboard-wrapper h4 {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--lovable-gray-700) !important;
    margin-bottom: 8px !important;
}

/* Section Descriptions - CLEAR */
.nexus-dashboard-wrapper p {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: var(--lovable-gray-600) !important;
}

/* Labels - LARGE & CLEAR */
.nexus-dashboard-wrapper label,
.nexus-dashboard-wrapper .nexus-label {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--lovable-gray-700) !important;
    display: block;
    margin-bottom: 10px;
}

/* Input Fields - LARGE & CLEAR */
.nexus-dashboard-wrapper input[type="text"],
.nexus-dashboard-wrapper input[type="url"],
.nexus-dashboard-wrapper input[type="email"],
.nexus-dashboard-wrapper input[type="number"],
.nexus-dashboard-wrapper input[type="password"],
.nexus-dashboard-wrapper textarea,
.nexus-dashboard-wrapper select {
    font-size: 16px !important;
    padding: 14px 18px !important;
    border: 2px solid var(--lovable-gray-200) !important;
    border-radius: 12px !important;
    background: var(--lovable-gray-50) !important;
    color: var(--lovable-gray-800) !important;
    transition: all 0.2s ease !important;
    font-family: var(--font-family) !important;
    width: 100%;
    max-width: 600px;
}

.nexus-dashboard-wrapper input:focus,
.nexus-dashboard-wrapper textarea:focus,
.nexus-dashboard-wrapper select:focus {
    border-color: var(--lovable-blue) !important;
    background: var(--lovable-white) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

/* Upload Areas - Consistent Golden Style */
.nexus-dashboard-wrapper .upload-area,
.nexus-dashboard-wrapper [class*="upload"],
.nexus-dashboard-wrapper .nexus-upload-area {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%) !important;
    border: 2px dashed var(--lovable-gold) !important;
    border-radius: 16px !important;
    padding: 30px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
}

.nexus-dashboard-wrapper .upload-area:hover,
.nexus-dashboard-wrapper [class*="upload"]:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%) !important;
    border-color: var(--lovable-gold-dark) !important;
}

/* Upload Icons */
.nexus-dashboard-wrapper .upload-area .dashicons,
.nexus-dashboard-wrapper [class*="upload"] .dashicons {
    font-size: 48px !important;
    color: var(--lovable-gold) !important;
    margin-bottom: 10px !important;
}

/* Buttons - Primary Gold Style */
.nexus-dashboard-wrapper .button-primary,
.nexus-dashboard-wrapper button[type="submit"] {
    background: linear-gradient(135deg, var(--lovable-gold) 0%, var(--lovable-gold-dark) 100%) !important;
    color: var(--lovable-gray-900) !important;
    border: none !important;
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3) !important;
    transition: all 0.3s ease !important;
}

.nexus-dashboard-wrapper .button-primary:hover,
.nexus-dashboard-wrapper button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4) !important;
}

/* Secondary Buttons */
.nexus-dashboard-wrapper .button-secondary,
.nexus-dashboard-wrapper .button:not(.button-primary):not([type="submit"]) {
    background: var(--lovable-white) !important;
    color: var(--lovable-blue) !important;
    border: 2px solid var(--lovable-blue) !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    transition: all 0.3s ease !important;
}

.nexus-dashboard-wrapper .button-secondary:hover,
.nexus-dashboard-wrapper .button:not(.button-primary):not([type="submit"]):hover {
    background: var(--lovable-blue) !important;
    color: var(--lovable-white) !important;
}

/* Tab Content Areas */
.nexus-dashboard-wrapper .tab-content,
.nexus-dashboard-wrapper [id*="tab-"],
.nexus-dashboard-wrapper .nexus-settings-section {
    background: var(--lovable-white);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--lovable-gray-100);
}

/* Inner Cards - Consistent */
.nexus-dashboard-wrapper .inner-card,
.nexus-dashboard-wrapper .settings-card,
.nexus-dashboard-wrapper .option-group {
    background: var(--lovable-gray-50);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--lovable-gray-100);
}

/* Toggle Items in Regular Cards (not gradient) */
.nexus-dashboard-wrapper .nexus-toggle-item {
    background: var(--lovable-gray-50);
    border: 1px solid var(--lovable-gray-200);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
}

.nexus-dashboard-wrapper .nexus-toggle-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--lovable-gray-800) !important;
    margin-bottom: 4px !important;
}

.nexus-dashboard-wrapper .nexus-toggle-desc {
    font-size: 15px !important;
    color: var(--lovable-gray-500) !important;
    line-height: 1.6 !important;
    line-height: 1.5 !important;
}

/* Gradient Card Overrides */
.nexus-card.blue-gradient .nexus-toggle-item,
.nexus-card.green-gradient .nexus-toggle-item,
.nexus-card.gold-gradient .nexus-toggle-item,
.nexus-card.purple-gradient .nexus-toggle-item {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.nexus-card.blue-gradient .nexus-toggle-title,
.nexus-card.green-gradient .nexus-toggle-title,
.nexus-card.gold-gradient .nexus-toggle-title,
.nexus-card.purple-gradient .nexus-toggle-title {
    color: #fff !important;
}

.nexus-card.blue-gradient .nexus-toggle-desc,
.nexus-card.green-gradient .nexus-toggle-desc,
.nexus-card.gold-gradient .nexus-toggle-desc,
.nexus-card.purple-gradient .nexus-toggle-desc {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Dividers */
.nexus-dashboard-wrapper hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--lovable-gray-200) 50%, transparent 100%);
    margin: 24px 0;
}

/* Info Boxes */
.nexus-dashboard-wrapper .info-box,
.nexus-dashboard-wrapper .notice-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    color: var(--lovable-blue-dark);
}

/* Warning Boxes */
.nexus-dashboard-wrapper .warning-box {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    color: var(--lovable-gold-dark);
}

/* ═══════════════════════════════════════════════════════════════
   🚫 FORCE OVERRIDE ALL COLORED BACKGROUNDS
   This overrides ANY inline styles with colored gradients
   ═══════════════════════════════════════════════════════════════ */

/* Override ANY div with inline background styles in dashboard */
.nexus-dashboard-wrapper div[style*="background"],
.nexus-dashboard-wrapper div[style*="linear-gradient"],
.nexus-dashboard-wrapper .nexus-card[style*="background"] {
    background: var(--lovable-white) !important;
    border: 1px solid var(--lovable-gray-200) !important;
}

/* Override colored text to dark */
.nexus-dashboard-wrapper [style*="color: #fff"],
.nexus-dashboard-wrapper [style*="color: white"],
.nexus-dashboard-wrapper [style*="color:white"],
.nexus-dashboard-wrapper [style*="color:#fff"] {
    color: var(--lovable-gray-800) !important;
}

.nexus-dashboard-wrapper [style*="color: rgba(255"],
.nexus-dashboard-wrapper [style*="color:rgba(255"] {
    color: var(--lovable-gray-500) !important;
}

/* Stats cards - make them white with colored accent */
.nexus-dashboard-wrapper .nexus-stat-card[style*="background"],
.nexus-dashboard-wrapper [class*="stat"][style*="background"] {
    background: var(--lovable-white) !important;
    border: 2px solid var(--lovable-blue-light) !important;
}

.nexus-dashboard-wrapper .nexus-stat-card h4,
.nexus-dashboard-wrapper .nexus-stat-card .stat-number {
    color: var(--lovable-gray-800) !important;
}

/* Table headers - gray instead of colored */
.nexus-dashboard-wrapper table thead[style*="background"],
.nexus-dashboard-wrapper table th[style*="background"],
.nexus-dashboard-wrapper .nexus-table thead[style*="background"] {
    background: var(--lovable-gray-100) !important;
    color: var(--lovable-gray-800) !important;
}

.nexus-dashboard-wrapper table th,
.nexus-dashboard-wrapper .nexus-table th {
    background: var(--lovable-gray-100) !important;
    color: var(--lovable-gray-800) !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    padding: 14px 16px !important;
}

.nexus-dashboard-wrapper table td,
.nexus-dashboard-wrapper .nexus-table td {
    background: var(--lovable-white) !important;
    color: var(--lovable-gray-700) !important;
    font-size: 15px !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--lovable-gray-100) !important;
}

.nexus-dashboard-wrapper table tbody tr:hover td {
    background: var(--lovable-gray-50) !important;
}

/* Section headers with inline colors */
.nexus-dashboard-wrapper h2[style*="color"],
.nexus-dashboard-wrapper h3[style*="color"],
.nexus-dashboard-wrapper h4[style*="color"] {
    color: var(--lovable-gray-800) !important;
}

/* Paragraphs and descriptions with inline colors */
.nexus-dashboard-wrapper p[style*="color"],
.nexus-dashboard-wrapper span[style*="color"] {
    color: var(--lovable-gray-600) !important;
}

/* Inner white boxes remain white */
.nexus-dashboard-wrapper div[style*="background: #fff"],
.nexus-dashboard-wrapper div[style*="background:#fff"],
.nexus-dashboard-wrapper div[style*="background: white"],
.nexus-dashboard-wrapper div[style*="background:white"] {
    background: var(--lovable-white) !important;
    border: 1px solid var(--lovable-gray-200) !important;
    border-radius: 12px !important;
}

/* Buttons keep their accent colors BUT with updated style */
.nexus-dashboard-wrapper button[style*="background"],
.nexus-dashboard-wrapper .button[style*="background"] {
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    padding: 12px 24px !important;
}

/* All spans in toggle items */
.nexus-dashboard-wrapper .nexus-toggle-item span {
    color: var(--lovable-gray-700) !important;
}

.nexus-dashboard-wrapper .nexus-toggle-item .nexus-toggle-title {
    color: var(--lovable-gray-800) !important;
    font-size: 17px !important;
}

.nexus-dashboard-wrapper .nexus-toggle-item .nexus-toggle-desc {
    color: var(--lovable-gray-500) !important;
    font-size: 14px !important;
}

/* ═══════════════════════════════════════════════════════════════
   📱 RESPONSIVE DESIGN - MOBILE & TABLET
   ═══════════════════════════════════════════════════════════════ */

/* Large Tablets and Small Desktops */
@media screen and (max-width: 1200px) {
    .nexus-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .nexus-quick-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nexus-search-bar {
        width: 250px;
    }
}

/* Tablets */
@media screen and (max-width: 992px) {
    .nexus-dashboard-wrapper {
        padding: var(--spacing-md);
    }

    .nexus-pill-nav {
        float: none;
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .nexus-pill-item {
        padding: 10px 16px;
        font-size: 14px;
    }

    .nexus-content-header-lovable {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .header-left,
    .header-right {
        width: 100%;
        justify-content: center;
    }

    .nexus-search-bar {
        width: 100%;
        max-width: 400px;
    }
}

/* Mobile Phones */
@media screen and (max-width: 768px) {
    .nexus-dashboard-wrapper {
        padding: var(--spacing-sm);
    }

    .nexus-stats-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .nexus-stat-card {
        padding: var(--spacing-md);
    }

    .nexus-stat-value {
        font-size: var(--font-size-xl);
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .nexus-quick-links {
        grid-template-columns: 1fr;
    }

    .nexus-pill-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 4px;
    }

    .nexus-pill-item {
        padding: 8px 12px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .nexus-pill-item .tab-icon {
        font-size: 16px;
    }

    .nexus-main-content-card {
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
    }

    .nexus-section-title {
        font-size: var(--font-size-lg);
    }

    .form-table th {
        display: block;
        width: 100%;
        padding-bottom: var(--spacing-xs);
    }

    .form-table td {
        display: block;
        padding: var(--spacing-sm) 0 var(--spacing-md);
    }

    .button-primary,
    .nexus-btn-primary {
        width: 100%;
        justify-content: center;
        padding: 14px 20px !important;
    }

    /* GSC Section Mobile */
    #gsc-results table {
        display: block;
        overflow-x: auto;
    }

    #gsc-status {
        font-size: 13px !important;
        max-height: 300px !important;
    }

    /* Bulk Indexing Mobile */
    #bulk-index-results {
        font-size: 13px !important;
    }

    /* Grid layouts to single column */
    div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    /* Flex wrapping */
    div[style*="display: flex"][style*="gap:"] {
        flex-wrap: wrap !important;
    }
}

/* Small Mobile Phones */
@media screen and (max-width: 480px) {
    .nexus-dashboard-wrapper {
        padding: 8px;
    }

    .nexus-stat-card {
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-md);
    }

    .nexus-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .nexus-stat-value {
        font-size: var(--font-size-lg);
    }

    .nexus-brand-title {
        font-size: var(--font-size-md);
    }

    .nexus-version-badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    /* Tables scroll horizontally */
    table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    /* Cards stacking */
    div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: 1fr !important;
    }

    /* Modals full width */
    .nexus-modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 10px auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   🎨 GLOBAL ANIMATIONS FOR PROGRESS BARS
   ═══════════════════════════════════════════════════════════════ */

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}