/*
 * LuckysCloud — Nebula WHMCS Theme
 * Corporate Design System v1.0
 * Port of the public_html Nebula design system
 */

/* =========================================
   FONTS
   ========================================= */
/* Fonts are loaded dynamically via Nebula Settings to prevent redundant requests */

/* =========================================
   DESIGN TOKENS
   ========================================= */
:root {
    /* Nebula Palette - Solar Luminous (Light Theme) */
    --accent-orange:   #f97316;
    --accent-teal:     #0891b2;
    --accent-emerald:  #10b981;
    --accent-rose:     #ef4444;
    --accent-amber:    #f59e0b;

    /* Architecture System (Light mode) */
    --glass-bg:        rgba(255, 255, 255, 0.70);
    --glass-border:    rgba(15, 23, 42, 0.08);
    --glass-border-hi: rgba(15, 23, 42, 0.12);

    /* Nebula Text Tokens */
    --nebula-text-primary:   #0f172a;
    --nebula-text-secondary: #475569;
    --nebula-text-muted:     #94a3b8;

    /* Surfaces */
    --nebula-bg:       #f8fafc;
    --nebula-surface:  #ffffff;
    --nebula-sidebar:  #f1f5f9;

    /* Layout */
    --sidebar-w:  280px;
    --radius-xl:  1.5rem;
    --radius-lg:  1rem;
    --radius-md:  0.75rem;
    --radius-sm:  0.5rem;

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Bootstrap Overrides (Compatibility) */
    --bs-body-bg:             #f8fafc;
    --bs-body-color:          #0f172a;
    --bs-secondary-color:     #475569;
    --bs-tertiary-color:      #94a3b8;
    --bs-link-color:          #f97316;
    --bs-link-hover-color:    #0891b2;
}

/* =========================================
   BASE RESET
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--nebula-bg);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(249, 115, 22, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(8, 145, 178, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--nebula-text-primary);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--nebula-text-primary);
    line-height: 1.2;
}

a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

p { margin-bottom: 1rem; color: var(--nebula-text-secondary); }

img { max-width: 100%; height: auto; }

ul, ol { padding-left: 1.25rem; }

/* =========================================
   AMBIENT LIGHTING
   ========================================= */
.nebula-ambient {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    inset: 0;
    overflow: hidden;
}

.nebula-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    animation: blob-pulse 10s infinite alternate;
}

.nebula-blob-1 {
    width: 500px; height: 500px;
    top: -10%; left: -5%;
    background: var(--accent-orange);
    opacity: 0.05;
    animation-delay: 0s;
}

.nebula-blob-2 {
    width: 600px; height: 600px;
    bottom: -15%; right: -10%;
    background: var(--accent-teal);
    opacity: 0.04;
    animation-delay: 2s;
}

@keyframes blob-pulse {
    0%   { transform: scale(1);    opacity: 0.04; }
    100% { transform: scale(1.08); opacity: 0.07; }
}

/* =========================================
   TEXT & COLOUR UTILITIES
   ========================================= */
.text-accent-orange  { color: var(--accent-orange)  !important; }
.text-accent-teal    { color: var(--accent-teal)    !important; }
.text-accent-emerald { color: var(--accent-emerald) !important; }
.text-accent-rose    { color: var(--accent-rose)    !important; }

.text-gradient {
    background: linear-gradient(135deg, var(--nebula-text-primary) 0%, var(--nebula-text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-accent {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-teal) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fw-800 { font-weight: 800 !important; }
.tracking-tight { letter-spacing: -0.02em !important; }

/* =========================================
   LAYOUT — WRAPPER
   ========================================= */
.nebula-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* =========================================
   SIDEBAR
   ========================================= */
.nebula-sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--nebula-sidebar);
    border-right: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nebula-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    text-decoration: none;
}

.nebula-sidebar .sidebar-brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 10px;
}

.nebula-sidebar .sidebar-brand span {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--nebula-text-primary);
    letter-spacing: -0.03em;
}

.sidebar-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nebula-text-muted);
    padding: 1.25rem 1.25rem 0.4rem;
}

.nebula-sidebar .nav {
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.nebula-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--nebula-text-secondary);
    transition: var(--transition-base);
    position: relative;
}

.nebula-sidebar .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.nebula-sidebar .nav-link:hover {
    background: rgba(249, 115, 22, 0.06);
    color: var(--accent-orange);
}

.nebula-sidebar .nav-link:hover i { color: var(--accent-orange); }

.nebula-sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.02));
    color: var(--accent-orange);
    border-left: 3px solid var(--accent-orange);
    padding-left: calc(0.85rem - 3px);
}

.nebula-sidebar .nav-link.active i { color: var(--accent-orange); }

/* Badge in sidebar nav */
.sidebar-badge {
    margin-left: auto;
    background: var(--accent-orange);
    color: #fff;
    font-size: 0.67rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 50px;
    line-height: 1.3;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--glass-border);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.03);
    transition: background 0.2s;
    text-decoration: none;
}

.sidebar-user-card:hover { background: rgba(15, 23, 42, 0.06); }

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-teal));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--nebula-text-primary);
    line-height: 1.2;
}

.sidebar-user-email {
    font-size: 0.72rem;
    color: var(--nebula-text-muted);
}

/* =========================================
   MAIN CONTENT AREA
   ========================================= */
.nebula-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   TOP BAR
   ========================================= */
.nebula-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.9rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.topbar-page-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--nebula-text-primary);
    letter-spacing: -0.02em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--nebula-text-secondary);
    font-size: 0.88rem;
    transition: var(--transition-base);
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

.topbar-icon-btn:hover {
    background: rgba(249, 115, 22, 0.08);
    color: var(--accent-orange);
    border-color: rgba(249, 115, 22, 0.2);
}

.topbar-notif-dot {
    position: absolute;
    top: 5px; right: 5px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent-rose);
    border: 1px solid var(--nebula-bg);
}

/* =========================================
   PAGE CONTENT CONTAINER
   ========================================= */
.nebula-content {
    flex: 1;
    padding: 2rem 2rem 3rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--nebula-text-primary);
    letter-spacing: -0.04em;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--nebula-text-secondary);
}

/* Breadcrumb */
.nebula-breadcrumb a { color: var(--nebula-text-muted); }
.nebula-breadcrumb a:hover { color: var(--accent-orange); }
.nebula-breadcrumb .separator { opacity: 0.5; padding: 0 0.2rem; }
.nebula-breadcrumb .current { color: var(--nebula-text-secondary); font-weight: 600; }

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0 0 1rem;
    margin-bottom: 1rem;
    list-style: none;
    font-size: 0.8rem;
    gap: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding-right: 0.5rem;
    color: var(--nebula-text-muted);
    opacity: 0.5;
}

.breadcrumb-item a { color: var(--nebula-text-muted); font-weight: 500; }
.breadcrumb-item a:hover { color: var(--accent-orange); }
.breadcrumb-item.active { color: var(--nebula-text-secondary); font-weight: 600; }

/* =========================================
   STAT CARDS
   ========================================= */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--nebula-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-orange), var(--accent-teal));
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover { transform: translateY(-3px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); }
.stat-card:hover::before { opacity: 1; }

.stat-icon {
    width: 42px; height: 42px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.stat-icon.orange  { background: rgba(249, 115, 22, 0.1);  color: var(--accent-orange); }
.stat-icon.teal    { background: rgba(8, 145, 178, 0.1);   color: var(--accent-teal); }
.stat-icon.emerald { background: rgba(16, 185, 129, 0.1);  color: var(--accent-emerald); }
.stat-icon.rose    { background: rgba(239, 68, 68, 0.1);   color: var(--accent-rose); }
.stat-icon.amber   { background: rgba(245, 158, 11, 0.1);  color: var(--accent-amber); }

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--nebula-text-primary);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--nebula-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* =========================================
   CARD COMPONENTS
   ========================================= */
.nebula-card {
    background: var(--nebula-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition-base);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.nebula-card:hover { 
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); 
    border-color: var(--accent-orange);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(12, 1fr);
}
.bento-col-12 { grid-column: span 12; }
.bento-col-9  { grid-column: span 9;  }
.bento-col-8  { grid-column: span 8;  }
.bento-col-6  { grid-column: span 6;  }
.bento-col-4  { grid-column: span 4;  }
.bento-col-3  { grid-column: span 3;  }

@media (max-width: 991px) {
    .bento-col-9, .bento-col-8, .bento-col-6, .bento-col-4, .bento-col-3 { grid-column: span 12; }
}

.card-header-nebula {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.015);
}

.card-header-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--nebula-text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header-title i {
    color: var(--accent-orange);
    font-size: 0.85rem;
}

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

/* =========================================
   GLASS PANEL (Glassmorphism variant)
   ========================================= */
.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-nebula {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-teal) 100%);
    color: #ffffff !important;
    border: none;
    padding: 0.75rem 1.85rem;
    border-radius: 50px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn-nebula:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(249, 115, 22, 0.45);
    color: #ffffff !important;
    filter: brightness(1.1);
}

.btn-nebula:active { transform: translateY(0); }

.btn-nebula-sm {
    padding: 0.45rem 1.1rem;
    font-size: 0.8rem;
}

.btn-nebula-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--accent-orange) !important;
    border: 1.5px solid var(--accent-orange);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-nebula-outline:hover {
    background: rgba(249, 115, 22, 0.06);
    transform: translateY(-1px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.04);
    color: var(--nebula-text-secondary) !important;
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.07);
    color: var(--nebula-text-primary) !important;
}

/* Danger */
.btn-nebula-danger {
    background: linear-gradient(135deg, var(--accent-rose), #dc2626);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-nebula-danger:hover { box-shadow: 0 8px 22px rgba(239, 68, 68, 0.4); }

/* Success */
.btn-nebula-success {
    background: linear-gradient(135deg, var(--accent-emerald), #059669);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

/* =========================================
   FORMS
   ========================================= */
.nebula-form-group {
    margin-bottom: 1.25rem;
}

.nebula-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--nebula-text-secondary);
    margin-bottom: 0.4rem;
}

.nebula-input,
.nebula-select,
.nebula-textarea {
    width: 100%;
    background: var(--nebula-surface);
    border: 1.5px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.9rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--nebula-text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

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

.nebula-input:focus,
.nebula-select:focus,
.nebula-textarea:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.nebula-textarea { resize: vertical; min-height: 120px; }

.nebula-input-error { border-color: var(--accent-rose) !important; }
.nebula-error-msg { font-size: 0.78rem; color: var(--accent-rose); margin-top: 0.3rem; }

/* Select arrow */
.nebula-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.25rem;
}

/* Input Group */
.nebula-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.nebula-input-group .nebula-input { padding-left: 2.75rem; }

.input-icon {
    position: absolute;
    left: 0.9rem;
    color: var(--nebula-text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

/* =========================================
   ALERTS / FLASH MESSAGES
   ========================================= */
.nebula-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
    position: relative;
}

.nebula-alert i { font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }

.nebula-alert-success { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.2); color: #065f46; }
.nebula-alert-success i { color: var(--accent-emerald); }

.nebula-alert-danger  { background: rgba(239, 68, 68, 0.08);  border-color: rgba(239, 68, 68, 0.2);  color: #991b1b; }
.nebula-alert-danger i { color: var(--accent-rose); }

.nebula-alert-warning { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.2); color: #92400e; }
.nebula-alert-warning i { color: var(--accent-amber); }

.nebula-alert-info    { background: rgba(8, 145, 178, 0.08);  border-color: rgba(8, 145, 178, 0.2);  color: #164e63; }
.nebula-alert-info i { color: var(--accent-teal); }

.alert-close {
    position: absolute;
    right: 0.75rem; top: 0.75rem;
    background: none; border: none;
    color: inherit; opacity: 0.5;
    cursor: pointer; font-size: 1rem;
    transition: opacity 0.2s;
}
.alert-close:hover { opacity: 1; }

/* =========================================
   TABLES
   ========================================= */
.nebula-table-wrap {
    border-radius: var(--radius-lg);
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    position: relative;
}

/* Scroll indicator when content overflows */
.nebula-table-wrap::after {
    content: 'Scroll to view more \2192';
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-orange);
    background: rgba(255,255,255,0.9);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    opacity: var(--scroll-hint, 0);
    transition: opacity 0.3s;
    pointer-events: none;
}

.nebula-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.nebula-table thead th {
    background: #f1f5f9;
    color: var(--nebula-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.nebula-table tbody tr {
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    transition: background 0.15s;
}

.nebula-table tbody tr:last-child { border-bottom: none; }
.nebula-table tbody tr:hover { background: rgba(15, 23, 42, 0.02); }

.badge-dot { padding-left: 1.5rem; position: relative; background: rgba(15,23,42,0.05); color: var(--nebula-text-secondary); border: 1px solid var(--glass-border); }
.badge-dot::before { content: ''; position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-active { color: var(--accent-emerald) !important; background: rgba(16, 185, 129, 0.08) !important; border-color: rgba(16, 185, 129, 0.2) !important; }
.badge-orange { color: var(--accent-orange) !important; background: rgba(249, 115, 22, 0.08) !important; border-color: rgba(249, 115, 22, 0.2) !important; }
.badge-teal   { color: var(--accent-teal) !important; background: rgba(8, 145, 178, 0.08) !important; border-color: rgba(8, 145, 178, 0.2) !important; }
.badge-danger { color: var(--accent-rose) !important; background: rgba(239, 68, 68, 0.08) !important; border-color: rgba(239, 68, 68, 0.2) !important; }
.badge-cancelled { color: var(--nebula-text-muted) !important; background: rgba(15, 23, 42, 0.05) !important; border-color: var(--glass-border) !important; }
/* =========================================
   BADGES
   ========================================= */
.nebula-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.badge-active,  .badge-success  { background: rgba(16, 185, 129, 0.1);  color: #065f46; }
.badge-pending, .badge-warning  { background: rgba(245, 158, 11, 0.1);  color: #92400e; }
.badge-cancelled,.badge-danger  { background: rgba(239, 68, 68, 0.1);   color: #991b1b; }
.badge-info,    .badge-teal     { background: rgba(8, 145, 178, 0.1);   color: #164e63; }
.badge-orange                   { background: rgba(249, 115, 22, 0.1);  color: #c2410c; }

/* Dot indicator */
.badge-dot::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* =========================================
   SERVICE / HOSTING ITEM CARD
   ========================================= */
.service-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    transition: background 0.2s;
}

.service-item:last-child { border-bottom: none; }
.service-item:hover { background: rgba(15, 23, 42, 0.02); }

.service-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    background: rgba(249, 115, 22, 0.08);
    color: var(--accent-orange);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.service-info { flex: 1; min-width: 0; }
.service-name { font-size: 0.88rem; font-weight: 700; color: var(--nebula-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.service-meta { font-size: 0.75rem; color: var(--nebula-text-muted); }

/* =========================================
   INVOICE / BILLING
   ========================================= */
.invoice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    transition: background 0.15s;
}

.invoice-row:last-child { border-bottom: none; }
.invoice-row:hover { background: rgba(15, 23, 42, 0.02); }

.invoice-id { font-size: 0.8rem; font-weight: 700; color: var(--nebula-text-primary); }
.invoice-desc { font-size: 0.75rem; color: var(--nebula-text-muted); }
.invoice-amount { font-size: 0.9rem; font-weight: 700; color: var(--nebula-text-primary); white-space: nowrap; }

/* =========================================
   TICKET SYSTEM
   ========================================= */
.ticket-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    transition: background 0.2s;
}

.ticket-item:last-child { border-bottom: none; }
.ticket-item:hover { background: rgba(15, 23, 42, 0.02); }

.ticket-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-emerald));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 0.75rem;
    flex-shrink: 0;
}

.ticket-subject { font-size: 0.88rem; font-weight: 700; color: var(--nebula-text-primary); margin-bottom: 0.15rem; }
.ticket-meta { font-size: 0.75rem; color: var(--nebula-text-muted); }

/* =========================================
   DOMAIN SEARCH / CHECKER
   ========================================= */
.domain-search-bar {
    display: flex;
    gap: 0.5rem;
    background: var(--nebula-surface);
    border: 1.5px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.4rem 0.4rem 0.4rem 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    align-items: center;
}

.domain-search-bar:focus-within {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

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

.domain-search-bar input::placeholder { color: var(--nebula-text-muted); }

.domain-tld-badge {
    display: inline-flex; align-items: center;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--glass-border);
    font-size: 0.8rem; font-weight: 700;
    color: var(--nebula-text-secondary);
    transition: var(--transition-base);
    cursor: pointer;
}

.domain-tld-badge:hover {
    background: rgba(249, 115, 22, 0.08);
    border-color: rgba(249, 115, 22, 0.25);
    color: var(--accent-orange);
}

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3.5rem 2rem;
    color: var(--nebula-text-muted);
}

.empty-state-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.04);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: var(--nebula-text-muted);
    margin-bottom: 1.25rem;
}

.empty-state-title { font-size: 1rem; font-weight: 700; color: var(--nebula-text-secondary); margin-bottom: 0.35rem; }
.empty-state-desc { font-size: 0.85rem; max-width: 280px; }

/* =========================================
   FOOTER
   ========================================= */
.nebula-client-footer {
    background: #f1f5f9;
    border-top: 1px solid var(--glass-border);
    padding: 1.4rem 2rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--nebula-text-muted);
    font-weight: 500;
}

.nebula-client-footer a {
    color: var(--nebula-text-muted);
    margin: 0 0.5rem;
}

.nebula-client-footer a:hover { color: var(--accent-orange); }

/* =========================================
   QUICK ACTIONS GRID
   ========================================= */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.2rem 0.75rem;
    background: var(--nebula-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nebula-text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
    text-align: center;
}

.quick-action-btn i {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(249, 115, 22, 0.08);
    color: var(--accent-orange);
    font-size: 1rem;
    transition: var(--transition-base);
}

.quick-action-btn:hover {
    border-color: rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.04);
    color: var(--accent-orange);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.1);
}

.quick-action-btn:hover i {
    background: rgba(249, 115, 22, 0.15);
}

/* =========================================
   PROGRESS BARS
   ========================================= */
.nebula-progress {
    height: 6px;
    background: rgba(15, 23, 42, 0.07);
    border-radius: 50px;
    overflow: hidden;
    margin-top: 0.4rem;
}

.nebula-progress-bar {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-teal));
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   MOBILE HAMBURGER
   ========================================= */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.4rem;
    cursor: pointer;
    color: var(--nebula-text-primary);
    font-size: 1.2rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.sidebar-toggle:hover { background: rgba(15, 23, 42, 0.06); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(2px);
    z-index: 1040;
}

/* =========================================
   SCROLLBAR (Webkit)
   ========================================= */
::-webkit-scrollbar          { width: 5px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-orange); }

/* =========================================
   REVEAL ANIMATION
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   UTILITIES
   ========================================= */
.text-primary-nebula   { color: var(--nebula-text-primary) !important; }
.text-secondary-nebula { color: var(--nebula-text-secondary) !important; }
.text-muted-nebula     { color: var(--nebula-text-muted) !important; }
.text-orange  { color: var(--accent-orange)  !important; }
.text-teal    { color: var(--accent-teal)    !important; }
.text-emerald { color: var(--accent-emerald) !important; }
.text-rose    { color: var(--accent-rose)    !important; }

.text-gradient-nebula {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-teal) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.tracking-tight { letter-spacing: -0.03em !important; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .nebula-sidebar {
        transform: translateX(-100%);
    }

    .nebula-sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(15, 23, 42, 0.12);
    }

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

    .sidebar-toggle { display: flex; }
    .sidebar-overlay.active { display: block; }
}

@media (max-width: 768px) {
    .nebula-content { padding: 1.25rem; }
    .nebula-topbar { padding: 0.75rem 1.25rem; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-actions { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }

    .page-title { font-size: 1.3rem; }
}

/* =========================================
   HARDENED THEME COMPONENTS
   ========================================= */

/* Notifications Dropdown */
.nebula-notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--nebula-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.nebula-notif-dropdown.show { display: flex; animation: nebulaFadeIn 0.2s ease-out; }

.notif-header { padding: 1rem 1.25rem; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; border-bottom: 1px solid var(--glass-border); color: var(--nebula-text-primary); }
.notif-empty { padding: 2rem; text-align: center; color: var(--nebula-text-muted); font-size: 0.85rem; }
.notif-item { padding: 1rem 1.25rem; display: flex; gap: 1rem; text-decoration: none; transition: background 0.2s; border-bottom: 1px solid var(--glass-border); }
.notif-item:hover { background: rgba(15, 23, 42, 0.03); }
.notif-item i { font-size: 1rem; margin-top: 0.2rem; }
.notif-content { font-size: 0.82rem; color: var(--nebula-text-secondary); line-height: 1.4; }

.severity-danger i { color: var(--accent-rose); }
.severity-warning i { color: var(--accent-amber); }
.severity-info i { color: var(--accent-teal); }
.severity-success i { color: var(--accent-emerald); }

/* Star Ratings */
.nebula-stars { display: flex; gap: 0.25rem; cursor: pointer; color: var(--glass-border); }
.nebula-stars i { transition: all 0.2s; font-size: 1.1rem; }
.nebula-stars i:hover, .nebula-stars i.active { color: var(--accent-amber); transform: scale(1.1); }
.nebula-stars i.fa-solid { color: var(--accent-amber); }

@keyframes nebulaFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
