[x-cloak] {
    display: none !important;
}

/* ===================== COLORS & VARIABLES ===================== */
:root {
    --a1: 99 102 241;
    /* Indigo default */
    --a2: 236 72 153;
    /* Pink default */
    --a3: 56 189 248;
    /* Sky default */
    --accent: var(--a1);
}

/* Existing Themes */
:root[data-accent="indigo"] {
    --a1: 99 102 241;
    --a2: 236 72 153;
    --a3: 56 189 248;
    --accent: var(--a1);
}

:root[data-accent="emerald"] {
    --a1: 16 185 129;
    --a2: 59 130 246;
    --a3: 236 72 153;
    --accent: var(--a1);
}

:root[data-accent="rose"] {
    --a1: 244 63 94;
    --a2: 168 85 247;
    --a3: 59 130 246;
    --accent: var(--a1);
}

:root[data-accent="amber"] {
    --a1: 245 158 11;
    --a2: 236 72 153;
    --a3: 99 102 241;
    --accent: var(--a1);
}

:root[data-accent="violet"] {
    --a1: 139 92 246;
    --a2: 99 102 241;
    --a3: 236 72 153;
    --accent: var(--a1);
}

:root[data-accent="sky"] {
    --a1: 14 165 233;
    --a2: 99 102 241;
    --a3: 236 72 153;
    --accent: var(--a1);
}

/* NEW Themes */
:root[data-accent="cyan"] {
    --a1: 6 182 212;
    --a2: 99 102 241;
    --a3: 236 72 153;
    --accent: var(--a1);
}

:root[data-accent="teal"] {
    --a1: 20 184 166;
    --a2: 6 182 212;
    --a3: 99 102 241;
    --accent: var(--a1);
}

:root[data-accent="orange"] {
    --a1: 249 115 22;
    --a2: 245 158 11;
    --a3: 236 72 153;
    --accent: var(--a1);
}

:root[data-accent="pink"] {
    --a1: 236 72 153;
    --a2: 168 85 247;
    --a3: 99 102 241;
    --accent: var(--a1);
}

:root[data-accent="purple"] {
    --a1: 168 85 247;
    --a2: 139 92 246;
    --a3: 236 72 153;
    --accent: var(--a1);
}

:root[data-accent="lime"] {
    --a1: 132 204 22;
    --a2: 34 197 94;
    --a3: 14 165 233;
    --accent: var(--a1);
}

/* Helper classes using CSS variables */
.accent-text {
    color: rgb(var(--accent));
}

.accent-bg {
    background-color: rgb(var(--accent));
}

.accent-border {
    border-color: rgb(var(--accent));
}

/* Soft backgrounds with opacity */
.accent-soft {
    background-color: rgb(var(--accent) / 0.12);
}

.accent-dot {
    background-color: rgb(var(--accent));
}

/* Gradient backgrounds */
.logo-gradient {
    background-image: linear-gradient(135deg, rgb(var(--a1)), rgb(var(--a2)), rgb(var(--a3)));
}

/* Focus rings */
.accent-focus:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgb(var(--accent) / 0.35);
    border-color: rgb(var(--accent) / 0.8);
}

/* ===================== GLASSMORPHISM ===================== */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(148, 163, 184, 0.2);
}

/* Shell - main container style */
.glass-shell {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.dark .glass-shell {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(51, 65, 85, 0.9);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* Glass Panel - for larger sections  */
.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.dark .glass-panel {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(71, 85, 105, 0.6);
}

/* Glass Card - for content blocks */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(71, 85, 105, 0.5);
}

/* Glass Input - for form inputs */
.glass-input {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #1e293b;
    transition: all 0.2s ease;
}

.glass-input:focus {
    outline: none;
    border-color: rgb(99, 102, 241);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dark .glass-input {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.6);
    color: #f1f5f9;
}

.dark .glass-input:focus {
    border-color: rgb(129, 140, 248);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Inner Panels */
.inner-panel {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.dark .inner-panel {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(51, 65, 85, 0.9);
}

.inner-panel:not(.dark) {
    background: rgba(255, 255, 255, 0.98);
}

/* ===================== GLOBAL BACKGROUND ===================== */
body {
    background-color: #f8fafc;
    background-image:
        radial-gradient(at 0% 0%, rgb(var(--a1) / 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgb(var(--a2) / 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgb(var(--a3) / 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    transition: background-image 0.5s ease;
}

.dark body {
    background-color: #0f172a;
    background-image:
        radial-gradient(at 0% 0%, rgb(var(--a1) / 0.10) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgb(var(--a2) / 0.10) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgb(var(--a3) / 0.10) 0px, transparent 50%);
}

/* Scrollbars */
.dark ::-webkit-scrollbar {
    width: 10px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 8px;
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 3s linear infinite;
}

/* ===================== UI COMPONENTS ===================== */

/* UI Inputs */
.ui-input {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #1e293b;
    transition: all 0.2s ease;
    outline: none;
}

.ui-input:focus {
    border-color: rgb(99, 102, 241);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dark .ui-input {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.6);
    color: #f1f5f9;
}

.dark .ui-input:focus {
    border-color: rgb(129, 140, 248);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.5);
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.7);
}

/* Buttons */
.btn-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-blue:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-green {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-green:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-orange:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-grad {
    background: linear-gradient(135deg, rgb(99, 102, 241), rgb(168, 85, 247));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-grad:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* Tab Buttons */
.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    color: rgba(148, 163, 184, 0.8);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    position: relative;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Pill Buttons */
.pill {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 0.5rem 1rem;
    color: rgba(148, 163, 184, 0.8);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.25s ease;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.pill:hover {
    border-color: rgb(var(--accent));
    color: rgb(var(--accent));
    background: rgb(var(--accent) / 0.1);
    transform: translateY(-1px);
}

.pill.active {
    background: rgb(var(--accent));
    border-color: rgb(var(--accent));
    color: white;
    box-shadow: 0 4px 12px rgb(var(--accent) / 0.4);
}

/* ===================== ADVANCED ANIMATIONS ===================== */

/* Gradient Animation */
@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.dark .shimmer {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
}

/* Pulse Glow */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgb(var(--accent) / 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgb(var(--accent) / 0.6);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.animate-bounce-in {
    animation: bounceIn 0.6s ease-out;
}

/* Slide In from Right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

/* ===================== ENHANCED COMPONENTS ===================== */

/* Stat Card */
.stat-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.dark .stat-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgb(var(--a1)), rgb(var(--a2)), rgb(var(--a3)));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

/* Enhanced Buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgb(var(--a1)), rgb(var(--a2)));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgb(var(--accent) / 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgb(var(--accent) / 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Icon Buttons */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: rgba(100, 116, 139, 0.8);
    cursor: pointer;
    transition: all 0.25s ease;
}

.icon-btn:hover {
    background: rgb(var(--accent) / 0.15);
    border-color: rgb(var(--accent) / 0.3);
    color: rgb(var(--accent));
    transform: scale(1.1);
}

.dark .icon-btn {
    background: rgba(51, 65, 85, 0.4);
    border-color: rgba(71, 85, 105, 0.5);
    color: rgba(148, 163, 184, 0.8);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: rgb(16, 185, 129);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: rgb(245, 158, 11);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: rgb(239, 68, 68);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: rgb(59, 130, 246);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Tooltips */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 0.75rem;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    font-size: 0.75rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.tooltip:hover::before {
    opacity: 1;
}

/* Loading Skeleton */
@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            rgba(148, 163, 184, 0.1) 25%,
            rgba(148, 163, 184, 0.2) 50%,
            rgba(148, 163, 184, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.5rem;
}

.dark .skeleton {
    background: linear-gradient(90deg,
            rgba(51, 65, 85, 0.3) 25%,
            rgba(51, 65, 85, 0.5) 50%,
            rgba(51, 65, 85, 0.3) 75%);
}

/* Enhanced Tables */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead {
    background: rgba(148, 163, 184, 0.1);
}

.modern-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(100, 116, 139, 0.8);
}

.modern-table td {
    padding: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.modern-table tbody tr {
    transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
    background: rgba(148, 163, 184, 0.05);
    transform: scale(1.01);
}

.dark .modern-table thead {
    background: rgba(51, 65, 85, 0.3);
}

.dark .modern-table td {
    border-top-color: rgba(71, 85, 105, 0.3);
}

.dark .modern-table tbody tr:hover {
    background: rgba(51, 65, 85, 0.4);
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgb(var(--a1)), rgb(var(--a2)));
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* Dividers */
.divider {
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(148, 163, 184, 0.3) 50%,
            transparent);
    margin: 1.5rem 0;
}

.dark .divider {
    background: linear-gradient(90deg,
            transparent,
            rgba(71, 85, 105, 0.5) 50%,
            transparent);
}

/* Enhanced Shadows */
.shadow-soft {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.shadow-medium {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.shadow-strong {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
}

.shadow-accent {
    box-shadow: 0 8px 24px rgb(var(--accent) / 0.25);
}

/* Responsive Grid */
.auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Floating Labels */
.floating-label {
    position: relative;
}

.floating-label input,
.floating-label textarea {
    width: 100%;
    padding: 1rem 0.75rem 0.5rem;
}

.floating-label label {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(100, 116, 139, 0.6);
    font-size: 0.875rem;
    pointer-events: none;
    transition: all 0.2s ease;
}

.floating-label input:focus+label,
.floating-label input:not(:placeholder-shown)+label,
.floating-label textarea:focus+label,
.floating-label textarea:not(:placeholder-shown)+label {
    top: 0.5rem;
    font-size: 0.75rem;
    color: rgb(var(--accent));
}