/* SEDAC UI 5.0 - Premium Modern Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

/* =========================================
   CSS Variables - Light Theme (Default)
   ========================================= */
:root {
    /* Primary Colors - Cyber Electric Cyan/Teal Theme */
    --primary-color: #0d9488;
    --primary-hover: #0f766e;
    --primary-light: #2dd4bf;
    --primary-dark: #115e59;
    --primary-gradient: linear-gradient(135deg, #0d9488 0%, #06b6d4 50%, #3b82f6 100%);
    --primary-glow: rgba(13, 148, 136, 0.4);

    /* Accent Colors */
    --accent-cyan: #06b6d4;
    --accent-teal: #14b8a6;
    --accent-pink: #ec4899;
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);

    /* Status Colors */
    --success-color: #10b981;
    --success-light: rgba(16, 185, 129, 0.12);
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning-color: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.12);
    --danger-color: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.12);
    --info-color: #0ea5e9;
    --info-light: rgba(14, 165, 233, 0.12);

    /* Background Colors */
    --bg-primary: #f0fdfa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #ccfbf1;
    --bg-gradient: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 50%, #ecfeff 100%);
    --bg-animated: linear-gradient(-45deg, #f0fdfa, #e0f2fe, #e0e7ff, #ecfeff);

    /* Glass Effect - Enhanced */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(13, 148, 136, 0.25);
    --glass-shadow: 0 8px 32px rgba(13, 148, 136, 0.1);
    --glass-glow: 0 0 40px rgba(13, 148, 136, 0.05);

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #0d9488;
    --text-tertiary: #14b8a6;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    /* Border Colors */
    --border-color: rgba(13, 148, 136, 0.15);
    --border-light: rgba(13, 148, 136, 0.08);
    --border-focus: #0d9488;

    /* Table Colors */
    --table-header-bg: linear-gradient(135deg, #0d9488 0%, #06b6d4 50%, #3b82f6 100%);
    --table-row-hover: rgba(13, 148, 136, 0.06);
    --table-row-alt: rgba(13, 148, 136, 0.03);

    /* Input Colors */
    --input-bg: #ffffff;
    --input-border: rgba(13, 148, 136, 0.25);
    --input-focus-ring: rgba(13, 148, 136, 0.2);

    /* Shadow */
    --shadow-sm: 0 2px 8px rgba(13, 148, 136, 0.08);
    --shadow-md: 0 4px 16px rgba(13, 148, 136, 0.12);
    --shadow-lg: 0 8px 32px rgba(13, 148, 136, 0.15);
    --shadow-xl: 0 16px 48px rgba(13, 148, 136, 0.2);
    --shadow-glow: 0 0 30px rgba(13, 148, 136, 0.15);

    /* Navbar */
    --navbar-bg: linear-gradient(135deg, #0d9488 0%, #0f766e 50%, #115e59 100%);
    --navbar-shadow: 0 4px 20px rgba(13, 148, 136, 0.3);

    /* Misc */
    --modal-overlay: rgba(30, 27, 75, 0.7);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 0.5rem;
    --border-radius-md: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.25rem;
    --border-radius-2xl: 1.5rem;

    /* Vibe Card Unified Styling */
    --vibe-card-bg: linear-gradient(135deg, rgba(13, 148, 136, 0.06), rgba(6, 182, 212, 0.03));
    --vibe-card-border: rgba(13, 148, 136, 0.2);
    --vibe-card-glow: rgba(13, 148, 136, 0.12);
    --vibe-card-header: #0d9488;
    --vibe-card-value: #0f172a;
    --vibe-card-subtext: #475569;
}

/* =========================================
   CSS Variables - Dark Theme
   ========================================= */
[data-theme="dark"] {
    /* Primary Colors - Neon Cyan */
    --primary-color: #22d3ee;
    --primary-hover: #67e8f9;
    --primary-light: #22d3ee;
    --primary-dark: #0891b2;
    --primary-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #3b82f6 100%);
    --primary-glow: rgba(34, 211, 238, 0.4);

    /* Background Colors - Deep Space Slate & Black */
    --bg-primary: #030712;
    --bg-secondary: #0b1329;
    --bg-tertiary: #111c44;
    --bg-gradient: linear-gradient(135deg, #030712 0%, #0b1329 50%, #090d16 100%);
    --bg-animated: linear-gradient(-45deg, #030712, #0b1329, #111827, #090d16);

    /* Glass Effect */
    --glass-bg: rgba(11, 19, 41, 0.85);
    --glass-border: rgba(34, 211, 238, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    --glass-glow: 0 0 40px rgba(34, 211, 238, 0.08);

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #38bdf8;
    --text-tertiary: #22d3ee;
    --text-muted: #94a3b8;
    --text-inverse: #030712;

    /* Border Colors */
    --border-color: rgba(34, 211, 238, 0.25);
    --border-light: rgba(34, 211, 238, 0.12);
    --border-focus: #22d3ee;

    /* Table Colors */
    --table-header-bg: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #06b6d4 100%);
    --table-row-hover: rgba(34, 211, 238, 0.08);
    --table-row-alt: rgba(34, 211, 238, 0.04);

    /* Input Colors */
    --input-bg: rgba(11, 19, 41, 0.8);
    --input-border: rgba(34, 211, 238, 0.3);
    --input-focus-ring: rgba(34, 211, 238, 0.25);

    /* Shadow */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(34, 211, 238, 0.2);

    /* Navbar */
    --navbar-bg: linear-gradient(135deg, #0b1329 0%, #0f766e 50%, #0d9488 100%);
    --navbar-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);

    /* Misc */
    --modal-overlay: rgba(0, 0, 0, 0.85);

    /* Vibe Card Unified Styling */
    --vibe-card-bg: linear-gradient(135deg, rgba(34, 211, 238, 0.06), rgba(6, 182, 212, 0.02));
    --vibe-card-border: rgba(34, 211, 238, 0.2);
    --vibe-card-glow: rgba(34, 211, 238, 0.08);
    --vibe-card-header: #38bdf8;
    --vibe-card-value: #f8fafc;
    --vibe-card-subtext: #94a3b8;
}

/* =========================================
   Base Styles with Animated Background
   ========================================= */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background var(--transition-slow), color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* =========================================
   Navigation - Premium Style
   ========================================= */
.navbar {
    background: var(--navbar-bg);
    padding: 0.875rem 1.5rem;
    box-shadow: var(--navbar-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Removed navbar shimmer animation for cleaner look */

.navbar-brand {
    color: var(--text-inverse);
    font-size: 1.375rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: -0.02em;
    transition: transform var(--transition-fast);
    position: relative;
    z-index: 1;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-logo {
    height: 38px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Theme & Action Buttons */
.theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.625rem;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 1.125rem;
    width: 42px;
    height: 42px;
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.theme-toggle:hover::before {
    opacity: 1;
}

.theme-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* =========================================
   App Container with Sidebar
   ========================================= */
.app-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Sidebar - Enhanced */
.sidebar {
    width: 240px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-color);
    padding: 1.25rem 0.75rem;
    transition: all var(--transition-base);
    flex-shrink: 0;
    box-shadow: var(--glass-shadow);
}

.sidebar.collapsed {
    width: 72px;
}

.sidebar.collapsed .sidebar-text {
    display: none;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary-gradient);
    border-radius: 0 4px 4px 0;
    transition: height var(--transition-fast);
}

.sidebar-link:hover {
    background: var(--table-row-hover);
    color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar-link:hover::before {
    height: 60%;
}

.sidebar-link.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px var(--primary-glow);
}

.sidebar-link.active::before {
    display: none;
}

.sidebar-icon {
    font-size: 1.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
}

.sidebar-text {
    white-space: nowrap;
    font-weight: 500;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Page visibility */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeSlideIn 0.4s ease-out;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Cards - Premium Glassmorphism
   ========================================= */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--glass-shadow), var(--glass-glow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

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

.card:hover {
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.card-header {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    color: var(--text-primary);
}

/* =========================================
   Buttons - Premium 3D Style
   ========================================= */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: scale(0.97) translateY(1px);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 16px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 16px var(--success-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-success:hover {
    box-shadow: 0 6px 24px var(--success-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger:hover {
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-warning:hover {
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-info {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-info:hover {
    box-shadow: 0 6px 24px rgba(6, 182, 212, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border-radius: var(--border-radius-sm);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-icon {
    padding: 0.625rem;
    min-width: 40px;
    min-height: 40px;
}

.toolbar-btn {
    min-width: 95px;
    height: 34px;
    line-height: 1;
    text-align: center;
}

/* =========================================
   Tabs - Pill Style with Animation
   ========================================= */
.tabs {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    padding: 0.5rem;
    border-radius: var(--border-radius-xl);
    width: fit-content;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.tab {
    padding: 0.875rem 1.75rem;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    position: relative;
}

.tab:hover {
    color: var(--primary-color);
    background: var(--table-row-hover);
}

.tab.active {
    color: white;
    background: var(--primary-gradient);
    box-shadow: var(--shadow-md), 0 0 20px var(--primary-glow);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeSlideIn 0.35s ease-out;
}

/* =========================================
   Tables - Premium Style
   ========================================= */
.table-container,
.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius-lg);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9375rem;
}

thead {
    background: var(--table-header-bg);
}

thead tr th:first-child {
    border-top-left-radius: var(--border-radius-lg);
}

thead tr th:last-child {
    border-top-right-radius: var(--border-radius-lg);
}

th {
    padding: 1rem 1.125rem;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    position: relative;
}

th::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

th:last-child::after {
    display: none;
}

td {
    padding: 1rem 1.125rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
    transition: background var(--transition-fast);
}

tbody tr {
    transition: all var(--transition-fast);
}

tbody tr:nth-child(even) {
    background-color: var(--table-row-alt);
}

tbody tr:hover {
    background-color: var(--table-row-hover);
    transform: scale(1.005);
}

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

tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--border-radius-lg);
}

tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--border-radius-lg);
}

/* =========================================
   Forms - Modern Style with Floating Effects
   ========================================= */
.form-group {
    margin-bottom: 1.375rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="url"],
textarea,
select,
.form-control {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid var(--input-border);
    border-radius: var(--border-radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    background-color: var(--input-bg);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="url"]:hover,
textarea:hover,
select:hover,
.form-control:hover {
    border-color: var(--primary-light);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus,
.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px var(--input-focus-ring), var(--shadow-md);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238b5cf6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    background-size: 1.25rem;
    padding-right: 2.75rem;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.625rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* =========================================
   Status Indicators & Badges
   ========================================= */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 var(--primary-glow);
    }

    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 6px transparent;
    }
}

.status-ok {
    background-color: var(--success-color);
    box-shadow: 0 0 12px var(--success-glow);
}

.status-warning {
    background-color: var(--warning-color);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.status-error {
    background-color: var(--danger-color);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.badge-info {
    background-color: var(--info-light);
    color: var(--info-color);
    border: 1px solid rgba(14, 165, 233, 0.25);
}

/* =========================================
   Modal - Premium Glassmorphism
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    padding: 0;
    border-radius: var(--border-radius-2xl);
    max-width: 600px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.375rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-2xl) var(--border-radius-2xl) 0 0;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.375rem;
    line-height: 1;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: var(--danger-light);
    color: var(--danger-color);
    transform: rotate(90deg);
}

.modal-content form {
    padding: 1.75rem;
}

.modal-footer {
    padding: 1.125rem 1.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.875rem;
    justify-content: flex-end;
    background: var(--bg-tertiary);
    border-radius: 0 0 var(--border-radius-2xl) var(--border-radius-2xl);
}

/* =========================================
   Loading Spinner - Premium
   ========================================= */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 10;
}

/* =========================================
   Grid Layout
   ========================================= */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* =========================================
   Alerts - Modern Style
   ========================================= */
.alert {
    padding: 1.125rem 1.375rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    font-size: 0.9375rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background-color: var(--success-light);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.alert-error {
    background-color: var(--danger-light);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert-warning {
    background-color: var(--warning-light);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.alert-info {
    background-color: var(--info-light);
    color: var(--info-color);
    border: 1px solid rgba(14, 165, 233, 0.25);
}

/* =========================================
   Typography
   ========================================= */
h1,
h2,
h3 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

/* =========================================
   System Info Page Styles
   ========================================= */
.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.system-card {
    position: relative;
    overflow: hidden;
}

.system-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}

.system-card .card-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0.75rem;
}

.system-icon {
    font-size: 1.625rem;
}

.metric-value {
    font-size: 2.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-details {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.metric-details div {
    margin-bottom: 0.375rem;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-fill.memory {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
}

.system-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.125rem;
    background: var(--glass-bg);
    border-radius: var(--border-radius-lg);
    font-size: 0.875rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.update-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =========================================
   Network Summary Card Styles
   ========================================= */
.network-summary-card {
    min-width: 280px;
}

.network-summary-card .card-body {
    padding: 1rem 1.25rem;
}

.network-summary-item {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.network-summary-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.network-summary-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.network-summary-detail {
    font-size: 0.8125rem;
    color: var(--text-muted);
    padding-left: 0.5rem;
    line-height: 1.6;
}

.network-summary-loading {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem 0;
}

/* =========================================
   NetworkInfo Section Styles
   ========================================= */
.network-info-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.network-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.network-card {
    position: relative;
    overflow: hidden;
}

.network-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.network-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.network-status-dot.online {
    background: var(--success-color);
    box-shadow: 0 0 8px var(--success-glow);
    animation: pulse 2s infinite;
}

.network-status-dot.offline {
    background: var(--danger-color);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.network-type {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.network-card-body {
    padding: 1.25rem;
}

.network-config-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.network-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.network-label {
    min-width: 80px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.network-value {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--primary-color);
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.network-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.network-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.network-input[readonly] {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
}

.network-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .network-cards-container {
        grid-template-columns: 1fr;
    }

    .network-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .network-label {
        min-width: auto;
    }

    .network-input {
        width: 100%;
    }
}

/* =========================================
   Filter Select
   ========================================= */
.filter-select {
    padding: 0.625rem 2.75rem 0.625rem 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238b5cf6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    background-size: 1.25rem;
    min-width: 150px;
    transition: all var(--transition-fast);
}

.filter-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px var(--input-focus-ring);
}

[data-theme="dark"] .filter-select,
[data-theme="dark"] select {
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a78bfa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

[data-theme="dark"] .filter-select option,
[data-theme="dark"] select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* =========================================
   Utility Classes
   ========================================= */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

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

.text-secondary {
    color: var(--text-secondary);
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-danger {
    color: var(--danger-color);
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

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

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 2rem;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.rounded {
    border-radius: var(--border-radius-md);
}

.rounded-lg {
    border-radius: var(--border-radius-lg);
}

.rounded-xl {
    border-radius: var(--border-radius-xl);
}

.shadow {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.hidden {
    display: none;
}

.visible {
    visibility: visible;
}

.invisible {
    visibility: hidden;
}

/* =========================================
   Scrollbar Styling
   ========================================= */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 5px;
    border: 2px solid var(--bg-tertiary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* =========================================
   Button Uniformity
   ========================================= */
.btn,
.btn-sm,
.btn-lg,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info {
    border-radius: var(--border-radius-md) !important;
}

label.btn {
    border-radius: var(--border-radius-md) !important;
}

/* =========================================
   Responsive Design - Desktop First
   ========================================= */
@media (max-width: 1024px) {
    .sidebar {
        width: 72px;
    }

    .sidebar .sidebar-text {
        display: none;
    }

    .main-content {
        padding: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0.625rem 0.75rem;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 99;
        background: var(--glass-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }

    .sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
    }

    .sidebar .sidebar-text {
        display: none;
    }

    .sidebar-link {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem 1rem;
        font-size: 0.6875rem;
    }

    .sidebar-link::before {
        display: none;
    }

    .sidebar-link:hover {
        transform: none;
    }

    .sidebar-toggle {
        display: none;
    }

    .main-content {
        padding: 1.25rem;
        padding-bottom: 5rem;
        /* Space for bottom nav */
    }

    .navbar {
        padding: 0.75rem 1rem;
    }

    .navbar-brand {
        font-size: 1.125rem;
    }

    .navbar-logo {
        height: 30px;
    }

    #userDisplay {
        display: none;
    }

    /* Tabs on mobile */
    .tabs {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .tab {
        flex: 1 1 auto;
        min-width: 85px;
        font-size: 0.8125rem;
        padding: 0.75rem 0.875rem;
        text-align: center;
    }

    /* Configuration grid stacks on mobile */
    .config-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* System grid on mobile */
    .system-grid {
        grid-template-columns: 1fr;
    }

    /* Cards on mobile */
    .card {
        padding: 1.25rem;
        border-radius: var(--border-radius-lg);
    }

    /* Table on mobile */
    table {
        font-size: 0.8125rem;
    }

    th,
    td {
        padding: 0.75rem 0.625rem;
    }

    /* Toolbar buttons on mobile */
    .toolbar-btn {
        min-width: 75px;
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        height: 32px;
    }

    /* Filter select on mobile */
    .filter-select {
        min-width: 110px;
        font-size: 0.8125rem;
    }

    /* Form inputs touch-friendly */
    input[type="text"],
    input[type="number"],
    input[type="password"],
    select,
    textarea {
        padding: 0.75rem 1rem;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Modal on mobile */
    .modal-content {
        width: 95%;
        max-height: 85vh;
        margin: 0.75rem;
        border-radius: var(--border-radius-xl);
    }

    /* Headings on mobile */
    h1 {
        font-size: 1.625rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    /* Button adjustments */
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .navbar-brand span:not(.navbar-logo) {
        font-size: 1rem;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
        padding: 0.5rem;
    }

    .toolbar-btn {
        min-width: auto;
        padding: 0.5rem 0.625rem;
    }

    .tab {
        padding: 0.625rem 0.5rem;
        font-size: 0.75rem;
        min-width: 70px;
    }

    .card {
        padding: 1rem;
    }

    .sidebar-link {
        padding: 0.625rem 0.75rem;
    }

    .sidebar-icon {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 1.375rem;
    }

    h2 {
        font-size: 1.125rem;
    }

    .metric-value {
        font-size: 2.25rem;
    }
}

/* =========================================
   Print Styles
   ========================================= */
@media print {

    .navbar,
    .sidebar,
    .theme-toggle,
    .btn,
    .modal {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}