/* ==========================================================================
   APXKEY PREMIUM GLOBAL CSS STYLE SYSTEM
   ========================================================================== */

/* 1. Theme Configuration variables */
:root[data-theme="dark"] {
    --bg-primary: #07070b;
    --bg-secondary: #0d0e15;
    --glass-bg: rgba(14, 15, 23, 0.78);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow: rgba(99, 102, 241, 0.16);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #a855f7 100%);
    --primary-glow: rgba(99, 102, 241, 0.38);
    
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    --accent-violet: #818cf8;
    
    --admin-color: #f43f5e;
    --admin-hover: #e11d48;
    --admin-gradient: linear-gradient(135deg, #f43f5e 0%, #fb7185 50%, #fda4af 100%);
    --admin-glow: rgba(244, 63, 94, 0.35);
    
    --success-color: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --card-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.85);
    --bg-card: rgba(14, 15, 23, 0.78);
    --border-color: rgba(255, 255, 255, 0.08);
    --bg-input: rgba(10, 11, 18, 0.65);
}

:root[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-glow: rgba(79, 70, 229, 0.05);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary-color: #4f46e5;
    --primary-hover: #3730a3;
    --primary-glow: rgba(79, 70, 229, 0.2);
    
    --admin-color: #e11d48;
    --admin-hover: #be123c;
    --admin-glow: rgba(225, 29, 72, 0.2);
    
    --success-color: #059669;
    --success-glow: rgba(5, 150, 105, 0.2);
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --card-shadow: 0 12px 30px -10px rgba(79, 70, 229, 0.08);
    --bg-card: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --bg-input: #f1f5f9;
}

/* 2. Global Reset and Layout styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', 'Outfit', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* Premium Blurry Glow Backdrops */
.bg-blur-1, .bg-blur-2 {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -2;
    opacity: 0.18;
    pointer-events: none;
    will-change: transform;
}

.bg-blur-1 {
    top: 5%;
    left: 15%;
    background: #6366f1;
}

.bg-blur-2 {
    bottom: 10%;
    right: 15%;
    background: #4f46e5;
}

.bg-radial-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 25%, rgba(99, 102, 241, 0.08) 0%, rgba(7, 7, 11, 0.95) 75%);
    z-index: -1;
    pointer-events: none;
}

/* Glassmorphism Shell Base */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* 3. Core App Container layouts */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-container {
    flex: 1;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 100px 24px 40px;
    will-change: transform, opacity;
}

/* Premium Header styling */
.app-header {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    height: 64px;
    border-radius: 32px;
    z-index: 100;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-shield {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-shield svg, .apex-prism-mark svg {
    display: block;
    width: 100%;
    height: 100%;
}

.apex-prism-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 14px rgba(99, 102, 241, 0.45));
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.apex-prism-mark:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 0 22px rgba(129, 140, 248, 0.75));
}

.apex-prism-mark.admin-prism {
    filter: drop-shadow(0 0 14px rgba(244, 63, 94, 0.45));
}

.apex-prism-mark.admin-prism:hover {
    filter: drop-shadow(0 0 22px rgba(244, 63, 94, 0.75));
}

.logo-shield-admin {
    box-shadow: 0 4px 14px var(--admin-glow);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #ffffff 40%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: #fff;
    background: var(--primary-color);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Header buttons & actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.05);
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #6366f1;
    background-image: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    background: #4f46e5;
    background-image: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.btn-admin {
    background: var(--admin-gradient);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 16px var(--admin-glow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-admin:hover {
    background: linear-gradient(135deg, #f43f5e 0%, #ff3366 50%, #fda4af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 51, 102, 0.55);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ff5555;
}

.btn-logout {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
    transition: all 0.2s;
}

.btn-icon-sm:hover {
    background: rgba(255,255,255,0.08);
}

/* 4. Auth layouts structure */
.auth-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    box-sizing: border-box;
}

.auth-wrapper {
    width: 100%;
    max-width: 440px;
    margin: 0;
    animation: authFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-card {
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--card-shadow);
}

.border-admin {
    border-color: rgba(244, 63, 94, 0.15);
}

.border-admin:hover {
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 16px 0 6px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Form Styling */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
}

.input-icon, .input-icon-admin {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Select Styling & High-Visibility Options */
select {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    background-color: #12141a !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 8px;
    color: #f4f4f7 !important;
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    cursor: pointer;
    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") !important;
    background-repeat: no-repeat !important;
    background-position: calc(100% - 14px) center !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Force dark high-contrast visible text on options in all browsers */
select option {
    background-color: #151821 !important;
    color: #f8fafc !important;
    padding: 12px 14px !important;
    font-size: 0.92rem !important;
}

select option:checked,
select option:hover,
select option:focus {
    background-color: #262c3d !important;
    color: #ffffff !important;
}

select optgroup {
    background-color: #0e1017 !important;
    color: #94a3b8 !important;
    font-weight: 700 !important;
}

:root[data-theme="light"] select {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

:root[data-theme="light"] select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

:root[data-theme="light"] select option:checked,
:root[data-theme="light"] select option:hover,
:root[data-theme="light"] select option:focus {
    background-color: #e0e7ff !important;
    color: #4338ca !important;
}

:root[data-theme="light"] select optgroup {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
}

.input-wrapper input {
    padding-left: 42px;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.border-admin input:focus {
    border-color: var(--admin-color);
    box-shadow: 0 0 0 3px var(--admin-glow);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.form-link {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.form-link:hover {
    color: var(--primary-color);
}

.form-link-highlight {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.form-link-highlight:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--glass-border);
}

.auth-divider:not(:empty)::before {
    margin-right: .5em;
}

.auth-divider:not(:empty)::after {
    margin-left: .5em;
}

/* Alert Boxes */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ff5555;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* 5. Dashboard core styles */
.dashboard-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    gap: 20px;
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Metrics stats boxes */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--card-shadow);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon-wrapper.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-icon-wrapper.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon-wrapper.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.stat-icon-wrapper.orange { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Split Column Content Layouts */
.dashboard-content-split {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
    margin-bottom: 32px;
}

.vertical-align-start {
    align-items: start;
}

.min-w-300 {
    min-width: 300px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.content-card {
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.card-header {
    margin-bottom: 24px;
}

.card-header h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.card-header p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Charts drawing area */
.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

/* Activity logs timeline view */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
}

.timeline-item {
    display: flex;
    gap: 16px;
    position: relative;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 14px;
    bottom: -18px;
    width: 1px;
    background: var(--glass-border);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-badge.badge-success { background: #10b981; box-shadow: 0 0 8px var(--success-glow); }
.timeline-badge.badge-info { background: #6366f1; box-shadow: 0 0 8px var(--primary-glow); }
.timeline-badge.badge-danger { background: #f43f5e; box-shadow: 0 0 8px var(--admin-glow); }

.timeline-body {
    display: flex;
    flex-direction: column;
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-title {
    font-size: 0.85rem;
    font-weight: 600;
}

.timeline-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Standard Tables system */
.table-card {
    padding: 0;
    overflow: hidden;
}

.table-card .card-header {
    padding: 24px 24px 16px;
    margin-bottom: 0;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.data-table th, .data-table td {
    padding: 14px 24px;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.data-table th {
    background: rgba(255,255,255,0.01);
    font-weight: 600;
    color: var(--text-secondary);
}

.data-table tr:hover {
    background: rgba(255,255,255,0.01);
}

.text-center { text-align: center; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

/* Masked values (Secrets, keys) toggler */
.token-container {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 160px;
}

.masked-input {
    border: none;
    background: transparent;
    padding: 0;
    font-family: monospace;
    font-size: 0.85rem;
    width: 110px;
    color: var(--text-secondary);
}

.masked-input-visible {
    font-family: monospace;
    background: rgba(255,255,255,0.02) !important;
    border: 1px solid var(--glass-border) !important;
}

.btn-icon {
    font-size: 0.85rem;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-muted);
}

.btn-icon:hover {
    color: var(--primary-color);
}

.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.badge-secondary { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

/* 6. Applications Cards Layout */
.apps-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.app-card {
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.app-card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.app-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.app-card-ver {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.app-card-status {
    margin-left: auto;
}

.app-card-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 16px;
}

.app-detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.detail-value-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.btn-copy-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: color 0.2s;
}

.btn-copy-icon:hover {
    color: var(--primary-color);
}

.app-stats-row {
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.app-stat-col {
    flex: 1;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.stat-mini-val {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

.stat-mini-lbl {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.app-card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* Modals Core Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.show .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.btn-close-modal {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
}

/* 7. License Keys Dashboard View */
.license-key-display {
    font-family: monospace;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.btn-copy-mini {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 6px;
}

.btn-copy-mini:hover {
    color: var(--text-primary);
}

.hwid-container {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hwid-hash {
    font-family: monospace;
    font-size: 0.8rem;
}

.actions-flex {
    display: flex;
    gap: 6px;
}

.inline-form {
    display: inline;
}

.input-helper {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 8. Toast Notifications popups */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.toast {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-success {
    border-left: 3px solid #10b981;
}

.toast.toast-error {
    border-left: 3px solid #ef4444;
}

/* Settings and Profile lists */
.profile-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary-color);
}

.profile-username {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
}

.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
}

.info-val {
    font-weight: 600;
    font-size: 0.85rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    margin-right: 4px;
}

.success-glow {
    box-shadow: 0 0 8px #10b981;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

/* Animations declarations */
@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Copied visual flash animation */
.copied-flash {
    animation: flashGreen 0.4s ease;
}

@keyframes flashGreen {
    0% { color: var(--text-muted); }
    50% { color: #10b981; }
    100% { color: var(--text-muted); }
}

/* Utility alignments and spacers */
.flex-1 { flex: 1; }
.flex-row { display: flex; gap: 16px; }
.form-row { display: flex; gap: 16px; }
.col-span-all { grid-column: 1 / -1; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* 9. Responsive Mobile Breakpoints */
@media(max-width: 900px) {
    .dashboard-content-split {
        grid-template-columns: 1fr;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 768px) {
    .app-header {
        top: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        height: 60px;
    }
    .header-inner {
        padding: 0 16px;
    }
    .nav-link span, .btn span {
        display: none;
    }
    .nav-link {
        padding: 8px 12px;
    }
    .main-container {
        padding-top: 80px;
        padding-left: 16px;
        padding-right: 16px;
    }
    .dashboard-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .quick-actions {
        width: 100%;
    }
    .quick-actions button, .quick-actions a {
        width: 100%;
        display: flex;
    }
}

/* Static Button Ripple effect */
.btn-ripple-span {
    position: absolute;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: scale(0);
    animation: rippleAnimation 0.6s linear;
    pointer-events: none;
}

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Empty Chart Fallback Graphic */
.empty-chart-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 240px;
    text-align: center;
    color: var(--text-secondary);
    padding: 24px;
}

.empty-chart-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.15));
    animation: pulseGlow 3s infinite ease-in-out;
}

.empty-chart-fallback p {
    font-size: 0.88rem;
    max-width: 280px;
    line-height: 1.5;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
}

/* 10. Left Sidebar Layout System */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    overflow-y: auto;
}

.sidebar-header {
    min-height: 80px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-header .logo-shield {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    box-shadow: 0 0 12px var(--primary-glow);
}

.sidebar-header .logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.sidebar-app-selector {
    padding: 16px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.app-selector-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 8px;
}

.app-selector-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.app-selector-dropdown:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--primary-color);
}

.app-selector-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.arrow-mini {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.sidebar-menu {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 800;
    margin: 16px 8px 8px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.menu-link i {
    width: 16px;
    text-align: center;
    font-size: 0.95rem;
}

.menu-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.menu-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.22) 0%, rgba(168, 85, 247, 0.06) 100%);
    border-left: 3px solid var(--primary-color);
    box-shadow: inset 0 0 16px rgba(99, 102, 241, 0.12);
    font-weight: 600;
}

.is-admin-route .menu-link.active,
.sidebar-admin .menu-link.active {
    background: linear-gradient(90deg, rgba(255, 51, 102, 0.2) 0%, rgba(244, 63, 94, 0.04) 100%);
    border-left: 3px solid var(--admin-color);
    box-shadow: inset 0 0 16px rgba(255, 51, 102, 0.1);
}

.content-wrapper {
    flex-grow: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - 260px);
}

.content-wrapper .app-header {
    height: 70px;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(9, 9, 11, 0.65);
    backdrop-filter: blur(12px);
    width: 100%;
}

.header-breadcrumb {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Page content adaptations */
.main-container {
    padding: 32px;
}

/* Sidebar responsive breakpoints */
@media (max-width: 1024px) {
    .sidebar {
        width: 60px;
    }
    .sidebar-header .logo-text,
    .app-selector-label,
    .app-selector-name,
    .arrow-mini,
    .menu-section-label,
    .menu-link span {
        display: none;
    }
    .sidebar-header {
        padding: 0;
        justify-content: center;
    }
    .sidebar-app-selector {
        padding: 12px 0;
        display: flex;
        justify-content: center;
    }
    .app-selector-dropdown {
        padding: 10px;
        justify-content: center;
    }
    .menu-link {
        padding: 12px;
        justify-content: center;
    }
    .content-wrapper {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
}

@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        height: 60px;
    }
    .sidebar-header,
    .sidebar-app-selector {
        display: none;
    }
    .sidebar-menu {
        flex-direction: row;
        padding: 8px;
        gap: 8px;
        overflow-x: auto;
        width: 100%;
    }
    .menu-link {
        display: inline-flex;
        padding: 8px 12px;
    }
    .content-wrapper {
        margin-left: 0;
        width: 100%;
    }
}


/* ── Footer ── */
.app-footer {
    width: 100%;
    padding: 14px 24px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background: transparent;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    text-align: center;
}

.footer-copy {
    font-size: 0.78rem;
    color: var(--text-muted);
    opacity: 0.75;
}

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    opacity: 0.75;
}

.status-indicator {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    flex-shrink: 0;
}

/* ==========================================================================
   IN-APP CONFIRMATION MODAL (REPLACES BROWSER NATIVE DIALOGS)
   ========================================================================== */
.apex-confirm-modal {
    z-index: 999999 !important;
}

.apex-confirm-card {
    background: var(--card-bg, rgba(18, 22, 34, 0.85)) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    animation: confirmCardPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes confirmCardPop {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.apex-confirm-icon-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.25) !important;
}

.apex-confirm-icon-warning {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.25) !important;
}

.apex-confirm-icon-success {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.25) !important;
}

.apex-confirm-icon-primary {
    background: rgba(99, 102, 241, 0.12) !important;
    color: var(--accent-primary) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.25) !important;
}

/* Custom Sleek Dark Glass Scrollbars - eliminates bright white sliders */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(9, 9, 11, 0.6);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) rgba(9, 9, 11, 0.6);
}

/* ==========================================================================
   GLASS VAULT ARCHITECTURAL SUITE (Landing & Auth Alignment)
   ========================================================================== */

/* Fullscreen Continuous Cyber Plasma Shader Canvas */
#color-bends-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.36;
}

/* Dedicated Radial Center Vignette */
.vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 25%, transparent 35%, rgba(3, 4, 7, 0.78) 85%);
    z-index: 1;
    pointer-events: none;
}

/* Master Layout Depth */
.dashboard-layout {
    position: relative;
    z-index: 10;
}

/* Base Body & Headings Typography Alignment */
body {
    font-family: 'Comfortaa', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    background-color: #030407 !important;
}

h1, h2, h3, h4, h5, h6,
.page-title,
.card-header h4,
.card-header-clean h4,
.stat-val {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* Sidebar Glass Vault Polish & Invisible Scroll */
.sidebar {
    background: rgba(10, 12, 18, 0.65) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    overflow-y: auto !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}

.sidebar::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Opera */
    width: 0 !important;
    height: 0 !important;
}

.sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Category Sections with Glowing Micro-Divider */
.menu-section-label {
    font-family: 'Comfortaa', sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    color: rgba(255, 255, 255, 0.42) !important;
    text-transform: uppercase !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 20px 8px 10px !important;
}

.menu-section-label::after {
    content: '' !important;
    flex: 1 !important;
    height: 1px !important;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0%, rgba(91, 108, 245, 0.15) 50%, transparent 100%) !important;
}

/* Menu Items with Frosted Hover & Micro-Animations */
.menu-link {
    font-family: 'Comfortaa', sans-serif !important;
    font-size: 0.88rem !important;
    border-radius: 12px !important;
    color: rgba(255, 255, 255, 0.65) !important;
    padding: 10px 14px !important;
    border: 1px solid transparent !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
}

.menu-link i {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease, filter 0.25s ease !important;
}

.menu-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    transform: translateX(4px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.menu-link:hover i {
    transform: scale(1.15) !important;
    color: #818cf8 !important;
    filter: drop-shadow(0 0 8px rgba(129, 140, 248, 0.65)) !important;
}

.menu-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(91, 108, 245, 0.24) 0%, rgba(129, 140, 248, 0.08) 100%) !important;
    border: 1px solid rgba(91, 108, 245, 0.4) !important;
    border-left: 1px solid rgba(91, 108, 245, 0.4) !important;
    box-shadow: 0 4px 20px rgba(91, 108, 245, 0.22), inset 0 1px 1px 0 rgba(255, 255, 255, 0.16) !important;
    font-weight: 700 !important;
}

.menu-link.active i {
    color: #818cf8 !important;
    filter: drop-shadow(0 0 10px rgba(129, 140, 248, 0.75)) !important;
}

/* Header Glass Pill */
.app-header {
    background: rgba(10, 12, 18, 0.58) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-radius: 9999px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5) !important;
}

.header-breadcrumb {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.app-header .header-inner,
.header-inner {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.breadcrumb-active {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 1.02rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.015em !important;
    color: #ffffff !important;
}

.header-live-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    border-radius: 9999px !important;
    padding: 3px 10px !important;
    font-family: 'Fira Code', monospace !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #34d399 !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.2) !important;
    user-select: none !important;
}

.header-live-pill .live-dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    background: #10b981 !important;
    box-shadow: 0 0 8px #10b981 !important;
    animation: livePulseDot 2s infinite ease-in-out !important;
}

@keyframes livePulseDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.45;
        transform: scale(0.8);
    }
}

.theme-toggle-btn, .btn-logout {
    border-radius: 9999px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.25s ease !important;
}

.theme-toggle-btn:hover, .btn-logout:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Dashboard Header Row & Welcome */
.dashboard-header-row {
    margin-bottom: 28px;
}

.welcome-box .page-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 6px;
}

.welcome-box .page-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Upgrade Banner Glass Vault */
.upgrade-banner-glass {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(91, 108, 245, 0.08);
    border: 1px solid rgba(91, 108, 245, 0.25);
    border-radius: 20px;
    padding: 1.3rem 1.6rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
    flex-wrap: wrap;
    gap: 1.2rem;
}

.upgrade-info-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 280px;
}

.upgrade-icon-gem {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 1.25rem;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
    flex-shrink: 0;
}

.upgrade-text-block h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.upgrade-text-block p {
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.45;
    margin: 0;
}

.btn-upgrade-pill {
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 9999px;
    background: linear-gradient(135deg, #5b6cf5 0%, #818cf8 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(91, 108, 245, 0.35);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.btn-upgrade-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 26px rgba(91, 108, 245, 0.5);
    color: #fff;
}

/* Stats Grid & Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card-glass {
    background: rgba(10, 12, 18, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.stat-card-glass:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 65px rgba(0, 0, 0, 0.75), inset 0 1px 1px 0 rgba(255, 255, 255, 0.22);
}

.stat-icon-gem {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-icon-gem.blue {
    background: rgba(91, 108, 245, 0.12);
    color: #818cf8;
    border-color: rgba(91, 108, 245, 0.25);
    box-shadow: 0 0 20px rgba(91, 108, 245, 0.2);
}

.stat-icon-gem.green {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.stat-icon-gem.purple {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.25);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.stat-icon-gem.orange {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.stat-info-wrap {
    display: flex;
    flex-direction: column;
}

.stat-lbl {
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.stat-val {
    font-size: 1.9rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Content Split & Glass Cards */
.dashboard-content-split {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
    margin-bottom: 32px;
}

.content-card-glass {
    background: rgba(10, 12, 18, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    padding: 26px 28px;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
}

.card-header-clean {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-header-clean h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.card-header-clean p {
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

.chart-container-box {
    position: relative;
    height: 310px;
    width: 100%;
}

.empty-chart-fallback, .empty-timeline-state {
    height: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    padding: 24px;
}

.empty-chart-icon, .empty-icon {
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 12px;
}

/* Activity Timeline Glass */
.activity-timeline-glass {
    display: flex;
    flex-direction: column;
}

.timeline-item-glass {
    display: flex;
    gap: 16px;
    position: relative;
    padding-bottom: 22px;
}

.timeline-item-glass:last-child {
    padding-bottom: 0;
}

.timeline-item-glass::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.08);
}

.timeline-item-glass:last-child::before {
    display: none;
}

.timeline-badge-gem {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-top: 3px;
    flex-shrink: 0;
    z-index: 2;
    border: 3px solid #030407;
}

.timeline-badge-gem.badge-success {
    background: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.timeline-badge-gem.badge-info {
    background: #818cf8;
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.5);
}

.timeline-body-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.timeline-time {
    font-family: 'Fira Code', monospace;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.42);
    margin-bottom: 2px;
}

.timeline-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 2px 0;
}

.timeline-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.45;
    margin: 0;
}

@media(max-width: 992px) {
    .dashboard-content-split {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   FLOATING GHOST ACTION CLUSTER (Glass Vault Spec)
   ========================================================================== */
.ghost-top-cluster {
    position: fixed !important;
    top: 20px !important;
    right: 28px !important;
    z-index: 999 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(10, 12, 18, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-radius: 9999px !important;
    padding: 6px 14px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), inset 0 1px 1px 0 rgba(255, 255, 255, 0.15) !important;
    transition: all 0.25s ease !important;
}

.ghost-cluster-btn {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    font-family: 'Comfortaa', sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.ghost-cluster-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.ghost-cluster-btn.theme-btn {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

.ghost-cluster-btn.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}

.ghost-sep {
    width: 1px !important;
    height: 16px !important;
    background: rgba(255, 255, 255, 0.14) !important;
}

/* Welcome Group with Live Indicator */
.welcome-title-group {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    flex-wrap: wrap !important;
    margin-bottom: 6px !important;
}

.welcome-title-group .page-title {
    margin-bottom: 0 !important;
}

.greeting-live-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    border-radius: 9999px !important;
    padding: 4px 12px !important;
    font-family: 'Fira Code', monospace !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #34d399 !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.2) !important;
    user-select: none !important;
}

.greeting-live-pill .live-dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    background: #10b981 !important;
    box-shadow: 0 0 8px #10b981 !important;
    animation: livePulseDot 2s infinite ease-in-out !important;
}

.main-container {
    padding: 36px 32px 60px !important;
}


/* ==========================================================================
   APEXAUTH UNIFIED MASTER DESIGN & COLOR SYSTEM
   Harmonizes Dashboard, Manage Apps, User List, Licenses, and all Core Views
   ========================================================================== */

:root[data-theme="dark"] {
    --bg-primary: #030407 !important;
    --bg-secondary: #080a14 !important;
    --glass-bg: rgba(11, 14, 24, 0.68) !important;
    --glass-border: rgba(255, 255, 255, 0.08) !important;
    --glass-glow: rgba(99, 102, 241, 0.16) !important;
    
    --card-surface: rgba(11, 14, 24, 0.68) !important;
    --card-border: rgba(255, 255, 255, 0.08) !important;
    --card-highlight: inset 0 1px 1px 0 rgba(255, 255, 255, 0.12) !important;
    --card-shadow: 0 16px 40px rgba(0, 0, 0, 0.55) !important;
    
    --dock-bg: #0e1222 !important;
    --dock-border: rgba(255, 255, 255, 0.08) !important;
    --dock-hover: #161b32 !important;
    --dock-hover-border: rgba(255, 255, 255, 0.18) !important;
    
    --input-surface: #080a14 !important;
    --input-border: rgba(255, 255, 255, 0.08) !important;
    
    --bg-card: rgba(11, 14, 24, 0.68) !important;
    --border-color: rgba(255, 255, 255, 0.08) !important;
    --bg-input: #080a14 !important;
}

/* 1. Master Harmonized Glass Surface across ALL Cards & Tables */
.glass,
.content-card.glass,
.content-card-glass,
.stat-card-glass,
.table-card,
.cyber-glass-table-card,
.app-box-card,
.kpi-glass-card {
    background: rgba(11, 14, 24, 0.68) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 1px 1px 0 rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
}

/* Hover elevation on interactive cards */
.app-box-card:hover,
.stat-card-glass:hover,
.kpi-glass-card:hover {
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), inset 0 1px 1px 0 rgba(255, 255, 255, 0.18) !important;
}

/* 2. Master Harmonized Action Buttons & Docks */
.dock-btn,
.btn-dock,
.action-box-btn,
.btn-icon-sm,
.btn-secondary {
    background: #0e1222 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
    transition: all 0.18s ease !important;
}
.dock-btn:hover,
.btn-dock:hover,
.action-box-btn:hover,
.btn-icon-sm:hover,
.btn-secondary:hover {
    background: #161b32 !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

/* 3. Master Harmonized Recessed Filter Containers */
.filter-pills-wrap,
.filter-segmented-wrap,
.users-controls-bar {
    background: #080a14 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
}

.filter-pill.active,
.seg-pill-btn.active {
    background: #161b32 !important;
    color: #818cf8 !important;
    border: 1px solid rgba(99, 102, 241, 0.32) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
}

/* 4. Master Harmonized Inputs & Textareas */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea,
.users-search-input,
.filter-search-input {
    background-color: #080a14 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-radius: 9px !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
.users-search-input:focus,
.filter-search-input:focus {
    border-color: rgba(99, 102, 241, 0.5) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15) !important;
}

/* 5. Master Harmonized Table Styling */
.data-table,
.cyber-table {
    width: 100% !important;
    border-collapse: collapse !important;
}
.data-table thead th,
.cyber-table thead th {
    background: rgba(6, 8, 15, 0.85) !important;
    color: #8b98b4 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.data-table tbody tr,
.cyber-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    transition: background 0.15s ease !important;
}
.data-table tbody tr:hover,
.cyber-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* 6. Master Harmonized Modals */
.modal-overlay,
.apex-centered-modal {
    background: rgba(4, 5, 10, 0.82) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}
.modal-card.glass,
.apex-modal-card {
    background: #0b0e1b !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), inset 0 1px 1px 0 rgba(255, 255, 255, 0.14) !important;
    border-radius: 16px !important;
}

/* Full-Width Fluid Layout for Administrative Console */
.admin-fluid-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 20px 24px 60px !important;
    box-sizing: border-box !important;
}
.admin-fluid-container .content-card,
.admin-fluid-container .table-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.admin-fluid-container .table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}
.admin-fluid-container .data-table {
    width: 100% !important;
    table-layout: auto !important;
}
.admin-fluid-container .data-table th,
.admin-fluid-container .data-table td {
    padding: 11px 12px !important;
}
