@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap');

/* ==========================================================================
   SableServers Unified Panel - Main Stylesheet
   Design System v2.0 - Based on design-final-floating-pins.html mockup
   Dark theme with indigo accent (#0f766e)
   
   Themes: OLED Black (default), Dark, Light
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
    /* Colors - Neutral dark palette (OLED-compatible, no blue tint) */
    --color-slate-50: #fafafa;
    --color-slate-100: #f4f4f5;
    --color-slate-200: #e4e4e7;
    --color-slate-300: #d4d4d8;
    --color-slate-400: #a1a1aa;
    --color-slate-500: #71717a;
    --color-slate-600: #52525b;
    --color-slate-700: #27272a;
    --color-slate-800: #18181b;
    --color-slate-900: #09090b;
    --color-slate-950: #000000;

    /* Accent - Teal */
    --color-primary: #14b8a6;
    --color-primary-hover: #2dd4bf;
    --color-primary-light: #5eead4;

    /* Status colors (matching mockup) */
    --color-success: #34d399;
    --color-success-light: #6ee7b7;
    --color-warning: #fbbf24;
    --color-warning-light: #fcd34d;
    --color-danger: #f87171;
    --color-danger-light: #fca5a5;
    --color-info: #60a5fa;
    --color-info-light: #93c5fd;

    /* Semantic color aliases (used in views) */
    --accent: var(--color-primary);
    --accent-hover: var(--color-primary-hover);
    --accent-light: var(--color-primary-light);

    /* Default backgrounds — OLED black (overridden by theme classes) */
    --bg-body: #000000;
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #222222;

    /* Default text (overridden by theme classes) */
    --text-primary: #f5f7ff;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    --text-disabled: #3f3f46;

    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.06);

    /* Spacing */
    --sidebar-width: 16rem;
    --sidebar-collapsed-width: 4rem;
    --header-height: 4rem;
    --mobile-nav-height: 4rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;

    /* Border radius */
    --radius: 0.5rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);

    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
}

/* Theme variables are defined in the NEW CUSTOMER LAYOUT section below */

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

html {
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-base, var(--bg-body));
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.25;
}

h1 {
    font-size: 1.875rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.125rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Application Layout
   -------------------------------------------------------------------------- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background-color: var(--color-slate-800);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 50;
    transition: transform var(--transition-normal);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    /* Prevent flex overflow */
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background-color: var(--color-slate-800);
    border-bottom: 1px solid var(--border-color);
}

.app-content {
    flex: 1;
    padding: 1.5rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

/* Mobile: Hide sidebar off-screen, show overlay when open */
@media (max-width: 1023px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: 50;
    }

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

    .sidebar-overlay.sidebar-open {
        display: block;
    }

    .app-content {
        padding: 1rem;
    }
}

/* --------------------------------------------------------------------------
   Layout Utilities
   -------------------------------------------------------------------------- */
.min-h-screen {
    min-height: 100vh;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1 1 0%;
}

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

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

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

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

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --------------------------------------------------------------------------
   Spacing Utilities
   -------------------------------------------------------------------------- */
.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

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

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

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

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

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

.ml-2 {
    margin-left: 0.5rem;
}

.ml-auto {
    margin-left: auto;
}

.mr-2 {
    margin-right: 0.5rem;
}

.space-y-1>*+* {
    margin-top: 0.25rem;
}

.space-y-3>*+* {
    margin-top: 0.75rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   Text Utilities
   -------------------------------------------------------------------------- */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

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

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

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

/* Text colors */
.text-white {
    color: #ffffff;
}

.text-slate-100 {
    color: var(--color-slate-100);
}

.text-slate-300 {
    color: var(--color-slate-300);
}

.text-slate-400 {
    color: var(--color-slate-400);
}

.text-slate-500 {
    color: var(--color-slate-500);
}

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

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

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

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

/* --------------------------------------------------------------------------
   Background Utilities
   -------------------------------------------------------------------------- */
.bg-slate-700 {
    background-color: var(--color-slate-700);
}

.bg-slate-800 {
    background-color: var(--color-slate-800);
}

.bg-slate-900 {
    background-color: var(--color-slate-900);
}

.bg-indigo-600 {
    background-color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Border Utilities
   -------------------------------------------------------------------------- */
.border {
    border-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-r {
    border-right-width: 1px;
}

.border-slate-600 {
    border-color: var(--color-slate-600);
}

.border-slate-700 {
    border-color: var(--color-slate-700);
}

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

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

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

/* --------------------------------------------------------------------------
   Width/Height Utilities
   -------------------------------------------------------------------------- */
.w-full {
    width: 100%;
}

.w-4 {
    width: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.w-8 {
    width: 2rem;
}

.w-12 {
    width: 3rem;
}

.w-64 {
    width: 16rem;
}

.h-4 {
    height: 1rem;
}

.h-5 {
    height: 1.25rem;
}

.h-6 {
    height: 1.5rem;
}

.h-8 {
    height: 2rem;
}

.h-12 {
    height: 3rem;
}

.h-16 {
    height: 4rem;
}

.h-full {
    height: 100%;
}

.max-w-md {
    max-width: 28rem;
}

/* --------------------------------------------------------------------------
   Display Utilities
   -------------------------------------------------------------------------- */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

@media (min-width: 640px) {
    .sm\:block {
        display: block;
    }
}

@media (min-width: 1024px) {
    .lg\:hidden {
        display: none;
    }

    .lg\:flex {
        display: flex;
    }

    .lg\:static {
        position: static;
    }

    .lg\:translate-x-0 {
        transform: translateX(0);
    }

    .lg\:ml-0 {
        margin-left: 0;
    }

    .lg\:p-6 {
        padding: 1.5rem;
    }
}

/* --------------------------------------------------------------------------
   Position Utilities
   -------------------------------------------------------------------------- */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.inset-y-0 {
    top: 0;
    bottom: 0;
}

.top-0 {
    top: 0;
}

.right-0 {
    right: 0;
}

.left-0 {
    left: 0;
}

.z-40 {
    z-index: 40;
}

.z-50 {
    z-index: 50;
}

/* --------------------------------------------------------------------------
   Transform Utilities
   -------------------------------------------------------------------------- */
.transform {
    transform: translateX(0);
}

.-translate-x-full {
    transform: translateX(-100%);
}

.transition-transform {
    transition-property: transform;
}

.duration-200 {
    transition-duration: 200ms;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-primary, #14b8a6);
    color: #ffffff;
    z-index: 1;
    transition: background 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
    background: var(--color-primary-hover, #2dd4bf);
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.4);
    color: #ffffff;
}

/* Prevent global a:hover color override on styled button links */
a.btn:hover,
a.btn-primary:hover,
a.back-btn:hover,
a.upgrade-btn:hover,
a.plan-btn:hover,
a.control-btn:hover {
    color: #ffffff;
}

.btn-primary::before {
    display: none;
}

@keyframes btn-gradient {

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

    33% {
        background-position: 100% 30%;
    }

    66% {
        background-position: 0% 70%;
    }
}

.btn-primary:hover:not(:disabled) {
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.btn-primary:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-secondary {
    background-color: var(--color-slate-700);
    color: var(--color-slate-100);
    border-color: var(--color-slate-600);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--color-slate-600);
}

.btn-danger {
    background-color: var(--color-danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

/* --------------------------------------------------------------------------
   Form Inputs
   -------------------------------------------------------------------------- */
.input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--color-slate-100);
    background-color: var(--color-slate-700);
    border: 1px solid var(--color-slate-600);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input::placeholder {
    color: var(--color-slate-400);
}

.input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

.input-error {
    border-color: var(--color-danger);
}

.input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Global form element defaults (theme-aware inputs/selects/textareas) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    font-family: inherit;
    color: var(--text-primary, #f5f7ff);
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-default, rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-lg, 10px);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
input[type="number"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder {
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.5);
    background: var(--bg-active, rgba(255, 255, 255, 0.06));
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

select option {
    background: #18181b;
    color: #f5f7ff;
}

select optgroup {
    background: #0f0f12;
    color: var(--accent-soft, #14b8a6);
    font-weight: 600;
    font-style: normal;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.25rem;
}

/* Checkbox */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    display: inline-block;
    vertical-align: middle;
    background-color: var(--color-slate-700);
    border: 1px solid var(--color-slate-600);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

input[type="checkbox"]:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 0.75rem 0.75rem;
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
    background-color: var(--color-slate-800);
    border: 1px solid var(--color-slate-700);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card.dropdown-open {
    overflow: visible;
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid var(--color-slate-700);
}

.card-body {
    padding: 1rem;
}

/* --------------------------------------------------------------------------
   Filters
   -------------------------------------------------------------------------- */
.filters-form {
    width: 100%;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filters-row .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.filters-row .form-group-buttons {
    flex: none;
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

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

    .filters-row .form-group {
        min-width: 100%;
    }

    .filters-row .form-group-buttons {
        width: 100%;
    }

    .filters-row .form-group-buttons .btn {
        flex: 1;
    }
}

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
}

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

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

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

.alert-info {
    background-color: rgba(15, 118, 110, 0.1);
    border: 1px solid rgba(15, 118, 110, 0.3);
    color: var(--color-info);
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.badge-default {
    background-color: var(--color-slate-700);
    color: var(--color-slate-300);
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

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

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

/* --------------------------------------------------------------------------
   Navigation Links
   -------------------------------------------------------------------------- */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--color-slate-300);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-slate-100);
    background-color: var(--color-slate-700);
}

.nav-link.active {
    color: white;
    background-color: var(--color-primary);
}

/* Expandable navigation group (native <details>/<summary>) */
.nav-group > summary {
    list-style: none;
}
.nav-group > summary::-webkit-details-marker,
.nav-group > summary::marker {
    display: none;
    content: '';
}
.nav-group-chevron {
    transition: transform var(--transition-fast);
}
.nav-group[open] > summary > .nav-group-chevron {
    transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
}

.divide-y>*+* {
    border-top: 1px solid var(--color-slate-700);
}

/* --------------------------------------------------------------------------
   Notification Badge
   -------------------------------------------------------------------------- */
.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: white;
    background-color: #dc2626;
    border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   Hover States
   -------------------------------------------------------------------------- */
.hover\:bg-slate-700:hover {
    background-color: var(--color-slate-700);
}

.hover\:bg-slate-700\/50:hover {
    background-color: rgba(51, 65, 85, 0.5);
}

.hover\:text-white:hover {
    color: white;
}

.hover\:text-indigo-300:hover {
    color: #a5b4fc;
}

.hover\:text-indigo-400:hover {
    color: var(--color-primary-light);
}

/* --------------------------------------------------------------------------
   Overflow
   -------------------------------------------------------------------------- */
.overflow-y-auto {
    overflow-y: auto;
}

.overflow-hidden {
    overflow: hidden;
}

.max-h-96 {
    max-height: 24rem;
}

/* --------------------------------------------------------------------------
   Shadows
   -------------------------------------------------------------------------- */
.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   Opacity
   -------------------------------------------------------------------------- */
.opacity-70 {
    opacity: 0.7;
}

.hover\:opacity-100:hover {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Focus States
   -------------------------------------------------------------------------- */
.focus\:outline-none:focus {
    outline: none;
}

.focus\:border-indigo-500:focus {
    border-color: var(--color-primary);
}

.focus\:ring-indigo-500:focus {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

/* --------------------------------------------------------------------------
   Responsive Utilities
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    #sidebar.open {
        transform: translateX(0);
    }

    #sidebar-overlay.open {
        display: block;
    }
}

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

/* --------------------------------------------------------------------------
   Page Header
   -------------------------------------------------------------------------- */
/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--accent, #0f766e);
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.back-link:hover {
    color: var(--accent-soft, #14b8a6);
}

.back-link svg,
.back-link .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Inline icon sizing */
.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    vertical-align: middle;
}

.btn .icon {
    width: 16px;
    height: 16px;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    padding: 2rem 2.25rem;
    background: linear-gradient(180deg, #081022, rgba(11, 18, 31, 0.86));
    border: 1px solid rgba(96, 165, 250, 0.14);
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse at 70% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 40%, black 20%, transparent 70%);
    pointer-events: none;
}

.page-header-content h1,
.page-title h1 {
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header-content p,
.page-title p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.page-header-actions,
.page-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

@media (max-width: 640px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem;
    }

    .page-actions {
        justify-content: stretch;
    }

    .page-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   Tables (Enhanced)
   -------------------------------------------------------------------------- */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

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

.table th.text-right,
.table td.text-right {
    text-align: right;
}

.table th.text-center,
.table td.text-center {
    text-align: center;
}

/* Table inside card without padding */
.card-body.p-0 .table th:first-child,
.card-body.p-0 .table td:first-child {
    padding-left: 1.25rem;
}

.card-body.p-0 .table th:last-child,
.card-body.p-0 .table td:last-child {
    padding-right: 1.25rem;
}

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */
.tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.tab {
    flex: 1;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.tab.active {
    color: var(--text-primary);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

/* Underline tabs variant */
.tabs-underline {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    background: transparent;
    padding: 0;
}

.tabs-underline .tab {
    padding: 0.75rem 0;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    flex: none;
}

.tabs-underline .tab.active {
    background: transparent;
    border-bottom-color: var(--accent);
    color: var(--accent);
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 100%;
    max-width: 32rem;
    max-height: calc(100vh - 2rem);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.modal-overlay.open .modal {
    transform: scale(1);
}

.modal-lg {
    max-width: 48rem;
}

.modal-xl {
    max-width: 64rem;
}

/* Fix: When .modal is used as overlay wrapper (contains .modal-content child) */
.modal:has(> .modal-content) {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 0;
    transform: none;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal, 1000);
    padding: 1rem;
}

.modal.hidden:has(> .modal-content) {
    display: none;
}

.modal:has(> .modal-content)>.modal-backdrop,
.modal:has(> .modal-content)>.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: -1;
}

.modal:has(> .modal-content)>.modal-content {
    position: relative;
    width: 100%;
    max-width: 32rem;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.modal-close {
    padding: 0.25rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1 1 auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Dropdown
   -------------------------------------------------------------------------- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 12rem;
    padding: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: all var(--transition-fast);
}

.dropdown.open .dropdown-menu,
.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0.25rem);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font: inherit;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.dropdown-item.danger {
    color: var(--color-danger-light);
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    background: var(--border-color);
}

/* Ensure table action dropdowns are not clipped by parent overflow */
.table td .dropdown .dropdown-menu {
    z-index: var(--z-overlay);
}
.card > .table-responsive {
    overflow: visible;
}
@media (max-width: 768px) {
    .card > .table-responsive {
        overflow-x: auto;
    }
}

/* --------------------------------------------------------------------------
   Tooltips
   -------------------------------------------------------------------------- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    z-index: var(--z-toast);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-fast);
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-0.25rem);
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    color: white;
    background: var(--color-slate-950);
    border-radius: var(--radius-sm);
}

[data-tooltip]::after {
    content: '';
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--color-slate-950);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* --------------------------------------------------------------------------
   Progress Bar
   -------------------------------------------------------------------------- */
.progress {
    height: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

.progress-bar.success {
    background: var(--color-success);
}

.progress-bar.warning {
    background: var(--color-warning);
}

.progress-bar.danger {
    background: var(--color-danger);
}

/* --------------------------------------------------------------------------
   Stats Grid (New Design)
   -------------------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* For 5+ cards, ensure they fit nicely on large screens */
@media (min-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Stats Cards / Widgets
   -------------------------------------------------------------------------- */
.stat-card {
    padding: 1.25rem;
    background: var(--bg-card, var(--bg-primary));
    border: 1px solid var(--border-subtle, var(--border-color));
    border-radius: var(--radius-lg, var(--radius));
    position: relative;
    overflow: hidden;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.stat-card:hover {
    border-color: var(--border-active, var(--accent));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card.highlight {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(139, 92, 246, 0.06));
    border-color: var(--border-active, var(--accent));
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.stat-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.stat-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--accent);
    background: rgba(15, 118, 110, 0.1);
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-card-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.stat-card-change.positive {
    color: var(--color-success);
}

.stat-card-change.negative {
    color: var(--color-danger);
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Stat Trend Badge */
.stat-trend {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-trend.up {
    background: var(--success-bg, rgba(52, 211, 153, 0.12));
    color: var(--success, var(--color-success));
}

.stat-trend.down {
    background: var(--danger-bg, rgba(248, 113, 113, 0.12));
    color: var(--danger, var(--color-danger));
}

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

.empty-state svg {
    width: 3rem;
    height: 3rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.empty-state p {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Loading States
   -------------------------------------------------------------------------- */
.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 1rem;
    height: 1rem;
}

.spinner-lg {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: linear-gradient(90deg,
            var(--bg-secondary) 25%,
            var(--bg-tertiary) 50%,
            var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

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

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

/* --------------------------------------------------------------------------
   Form Groups
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

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

.form-label.required::after {
    content: ' *';
    color: var(--color-danger);
}

.form-text {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-error {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--color-danger-light);
}

/* Form Input - OLED Theme Compatible (used in profile, settings pages) */
.form-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary, #f5f7ff);
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-default, rgba(255, 255, 255, 0.1));
    border-radius: 10px;
    font-family: inherit;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input::placeholder {
    color: var(--text-muted, #52525b);
}

.form-input:hover:not(:focus) {
    border-color: var(--border-highlight, rgba(255, 255, 255, 0.15));
}

.form-input:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.5);
    background: var(--bg-active, rgba(255, 255, 255, 0.06));
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

/* Select specific styling */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Select (legacy class) */
.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5rem;
    padding-right: 2.5rem;
}

/* Textarea */
textarea.input {
    min-height: 6rem;
    resize: vertical;
}

/* Radio buttons */
input[type="radio"] {
    appearance: none;
    width: 1rem;
    height: 1rem;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

input[type="radio"]:checked {
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow: inset 0 0 0 3px var(--bg-primary);
}

input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

/* Toggle/Switch */
.toggle {
    position: relative;
    width: 2.5rem;
    height: 1.5rem;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

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

.toggle.active::after {
    transform: translateX(1rem);
}

/* --------------------------------------------------------------------------
   Content Grid (New Design)
   -------------------------------------------------------------------------- */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
}

.content-grid.full-width {
    grid-template-columns: 1fr;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Sidebar - Stacked panels with gaps */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   Panels (New Design)
   -------------------------------------------------------------------------- */
.panel {
    background: var(--bg-card, var(--bg-primary));
    border: 1px solid var(--border-subtle, var(--border-color));
    border-radius: var(--radius-lg, var(--radius));
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle, var(--border-color));
}

.panel-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.panel-action {
    font-size: 0.8rem;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: none;
    font-family: inherit;
}

.panel-action:hover {
    color: var(--accent-soft, var(--accent-light));
}

.panel-body {
    padding: 1rem 1.25rem;
}

/* --------------------------------------------------------------------------
   Data Table (New Design)
   -------------------------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle, var(--border-color));
}

.data-table td {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-subtle, var(--border-color));
}

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

.data-table tr:hover td {
    background: var(--bg-hover);
}

/* Service Cell */
.service-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-icon-lg {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.service-icon-lg.vps {
    background: rgba(15, 118, 110, 0.15);
    color: var(--accent);
}

.service-icon-lg.game {
    background: var(--success-bg, rgba(52, 211, 153, 0.15));
    color: var(--success, var(--color-success));
}

.service-icon-lg.web {
    background: var(--warning-bg, rgba(251, 191, 36, 0.15));
    color: var(--warning, var(--color-warning));
}

.service-icon-lg.storage {
    background: var(--info-bg, rgba(96, 165, 250, 0.15));
    color: var(--info, var(--color-info));
}

.service-info strong {
    display: block;
    font-weight: 500;
}

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

/* Status Badge (Pill Style) */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status.active,
.status.online,
.status.running {
    background: var(--success-bg, rgba(52, 211, 153, 0.12));
    color: var(--success, var(--color-success));
}

.status.warning {
    background: var(--warning-bg, rgba(251, 191, 36, 0.12));
    color: var(--warning, var(--color-warning));
}

.status.stopped,
.status.offline,
.status.danger {
    background: var(--danger-bg, rgba(248, 113, 113, 0.12));
    color: var(--danger, var(--color-danger));
}

.status.pending,
.status.starting,
.status.restarting,
.status.stopping {
    background: var(--warning-bg, rgba(251, 191, 36, 0.12));
    color: var(--warning, var(--color-warning));
}

.status.installing {
    background: rgba(15, 118, 110, 0.12);
    color: var(--accent, #0f766e);
}

.status.upgrading {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

.status.starting,
.status.restarting,
.status.stopping,
.status.installing,
.status.upgrading {
    animation: status-pulse 1.5s ease-in-out infinite;
}

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

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.running {
    background: rgba(52, 211, 153, 0.15);
    color: var(--success, #34d399);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.2);
}

.status-badge.starting,
.status-badge.restarting,
.status-badge.stopping {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning, #fbbf24);
    animation: status-pulse 1.5s ease-in-out infinite;
}

.status-badge.installing {
    background: rgba(15, 118, 110, 0.15);
    color: var(--accent, #0f766e);
    animation: status-pulse 1.5s ease-in-out infinite;
}

.status-badge.upgrading {
    background: rgba(15, 118, 110, 0.15);
    color: #0f766e;
    animation: status-pulse 1.5s ease-in-out infinite;
}

.status-badge.stopped {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.status-badge.error {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger, #f87171);
}

/* Row Actions */
.row-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 150ms ease;
}

tr:hover .row-actions {
    opacity: 1;
}

.row-action-btn {
    width: 28px;
    height: 28px;
    background: var(--bg-hover);
    border: 1px solid var(--border-subtle, var(--border-color));
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 150ms ease;
}

.row-action-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-default, var(--border-color));
}

.row-action-btn.pin:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Activity Feed
   -------------------------------------------------------------------------- */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-subtle, var(--border-color));
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 0.375rem;
    flex-shrink: 0;
}

.activity-dot.success {
    background: var(--success, var(--color-success));
}

.activity-dot.warning {
    background: var(--warning, var(--color-warning));
}

.activity-dot.danger {
    background: var(--danger, var(--color-danger));
}

.activity-dot.info {
    background: var(--info, var(--color-info));
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

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

/* --------------------------------------------------------------------------
   Quick Actions Grid
   -------------------------------------------------------------------------- */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-subtle, var(--border-color));
    border-radius: var(--radius-md, var(--radius));
    color: var(--text-primary);
    cursor: pointer;
    transition: all 150ms ease;
    text-decoration: none;
}

.quick-action:hover {
    background: var(--bg-active);
    border-color: var(--border-active, var(--accent));
}

.quick-action-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-active, rgba(15, 118, 110, 0.12));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.quick-action-text {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
}

.quick-action-shortcut {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* --------------------------------------------------------------------------
   Service Cards (Grid View)
   -------------------------------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: var(--bg-card, var(--bg-primary));
    border: 1px solid var(--border-subtle, var(--border-color));
    border-radius: var(--radius-lg, var(--radius));
    padding: 1.25rem;
    cursor: pointer;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    border-color: var(--border-active, var(--accent));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.service-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.service-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.service-card-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border-subtle, var(--border-color));
}

.service-card-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.service-card-stat-value {
    font-size: 0.875rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Filter Tabs
   -------------------------------------------------------------------------- */
.filter-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    background: var(--bg-card, var(--bg-secondary));
    border-radius: var(--radius-md, var(--radius));
    border: 1px solid var(--border-subtle, var(--border-color));
    width: fit-content;
}

.filter-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 150ms ease;
}

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

.filter-tab.active {
    background: var(--accent);
    color: white;
}

/* --------------------------------------------------------------------------
   Billing Summary
   -------------------------------------------------------------------------- */
.billing-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .billing-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .billing-summary {
        grid-template-columns: 1fr;
    }
}

.summary-card {
    background: var(--bg-card, var(--bg-primary));
    border: 1px solid var(--border-subtle, var(--border-color));
    border-radius: var(--radius-lg, var(--radius));
    padding: 1.25rem;
}

.summary-card.highlight {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.05));
    border-color: rgba(251, 191, 36, 0.3);
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Tickets
   -------------------------------------------------------------------------- */
.ticket-item {
    display: flex;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle, var(--border-color));
    cursor: pointer;
    transition: background 150ms ease;
}

.ticket-item:last-child {
    border-bottom: none;
}

.ticket-item:hover {
    background: var(--bg-hover);
}

.ticket-priority {
    width: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.ticket-priority.high {
    background: var(--danger, var(--color-danger));
}

.ticket-priority.medium {
    background: var(--warning, var(--color-warning));
}

.ticket-priority.low {
    background: var(--success, var(--color-success));
}

.ticket-content {
    flex: 1;
}

.ticket-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.ticket-title {
    font-size: 0.9rem;
    font-weight: 500;
}

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

.ticket-excerpt {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

.ticket-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Resource Bars (VPS Stats)
   -------------------------------------------------------------------------- */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .resource-grid {
        grid-template-columns: 1fr;
    }
}

.resource-card {
    background: var(--bg-card, var(--bg-primary));
    border: 1px solid var(--border-subtle, var(--border-color));
    border-radius: var(--radius-lg, var(--radius));
    padding: 1.25rem;
}

.resource-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.resource-card-header h4 {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.resource-card-header span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.resource-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.resource-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.resource-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.resource-bar-fill.low {
    background: var(--success, var(--color-success));
}

.resource-bar-fill.medium {
    background: var(--warning, var(--color-warning));
}

.resource-bar-fill.high {
    background: var(--danger, var(--color-danger));
}

/* --------------------------------------------------------------------------
   Console Panel
   -------------------------------------------------------------------------- */
.console-panel {
    background: #0d0d0d;
    border: 1px solid var(--border-subtle, var(--border-color));
    border-radius: var(--radius-lg, var(--radius));
    overflow: hidden;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-subtle, var(--border-color));
}

.console-header h4 {
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.console-header .live-dot {
    width: 8px;
    height: 8px;
    background: var(--success, var(--color-success));
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.console-actions {
    display: flex;
    gap: 0.5rem;
}

.console-body {
    padding: 1rem;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #a0a0a0;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.console-line {
    margin-bottom: 0.25rem;
}

.console-line .timestamp {
    color: var(--text-muted);
}

.console-line .success {
    color: var(--success, var(--color-success));
}

.console-line .warning {
    color: var(--warning, var(--color-warning));
}

.console-line .error {
    color: var(--danger, var(--color-danger));
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--border-active, rgba(15, 118, 110, 0.4));
}

/* --------------------------------------------------------------------------
   Code & Pre
   -------------------------------------------------------------------------- */
code {
    padding: 0.125rem 0.375rem;
    font-family: 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.8125em;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--accent-light);
}

pre {
    margin: 0;
    padding: 1rem;
    font-family: 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow-x: auto;
}

pre code {
    padding: 0;
    background: none;
    border-radius: 0;
}

/* --------------------------------------------------------------------------
   Avatars
   -------------------------------------------------------------------------- */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    background: var(--accent);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.25rem;
}

.avatar-group {
    display: flex;
}

.avatar-group .avatar {
    margin-left: -0.5rem;
    border: 2px solid var(--bg-primary);
}

.avatar-group .avatar:first-child {
    margin-left: 0;
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
    position: fixed;
    top: 4.5rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: var(--z-toast);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    min-width: 20rem;
    max-width: 28rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

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

.toast-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.toast-message {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.toast-close {
    padding: 0.25rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.toast-close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.toast.success .toast-icon {
    color: var(--color-success);
}

.toast.error .toast-icon {
    color: var(--color-danger);
}

.toast.warning .toast-icon {
    color: var(--color-warning);
}

.toast.info .toast-icon {
    color: var(--color-info);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-item:hover:not(.disabled):not(.active) {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.pagination-item.active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.breadcrumb a {
    color: var(--accent);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    color: var(--text-muted);
}

.breadcrumb span:last-child {
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Button Variants & Sizes
   -------------------------------------------------------------------------- */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

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

.btn-icon {
    padding: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
}

.btn-icon.btn-sm {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0.25rem;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-outline:hover:not(:disabled) {
    background: var(--accent);
    color: white;
}

.btn-success {
    background: var(--color-success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
}

.btn-warning {
    background: var(--color-warning);
    color: #1a1a1a;
}

.btn-warning:hover:not(:disabled) {
    background: #d97706;
}

/* Button with icon */
.btn svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.375rem;
}

.btn-icon svg {
    margin: 0;
}

/* Button group */
.btn-group {
    display: inline-flex;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.btn-group .btn:not(:first-child) {
    margin-left: -1px;
}

/* --------------------------------------------------------------------------
   Card Variants
   -------------------------------------------------------------------------- */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    margin: 0;
    font-size: 1rem;
}

.card-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.card-clickable {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.card-clickable:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   Status Indicators
   -------------------------------------------------------------------------- */
.status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--text-muted);
}

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

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

.status-dot.warning,
.status-dot.pending {
    background: var(--color-warning);
}

.status-dot.info,
.status-dot.running {
    background: var(--color-info);
}

/* Pulsing animation for active states */
.status-dot.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* --------------------------------------------------------------------------
   Console / Terminal
   -------------------------------------------------------------------------- */
.console {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    background: #0d1117;
    color: #c9d1d9;
    padding: 1rem;
    border-radius: var(--radius);
    overflow: auto;
    max-height: 24rem;
}

.console-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #161b22;
    border-top: 1px solid var(--border-color);
}

.console-prompt {
    color: var(--color-success);
    font-weight: 600;
}

.console-input input {
    flex: 1;
    background: none;
    border: none;
    color: #c9d1d9;
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* --------------------------------------------------------------------------
   Mobile Navigation
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--mobile-nav-height);
        background: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        display: flex;
        z-index: var(--z-sticky);
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        padding: 0.5rem;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.625rem;
        transition: color var(--transition-fast);
    }

    .mobile-nav-item svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    .mobile-nav-item.active {
        color: var(--accent);
    }

    .mobile-nav-item:hover {
        color: var(--text-primary);
    }

    /* Add padding to main content for mobile nav */
    main {
        padding-bottom: calc(var(--mobile-nav-height) + 1rem);
    }
}

/* --------------------------------------------------------------------------
   Utility Classes (Additional)
   -------------------------------------------------------------------------- */
.text-muted {
    color: var(--text-muted);
}

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

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

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

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

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

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

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

.bg-success {
    background-color: var(--color-success);
}

.bg-warning {
    background-color: var(--color-warning);
}

.bg-danger {
    background-color: var(--color-danger);
}

.bg-info {
    background-color: var(--color-info);
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.select-none {
    user-select: none;
}

.pointer-events-none {
    pointer-events: none;
}

.transition-all {
    transition: all var(--transition-normal);
}

.transition-colors {
    transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

/* Flex utilities */
.flex-wrap {
    flex-wrap: wrap;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.flex-grow {
    flex-grow: 1;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-end {
    justify-content: flex-end;
}

.justify-start {
    justify-content: flex-start;
}

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

/* Gap utilities */
.gap-1 {
    gap: 0.25rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-8 {
    gap: 2rem;
}

/* Margin utilities */
.m-0 {
    margin: 0;
}

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

.my-4 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.mt-0 {
    margin-top: 0;
}

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

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

.mb-0 {
    margin-bottom: 0;
}

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

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

.ml-1 {
    margin-left: 0.25rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

/* Padding utilities */
.p-0 {
    padding: 0;
}

.p-1 {
    padding: 0.25rem;
}

.p-5 {
    padding: 1.25rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Border utilities */
.border-none {
    border: none;
}

.border-l {
    border-left-width: 1px;
}

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

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

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

/* Width/Height */
.w-auto {
    width: auto;
}

.w-10 {
    width: 2.5rem;
}

.w-16 {
    width: 4rem;
}

.w-20 {
    width: 5rem;
}

.w-24 {
    width: 6rem;
}

.w-32 {
    width: 8rem;
}

.w-48 {
    width: 12rem;
}

.min-w-0 {
    min-width: 0;
}

.max-w-sm {
    max-width: 24rem;
}

.max-w-lg {
    max-width: 32rem;
}

.max-w-xl {
    max-width: 36rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-full {
    max-width: 100%;
}

.h-auto {
    height: auto;
}

.h-10 {
    height: 2.5rem;
}

.h-screen {
    height: 100vh;
}

.min-h-0 {
    min-height: 0;
}

/* Overflow */
.overflow-x-auto {
    overflow-x: auto;
}

.overflow-auto {
    overflow: auto;
}

/* Visibility */
.invisible {
    visibility: hidden;
}

.visible {
    visibility: visible;
}

/* Object fit */
.object-cover {
    object-fit: cover;
}

.object-contain {
    object-fit: contain;
}

/* ==========================================================================
   NEW CUSTOMER LAYOUT - Floating Header Design
   ========================================================================== */

/* --------------------------------------------------------------------------
   Theme Variables (OLED + Dark + Light)
   -------------------------------------------------------------------------- */
.theme-oled {
    --bg-base: #000000;
    --bg-elevated: #0a0a0a;
    --bg-card: rgba(18, 18, 18, 0.95);
    --bg-card-solid: #121212;
    --bg-hover: rgba(255, 255, 255, 0.04);
    --bg-active: rgba(15, 118, 110, 0.12);
    --bg-overlay: rgba(0, 0, 0, 0.8);

    --text-primary: #f5f7ff;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-active: rgba(15, 118, 110, 0.4);
    --border-highlight: rgba(255, 255, 255, 0.12);

    --accent: #14b8a6;
    --accent-hover: #2dd4bf;
    --accent-soft: #5eead4;
    --accent-glow: rgba(20, 184, 166, 0.3);
    --accent-gradient: linear-gradient(135deg, #0f766e, #8b5cf6);

    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.12);
    --info: #60a5fa;
    --info-bg: rgba(96, 165, 250, 0.12);

    --blur-amount: 24px;
    --radius-xl: 18px;
    --shadow-glow: 0 0 30px var(--accent-glow);
}

.theme-dark {
    --bg-base: #04050a;
    --bg-elevated: #0c111b;
    --bg-card: rgba(18, 24, 38, 0.9);
    --bg-card-solid: #121a28;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-default: rgba(255, 255, 255, 0.12);
}

.theme-light {
    --bg-base: #f8fafc;
    --bg-body: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-solid: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-hover: rgba(0, 0, 0, 0.04);
    --bg-active: rgba(15, 118, 110, 0.08);
    --bg-overlay: rgba(255, 255, 255, 0.9);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-disabled: #cbd5e1;

    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-default: rgba(0, 0, 0, 0.1);
    --border-color: rgba(0, 0, 0, 0.1);
    --border-light: rgba(0, 0, 0, 0.06);
    --border-highlight: rgba(0, 0, 0, 0.08);
    --border-active: rgba(15, 118, 110, 0.4);

    /* Override slate palette for light */
    --color-slate-600: #94a3b8;
    --color-slate-700: #e2e8f0;
    --color-slate-800: #ffffff;
    --color-slate-900: #f8fafc;
    --color-slate-950: #f1f5f9;

    --accent-glow: rgba(15, 118, 110, 0.15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------------------------------
   Body Base Styles for New Theme
   -------------------------------------------------------------------------- */
body.theme-oled,
body.theme-dark,
body.theme-light {
    background: var(--bg-base);
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Ambient Background Effect
   -------------------------------------------------------------------------- */
.bg-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(15, 118, 110, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(139, 92, 246, 0.06), transparent);
}

.theme-light .bg-ambient {
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(15, 118, 110, 0.05), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(139, 92, 246, 0.03), transparent);
}

/* --------------------------------------------------------------------------
   Floating Header (Desktop)
   -------------------------------------------------------------------------- */
.floating-header {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-xl);
    height: 56px;
    overflow: visible;
}

.floating-header.admin-header .header-nav {
    overflow: visible;
}


/* Backdrop layer — isolated in ::after to prevent Chromium backdrop-filter
   child-clipping bug (crbug.com/986206). Children can now overflow freely. */
.floating-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--border-default);
    border-radius: inherit;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    z-index: -1;
    pointer-events: none;
}

.floating-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    border-radius: 1px;
    pointer-events: none;
    z-index: 0;
}

/* Header Brand/Logo */

/* Fade-in animation for hero section (prevents logo flash) */
.page-header-hero,
.svc-hero,
.svc-grid {
    opacity: 0;
    animation: hero-fade-in 0.5s ease 0s forwards;
}

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

    to {
        opacity: 1;
    }
}

/* Hero image inside page-header-hero (store pages, etc.)
   Must live here so opacity is applied before the fade-in animation
   begins, preventing a full-brightness flash of the logo. */
.hero-image {
    position: relative;
    z-index: 1;
    padding-right: 2rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.hero-image img {
    height: 120px;
    width: auto;
    object-fit: contain;
    opacity: 0.35;
    filter: drop-shadow(0 0 20px rgba(15, 118, 110, 0.3));
    mix-blend-mode: screen;
}

@media (max-width: 768px) {
    .hero-image {
        display: none;
    }
}

/* Back to Store button — used on all store category pages */
.back-to-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(15, 118, 110, 0.1);
    border: 1px solid rgba(15, 118, 110, 0.3);
    border-radius: 12px;
    color: var(--text-primary, #fff);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.1);
}

.back-to-store-btn:hover {
    background: rgba(15, 118, 110, 0.15);
    border-color: var(--accent, #0f766e);
    box-shadow: 0 4px 16px rgba(15, 118, 110, 0.2);
}

.back-to-store-btn svg {
}

.back-to-store-btn:hover svg {
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0 1.25rem;
    height: 100%;
    border-right: 1px solid var(--border-subtle);
    flex-shrink: 0;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.header-brand .logo,
.logo {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 1px 4px rgba(15, 118, 110, 0.4));
}

.brand-text {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* Header Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 0.5rem;
    height: 100%;
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 200px);
    overflow-x: visible;
    overflow-y: visible;
    position: relative;
    z-index: 1;
    margin-right: 8px;
}

.header-nav .nav-item {
    position: relative;
    height: 38px;
    padding: 0 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.header-nav .nav-item:hover {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.header-nav .nav-item.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    font-weight: 600;
}

/* Header Divider */
.header-divider {
    width: 1px;
    height: 24px;
    background: var(--border-subtle);
    margin: 0 0.5rem;
    flex-shrink: 0;
}

/* Inline divider for pinned section */
.header-divider-inline {
    width: 1px;
    height: 20px;
    background: var(--border-subtle);
    margin: 0 0.5rem;
    flex-shrink: 0;
}

/* Pinned Services Section */
.pinned-section {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 0.5rem;
    height: 100%;
    min-width: 0;
}

.pinned-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    opacity: 0.6;
    flex-shrink: 0;
}

.pinned-services {
    display: flex;
    gap: 8px;
    overflow: visible;
    padding: 2px 0;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
}

.pinned-empty {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* Pinned overflow button - shows "+X more" when there are hidden pins */
.pinned-overflow-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(15, 118, 110, 0.15);
    border: 1px solid rgba(15, 118, 110, 0.3);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.pinned-overflow-btn:hover {
    background: rgba(15, 118, 110, 0.25);
    border-color: var(--accent);
}

.pinned-overflow-btn svg {
    width: 12px;
    height: 12px;
}

/* Pinned overflow dropdown */
.pinned-overflow-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 240px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg, 14px);
    box-shadow: var(--shadow-lg);
    z-index: 250;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    max-height: 400px;
    overflow-y: auto;
}

.pinned-overflow-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.pinned-overflow-dropdown .pinned-service {
    margin: 0.5rem;
    width: calc(100% - 1rem);
}

@media (max-width: 1400px) {
    .pinned-services {
        max-width: 350px;
    }
}

.pinned-service {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    text-decoration: none;
}

.pinned-service:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.pinned-service.dragging {
    opacity: 0.95;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent);
    transform: scale(1.05);
}

.pinned-service .service-icon {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
}

.pinned-service .service-icon.vps {
    background: rgba(15, 118, 110, 0.25);
    color: #14b8a6;
}

.pinned-service .service-icon.game {
    background: rgba(52, 211, 153, 0.25);
    color: #6ee7b7;
}

.pinned-service .service-icon.web {
    background: rgba(251, 191, 36, 0.25);
    color: #fcd34d;
}

.pinned-service .service-icon.storage {
    background: rgba(96, 165, 250, 0.25);
    color: #93c5fd;
}

.pinned-service .service-icon.network {
    background: rgba(45, 212, 191, 0.25);
    color: #5eead4;
}

.pinned-service .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pinned-service .status-dot.active {
    background: #34d399;
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
}

.pinned-service .status-dot.warning {
    background: #fbbf24;
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}

.pinned-service .status-dot.danger,
.pinned-service .status-dot.stopped {
    background: #f87171;
    box-shadow: 0 0 6px rgba(248, 113, 113, 0.5);
}

.pinned-service .pin-number {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    background: var(--accent);
    border-radius: 50%;
    font-size: 0.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: scale(0.8);
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--bg-card-solid);
}

.pinned-service:hover .pin-number {
    opacity: 1;
    transform: scale(1);
}

.pin-edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-muted);
    margin-left: 4px;
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.pin-edit-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(15, 118, 110, 0.1);
}

.pin-edit-btn svg {
    width: 14px;
    height: 14px;
}

/* Pin Dropdown */
.pin-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 300px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg, 14px);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.pin-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.pin-dropdown-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pin-dropdown-header .pin-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

.pin-dropdown-list {
    max-height: 300px;
    overflow-y: auto;
}

.pin-dropdown-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.pin-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 150ms ease;
}

.pin-dropdown-item:hover {
    background: var(--bg-hover);
}

.pin-dropdown-item.pinned {
    background: var(--bg-active);
}

.pin-dropdown-item .service-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.pin-dropdown-item .service-info {
    flex: 1;
    min-width: 0;
}

.pin-dropdown-item .service-name {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pin-dropdown-item .service-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.pin-dropdown-item .check {
    width: 18px;
    color: var(--accent);
    font-size: 0.9rem;
    text-align: center;
}

.pin-dropdown-item .check.hidden {
    opacity: 0;
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 0 1rem;
    height: 100%;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Command Palette Trigger */
.command-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.command-trigger:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.command-trigger .search-icon {
    opacity: 0.5;
}

.command-trigger .search-text {
    color: var(--text-muted);
}

.command-trigger kbd {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* Header Icon Button */
.header-icon-btn {
    position: relative;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-icon-btn:hover {
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.header-icon-btn .badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #dc2626;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card-solid);
    color: white;
    z-index: 1;
}

/* Notification bell glow when there are unread notifications */
.header-icon-btn.has-notifications {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.25);
    color: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.15);
    animation: notifPulse 2s ease-in-out infinite;
}

.header-icon-btn.has-notifications:hover {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    box-shadow: 0 0 14px rgba(248, 113, 113, 0.25);
}

@keyframes notifPulse {
    0%, 100% {
        color: #f87171;
        box-shadow: 0 0 8px rgba(248, 113, 113, 0.15);
    }
    50% {
        color: #fca5a5;
        box-shadow: 0 0 14px rgba(248, 113, 113, 0.25);
    }
}

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

.mobile-header-btn.has-notifications {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.25);
    color: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.15);
    animation: notifPulse 2s ease-in-out infinite;
    border-radius: 8px;
}

.mobile-header-btn.has-notifications:hover {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
    box-shadow: 0 0 14px rgba(248, 113, 113, 0.25);
}

/* Header Avatar */
.header-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #0d6b63 0%, #0f766e 50%, #14b8a6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(15, 118, 110, 0.5), 0 0 4px rgba(15, 118, 110, 0.3);
    color: white;
    border: 2px solid rgba(129, 140, 248, 0.35);
}

.header-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 0 18px rgba(15, 118, 110, 0.65), 0 0 6px rgba(15, 118, 110, 0.4);
    border-color: rgba(129, 140, 248, 0.5);
}

.dropdown-avatar {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: linear-gradient(135deg, #0d6b63 0%, #0f766e 50%, #14b8a6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Mobile Header
   -------------------------------------------------------------------------- */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0));
    align-items: center;
    justify-content: space-between;
}

.mobile-header-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-header-brand .logo {
    width: 28px;
    height: 28px;
}

.mobile-header-brand .logo img {
    width: 28px;
    height: 28px;
}

.mobile-header-brand span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-header-actions {
    display: flex;
    gap: 0.5rem;
}

.mobile-header-btn {
    position: relative;
    width: 36px;
    height: 36px;
    background: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-header-btn:hover {
    background: var(--bg-active);
    color: var(--text-primary);
}

.mobile-notification-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #dc2626;
    border-radius: 8px;
    font-size: 0.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid var(--bg-card);
}

/* --------------------------------------------------------------------------
   Mobile Bottom Navigation
   -------------------------------------------------------------------------- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-top: 1px solid var(--border-subtle);
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0));
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.mobile-nav-item.active {
    color: var(--accent);
}

.mobile-nav-item:hover {
    color: var(--text-secondary);
}

.mobile-nav-item svg {
    width: 22px;
    height: 22px;
}

/* --------------------------------------------------------------------------
   Main Content Area (Customer Layout)
   -------------------------------------------------------------------------- */
.main-content {
    position: relative;
    z-index: 1;
    padding: calc(56px + 2rem) 2rem 3rem;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Flash Messages (Enhanced)
   -------------------------------------------------------------------------- */
.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
}

.alert-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert span {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0;
    transition: opacity 150ms ease;
}

.alert-close:hover {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Profile Dropdown
   -------------------------------------------------------------------------- */
.profile-dropdown {
    position: fixed;
    top: calc(56px + 1.25rem);
    right: 0.75rem;
    width: 280px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-dropdown-avatar {
    width: 56px;
    height: 56px;
    /* Match the top-right .header-avatar teal gradient for a consistent
       identity when the dropdown opens. */
    background: linear-gradient(135deg, #0d6b63 0%, #0f766e 50%, #14b8a6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.2);
}

.profile-dropdown-info {
    flex: 1;
    min-width: 0;
}

.profile-dropdown-info strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown-info span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown-body {
    padding: 0.5rem;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.profile-dropdown-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.profile-dropdown-item svg {
    opacity: 0.7;
}

.profile-dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    background: var(--border-subtle);
}

.profile-dropdown-admin {
    color: var(--accent);
}

.profile-dropdown-danger {
    color: var(--danger);
}

.profile-dropdown-danger:hover {
    background: var(--danger-bg);
}

.profile-dropdown-logout {
    margin: 0;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Notifications Dropdown
   -------------------------------------------------------------------------- */
.notifications-dropdown {
    position: fixed;
    top: calc(56px + 1.25rem);
    right: 3.5rem;
    width: 360px;
    max-height: 480px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.notifications-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notifications-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.notifications-dropdown-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.notifications-mark-read {
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffffff;
    background: #0f766e;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
    white-space: nowrap;
}

.notifications-mark-read:hover {
    background: #0d6b63;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.4);
    transform: translateY(-1px);
}

.notifications-dropdown-body {
    flex: 1;
    overflow-y: auto;
    max-height: 340px;
}

.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.notifications-empty svg {
    opacity: 0.4;
    margin-bottom: 0.75rem;
}

.notifications-empty p {
    margin: 0;
    font-size: 0.875rem;
}

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background 150ms ease;
    text-decoration: none;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: rgba(15, 118, 110, 0.08);
    border-left: 3px solid #0f766e;
    box-shadow: inset 0 0 20px rgba(15, 118, 110, 0.08), 0 0 8px rgba(15, 118, 110, 0.1);
}
.notification-item.unread:hover {
    background: rgba(15, 118, 110, 0.13);
    box-shadow: inset 0 0 24px rgba(15, 118, 110, 0.1), 0 0 12px rgba(15, 118, 110, 0.15);
}

.notification-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.info {
    background: var(--info-bg);
    color: var(--info);
}

.notification-icon.success {
    background: var(--success-bg);
    color: var(--success);
}

.notification-icon.warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.notification-icon.danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.15rem;
    line-height: 1.3;
}

.notification-content p {
    margin: 0 0 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.notifications-dropdown-footer {
    display: block;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--accent);
    border-top: 1px solid var(--border-subtle);
    text-decoration: none;
}

.notifications-dropdown-footer:hover {
    background: var(--bg-hover);
}

/* --------------------------------------------------------------------------
   Command Palette Modal
   -------------------------------------------------------------------------- */
#command-modal {
    padding-top: 15vh;
    align-items: flex-start;
}

.command-palette {
    width: 100%;
    max-width: 600px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: translateY(-20px) scale(0.98);
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

#command-modal.open .command-palette,
.modal-overlay.active .command-palette {
    transform: translateY(0) scale(1);
}

.command-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.command-search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.command-search input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.command-search input::placeholder {
    color: var(--text-muted);
}

.command-search kbd {
    padding: 0.25rem 0.5rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.command-results {
    max-height: 400px;
    overflow-y: auto;
}

.command-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.command-footer-hints {
    display: flex;
    gap: 1rem;
}

.command-footer-hint {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.command-footer-hint kbd {
    padding: 0.125rem 0.375rem;
    background: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* Command Palette Search Results */
.cmd-group {
    padding: 0.5rem 0;
}

.cmd-group+.cmd-group {
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
}

.cmd-group-label {
    padding: 0.375rem 1.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.cmd-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    color: var(--text-primary, #fff);
    text-decoration: none;
    cursor: pointer;
    transition: background 100ms ease;
}

.cmd-item:hover,
.cmd-item.active {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
}

.cmd-item.active {
    background: var(--bg-active, rgba(255, 255, 255, 0.06));
}

.cmd-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: var(--radius-sm, 0.25rem);
    background: rgba(15, 118, 110, 0.12);
    color: var(--color-primary-light, #14b8a6);
}

.cmd-icon svg {
    width: 16px;
    height: 16px;
}

.cmd-item-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cmd-label {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmd-sublabel {
    font-size: 0.75rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmd-badge {
    flex-shrink: 0;
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: var(--radius-full, 9999px);
    background: rgba(15, 118, 110, 0.15);
    color: var(--color-primary-light, #14b8a6);
}

.cmd-status {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.cmd-status-running,
.cmd-status-active {
    background: var(--color-success, #34d399);
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.4);
}

.cmd-status-stopped,
.cmd-status-offline {
    background: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.cmd-status-suspended {
    background: var(--color-warning, #fbbf24);
}

.cmd-status-error {
    background: var(--color-danger, #f87171);
}

.cmd-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Auth Layout (Legacy)
   -------------------------------------------------------------------------- */
.auth-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* --------------------------------------------------------------------------
   Auth Pages (New Design - OLED Theme)
   -------------------------------------------------------------------------- */

/* Auth Body - OLED black background */
.auth-body {
    margin: 0;
    min-height: 100vh;
    background: #000000;
    color: #f5f7ff;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ambient Background Glow */
.bg-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(15, 118, 110, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(139, 92, 246, 0.06), transparent);
}

/* Auth Container */
.auth-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Auth Card */
.auth-card {
    width: 100%;
    max-width: 400px;
    background: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 2rem;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    backdrop-filter: blur(24px);
}

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

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    width: 48px;
    height: 48px;
    background: #0f766e;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(15, 118, 110, 0.3);
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f5f7ff;
    margin: 0 0 0.375rem 0;
    letter-spacing: -0.02em;
}

.auth-header p {
    font-size: 0.9rem;
    color: #a1a1aa;
    margin: 0;
}

/* Auth Alerts */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.auth-alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-alert span {
    flex: 1;
    line-height: 1.4;
}

.auth-alert-success {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #34d399;
}

.auth-alert-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.auth-alert-warning {
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.auth-alert-info {
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #60a5fa;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #a1a1aa;
    margin-bottom: 0.5rem;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #f5f7ff;
    font-family: inherit;
    font-size: 0.9375rem;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form input::placeholder {
    color: #52525b;
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.5);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.auth-form input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Form Row (Remember Me + Forgot Password) */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #a1a1aa;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    width: 1rem;
    height: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    cursor: pointer;
    transition: all 150ms ease;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked {
    background: #0f766e;
    border-color: #0f766e;
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

.checkbox-label span {
    user-select: none;
}

/* Auth Links */
.auth-link {
    font-size: 0.875rem;
    color: #14b8a6;
    text-decoration: none;
    transition: color 150ms ease;
}

.auth-link:hover {
    color: #a5b4fc;
}

/* Primary Button - Full Width */
.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Auth Primary Button Override */
.auth-form .btn-primary {
    background: #0f766e;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 0 20px rgba(15, 118, 110, 0.25);
}

.auth-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 30px rgba(15, 118, 110, 0.4);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

.auth-form .btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.3), 0 6px 30px rgba(15, 118, 110, 0.4);
}

/* Auth Footer (inside card) */
.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    font-size: 0.875rem;
    color: #a1a1aa;
}

.auth-footer a {
    color: #14b8a6;
    text-decoration: none;
    font-weight: 500;
    transition: color 150ms ease;
}

.auth-footer a:hover {
    color: #a5b4fc;
}

/* Auth Copyright (below card) */
.auth-copyright {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #52525b;
    text-align: center;
}

/* Auth Page Responsive */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
        border-radius: 14px;
    }

    .auth-logo {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
    }

    .auth-header h1 {
        font-size: 1.25rem;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* --------------------------------------------------------------------------
   App Footer (Admin Layout)
   -------------------------------------------------------------------------- */
.app-footer {
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* --------------------------------------------------------------------------
   Responsive: Mobile Layout
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {

    /* Show mobile nav and header */
    .mobile-nav {
        display: block;
    }

    .mobile-header {
        display: flex;
    }

    /* Hide desktop floating header */
    .floating-header {
        display: none;
    }

    /* Adjust main content padding */
    .main-content {
        padding-top: 70px;
        padding-bottom: 100px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Dropdowns take full width on mobile */
    .profile-dropdown,
    .notifications-dropdown {
        top: auto;
        bottom: calc(70px + env(safe-area-inset-bottom, 0));
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
    }

    .profile-dropdown {
        max-height: 60vh;
    }

    .notifications-dropdown {
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .command-trigger {
        display: none;
    }
}

/* ==========================================================================
   ADDITIONAL STYLES - Services, Billing, Tickets Views
   ========================================================================== */

/* --------------------------------------------------------------------------
   Stats Grid Variations
   -------------------------------------------------------------------------- */
.stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {

    .stats-grid,
    .stats-grid-3,
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Stat icon base styles */
.stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Stat icon color variants */
.stat-icon-primary {
    background: var(--accent-bg, rgba(15, 118, 110, 0.12));
    color: var(--accent, #14b8a6);
}

.stat-icon-success {
    background: var(--success-bg, rgba(52, 211, 153, 0.12));
    color: var(--success, #34d399);
}

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

.stat-icon-danger {
    background: var(--danger-bg, rgba(248, 113, 113, 0.12));
    color: var(--danger, #f87171);
}

.stat-icon-info {
    background: var(--info-bg, rgba(96, 165, 250, 0.12));
    color: var(--info, #60a5fa);
}

.stat-icon-secondary {
    background: var(--secondary-bg, rgba(161, 161, 170, 0.12));
    color: var(--secondary, #a1a1aa);
}

/* Legacy class names for backward compatibility */
.stat-icon.success {
    background: var(--success-bg, rgba(52, 211, 153, 0.12));
    color: var(--success, #34d399);
}

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

.stat-icon.danger {
    background: var(--danger-bg, rgba(248, 113, 113, 0.12));
    color: var(--danger, #f87171);
}

.stat-icon.info {
    background: var(--info-bg, rgba(96, 165, 250, 0.12));
    color: var(--info, #60a5fa);
}

/* Stat content styles */
.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-content .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-content .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   VPS Index Styles
   -------------------------------------------------------------------------- */
.service-icon-lg.homelab {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.ip-address {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all 150ms ease;
}

.ip-address:hover {
    background: var(--accent);
    color: white;
}

.ip-address.private {
    opacity: 0.7;
    font-size: 0.75rem;
}

.resource-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resource-specs .spec {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.125rem 0.375rem;
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    border-radius: var(--radius-sm);
}

.bandwidth-mini {
    min-width: 120px;
}

.bandwidth-mini .bandwidth-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.bandwidth-mini .bandwidth-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.bandwidth-mini .bandwidth-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.bandwidth-mini .bandwidth-fill.low {
    background: var(--success, #34d399);
}

.bandwidth-mini .bandwidth-fill.medium {
    background: var(--warning, #fbbf24);
}

.bandwidth-mini .bandwidth-fill.high {
    background: var(--danger, #f87171);
}

.row-action-btn.success:hover {
    color: var(--success, #34d399);
    border-color: var(--success, #34d399);
}

.row-action-btn.danger:hover {
    color: var(--danger, #f87171);
    border-color: var(--danger, #f87171);
}

/* --------------------------------------------------------------------------
   Game Server Cards
   -------------------------------------------------------------------------- */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

.server-card {
    background: var(--bg-card, rgba(18, 18, 18, 0.95));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 150ms ease;
}

.server-card:hover {
    border-color: var(--border-active, rgba(15, 118, 110, 0.4));
}

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

.server-game {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.server-game-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}

.server-game-icon-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.server-game-info {
    display: flex;
    flex-direction: column;
}

.server-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.server-game-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

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

.server-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.server-stat {
    display: flex;
    flex-direction: column;
}

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

.server-stat .stat-value {
    font-weight: 600;
    font-size: 0.875rem;
}

.server-address {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

.address-value {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: all 150ms ease;
}

.address-value:hover {
    background: var(--accent);
    color: white;
}

.server-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    background: var(--bg-hover, rgba(255, 255, 255, 0.02));
}

.power-buttons {
    display: flex;
    gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Web Hosting Cards
   -------------------------------------------------------------------------- */
.hosting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
}

.hosting-card {
    background: var(--bg-card, rgba(18, 18, 18, 0.95));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 150ms ease;
}

.hosting-card:hover {
    border-color: var(--border-active, rgba(15, 118, 110, 0.4));
}

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

.hosting-info {
    display: flex;
    flex-direction: column;
}

.hosting-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.hosting-domain {
    font-size: 0.75rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hosting-domain:hover {
    color: var(--accent-soft, #14b8a6);
}

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

.hosting-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.hosting-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hosting-stat .stat-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
}

.hosting-stat .stat-label {
    color: var(--text-muted);
}

.hosting-stat .stat-value {
    font-weight: 500;
}

.stat-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.stat-fill.low {
    background: var(--success, #34d399);
}

.stat-fill.medium {
    background: var(--warning, #fbbf24);
}

.stat-fill.high {
    background: var(--danger, #f87171);
}

.hosting-resources {
    display: flex;
    gap: 1.5rem;
}

.resource-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resource-value {
    font-size: 1.25rem;
    font-weight: 600;
}

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

.hosting-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    background: var(--bg-hover, rgba(255, 255, 255, 0.02));
}

.quick-links {
    display: flex;
    gap: 0.5rem;
}

.quick-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    background: var(--bg-card, rgba(18, 18, 18, 0.95));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    transition: all 150ms ease;
}

.quick-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(15, 118, 110, 0.1);
}

/* --------------------------------------------------------------------------
   Billing Alert
   -------------------------------------------------------------------------- */
.billing-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--warning-bg, rgba(251, 191, 36, 0.12));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.billing-alert-icon {
    width: 48px;
    height: 48px;
    background: var(--warning, #fbbf24);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.billing-alert-icon svg {
    color: white;
}

.billing-alert-content {
    flex: 1;
}

.billing-alert-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.125rem;
}

.billing-alert-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.billing-alert-badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.billing-alert-badge.danger {
    background: var(--danger, #f87171);
    color: white;
}

/* --------------------------------------------------------------------------
   Filter Tabs
   -------------------------------------------------------------------------- */
.filter-tabs-container {
    margin-bottom: 1.5rem;
}

.filter-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
}

.filter-tab {
    padding: 0.75rem 1rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 150ms ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.filter-tab.active {
    color: white;
    border-bottom-color: var(--accent);
    font-weight: 700;
}

.filter-tab-badge {
    font-size: 0.65rem;
    padding: 0.125rem 0.375rem;
    background: var(--danger, #f87171);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Invoice Table Styles
   -------------------------------------------------------------------------- */
.invoice-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 500;
}

.invoice-link:hover {
    color: var(--accent-soft, #14b8a6);
}

.invoice-link svg {
    opacity: 0.7;
}

.amount-cell .amount {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 600;
}

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

.overdue-badge {
    font-size: 0.6rem;
    padding: 0.125rem 0.375rem;
    background: var(--danger, #f87171);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 600;
    margin-left: 0.375rem;
}

.status.info {
    background: var(--info-bg, rgba(96, 165, 250, 0.2));
    color: var(--info, #60a5fa);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Tickets List
   -------------------------------------------------------------------------- */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ticket-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card, rgba(18, 18, 18, 0.95));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 150ms ease;
}

.ticket-item:hover {
    border-color: var(--accent);
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
}

.ticket-status-dot {
    flex-shrink: 0;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}

.status-dot.active {
    background: var(--success, #34d399);
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
}

.status-dot.warning {
    background: var(--warning, #fbbf24);
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}

.status-dot.info {
    background: var(--info, #60a5fa);
    box-shadow: 0 0 6px rgba(96, 165, 250, 0.5);
}

.status-dot.stopped,
.status-dot.danger {
    background: var(--danger, #f87171);
    box-shadow: 0 0 6px rgba(248, 113, 113, 0.5);
}

.status-dot.pending {
    background: var(--text-muted);
}

.ticket-main {
    flex: 1;
    min-width: 0;
    text-align: left;
    margin-right: auto;
}

.ticket-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

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

.ticket-subject {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ticket-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.ticket-badges {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ticket-replies {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.ticket-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
}

/* Badge variants */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-default {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    color: var(--text-secondary);
}

.badge-danger {
    background: var(--danger-bg, rgba(248, 113, 113, 0.12));
    color: var(--danger, #f87171);
}

.badge-warning {
    background: var(--warning-bg, rgba(251, 191, 36, 0.12));
    color: var(--warning, #fbbf24);
}

.badge-success {
    background: var(--success-bg, rgba(52, 211, 153, 0.12));
    color: var(--success, #34d399);
}

.badge-info {
    background: var(--info-bg, rgba(96, 165, 250, 0.2));
    color: var(--info, #60a5fa);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Loading Spinner
   -------------------------------------------------------------------------- */
.loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {

    .server-grid,
    .hosting-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .billing-alert {
        flex-direction: column;
        text-align: center;
    }

    .billing-alert .btn {
        width: 100%;
    }

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

    .ticket-badges {
        order: 3;
        width: 100%;
        margin-top: 0.5rem;
    }

    .ticket-replies,
    .ticket-arrow {
        display: none;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }

    .row-actions {
        opacity: 1;
    }
}

/* ==========================================================================
   ADMIN LAYOUT - Floating Header with Dropdown Navigation
   ========================================================================== */

/* --------------------------------------------------------------------------
   Admin Badge
   -------------------------------------------------------------------------- */
.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: var(--accent);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.admin-badge-mobile {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
    background: var(--accent);
    color: white;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 3px;
    margin-left: 0.375rem;
}

/* --------------------------------------------------------------------------
   Navigation Dropdown Menus
   -------------------------------------------------------------------------- */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown>.nav-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-arrow {
    opacity: 0.5;
    transition: transform 150ms ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    padding: 0.5rem;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.98);
    transform-origin: top left;
    transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), opacity 140ms ease, visibility 140ms ease;
    z-index: 200;
    margin-top: 0.5rem;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-dropdown-item {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    border-radius: 6px;
    text-decoration: none;
    transition: all 150ms ease;
}

.nav-dropdown-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-dropdown-item.active {
    color: var(--accent);
    background: var(--bg-active);
}

/* Nested flyout submenu inside a nav-dropdown-menu. Hover the parent
   item to reveal a side panel with the nested links. */
.nav-dropdown-flyout {
    position: relative;
}
.nav-dropdown-flyout-trigger {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.nav-dropdown-flyout-arrow {
    flex-shrink: 0;
    opacity: 0.6;
    transition: transform 150ms ease, opacity 150ms ease;
}
.nav-dropdown-flyout:hover > .nav-dropdown-flyout-trigger .nav-dropdown-flyout-arrow,
.nav-dropdown-flyout.open > .nav-dropdown-flyout-trigger .nav-dropdown-flyout-arrow {
    opacity: 1;
    transform: translateX(2px);
}
.nav-dropdown-flyout-menu {
    position: absolute;
    top: -0.5rem;
    left: 100%;
    margin-left: 0.25rem;
    min-width: 200px;
    padding: 0.5rem;
    background: var(--bg-elevated, var(--bg-surface, #1b1d21));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-6px);
    transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms;
    z-index: 60;
}
.nav-dropdown-flyout:hover > .nav-dropdown-flyout-menu,
.nav-dropdown-flyout.open > .nav-dropdown-flyout-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 0s;
}
/* On narrow dropdowns, flip to the left if the flyout would overflow */
@media (max-width: 900px) {
    .nav-dropdown-flyout-menu {
        left: auto;
        right: 100%;
        margin-left: 0;
        margin-right: 0.25rem;
    }
}

/* --------------------------------------------------------------------------
   Nav Badge (for notification counts in nav)
   -------------------------------------------------------------------------- */
.nav-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px 0 4px;
    background: #e53e3e;
    color: white;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    border-radius: 9px;
    margin-left: 6px;
    vertical-align: middle;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: 0;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   Customer View Button
   -------------------------------------------------------------------------- */
.customer-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

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

.customer-view-btn svg {
    opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Mobile Navigation Drawer (Admin)
   -------------------------------------------------------------------------- */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--bg-card-solid);
    border-right: 1px solid var(--border-default);
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mobile-nav-drawer.active {
    transform: translateX(0);
}

.mobile-nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-drawer-header span {
    font-weight: 600;
    font-size: 0.95rem;
}

.mobile-nav-close {
    width: 32px;
    height: 32px;
    background: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
}

.mobile-nav-close:hover {
    color: var(--text-primary);
    border-color: var(--border-default);
}

.mobile-nav-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.mobile-nav-drawer-section {
    padding: 0.75rem 0.75rem 0.375rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.mobile-nav-drawer-section:first-child {
    margin-top: 0;
}

.mobile-nav-drawer-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 150ms ease;
}

.mobile-nav-drawer-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.mobile-nav-drawer-item.active {
    color: var(--accent);
    background: var(--bg-active);
}

.mobile-nav-drawer-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0.75rem 0;
}

.mobile-nav-drawer-accent {
    color: var(--accent);
}

.mobile-nav-drawer-accent:hover {
    color: var(--accent-soft);
    background: var(--bg-active);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 299;
    opacity: 0;
    visibility: hidden;
    transition: all 200ms ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --------------------------------------------------------------------------
   Admin Responsive - Hide dropdown menus on smaller screens
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
    .nav-dropdown-menu {
        min-width: 160px;
    }

    .customer-view-btn span {
        display: none;
    }

    .customer-view-btn {
        padding: 8px;
    }
}

@media (max-width: 1100px) {
    .header-nav {
        max-width: calc(100% - 160px);
    }

    .header-nav .nav-item {
        padding: 0 0.625rem;
        font-size: 0.75rem;
    }

    .nav-dropdown-menu {
        min-width: 150px;
    }

    /* Hide search text on smaller screens, keep icon */
    .command-trigger .search-text {
        display: none;
    }

    .command-trigger {
        padding: 0 8px;
        min-width: auto;
        height: 32px;
        font-size: 0.7rem;
    }

    .header-right {
        gap: 4px;
        padding: 0 0.75rem;
    }
}

@media (max-width: 900px) {
    .header-nav {
        max-width: calc(100% - 140px);
        gap: 0;
    }

    .header-nav .nav-item {
        padding: 0 0.5rem;
        font-size: 0.7rem;
        height: 36px;
    }

    /* Hide keyboard shortcut indicator on tablets */
    .command-trigger kbd {
        display: none;
    }

    /* Make header-right more compact */
    .header-right {
        gap: 3px;
        padding: 0 0.5rem;
    }

    .command-trigger {
        padding: 0 6px;
        height: 30px;
    }

    .header-icon-btn {
        width: 30px;
        height: 30px;
    }

    /* Reduce nav spacing */
    .nav-dropdown-menu {
        min-width: 140px;
    }
}

@media (max-width: 768px) {

    /* Hide admin floating header on mobile */
    .floating-header {
        display: none;
    }

    /* Show mobile header */
    .mobile-header {
        display: flex;
    }

}

@media (max-width: 600px) {
    .command-trigger .search-icon {
        margin: 0;
    }

    .command-trigger {
        padding: 0 4px;
        min-width: 30px;
    }

    .header-right {
        gap: 2px;
        padding: 0 0.25rem;
    }
}

/* ==========================================================================
   Light Theme - Component Overrides
   Fixes hardcoded rgba(255,255,255,...) values used throughout dark theme
   ========================================================================== */

/* Floating header top shine line */
.theme-light .floating-header::before {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.04), transparent);
}

.theme-light .floating-header::after {
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.03) inset;
}

/* Nav active state */
.theme-light .header-nav .nav-item.active {
    background: rgba(0, 0, 0, 0.06);
}

/* Pinned services */
.theme-light .pinned-service {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.theme-light .pinned-service:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
}

/* Pin edit button */
.theme-light .pin-edit-btn {
    border-color: rgba(0, 0, 0, 0.08);
}

/* Command palette trigger */
.theme-light .command-trigger {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.theme-light .command-trigger:hover {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.05);
}

.theme-light .command-trigger kbd {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
}

/* Header icon buttons */
.theme-light .header-icon-btn {
    border-color: rgba(0, 0, 0, 0.08);
}

.theme-light .header-icon-btn:hover {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.04);
}

.theme-light .header-icon-btn .badge {
    border-color: var(--bg-card-solid);
}

/* Form inputs */
.theme-light input[type="text"],
.theme-light input[type="email"],
.theme-light input[type="password"],
.theme-light input[type="tel"],
.theme-light input[type="url"],
.theme-light input[type="number"],
.theme-light input[type="search"],
.theme-light input[type="date"],
.theme-light input[type="datetime-local"],
.theme-light input[type="time"],
.theme-light select,
.theme-light textarea {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}

.theme-light input:focus,
.theme-light select:focus,
.theme-light textarea:focus {
    background: #ffffff;
    border-color: rgba(15, 118, 110, 0.5);
}

.theme-light select option {
    background: #ffffff;
    color: #1e293b;
}

.theme-light select optgroup {
    background: #f1f5f9;
    color: #0d6b63;
}

/* Checkbox */
.theme-light input[type="checkbox"] {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.2);
}

/* Radio */
.theme-light input[type="radio"] {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.2);
}

.theme-light input[type="radio"]:checked {
    box-shadow: inset 0 0 0 3px #ffffff;
}

/* Cards and panels */
.theme-light .card {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.theme-light .card-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.theme-light .card-footer {
    border-top-color: rgba(0, 0, 0, 0.06);
    background: #f8fafc;
}

.theme-light .panel {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.theme-light .panel-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* Stat cards */
.theme-light .stat-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

/* Data tables */
.theme-light .data-table th {
    background: #f8fafc;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.theme-light .data-table td {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.theme-light .data-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Status badges - ensure visibility */
.theme-light .status {
    border-color: rgba(0, 0, 0, 0.06);
}

/* Mobile header */
.theme-light .mobile-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* Mobile bottom nav */
.theme-light .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(0, 0, 0, 0.08);
}

/* Notification dropdown */
.theme-light .notifications-dropdown {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-light .notification-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.theme-light .notification-item.unread {
    background: rgba(15, 118, 110, 0.07);
    box-shadow: inset 0 0 20px rgba(15, 118, 110, 0.06), 0 0 6px rgba(15, 118, 110, 0.08);
}
.theme-light .notification-item.unread:hover {
    background: rgba(15, 118, 110, 0.11);
    box-shadow: inset 0 0 24px rgba(15, 118, 110, 0.08), 0 0 10px rgba(15, 118, 110, 0.1);
}

/* Profile dropdown / user menu */
.theme-light .dropdown-menu,
.theme-light .profile-dropdown,
.theme-light .user-dropdown {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.theme-light .dropdown-menu a:hover,
.theme-light .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Resource bars */
.theme-light .resource-bar {
    background: rgba(0, 0, 0, 0.08);
}

/* Filter cards */
.theme-light .filter-tab.active {
    background: rgba(15, 118, 110, 0.08);
}

/* Alert banners */
.theme-light .billing-alert {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

/* Empty states */
.theme-light .empty-state-icon {
    background: rgba(0, 0, 0, 0.04);
}

/* Page header */
.theme-light .page-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* Separator lines using rgba white */
.theme-light .header-divider {
    background: rgba(0, 0, 0, 0.1);
}

/* Agent card overrides (inline styles in views) */
.theme-light .agent-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.theme-light .agent-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.theme-light .agent-card .agent-info-row {
    border-top-color: rgba(0, 0, 0, 0.06);
}

.theme-light .agent-card .agent-footer {
    background: rgba(0, 0, 0, 0.02);
    border-top-color: rgba(0, 0, 0, 0.06);
}

.theme-light .agent-card .resource-bar {
    background: rgba(0, 0, 0, 0.08);
}

.theme-light .agent-os-icon {
    background: rgba(15, 118, 110, 0.08);
    border-color: rgba(15, 118, 110, 0.15);
}

.theme-light .agent-status-dot {
    border-color: #ffffff;
}

/* Tabs */
.theme-light .tabs .tab-link.active {
    border-bottom-color: var(--accent);
}

/* Toast / alerts */
.theme-light .toast {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Quick links and sidebar items */
.theme-light .quick-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* General rgba(255,255,255) overrides for common patterns */
.theme-light .bg-white-4 {
    background: rgba(0, 0, 0, 0.03);
}

.theme-light .bg-white-6 {
    background: rgba(0, 0, 0, 0.04);
}

.theme-light .bg-white-8 {
    background: rgba(0, 0, 0, 0.06);
}

/* =============================================
   GLOW HERO BANNER - Shared component
   ============================================= */
.glow-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1.75rem;
    padding: 2rem 2.25rem;
    min-height: 120px;
}
.glow-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #081022, rgba(11, 18, 31, 0.86));
    border: 1px solid rgba(96, 165, 250, 0.14);
    border-radius: 20px;
}
.glow-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    will-change: transform;
}
.glow-orb-1 {
    width: 200px;
    height: 200px;
    background: rgba(15, 118, 110, 0.15);
    top: -40px;
    right: 10%;
    animation: glowOrbFloat 8s ease-in-out infinite;
}
.glow-orb-2 {
    width: 150px;
    height: 150px;
    background: rgba(139, 92, 246, 0.12);
    bottom: -30px;
    left: 15%;
    animation: glowOrbFloat 10s ease-in-out infinite reverse;
}
.glow-orb-3 {
    width: 100px;
    height: 100px;
    background: rgba(236, 72, 153, 0.1);
    top: 20%;
    left: 60%;
    animation: glowOrbFloat 12s ease-in-out infinite 2s;
}
@keyframes glowOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15px, -10px) scale(1.05); }
    66% { transform: translate(-10px, 8px) scale(0.95); }
}
.glow-hero-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse at 70% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 40%, black 20%, transparent 70%);
    pointer-events: none;
}
.glow-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.glow-hero-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--text-primary);
}
.glow-hero-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}
.glow-hero-actions {
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .glow-hero {
        padding: 1.5rem;
    }
    .glow-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .glow-hero-text h1 {
        font-size: 1.25rem;
    }
}

/* -------------------------------------------------------------------------
   Mobile Card View — transforms .table and .data-table into stacked cards
   on screens ≤768px. Requires data-label attributes on <td> elements
   (auto-applied by the table-cards JS initializer).
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .table-cards thead,
    .table.table-cards thead,
    .data-table.table-cards thead {
        display: none;
    }

    .table-cards tbody tr,
    .table.table-cards tbody tr,
    .data-table.table-cards tbody tr {
        display: block;
        background: var(--bg-card, rgba(255,255,255,0.02));
        border: 1px solid var(--border-color, rgba(255,255,255,0.06));
        border-radius: 0.75rem;
        margin-bottom: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .table-cards tbody tr:hover,
    .table.table-cards tbody tr:hover,
    .data-table.table-cards tbody tr:hover {
        background: var(--bg-hover, rgba(255,255,255,0.04));
    }

    .table-cards tbody td,
    .table.table-cards tbody td,
    .data-table.table-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.4rem 0;
        border: none;
        border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.04));
        font-size: 0.875rem;
        text-align: right;
    }

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

    .table-cards tbody td::before,
    .table.table-cards tbody td::before,
    .data-table.table-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--text-secondary, rgba(255,255,255,0.7));
        text-align: left;
        flex-shrink: 0;
        margin-right: 1rem;
    }

    .table-cards tbody td[data-label=""]::before,
    .table.table-cards tbody td[data-label=""]::before,
    .data-table.table-cards tbody td[data-label=""]::before {
        display: none;
    }

    /* Actions column — keep buttons full width */
    .table-cards tbody td.actions,
    .table-cards tbody td:last-child:has(.btn) {
        justify-content: flex-end;
        gap: 0.5rem;
    }
}

/* -------------------------------------------------------------------------
   Global Mobile Breakpoints — ensures all common layout patterns
   (grids, forms, flex rows, stat cards, page headers, action bars)
   collapse gracefully on mobile. Covers views without per-view @media.
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* Grid layouts → single column */
    .grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-cols-5, .grid-cols-6 {
        grid-template-columns: 1fr !important;
    }

    /* Stats grid → 2 columns on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Form rows and flex containers → stack vertically */
    .form-row, .flex-row, .inline-form, .btn-group-row,
    .action-bar, .page-header-actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    /* Page headers → stack title and actions */
    .page-header, .content-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    .page-header .btn, .content-header .btn,
    .page-header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Card grids → single column */
    .card-grid, .service-grid, .product-grid {
        grid-template-columns: 1fr !important;
    }

    /* Side-by-side panels → stack */
    .split-layout, .two-column, .detail-layout {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
    }

    /* Tab navigation → horizontal scroll */
    .tabs, .tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
        gap: 0 !important;
    }

    .tabs .tab, .tab-nav a, .tab-nav button {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Compact padding for cards/panels */
    .card, .panel, .section-card {
        padding: 1rem !important;
    }

    .card-header, .panel-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    /* Tables → horizontal scroll wrapper */
    .table-wrap, .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Buttons → full width on mobile when in rows */
    .btn-row, .button-group {
        flex-direction: column !important;
    }

    .btn-row .btn, .button-group .btn {
        width: 100%;
    }

    /* Modal content → tighter padding */
    .modal-content, .modal-body {
        padding: 1rem !important;
    }

    .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100vw - 1rem) !important;
    }

    /* Stat cards → tighter */
    .stat-card, .stat-box {
        padding: 0.75rem !important;
    }

    .stat-card .stat-value, .stat-box .stat-value {
        font-size: 1.25rem !important;
    }

    /* Hide non-essential elements on mobile */
    .hide-mobile, .desktop-only {
        display: none !important;
    }

    /* Text sizing adjustments */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.1rem !important; }

    /* Ensure inputs fill width */
    input[type="text"], input[type="email"], input[type="password"],
    input[type="number"], input[type="search"], input[type="url"],
    select, textarea {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    /* Extra small — stats grid single column */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    /* Tighter body padding */
    .content, .main-content, .page-content {
        padding: 0.5rem !important;
    }

    /* Badge/chip wrapping */
    .badge-row, .chip-row, .tag-row {
        flex-wrap: wrap !important;
        gap: 0.25rem !important;
    }
}

/* --------------------------------------------------------------------------
   Site-wide Promo / Sale theme
   Red is reserved for the attention bits (strike-through line, "% OFF"
   chip). The actual sale PRICE stays white — the contrast between struck
   red and bright white reads as a deal without shouting at the shopper.
   -------------------------------------------------------------------------- */
.price-sale {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
}
.price-original {
    text-decoration-color: #ef4444 !important;
    text-decoration-thickness: 2px !important;
}
.promo-tag {
    background: #ef4444 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: none !important;
    padding: 0.28rem 0.65rem !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    line-height: 1 !important;
    text-transform: none !important;
    box-shadow: none !important;
}
/* Legacy addon-promo-tag used on configure modals — keep red chip */
.addon-promo-tag {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

