/* ==========================================================================
   Scintilla Cloud -- Design System & Custom Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Color System)
   -------------------------------------------------------------------------- */
:root {
    /* Brand: Teal-Cyan */
    --brand-50: #e6fff7;
    --brand-100: #b3ffea;
    --brand-200: #80ffdd;
    --brand-300: #4dffd0;
    --brand-400: #00d4aa;
    --brand-500: #00b894;
    --brand-600: #009b7d;
    --brand-700: #007d66;
    --brand-800: #00604f;
    --brand-900: #004238;

    /* Surface: Warm dark tones */
    --surface-50: #f5f5f4;
    --surface-100: #e7e5e4;
    --surface-200: #d6d3d1;
    --surface-700: #2a2a2e;
    --surface-800: #1c1c20;
    --surface-900: #141418;
    --surface-950: #0c0c0f;

    /* Accent: Warm amber */
    --accent-400: #fbbf24;
    --accent-500: #f59e0b;
    --accent-600: #d97706;

    /* Semantic */
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Glass */
    --glass-bg: rgba(28, 28, 32, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Sidebar */
    --sidebar-width: 16rem;         /* 256px */
    --sidebar-collapsed-width: 4rem; /* 64px */

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}


/* --------------------------------------------------------------------------
   2. Base / Reset Enhancements
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

::selection {
    background: rgba(0, 212, 170, 0.3);
    color: #fff;
}


/* --------------------------------------------------------------------------
   3. Scrollbar Styling
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    transition: background var(--transition-fast);
}

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

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}


/* --------------------------------------------------------------------------
   4. Glass Card
   -------------------------------------------------------------------------- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    box-shadow: var(--glass-shadow);
}


/* --------------------------------------------------------------------------
   5. Status Pulse Animation
   -------------------------------------------------------------------------- */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--success);
}

.status-dot.offline {
    background: var(--error);
}

.status-pulse {
    position: relative;
}

.status-pulse::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: inherit;
    opacity: 0;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}


/* --------------------------------------------------------------------------
   6. Sidebar
   -------------------------------------------------------------------------- */
#sidebar {
    width: var(--sidebar-width);
    transition: width var(--transition-base);
    overflow: hidden;
}

#sidebar .sidebar-label {
    opacity: 1;
    white-space: nowrap;
    transition: opacity var(--transition-fast);
}

#sidebar .sidebar-section-label {
    opacity: 1;
    transition: opacity var(--transition-fast);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    padding: 0.75rem 0.75rem 0.25rem;
}

/* Collapsed state */
.sidebar-collapsed #sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-collapsed #sidebar .sidebar-label,
.sidebar-collapsed #sidebar .sidebar-section-label,
.sidebar-collapsed #sidebar .sidebar-badge,
.sidebar-collapsed #sidebar .sidebar-user-info,
.sidebar-collapsed #sidebar .sidebar-logo-text {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
}

.sidebar-collapsed #sidebar .sidebar-logo {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar-collapsed #sidebar .sidebar-nav-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar-collapsed #sidebar .sidebar-user-section {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Main content margin transition (only when sidebar exists) */
#main-content {
    transition: margin-left var(--transition-base);
}

body.has-sidebar #main-content {
    margin-left: var(--sidebar-width);
}

body.has-sidebar.sidebar-collapsed #main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Sidebar nav link */
.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
    border-left: 3px solid transparent;
    margin-left: -3px;
}

.sidebar-nav-link:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-link.active {
    color: var(--brand-400);
    background: rgba(0, 212, 170, 0.08);
    border-left-color: var(--brand-400);
}

.sidebar-nav-link .nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Sidebar badge */
.sidebar-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    background: rgba(0, 212, 170, 0.15);
    color: var(--brand-400);
    margin-left: auto;
    min-width: 1.25rem;
    text-align: center;
}


/* --------------------------------------------------------------------------
   7. Sidebar Toggle Button
   -------------------------------------------------------------------------- */
.sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-toggle-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-toggle-btn svg {
    transition: transform var(--transition-base);
}

.sidebar-collapsed .sidebar-toggle-btn svg {
    transform: rotate(180deg);
}


/* --------------------------------------------------------------------------
   8. Mobile Sidebar
   -------------------------------------------------------------------------- */
#sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

#sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        width: var(--sidebar-width) !important;
    }

    #sidebar.mobile-open {
        transform: translateX(0);
    }

    #main-content {
        margin-left: 0 !important;
    }

    .sidebar-collapsed #sidebar .sidebar-label,
    .sidebar-collapsed #sidebar .sidebar-section-label,
    .sidebar-collapsed #sidebar .sidebar-badge,
    .sidebar-collapsed #sidebar .sidebar-user-info,
    .sidebar-collapsed #sidebar .sidebar-logo-text {
        opacity: 1;
        pointer-events: auto;
        width: auto;
    }
}


/* --------------------------------------------------------------------------
   9. GridStack Widget Styling
   -------------------------------------------------------------------------- */
.grid-stack-item-content {
    inset: 6px !important;
    border-radius: 0.75rem;
    overflow: hidden;
}

.grid-stack-placeholder > .placeholder-content {
    border: 2px dashed rgba(0, 212, 170, 0.35) !important;
    border-radius: 0.75rem;
    background: rgba(0, 212, 170, 0.04) !important;
}

.widget-card {
    background: var(--surface-800);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    height: 100%;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.widget-card:hover {
    border-color: rgba(0, 212, 170, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}


/* --------------------------------------------------------------------------
   10. Gauge Widget
   -------------------------------------------------------------------------- */
.gauge-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-value {
    position: absolute;
    font-size: 1.5rem;
    font-weight: 700;
}


/* --------------------------------------------------------------------------
   11. Empty State
   -------------------------------------------------------------------------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.empty-state-icon {
    width: 5rem;
    height: 5rem;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    background: rgba(0, 212, 170, 0.06);
    border: 2px dashed rgba(0, 212, 170, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-400);
    position: relative;
}

.empty-state-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 212, 170, 0.1);
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    max-width: 24rem;
}


/* --------------------------------------------------------------------------
   12. Flash / Toast Notifications
   -------------------------------------------------------------------------- */
#flash-container {
    z-index: 9999;
}

.flash-msg {
    animation: toast-slide-in 0.35s ease-out;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
}

.flash-msg .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: currentColor;
    opacity: 0.4;
    animation: toast-countdown 5s linear forwards;
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(2rem) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toast-countdown {
    from { width: 100%; }
    to { width: 0%; }
}

.flash-msg.toast-exit {
    animation: toast-slide-out 0.3s ease-in forwards;
}

@keyframes toast-slide-out {
    to {
        opacity: 0;
        transform: translateX(2rem) scale(0.95);
    }
}


/* --------------------------------------------------------------------------
   13. Gradient Border Effect
   -------------------------------------------------------------------------- */
.gradient-border {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        var(--brand-400),
        var(--brand-600),
        var(--accent-500),
        var(--brand-400)
    );
    background-size: 300% 300%;
    animation: gradient-rotate 4s ease infinite;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

@keyframes gradient-rotate {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}


/* --------------------------------------------------------------------------
   14. Form Inputs
   -------------------------------------------------------------------------- */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--surface-800);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--brand-400);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.form-input:disabled,
.form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.375rem;
}


/* --------------------------------------------------------------------------
   15. Stat Cards
   -------------------------------------------------------------------------- */
.stat-card {
    background: var(--surface-800);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.stat-card:hover {
    border-color: rgba(0, 212, 170, 0.15);
    transform: translateY(-1px);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.stat-card .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 170, 0.1);
    color: var(--brand-400);
}


/* --------------------------------------------------------------------------
   16. Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.15);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--brand-400);
}

.breadcrumb .breadcrumb-separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}

.breadcrumb .breadcrumb-current {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}


/* --------------------------------------------------------------------------
   17. Tabs
   -------------------------------------------------------------------------- */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tab {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: transparent;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab:hover {
    color: rgba(255, 255, 255, 0.7);
}

.tab.active {
    color: var(--brand-400);
    border-bottom-color: var(--brand-400);
}

.tab-content {
    display: none;
    padding: 1.25rem 0;
}

.tab-content.active {
    display: block;
}


/* --------------------------------------------------------------------------
   18. Modal Dialog
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--surface-800);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 32rem;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(1rem);
    transition: transform var(--transition-base);
    margin: 1rem;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}


/* --------------------------------------------------------------------------
   19. Progress / Loading Bar
   -------------------------------------------------------------------------- */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--brand-400);
    border-radius: 2px;
    transition: width var(--transition-base);
}

.progress-bar-indeterminate .progress-bar-fill {
    width: 30%;
    animation: progress-slide 1.5s ease-in-out infinite;
}

@keyframes progress-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* Top page loading bar */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    background: transparent;
}

.loading-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--brand-400), transparent);
    animation: loading-sweep 1.2s ease-in-out infinite;
}

@keyframes loading-sweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


/* --------------------------------------------------------------------------
   20. Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    line-height: 1.4;
}

.badge-brand {
    background: rgba(0, 212, 170, 0.12);
    color: var(--brand-400);
}

.badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.badge-error {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--info);
}

.badge-neutral {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
}


/* --------------------------------------------------------------------------
   21. Skeleton Loading
   -------------------------------------------------------------------------- */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 0.375rem;
}

.skeleton-text {
    height: 0.875rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-card {
    height: 8rem;
    border-radius: 0.75rem;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* --------------------------------------------------------------------------
   22. Table Styling
   -------------------------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.data-table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
}

.data-table thead th:first-child {
    border-radius: 0.5rem 0 0 0;
}

.data-table thead th:last-child {
    border-radius: 0 0.5rem 0 0;
}

.data-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.75);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

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


/* --------------------------------------------------------------------------
   23. User Dropdown
   -------------------------------------------------------------------------- */
.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 12rem;
    background: var(--surface-800);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    padding: 0.375rem;
    opacity: 0;
    transform: translateY(-0.5rem) scale(0.95);
    pointer-events: none;
    transition: all var(--transition-fast);
    z-index: 100;
}

.user-dropdown.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
}

.user-dropdown .dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.25rem 0;
}


/* --------------------------------------------------------------------------
   24. Connection Status Indicator
   -------------------------------------------------------------------------- */
.connection-indicator {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.connection-indicator .status-dot {
    width: 6px;
    height: 6px;
}


/* --------------------------------------------------------------------------
   25. Avatar
   -------------------------------------------------------------------------- */
.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    flex-shrink: 0;
    background: rgba(0, 212, 170, 0.15);
    color: var(--brand-400);
    text-transform: uppercase;
}

.avatar-sm {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.625rem;
}

.avatar-lg {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
}


/* --------------------------------------------------------------------------
   26. Button Enhancements
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    line-height: 1.4;
}

.btn-brand {
    background: var(--brand-400);
    color: var(--surface-950);
}

.btn-brand:hover {
    background: var(--brand-300);
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.25);
}

.btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}


/* --------------------------------------------------------------------------
   27. Search Input (Navbar)
   -------------------------------------------------------------------------- */
.search-input-wrapper {
    position: relative;
    max-width: 18rem;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.25);
    width: 1rem;
    height: 1rem;
    pointer-events: none;
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.8125rem;
    outline: none;
    transition: all var(--transition-fast);
}

.search-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.search-input-wrapper input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.08);
}


/* --------------------------------------------------------------------------
   28. Hamburger Menu Button
   -------------------------------------------------------------------------- */
.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.375rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.hamburger-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }
}


/* --------------------------------------------------------------------------
   29. Notification Bell
   -------------------------------------------------------------------------- */
.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.375rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.notification-bell:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
}

.notification-bell .notification-dot {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--error);
}


/* --------------------------------------------------------------------------
   30. Utility: Fade Transitions
   -------------------------------------------------------------------------- */
.fade-in {
    animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
