* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body {
    font-family: 'Inter', sans-serif
}

.font-jakarta {
    font-family: 'Plus Jakarta Sans', sans-serif
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569
}

.sidebar-scroll::-webkit-scrollbar {
    width: 4px
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .3);
    border-radius: 2px
}

.glass {
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px)
}

.dark .glass {
    background: rgba(15, 23, 42, .7)
}

.glass-card {
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, .8)
}

.dark .glass-card {
    background: rgba(30, 41, 59, .8);
    border: 1px solid rgba(51, 65, 85, .6)
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes pulse-soft {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .7
    }
}

.animate-fadeInUp {
    animation: fadeInUp .5s ease-out forwards
}

.hover-lift {
    transition: all .3s cubic-bezier(.4, 0, .2, 1)
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .12)
}

.dark .hover-lift:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, .4)
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.nav-active {
    background: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(139, 92, 246, .08));
    border-right: 3px solid #6366f1;
    color: #6366f1
}

.dark .nav-active {
    background: linear-gradient(135deg, rgba(99, 102, 241, .2), rgba(139, 92, 246, .12));
    color: #818cf8;
    border-color: #818cf8
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: pulse-soft 2s infinite
}

.dark .notification-dot {
    border-color: #0f172a
}

.dropdown-enter {
    opacity: 0;
    transform: translateY(-8px) scale(.96);
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
    pointer-events: none
}

.dropdown-enter.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto
}

.kpi-gradient-1 {
    background: linear-gradient(135deg, #6366f1, #8b5cf6)
}

.chart-container {
    position: relative;
    width: 100%;
    min-height: 280px
}

.badge-success {
    background: #ecfdf5;
    color: #059669
}

.dark .badge-success {
    background: rgba(16, 185, 129, .15);
    color: #34d399
}

.badge-warning {
    background: #fffbeb;
    color: #d97706
}

.dark .badge-warning {
    background: rgba(245, 158, 11, .15);
    color: #fbbf24
}

.badge-danger {
    background: #fef2f2;
    color: #dc2626
}

.dark .badge-danger {
    background: rgba(239, 68, 68, .15);
    color: #f87171
}

.badge-info {
    background: #eff6ff;
    color: #2563eb
}

.dark .badge-info {
    background: rgba(59, 130, 246, .15);
    color: #60a5fa
}

.badge-purple {
    background: #f5f3ff;
    color: #7c3aed
}

.dark .badge-purple {
    background: rgba(124, 58, 237, .15);
    color: #a78bfa
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    padding: 16px
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 520px;
    width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    transform: scale(.95) translateY(10px);
    transition: transform .3s ease
}

.modal-backdrop.active .modal-content {
    transform: scale(1) translateY(0)
}

.dark .modal-content {
    background: #1e293b
}

.live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse-soft 1.5s infinite
}

/* Settings-specific */
.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    transition: all .2s ease;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
}

.dark .settings-nav-item {
    color: #94a3b8
}

.settings-nav-item:hover {
    background: rgba(99, 102, 241, .06);
    color: #4f46e5
}

.dark .settings-nav-item:hover {
    background: rgba(99, 102, 241, .1);
    color: #a5b4fc
}

.settings-nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(139, 92, 246, .06));
    color: #4f46e5;
    border-color: rgba(99, 102, 241, .2);
}

.dark .settings-nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, .2), rgba(139, 92, 246, .1));
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, .3)
}

.settings-section {
    display: none;
    animation: fadeInUp .3s ease-out
}

.settings-section.active {
    display: block
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: all .2s ease;
}

.dark .form-input,
.dark .form-select,
.dark .form-textarea {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15)
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px
}

.dark .form-label {
    color: #cbd5e1
}

.form-help {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 5px
}

.toggle-lg {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 9999px;
    cursor: pointer;
    transition: background .2s;
    flex-shrink: 0;
}

.dark .toggle-lg {
    background: #475569
}

.toggle-lg::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}

.toggle-lg.on {
    background: #6366f1
}

.toggle-lg.on::after {
    transform: translateX(20px)
}

.pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    transition: background .2s;
}

.pref-row:hover {
    background: rgba(99, 102, 241, .04)
}

.dark .pref-row:hover {
    background: rgba(99, 102, 241, .08)
}

.theme-preview {
    padding: 14px;
    border-radius: 14px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}

.theme-preview.selected {
    border-color: #6366f1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, .2)
}

.theme-preview:hover {
    transform: translateY(-2px)
}

.theme-preview::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}

.theme-preview.selected::after {
    opacity: 1
}

.theme-preview .theme-check {
    position: absolute;
    top: 11px;
    right: 11px;
    color: #fff;
    opacity: 0;
    transition: opacity .2s;
    z-index: 2;
    font-size: 13px;
    font-weight: 900
}

.theme-preview.selected .theme-check {
    opacity: 1
}

.tp-light {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0)
}

.tp-dark {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #f1f5f9
}

.tp-auto {
    background: linear-gradient(135deg, #f8fafc 50%, #0f172a 50%);
    color: #0f172a
}

.dark .tp-auto {
    color: #f1f5f9
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all .2s ease;
    position: relative;
}

.color-swatch.selected {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15)
}

.color-swatch::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    opacity: 0;
    transition: opacity .2s;
}

.color-swatch.selected::after {
    opacity: 1
}

.cs-indigo {
    background: linear-gradient(135deg, #6366f1, #4f46e5)
}

.cs-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb)
}

.cs-emerald {
    background: linear-gradient(135deg, #10b981, #059669)
}

.cs-rose {
    background: linear-gradient(135deg, #f43f5e, #e11d48)
}

.cs-orange {
    background: linear-gradient(135deg, #f97316, #ea580c)
}

.cs-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed)
}

.cs-cyan {
    background: linear-gradient(135deg, #06b6d4, #0891b2)
}

.cs-amber {
    background: linear-gradient(135deg, #f59e0b, #d97706)
}

.session-item {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all .2s ease;
}

.dark .session-item {
    border-color: #334155
}

.session-item:hover {
    border-color: #6366f1
}

.session-current {
    border-color: #10b981;
    background: rgba(16, 185, 129, .04)
}

.dark .session-current {
    background: rgba(16, 185, 129, .08)
}

.plan-card {
    padding: 20px;
    border-radius: 16px;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.dark .plan-card {
    border-color: #334155
}

.plan-card:hover {
    transform: translateY(-3px)
}

.plan-card.current {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, .05), rgba(139, 92, 246, .02))
}

.dark .plan-card.current {
    background: linear-gradient(135deg, rgba(99, 102, 241, .1), rgba(139, 92, 246, .05))
}

.plan-card .plan-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
}

.danger-zone {
    border: 2px dashed rgba(239, 68, 68, .3);
    background: rgba(239, 68, 68, .02);
    border-radius: 14px;
    padding: 16px;
}

.dark .danger-zone {
    background: rgba(239, 68, 68, .05)
}

.settings-row {
    padding: 14px;
    border-radius: 10px;
    transition: background .2s ease;
}

.settings-row:hover {
    background: rgba(99, 102, 241, .03)
}

.dark .settings-row:hover {
    background: rgba(99, 102, 241, .08)
}

.avatar-upload {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 4px solid #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
}

.dark .avatar-upload {
    border-color: #1e293b
}

.avatar-upload:hover .avatar-overlay {
    opacity: 1
}

.avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity .2s;
}

.integration-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    transition: background .2s;
}

.dark .integration-mini {
    background: #1e293b
}

.integration-mini:hover {
    background: #f1f5f9
}

.dark .integration-mini:hover {
    background: #334155
}

.im-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

.api-key-mask {
    font-family: 'SF Mono', 'Monaco', monospace;
    letter-spacing: 2px
}