/* Import modern font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Theme Settings & CSS Variables */
:root {
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Default: Space Obsidian / Dark Theme */
    --bg-base: radial-gradient(ellipse 120% 100% at 50% 0%, #0f1729 0%, #080d1a 40%, #050810 100%);
    --bg-surface: rgba(30, 41, 59, 0.7);
    --bg-surface-elevated: rgba(15, 23, 42, 0.45);
    --bg-glass: rgba(30, 41, 59, 0.7);
    --border-color: rgba(148, 163, 184, 0.14);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --dropdown-bg: #1e293b;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.15);
    
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
}

.theme-dark {
    --bg-base: radial-gradient(ellipse 120% 100% at 50% 0%, #0f1729 0%, #080d1a 40%, #050810 100%);
    --bg-surface: rgba(30, 41, 59, 0.7);
    --bg-surface-elevated: rgba(15, 23, 42, 0.45);
    --bg-glass: rgba(30, 41, 59, 0.7);
    --border-color: rgba(148, 163, 184, 0.14);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --dropdown-bg: #1e293b;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
}

.theme-light {
    --bg-base: linear-gradient(135deg, #f4f8f6 0%, #e2ede8 100%);
    --bg-surface: #ffffff;
    --bg-surface-elevated: #e2ede8;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-color: rgba(34, 197, 94, 0.12);
    --text-primary: #142a1d;
    --text-secondary: #475d52;
    --text-muted: #8c9c94;
    --dropdown-bg: #ffffff;
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.1);
    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.1);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.1);
    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.1);
    --info: #0077b6;
    --info-bg: rgba(0, 119, 182, 0.1);
}

.theme-snow {
    --bg-base: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
    --bg-surface: rgba(255, 255, 255, 0.75);
    --bg-surface-elevated: #d9e2ec;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-color: rgba(186, 201, 218, 0.4);
    --text-primary: #102a43;
    --text-secondary: #486581;
    --text-muted: #627d98;
    --dropdown-bg: #ffffff;
    --primary: #0077b6;
    --primary-hover: #005f8f;
    --primary-glow: rgba(0, 119, 182, 0.15);
    --success: #2b9348;
    --success-bg: rgba(43, 147, 72, 0.1);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.1);
    --danger: #d62828;
    --danger-bg: rgba(214, 40, 40, 0.1);
    --info: #0077b6;
    --info-bg: rgba(0, 119, 182, 0.1);
}

.theme-cyberpunk {
    --bg-base: radial-gradient(circle at 50% 50%, #0e051a, #07020d);
    --bg-surface: rgba(22, 10, 36, 0.75);
    --bg-surface-elevated: #160a24;
    --bg-glass: rgba(22, 10, 36, 0.75);
    --border-color: rgba(255, 0, 127, 0.18);
    --text-primary: #ffffff;
    --text-secondary: #00f0ff;
    --text-muted: #bd93f9;
    --dropdown-bg: #160a24;
    --primary: #ff007f;
    --primary-hover: #e60072;
    --primary-glow: rgba(255, 0, 127, 0.15);
    --success: #39ff14;
    --success-bg: rgba(57, 255, 20, 0.1);
    --warning: #ff00ff;
    --warning-bg: rgba(255, 0, 255, 0.1);
    --danger: #ff3333;
    --danger-bg: rgba(255, 51, 51, 0.1);
    --info: #00f0ff;
    --info-bg: rgba(0, 240, 255, 0.1);
}

.theme-sunset {
    --bg-base: radial-gradient(ellipse 120% 100% at 50% 0%, #170d06 0%, #0d0703 60%, #060301 100%);
    --bg-surface: rgba(36, 24, 15, 0.72);
    --bg-surface-elevated: #1f140d;
    --bg-glass: rgba(36, 24, 15, 0.72);
    --border-color: rgba(251, 191, 36, 0.16);
    --text-primary: #fffbeb;
    --text-secondary: #fcd34d;
    --text-muted: #b45309;
    --dropdown-bg: #1f140d;
    --primary: #f59e0b;
    --primary-hover: #d97706;
    --primary-glow: rgba(245, 158, 11, 0.15);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
}

.theme-forest {
    --bg-base: radial-gradient(ellipse 120% 100% at 50% 0%, #08120e 0%, #040907 60%, #020504 100%);
    --bg-surface: rgba(14, 28, 22, 0.7);
    --bg-surface-elevated: #0b1712;
    --bg-glass: rgba(14, 28, 22, 0.7);
    --border-color: rgba(52, 211, 153, 0.12);
    --text-primary: #ecfdf5;
    --text-secondary: #a7f3d0;
    --text-muted: #047857;
    --dropdown-bg: #0b1712;
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.15);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
}

.theme-amethyst {
    --bg-base: radial-gradient(ellipse 120% 100% at 50% 0%, #150e26 0%, #0b0714 60%, #06040b 100%);
    --bg-surface: rgba(30, 20, 50, 0.65);
    --bg-surface-elevated: #1e1333;
    --bg-glass: rgba(30, 20, 50, 0.65);
    --border-color: rgba(167, 139, 250, 0.18);
    --text-primary: #f5f3ff;
    --text-secondary: #c084fc;
    --text-muted: #7c3aed;
    --dropdown-bg: #1e1333;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.15);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
}

/* Base resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: var(--transition-smooth);
}

.app-wrapper {
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    transition: var(--transition-smooth);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}
a:hover {
    color: var(--primary-hover);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-surface-elevated);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Layout Containers */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2rem;
    transition: var(--transition-smooth);
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Header navbar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.brand-section {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}
.brand-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar Navigation Items */
.nav-links {
    list-style: none;
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
}
.nav-item {
    margin-bottom: 0.5rem;
}
.nav-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link-item:hover {
    background-color: var(--primary-glow);
    color: var(--primary);
    transform: translateX(4px);
}
.nav-link-item.active {
    background-color: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
    border-radius: 4px 8px 8px 4px;
}

/* --- Premium Login Page (Modern & Smooth) --- */
.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-bg-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: particleFloat 20s ease-in-out infinite;
}

.p1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.p2 {
    width: 300px;
    height: 300px;
    background: #a855f7;
    bottom: -8%;
    right: -5%;
    animation-delay: -5s;
}

.p3 {
    width: 250px;
    height: 250px;
    background: #ec4899;
    top: 40%;
    right: 10%;
    animation-delay: -10s;
}

.p4 {
    width: 200px;
    height: 200px;
    background: var(--primary);
    bottom: 20%;
    left: 5%;
    animation-delay: -15s;
}

.p5 {
    width: 150px;
    height: 150px;
    background: #06b6d4;
    top: 15%;
    left: 40%;
    animation-delay: -7s;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(20px, 30px) scale(1.05);
    }
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    animation: loginFadeIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card-premium {
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem 2.5rem 1.75rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    animation: loginLogoPulse 3s ease-in-out infinite;
}

@keyframes loginLogoPulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
    }
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.login-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.feature-card-premium {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem;
    border-radius: 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    cursor: default;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card-premium:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), 0 0 12px var(--primary-glow);
}

.feature-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-color, var(--primary));
    transition: all 0.3s ease;
}

.feature-card-premium:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
}

.feature-info h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.15rem;
    line-height: 1.2;
}

.feature-info p {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-divider span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.login-form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tab-switcher-premium {
    display: flex;
    background: var(--bg-surface-elevated);
    border-radius: 12px;
    padding: 3px;
    border: 1px solid var(--border-color);
    gap: 2px;
}

.tab-btn-premium {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tab-btn-premium:hover {
    color: var(--text-secondary);
    background: var(--bg-surface);
}

.tab-btn-premium.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--border-color);
}

.login-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
    font-size: 0.85rem;
    animation: shakeError 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.login-form-content {
    min-height: 170px;
}

.input-group-premium {
    margin-bottom: 1.1rem;
}

.input-field {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    padding-top: 1.35rem;
    background: var(--bg-surface-elevated);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-input:focus ~ label,
.form-input:not(:placeholder-shown) ~ label {
    transform: translateY(-0.25rem) scale(0.78);
    color: var(--primary);
}

.input-field label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left top;
    font-weight: 400;
}

.form-input:focus ~ label {
    color: var(--primary);
    font-weight: 500;
}

.validation-msg {
    display: block;
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 0.35rem;
    padding-left: 0.25rem;
}

.btn-gradient-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-gradient-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.btn-gradient-premium:hover::before {
    left: 100%;
}

.btn-gradient-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4);
}

.btn-gradient-premium:active {
    transform: translateY(1px) scale(0.98);
}

.btn-gradient-premium:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* --- Premium Modern Add/Create Button --- */
.btn-premium-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    font-weight: 600;
    font-size: 0.82rem;
    font-family: var(--font-sans);
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-premium-add::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a855f7 0%, var(--primary) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    border-radius: inherit;
}

.btn-premium-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.35);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-premium-add:hover::before {
    opacity: 1;
}

.btn-premium-add:active {
    transform: translateY(1px) scale(0.96);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.btn-premium-add i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.btn-premium-add:hover i {
    transform: rotate(90deg);
}

.login-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.login-ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 500;
    font-family: var(--font-sans);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-ghost-btn:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.theme-dropdown-container {
    position: relative;
}

.theme-dropdown-menu {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform-origin: bottom center;
    transform: translateX(-50%);
    width: 190px;
    z-index: 1000;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
    animation: themeMenuIn 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes themeMenuIn {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.92) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1) translateY(0);
    }
}

.theme-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: left;
}

.theme-dropdown-item:hover {
    background: var(--primary-glow);
    color: var(--primary);
    transform: translateX(3px);
}

.theme-dropdown-item.active {
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
}

.theme-dropdown-item.active::before {
    content: '✓';
    margin-right: 0.15rem;
}

.theme-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 8px;
}

.login-demo-accounts {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.login-demo-accounts strong {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 576px) {
    .login-wrapper {
        padding: 0.75rem;
    }

    .login-card-premium {
        padding: 1.5rem 1.5rem 1.15rem;
        border-radius: 20px;
    }

    .login-features {
        grid-template-columns: 1fr;
    }

    .login-title {
        font-size: 1.4rem;
    }
}

/* Cards & Glassmorphism effects */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
select.form-control {
    background-color: var(--bg-surface-elevated) !important;
    color: var(--text-primary) !important;
}
select.form-control option {
    background-color: var(--dropdown-bg) !important;
    color: var(--text-primary) !important;
}

/* Button styles with micro-animations & premium scaling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.5s ease-out;
    pointer-events: none;
}
.btn:hover {
    transform: translateY(-2px) scale(1.02);
}
.btn:active {
    transform: translateY(1px) scale(0.98);
}
.btn:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
}
.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
.btn-secondary {
    background-color: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.btn-secondary:hover {
    background-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}



/* Premium table enhancements */
.table {
    --bs-table-bg: transparent !important;
    background-color: transparent !important;
    --bs-table-color: var(--text-primary) !important;
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0;
}
.table th, .table td {
    background-color: transparent !important;
    color: var(--text-primary) !important;
}
.table th {
    color: var(--text-secondary) !important;
}
.table tr {
    transition: var(--transition-smooth);
}
.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
    transform: translateY(-1px);
    box-shadow: inset 3px 0 0 0 var(--primary);
}
.theme-light .table tbody tr:hover,
.theme-snow .table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
}
.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color) !important;
}
.table td {
    border-bottom: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15), 0 0 12px var(--primary-glow);
}

/* Badges for status and priority */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-open { background-color: var(--info-bg); color: var(--info); }
.badge-inprogress { background-color: var(--warning-bg); color: var(--warning); }
.badge-resolved { background-color: var(--success-bg); color: var(--success); }
.badge-closed { background-color: var(--text-muted); color: var(--bg-base); }

.badge-low { background-color: var(--success-bg); color: var(--success); }
.badge-medium { background-color: var(--warning-bg); color: var(--warning); }
.badge-high { background-color: var(--danger-bg); color: var(--danger); }
.badge-critical { background-color: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }

/* Dashboard Styling */


/* Kanban Board Styling */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    align-items: flex-start;
}
.kanban-column {
    flex: 1;
    min-width: 280px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}
.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 400px;
}
.kanban-card {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: grab;
    transition: var(--transition-smooth);
}
.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    border-color: var(--primary);
}

/* --- Premium Knowledge Base Page Styles --- */

.kb-sidebar {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.kb-search-wrapper {
    position: relative;
    margin-bottom: 1.25rem;
}

.kb-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.kb-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem !important;
    background: var(--bg-surface-elevated) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 10px !important;
    color: var(--text-primary) !important;
    font-size: 0.88rem;
    transition: var(--transition-smooth) !important;
}

.kb-search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.kb-search-input:focus + .kb-search-icon {
    color: var(--primary);
}

/* Category Items */
.kb-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kb-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.kb-category-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transform: scaleY(0.3);
    transition: var(--transition-smooth);
}

.kb-category-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.kb-category-item.active {
    color: var(--text-primary);
    background: var(--primary-glow);
    border-color: var(--border-color);
}

.kb-category-item.active::before {
    opacity: 1;
    transform: scaleY(1);
}

.kb-category-icon-wrapper {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.kb-category-item:hover .kb-category-icon-wrapper,
.kb-category-item.active .kb-category-icon-wrapper {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
}

.kb-category-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-surface-elevated);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-weight: 600;
}

/* Articles List Pane */
.kb-articles-pane {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    max-height: 650px;
    display: flex;
    flex-direction: column;
}

.kb-articles-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 4px;
}

.kb-article-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.kb-article-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kb-article-card.active {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.kb-article-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    flex-shrink: 0;
}

.kb-article-info {
    flex: 1;
    overflow: hidden;
}

.kb-article-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.kb-article-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Article Detail Pane */
.kb-detail-pane {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    min-height: 550px;
    position: relative;
    overflow: hidden;
}

.kb-detail-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.kb-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.kb-author-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kb-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
}

.kb-author-info {
    display: flex;
    flex-direction: column;
}

.kb-author-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.kb-article-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.kb-category-badge {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--primary);
}

/* Markdown Rendering Upgrades */
.article-body h1, .article-body h2, .article-body h3 {
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.article-body h1 { font-size: 1.4rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.article-body h2 { font-size: 1.25rem; }
.article-body h3 { font-size: 1.1rem; }

.article-body p {
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    opacity: 0.95;
}

.article-body ul, .article-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-primary);
    opacity: 0.95;
}

.article-body blockquote {
    border-left: 4px solid var(--primary);
    background: var(--primary-glow);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-primary);
}

.article-body code {
    background-color: var(--bg-surface-elevated) !important;
    color: var(--primary) !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 6px !important;
    font-size: 0.85em !important;
    font-family: monospace !important;
    border: 1px solid var(--border-color) !important;
}

.article-body pre {
    background-color: var(--bg-surface-elevated) !important;
    border: 1px solid var(--border-color) !important;
    padding: 1.25rem !important;
    border-radius: 12px !important;
    overflow-x: auto !important;
    margin: 1.5rem 0 !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1) !important;
}

.article-body pre code {
    background-color: transparent !important;
    border: none !important;
    color: var(--text-primary) !important;
    padding: 0 !important;
    font-size: 0.85rem !important;
}

/* Custom Toast Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}
.toast-alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
    min-width: 250px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease;
    border: 1px solid var(--border-color);
}
.toast-success { background-color: var(--bg-surface); color: var(--success); border-left: 4px solid var(--success); }
.toast-danger { background-color: var(--bg-surface); color: var(--danger); border-left: 4px solid var(--danger); }
.toast-warning { background-color: var(--bg-surface); color: var(--warning); border-left: 4px solid var(--warning); }
.toast-info { background-color: var(--bg-surface); color: var(--info); border-left: 4px solid var(--info); }

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

/* Login Page Layout */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background: radial-gradient(circle at top right, var(--primary-glow), var(--bg-base));
}
.login-card {
    width: 100%;
    max-width: 900px;
}

/* Print Specific Rules for PDF Export */
@media print {
    body, html, .app-wrapper, .main-content, .content-body {
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    aside, header.top-nav, .toast-container, .btn, .btn-secondary, .btn-primary, .col-lg-4 {
        display: none !important;
    }
    .col-lg-8 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    .glass-card {
        background: #ffffff !important;
        color: #000000 !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
}

/* TeamWork Style loaders & logo classes */
.initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #06080c;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-box {
    width: 90px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    position: relative;
}

.circle-border {
    width: 90px !important;
    height: 90px !important;
    padding: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: linear-gradient(0deg, rgba(99, 102, 241, 0.1) 33%, var(--primary) 100%) !important;
    animation: spin 1s linear infinite !important;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.15), inset 0 0 16px rgba(99, 102, 241, 0.05);
}

.circle-core {
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(4px);
    border-radius: 50%;
    background-image: url('/logo.png');
    background-size: 55% auto;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2), 0 0 0 1px rgba(255,255,255,0.06);
    animation: corePulseMini 2s ease-in-out infinite;
}

.spinner-box::before,
.spinner-box::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.8;
    box-shadow: 0 0 8px var(--primary);
}

.spinner-box::before {
    animation: dotOrbitMini1 2s ease-in-out infinite;
}

.spinner-box::after {
    animation: dotOrbitMini2 2s ease-in-out infinite;
}

.loader-text {
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

@keyframes corePulseMini {
    0%, 100% { box-shadow: 0 0 12px rgba(99, 102, 241, 0.2); transform: scale(1); }
    50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); transform: scale(1.04); }
}

@keyframes dotOrbitMini1 {
    0% { transform: rotate(0deg) translateX(43px) rotate(0deg); opacity: 0.8; }
    50% { opacity: 1; }
    100% { transform: rotate(360deg) translateX(43px) rotate(-360deg); opacity: 0.8; }
}

@keyframes dotOrbitMini2 {
    0% { transform: rotate(180deg) translateX(43px) rotate(-180deg); opacity: 0.8; }
    50% { opacity: 1; }
    100% { transform: rotate(540deg) translateX(43px) rotate(-540deg); opacity: 0.8; }
}

/* Navigation loader */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 8, 16, 0.75);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.loader-orbit {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--primary);
    border-right-color: #a78bfa;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15), inset 0 0 30px rgba(99, 102, 241, 0.05);
}

.orbit-core {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.2), 0 0 0 1px rgba(255,255,255,0.06);
    z-index: 1;
    animation: corePulse 2s ease-in-out infinite;
}

@keyframes corePulse {
    0%, 100% { box-shadow: 0 0 24px rgba(99, 102, 241, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.5); transform: scale(1.05); }
}

.orbit-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.8;
    animation: dotOrbit 2s ease-in-out infinite;
}

.orbit-dot.dot-1 { animation-delay: 0s; }
.orbit-dot.dot-2 { animation-delay: 0.67s; }
.orbit-dot.dot-3 { animation-delay: 1.33s; }

.orbit-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.2;
    animation: dotGlow 2s ease-in-out infinite;
}

@keyframes dotOrbit {
    0% { transform: rotate(0deg) translateX(72px) rotate(0deg); opacity: 0.8; }
    50% { opacity: 1; }
    100% { transform: rotate(360deg) translateX(72px) rotate(-360deg); opacity: 0.8; }
}

@keyframes dotGlow {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.8); opacity: 0.1; }
}

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

/* Collapsible Sidebar & Grouping Styles */
.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    border-radius: 8px;
}
.sidebar-toggle-btn:hover {
    background-color: var(--primary-glow);
    color: var(--primary);
}

.menu-group-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 0.75rem 1rem 0.25rem 1rem;
    margin-top: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition-smooth);
}
.menu-group-header .chevron {
    font-size: 0.65rem;
    transition: var(--transition-smooth);
    color: var(--text-muted);
}


.sidebar.collapsed {
    width: 80px;
}
.sidebar.collapsed .brand-logo,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .menu-group-header,
.sidebar.collapsed .btn,
.sidebar.collapsed .badge,
.sidebar.collapsed div[style*="padding: 1.25rem 1rem"] span,
.sidebar.collapsed div[style*="padding: 1.25rem 1rem"] div[style*="display: flex; flex-direction: column"] {
    display: none !important;
}
.sidebar.collapsed .brand-section {
    padding: 1rem 0.5rem;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
}
.sidebar.collapsed .nav-links {
    padding: 0.5rem;
}
.sidebar.collapsed .nav-link-item {
    justify-content: center;
    padding: 0.75rem 0;
    gap: 0;
}
.sidebar.collapsed .nav-icon {
    font-size: 1.35rem;
}
.sidebar.collapsed .sidebar-profile-card {
    background: transparent !important;
    border-color: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    justify-content: center !important;
}
.sidebar.collapsed .sidebar-profile-card div[style*="display: flex; flex-direction: column"] {
    display: none !important;
}
.sidebar.collapsed .sidebar-profile-card > div {
    gap: 0 !important;
}

.main-content.collapsed {
    margin-left: 80px;
}

@media (min-width: 993px) {
    .sidebar.collapsed {
        width: 80px;
    }
    .main-content.collapsed {
        margin-left: 80px;
    }
}

/* =========================================
   PREMIUM ENHANCEMENTS — Modern + Premium UI
   ========================================= */

/* --- Premium Sidebar --- */
.sidebar {
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-surface-elevated) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    border-right-color: transparent;
}
.sidebar::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--border-color), transparent);
    pointer-events: none;
}

.brand-section {
    position: relative;
    overflow: hidden;
}
.brand-section::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10%;
    width: 80%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.4;
}
.brand-logo {
    background-size: 200% auto;
    animation: brandShimmer 4s ease-in-out infinite alternate;
}
@keyframes brandShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 100% center; }
}

.nav-link-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin: 2px 0;
}
.nav-link-item::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 3px; height: 0;
    background: var(--primary);
    transform: translateY(-50%);
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px var(--primary-glow);
}
.nav-link-item:hover::before { height: 60%; }
.nav-link-item.active::before { height: 70%; }
.nav-link-item .nav-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}
.nav-link-item:hover .nav-icon {
    transform: scale(1.15);
    color: var(--primary);
}
.nav-link-item.active .nav-icon {
    color: var(--primary);
}
.nav-link-item .nav-text {
    transition: transform 0.3s ease;
}
.nav-link-item:hover .nav-text {
    transform: translateX(4px);
}

.menu-group-header {
    position: relative;
    padding-left: 1.5rem;
}
.menu-group-header::after {
    content: '';
    position: absolute;
    left: 0.75rem; top: 50%;
    width: 10px; height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 1px;
    transform: translateY(-50%);
}

/* Premium profile card in sidebar */
.sidebar-profile-card {
    background: linear-gradient(135deg, var(--bg-surface-elevated) 0%, var(--bg-surface) 100%);
    border-radius: 14px;
    padding: 1rem;
    margin: 0.25rem 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.sidebar-profile-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0.6;
}
.sidebar-profile-card:hover {
    box-shadow: 0 4px 16px var(--primary-glow);
}

/* --- Premium Buttons --- */
.btn {
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-weight: 600;
    position: relative;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.btn:hover::before {
    transform: translateX(100%);
}
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-glow), 0 4px 12px var(--primary-glow);
}
.btn:active {
    transform: translateY(1px) scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border: none;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    box-shadow: 0 6px 24px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.btn-gradient:hover {
    background: linear-gradient(135deg, var(--primary-hover), #9333ea);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    box-shadow: none;
}
.btn-ghost:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: none;
    transform: translateY(-1px);
}
.btn-ghost:focus-visible {
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    border: none;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, var(--danger));
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    border: none;
    box-shadow: 0 4px 14px rgba(52, 211, 153, 0.25);
}
.btn-success:hover {
    background: linear-gradient(135deg, #059669, var(--success));
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.35);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--primary-glow);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-outline-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: transparent;
}
.btn-outline-secondary:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* Premium loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}
.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
}
@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* Pulse button (for voice/record) */
.pulse-button {
    animation: pulseRing 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 var(--danger-bg); }
    50% { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* --- Premium Custom Select / Dropdown --- */
.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}
.select-wrapper select.form-control {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
    background-color: var(--bg-surface-elevated);
}
.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem; top: 50%;
    transform: translateY(-50%);
    font-size: 0.55rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: transform 0.25s ease;
}
.select-wrapper:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
    color: var(--primary);
}

/* Dropdown menu animation */
.dropdown-menu-premium {
    transform-origin: top right;
    animation: dropFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-surface-elevated);
    backdrop-filter: blur(20px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
@keyframes dropFadeIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.dropdown-item-premium {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: left;
}
.dropdown-item-premium:hover {
    background: var(--primary-glow);
    color: var(--primary);
    transform: translateX(4px);
}
.dropdown-item-premium.active {
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
}
.dropdown-item-premium.active::before {
    content: '✓';
    margin-right: 0.25rem;
}

/* --- Premium Page Header & Titles --- */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    border-radius: 1px;
}

.page-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    font-size: 1.3rem;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0.2rem 0 0 0;
    line-height: 1.4;
}

/* Content section title accent */
.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 60px; height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 1px;
}

/* --- Premium Tables --- */
.table-container {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}
.table thead tr {
    background: linear-gradient(180deg, 
        color-mix(in srgb, var(--bg-surface-elevated) 90%, transparent) 0%,
        var(--bg-surface-elevated) 100%) !important;
    backdrop-filter: blur(12px);
}
.table thead th {
    position: relative;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.6px;
}
.table thead th::after {
    content: '⇅';
    margin-left: 0.4rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 0.55rem;
    color: var(--text-muted);
}
.table thead th:hover::after { opacity: 0.6; }

.table tbody tr {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.012) !important;
}
.table tbody tr:hover {
    background: var(--primary-glow) !important;
    transform: scale(1.001);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06), inset 3px 0 0 0 var(--primary);
}
.table tbody tr::after {
    content: '';
    position: absolute;
    bottom: 0; left: 3px;
    width: calc(100% - 6px); height: 1px;
    background: linear-gradient(90deg, var(--primary), var(--border-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 0 1px 1px;
}
.table tbody tr:hover::after { opacity: 0.6; }
.table tbody tr:last-child::after { display: none; }

.table td {
    padding: 1rem 1.5rem !important;
    vertical-align: middle;
    font-size: 0.9rem;
}
.table th {
    padding: 1rem 1.5rem !important;
}

/* --- Premium Badges with Icons --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    position: relative;
}
.badge-open::before { content: '○'; }
.badge-inprogress::before { content: '◐'; }
.badge-resolved::before { content: '●'; }
.badge-closed::before { content: '◆'; }
.badge-critical::before { content: '‼'; }
.badge-high::before { content: '↑'; }
.badge-medium::before { content: '–'; }
.badge-low::before { content: '↓'; }

/* --- Premium Dashboard --- */

.dashboard-loading {
    text-align: center;
    padding: 5rem 2rem;
}

.dashboard-loading-text {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

/* --- My Dashboard Widget Cards --- */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.widget-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.widget-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.widget-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--success), var(--warning));
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.widget-card:hover::before {
    opacity: 1;
}

.widget-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.widget-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.widget-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.widget-card:hover .widget-card-icon {
    transform: scale(1.1) rotate(-5deg);
}

.widget-card-drag {
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.widget-card:hover .widget-card-drag {
    opacity: 1;
}

.widget-card-body {
    min-height: 80px;
}

.widget-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.widget-stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.widget-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.widget-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.widget-list-item:hover {
    border-color: var(--primary);
    transform: translateX(3px);
}

.widget-list-rank {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 24px;
}

.widget-list-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.widget-list-value {
    font-size: 0.82rem;
    color: var(--primary);
}

.widget-ticket-title {
    flex: 1;
    font-size: 0.82rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-elevated) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.premium-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--stat-accent);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.premium-stat:hover {
    transform: translateY(-4px);
    border-color: var(--stat-accent);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15), 0 0 20px color-mix(in srgb, var(--stat-accent) 10%, transparent);
}

.premium-stat:hover::before {
    opacity: 1;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-color);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.premium-stat:hover .stat-icon {
    transform: scale(1.1) rotate(-5deg);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

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

.chart-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.chart-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

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

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-primary);
}

.chart-title svg {
    color: var(--primary);
    flex-shrink: 0;
}

.chart-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0.2rem 0 0;
}

.chart-body {
    flex: 1;
    padding: 0.5rem 0;
}

.chart-svg {
    width: 100%;
    height: auto;
}

.chart-hover-point {
    cursor: pointer;
    transition: r 0.2s;
}

.chart-hover-point:hover {
    r: 7;
}

.chart-line-path {
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3));
}

.chart-bar {
    cursor: pointer;
    transition: opacity 0.2s;
}

.chart-bar:hover {
    opacity: 0.8;
}

.chart-tooltip {
    text-align: center;
    height: 20px;
    font-size: 0.8rem;
    color: var(--info);
    font-weight: 500;
    margin-top: 0.5rem;
}

.sla-donut-wrapper {
    position: relative;
    display: inline-block;
    width: 160px;
    height: 160px;
}

.sla-donut-svg {
    width: 100%;
    height: 100%;
}

.sla-donut-arc {
    transition: stroke-dashoffset 0.8s ease-in-out;
}

.sla-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.sla-donut-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    line-height: 1.2;
}

.sla-donut-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: block;
}

.sla-stats {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sla-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.sla-stat-row:last-child {
    border-bottom: none;
}

.sla-stat-row span {
    color: var(--text-secondary);
}

.sla-stat-row strong {
    color: var(--text-primary);
}

.priority-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.priority-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.priority-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.priority-count {
    color: var(--text-secondary);
    font-weight: 500;
}

.priority-bar-track {
    height: 8px;
    background-color: var(--bg-surface-elevated);
    border-radius: 4px;
    overflow: hidden;
}

.priority-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.sla-table-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

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

.premium-table thead th:first-child {
    border-radius: 8px 0 0 0;
}

.premium-table thead th:last-child {
    border-radius: 0 8px 0 0;
}

.premium-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: background 0.2s ease;
}

.premium-table tbody tr:hover td {
    background: var(--primary-glow);
}

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

.sla-time-remaining {
    font-weight: 600;
}

.sla-status-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* --- Kanban Premium --- */
.kanban-column {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.kanban-column-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}
.kanban-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.kanban-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 2px 2px 0;
}
.kanban-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 0 0 1px var(--primary);
    border-color: var(--primary);
}
.kanban-card:hover::before {
    opacity: 1;
}

/* --- Modal Premium --- */
.modal-premium {
    animation: modalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.modal-premium .modal-content {
    animation: modalContentIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes modalContentIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- Premium Login Feature Cards --- */
.feature-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.feature-card:hover::after {
    opacity: 1;
}

/* --- Misc Premium Touches --- */
.btn-close-premium {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}
.btn-close-premium:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
    transform: rotate(90deg);
}

/* Checkbox premium styling */
input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px; height: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
input[type="checkbox"]:hover {
    transform: scale(1.15);
}

/* Progress bar premium */
.progress {
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
}
.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    position: relative;
    overflow: hidden;
}
.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: progressShimmer 2s ease-in-out infinite;
}
@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Tab switcher premium */
.tab-switcher {
    display: flex;
    background: var(--bg-base);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--border-color);
    gap: 4px;
}
.tab-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}
.tab-btn.active {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Notification badge dot */
.notif-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 6px var(--danger);
    animation: notifPulse 2s ease-in-out infinite;
}
@keyframes notifPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Skeleton shimmer loading effect */
.skeleton {
    background: linear-gradient(90deg, 
        var(--bg-surface-elevated) 25%, 
        var(--bg-surface) 50%, 
        var(--bg-surface-elevated) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Presence Indicator Dot --- */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px currentColor;
    margin-right: 4px;
}
.status-online {
    background-color: var(--success);
    color: var(--success);
}
.status-offline {
    background-color: var(--danger);
    color: var(--danger);
}

/* --- Teamwork Members Page Split Container & Grids --- */
.members-split-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
    margin-top: 20px;
}

@media (max-width: 992px) {
    .members-split-container {
        grid-template-columns: 1fr;
    }
}

/* --- Premium Card Actions --- */
.card-actions-top-right {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.btn-card-action {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 0;
}

.btn-card-action:hover {
    transform: translateY(-2px);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-card-action:active {
    transform: translateY(0) scale(0.92);
}

.btn-card-action.btn-edit {
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.2);
}
.btn-card-action.btn-edit:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-card-action.btn-delete,
.btn-card-action.btn-block {
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.2);
}
.btn-card-action.btn-delete:hover,
.btn-card-action.btn-block:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-card-action.btn-activate {
    color: var(--success);
    border-color: rgba(52, 211, 153, 0.2);
}
.btn-card-action.btn-activate:hover {
    background: var(--success-bg);
    border-color: var(--success);
    color: var(--success);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.member-card {
    text-align: center;
    padding: 24px 20px !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    transition: var(--transition-smooth) !important;
}

.member-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary) !important;
    box-shadow: 0 10px 25px var(--primary-glow) !important;
}

.user-avatar.member-card-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 12px;
}

.member-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.member-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.member-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: var(--bg-surface-elevated);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 12px;
}

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

.stat-num {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.progress-bar-custom {
    width: 100%;
    height: 6px;
    background: var(--bg-surface-elevated);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* --- Teamwork Roles Page Grid & Cards --- */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.role-card-premium {
    padding: 24px 22px !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    position: relative;
    overflow: hidden;
    background: var(--bg-surface) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    transition: var(--transition-smooth) !important;
}

.role-card-premium:hover {
    transform: translateY(-5px);
    border-color: var(--primary) !important;
    box-shadow: 0 15px 35px var(--primary-glow) !important;
}

.role-glow-overlay {
    position: absolute;
    top: -40%;
    left: -40%;
    width: 180%;
    height: 180%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.role-icon-glow {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.org-members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 60px;
    position: relative;
    z-index: 2;
    margin-top: 6px;
}

.org-member-item-premium {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.org-member-item-premium:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
    border-color: var(--primary);
}

.org-member-avatar-premium {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}

.org-members-empty-premium {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 20px 0;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
}

/* Modal Backdrops and details styling */
.modal-backdrop-custom {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 8, 16, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content-custom {
    max-width: 600px;
    width: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-surface) !important;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.modal-header-custom {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.modal-close:hover {
    color: var(--text-primary);
}

.form-group-custom {
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label-custom {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input-custom {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    font-family: var(--font-sans);
    outline: none;
    transition: var(--transition-smooth);
}
.form-input-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.modal-footer-custom {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Heatmap for profile details */
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(53, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 3px;
    max-width: 100%;
    overflow-x: auto;
}
.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 2px;
}
.heatmap-cell.level-0 { background-color: var(--bg-surface-elevated); }
.heatmap-cell.level-1 { background-color: rgba(99, 102, 241, 0.25); }
.heatmap-cell.level-2 { background-color: rgba(99, 102, 241, 0.5); }
.heatmap-cell.level-3 { background-color: rgba(99, 102, 241, 0.75); }
.heatmap-cell.level-4 { background-color: var(--primary); }

/* ============================================================
   Teamwork-style Search Bar
   ============================================================ */
.tw-search-wrapper {
    position: relative;
    z-index: 1010;
}

.tw-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    min-width: 300px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: text;
}

.tw-search-bar:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(148, 163, 184, 0.3);
}

.tw-search-bar.focused {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 360px;
}

.tw-search-icon {
    position: absolute;
    left: 14px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: color 0.25s ease;
    pointer-events: none;
    z-index: 1;
}

.tw-search-bar.focused .tw-search-icon {
    color: var(--primary);
}

.tw-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 400;
    padding: 10px 10px 10px 40px;
    letter-spacing: 0.01em;
    width: 100%;
}

.tw-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    font-weight: 400;
}

.tw-search-input:focus {
    outline: none;
}

/* Keyboard shortcut badge */
.tw-search-shortcut {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-right: 12px;
    pointer-events: none;
    flex-shrink: 0;
}

.tw-search-shortcut kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    font-size: 0.65rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 5px;
    line-height: 1;
}

.tw-search-shortcut span {
    font-size: 0.6rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Clear button */
.tw-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.tw-search-clear:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Results Dropdown */
.tw-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 400px;
    max-height: 380px;
    overflow-y: auto;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px);
    padding: 6px;
    z-index: 1020;
    animation: twSearchDropIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes twSearchDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tw-search-results::-webkit-scrollbar {
    width: 5px;
}
.tw-search-results::-webkit-scrollbar-track {
    background: transparent;
}
.tw-search-results::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 10px;
}

/* Results header */
.tw-search-results-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    margin-bottom: 4px;
}

.tw-search-results-count {
    margin-left: auto;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Result item */
.tw-search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.15s ease;
    cursor: pointer;
    margin-bottom: 2px;
}

.tw-search-result-item:hover {
    background: rgba(99, 102, 241, 0.08);
}

.tw-search-result-item:active {
    transform: scale(0.99);
}

.tw-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.tw-search-result-item:hover .tw-result-icon {
    background: rgba(99, 102, 241, 0.18);
}

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

.tw-result-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.tw-result-summary {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
    line-height: 1.4;
}

/* Type badges */
.tw-result-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.tw-result-badge.badge-ticket {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
}

.tw-result-badge.badge-kb {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
}

/* ============================================================
   Shared Design System — Utility Classes
   ============================================================ */

/* --- Spacing Tokens --- */
:root {
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px var(--primary-glow);
}

/* --- Shared Flex/Grid Helpers --- */
.d-flex { display: flex; }
.d-grid { display: grid; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* --- Shared Spacing Helpers --- */
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.m-0 { margin: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* --- Shared Text Helpers --- */
.text-center { text-align: center; }
.text-start { text-align: left; }
.text-end { text-align: right; }
.text-sm { font-size: 0.8rem; }
.text-md { font-size: 0.9rem; }
.text-lg { font-size: 1.1rem; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--text-primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Shared Width Helpers --- */
.w-full { width: 100%; }
.h-full { height: 100%; }

/* --- Shared Surface / Container --- */
.surface-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.surface-card:hover {
    box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.surface-elevated {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

/* --- Shared Button Variants --- */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.82rem;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
}

.btn-icon-lg {
    padding: 0.7rem 1.3rem;
    font-size: 0.95rem;
}

.btn-primary-solid {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-danger-solid {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-danger-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

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

.btn-ghost-neutral:hover {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

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

.btn-ghost-danger:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
    transform: translateY(-1px);
}

/* --- Shared Animation Utilities --- */
.fade-in {
    animation: sharedFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sharedFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-fast {
    animation: sharedFadeInFast 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sharedFadeInFast {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.scale-in {
    animation: sharedScaleIn 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes sharedScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dashboard-page {
    animation: dashboardFadeIn 0.4s ease forwards;
}

@keyframes dashboardFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.page-header, .dashboard-content {
    animation: pageContentSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pageContentSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 16, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn 0.2s ease forwards;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    overflow-y: auto;
    animation: sharedScaleIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.modal-container.modal-sm { max-width: 400px; }
.modal-container.modal-lg { max-width: 720px; }
.modal-container.modal-xl { max-width: 960px; }

.modal-container::-webkit-scrollbar { width: 5px; }
.modal-container::-webkit-scrollbar-track { background: transparent; }
.modal-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

/* --- Shared Form Controls --- */
.form-field {
    margin-bottom: 1.1rem;
}

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

.input-premium {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-surface-elevated);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
}

.input-premium:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

select.input-premium {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

select.input-premium option {
    background-color: var(--dropdown-bg) !important;
    color: var(--text-primary) !important;
}

textarea.input-premium {
    min-height: 80px;
    resize: vertical;
}

/* --- Shared Badge System --- */
.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

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

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

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

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

.badge-premium.badge-neutral {
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
}

/* --- Shared Empty State --- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3.5rem 2rem;
    background: var(--bg-surface-elevated);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    margin: 1.5rem 0;
    transition: var(--transition-smooth);
}

.empty-state:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--primary);
    font-size: 2rem;
    opacity: 0.95;
    animation: pulseGlow 3s infinite alternate;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.5;
}

/* Sticky table headers option */
.table-responsive-sticky {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-surface);
}

.table-responsive-sticky .premium-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--dropdown-bg) !important;
    border-bottom: 2px solid var(--border-color);
}

/* Accessibility Focus Rings */
button:focus-visible, 
input:focus-visible, 
select:focus-visible, 
textarea:focus-visible,
.btn:focus-visible,
.input-premium:focus-visible {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 10px var(--primary-glow) !important;
    transition: box-shadow 0.2s ease, outline 0.2s ease !important;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    100% {
        box-shadow: 0 0 15px 5px rgba(99, 102, 241, 0.1);
    }
}

/* --- Shared Loading Spinner --- */
.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: loadingDots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(2) { animation-delay: 0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes loadingDots {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* --- Shared Divider --- */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: var(--space-lg) 0;
}

.divider-vertical {
    width: 1px;
    background: var(--border-color);
}

/* --- Shared Hover Card Effect --- */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hover-glow {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
    border-color: var(--primary);
}

/* --- Premium KB Action Buttons --- */
.btn-premium-edit,
.btn-premium-delete {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.btn-premium-edit {
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.25);
}

.btn-premium-edit:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

.btn-premium-edit:active {
    transform: translateY(0px) scale(0.96);
}

.btn-premium-delete {
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.25);
}

.btn-premium-delete:hover {
    background: rgba(248, 113, 113, 0.12);
    border-color: var(--danger);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(248, 113, 113, 0.2);
}

.btn-premium-delete:active {
    transform: translateY(0px) scale(0.96);
}

/* Responsive */
@media (max-width: 768px) {
    .tw-search-bar {
        min-width: 180px;
    }
    .tw-search-bar.focused {
        min-width: 220px;
    }
    .tw-search-shortcut {
        display: none;
    }
    .tw-search-results {
        min-width: 280px;
        right: -40px;
    }
}

/* ============================================================
   Premium UI Enhancements (Modern, Clean, Smooth)
   ============================================================ */

/* 1. Glassmorphism cards & widgets */
.premium-widget {
    background: var(--bg-surface) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    padding: 1.25rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 0 !important;
}

.premium-widget:hover {
    transform: translateY(-4px);
    border-color: var(--primary) !important;
    box-shadow: 0 8px 32px var(--primary-glow) !important;
}

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

.widget-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.widget-card-icon {
    font-size: 1.1rem;
    color: var(--primary);
}

.widget-card-drag {
    cursor: grab;
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.widget-card-drag:hover {
    opacity: 1;
}

.widget-stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.03em;
}

.widget-stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.widget-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.widget-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-surface-elevated);
    border-radius: 8px;
    font-size: 0.82rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.widget-list-item:hover {
    border-color: var(--border-color);
    transform: translateX(2px);
}

.widget-list-rank {
    font-weight: 700;
    color: var(--primary);
    width: 24px;
}

.widget-list-name {
    flex: 1;
    color: var(--text-primary);
}

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

.widget-ticket-title {
    font-size: 0.82rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

/* 2. Premium glowing badges */
.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.badge-premium.badge-success {
    background: var(--success-bg) !important;
    color: var(--success) !important;
    border-color: rgba(52, 211, 153, 0.15) !important;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.08) !important;
}

.badge-premium.badge-warning {
    background: var(--warning-bg) !important;
    color: var(--warning) !important;
    border-color: rgba(251, 191, 36, 0.15) !important;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.08) !important;
}

.badge-premium.badge-danger,
.badge-premium.badge-critical {
    background: var(--danger-bg) !important;
    color: var(--danger) !important;
    border-color: rgba(248, 113, 113, 0.15) !important;
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.08) !important;
}

.badge-premium.badge-info {
    background: var(--info-bg) !important;
    color: var(--info) !important;
    border-color: rgba(59, 130, 246, 0.15) !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.08) !important;
}

.badge-premium.badge-neutral {
    background: var(--bg-surface-elevated) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

/* 3. Live pulsing status indicator */
.pulse-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.pulse-status.online {
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: pulseOnline 2s infinite;
}

.pulse-status.offline {
    background: var(--danger);
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.7);
    animation: pulseOffline 2s infinite;
}

@keyframes pulseOnline {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    }
}

@keyframes pulseOffline {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(248, 113, 113, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
    }
}

/* 4. Table Animations & Row cards */
.premium-table-hover tbody tr {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-table-hover tbody tr:hover {
    background: var(--bg-surface-elevated) !important;
    transform: scale(1.002) translateX(4px);
    box-shadow: inset 3px 0 0 var(--primary);
}

/* 5. Secure Shield Container */
.secure-shield-container {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-elevated) 100%) !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.secure-shield-container:hover {
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.1) !important;
}

/* 6. Drag and Drop placeholders */
.kanban-column.drag-over {
    background: var(--bg-surface-elevated) !important;
    border: 2px dashed var(--primary) !important;
}

.premium-widget.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

/* --- Premium Pagination --- */
.premium-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.btn-pagination {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pagination:hover:not(:disabled) {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-pagination:active:not(:disabled) {
    transform: translateY(0);
}

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

.pagination-info {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 600;
    padding: 0 0.85rem;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* KB Detail Pane Empty State override to prevent double carding */
.kb-detail-pane .empty-state {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2rem 0 !important;
    margin: 0 !important;
}

.kb-detail-pane .empty-state-icon {
    animation: none !important;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    font-size: 3.5rem !important;
    opacity: 0.7 !important;
}

.kb-detail-pane .empty-state-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    margin-bottom: 0.5rem !important;
}

.kb-detail-pane .empty-state-desc {
    font-size: 0.9rem !important;
    color: var(--text-secondary) !important;
    max-width: 400px !important;
}

/* Theme-adaptive Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: var(--transition-smooth);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- Theme-Specific Premium Effects --- */

/* 1. Cyberpunk (Neon Synthwave) */
.theme-cyberpunk .secure-shield-container {
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.15), inset 0 0 10px rgba(0, 240, 255, 0.05) !important;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.25);
}
.theme-cyberpunk .premium-card,
.theme-cyberpunk .surface-card {
    box-shadow: 0 4px 16px rgba(0, 240, 255, 0.04) !important;
}
.theme-cyberpunk .premium-card:hover,
.theme-cyberpunk .surface-card:hover {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.12), 0 0 0 1px var(--primary) !important;
    border-color: var(--primary) !important;
}
.theme-cyberpunk .btn-primary {
    box-shadow: 0 0 12px rgba(255, 0, 127, 0.45) !important;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}
.theme-cyberpunk .btn-primary:hover {
    box-shadow: 0 0 22px rgba(255, 0, 127, 0.8), 0 0 10px rgba(0, 240, 255, 0.5) !important;
    transform: translateY(-2px) scale(1.02);
}
.theme-cyberpunk .form-control:focus,
.theme-cyberpunk .input-premium:focus {
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3) !important;
    border-color: var(--text-secondary) !important;
}

/* 2. Sunset (Warm Amber) */
.theme-sunset .secure-shield-container {
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
}
.theme-sunset .premium-card:hover,
.theme-sunset .surface-card:hover {
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.08), 0 0 0 1px var(--primary) !important;
}
.theme-sunset .btn-primary:hover {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.45) !important;
    transform: translateY(-1px);
}

/* 3. Amethyst (Mystic Purple) */
.theme-amethyst .secure-shield-container {
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
}
.theme-amethyst .premium-card:hover,
.theme-amethyst .surface-card:hover {
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.08), 0 0 0 1px var(--primary) !important;
}
.theme-amethyst .btn-primary:hover {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.45) !important;
    transform: translateY(-1px);
}

/* 4. Snow (Nordic Ice) */
.theme-snow .secure-shield-container {
    box-shadow: 0 8px 30px rgba(0, 77, 118, 0.025) !important;
    border-color: rgba(0, 119, 182, 0.1) !important;
}
.theme-snow .premium-card:hover,
.theme-snow .surface-card:hover {
    box-shadow: 0 6px 20px rgba(0, 119, 182, 0.05), 0 0 0 1px var(--primary) !important;
}
.theme-snow .btn-primary:hover {
    box-shadow: 0 4px 15px rgba(0, 119, 182, 0.18) !important;
    transform: translateY(-1px);
}

/* 5. Forest (Deep Emerald) */
.theme-forest .secure-shield-container {
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
}
.theme-forest .premium-card:hover,
.theme-forest .surface-card:hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.08), 0 0 0 1px var(--primary) !important;
}
.theme-forest .btn-primary:hover {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.45) !important;
    transform: translateY(-1px);
}

/* 6. Dark Theme (Space Obsidian) */
.theme-dark .secure-shield-container {
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
}
.theme-dark .premium-card:hover,
.theme-dark .surface-card:hover {
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08), 0 0 0 1px var(--primary) !important;
}
.theme-dark .btn-primary:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.45) !important;
    transform: translateY(-1px);
}

/* 7. Light Theme (Emerald Mint) */
.theme-light .secure-shield-container {
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.025) !important;
}
.theme-light .premium-card:hover,
.theme-light .surface-card:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.05), 0 0 0 1px var(--primary) !important;
}
.theme-light .btn-primary:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.18) !important;
    transform: translateY(-1px);
}

/* ============================================================
   AI Assistant Page UI/UX Enhancements (Modern Chat System)
   ============================================================ */

.chat-bubble-user-container {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
    animation: chatBubbleFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-bubble-user {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-glow) 100%) !important;
    color: #ffffff !important;
    border-radius: 18px 18px 4px 18px !important;
    padding: 0.85rem 1.35rem !important;
    box-shadow: 0 4px 12px var(--primary-glow) !important;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
    border: none !important;
    transition: all 0.2s ease-in-out;
}

.chat-bubble-user:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--primary-glow) !important;
}

.chat-bubble-bot-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
    animation: chatBubbleFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-bubble-bot {
    background: var(--bg-surface-elevated) !important;
    color: var(--text-primary) !important;
    border-radius: 18px 18px 18px 4px !important;
    padding: 0.9rem 1.4rem !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid var(--border-color) !important;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
    transition: all 0.2s ease-in-out;
}

.chat-bubble-bot:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06) !important;
}

.chat-avatar-user,
.chat-avatar-bot {
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
}

.chat-avatar-user {
    background: var(--primary-glow) !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
}

.chat-avatar-bot {
    background: var(--bg-surface-elevated) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

/* Animations */
@keyframes chatBubbleFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-fade-in {
    animation: chatBubbleFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mic pulse listening effect */
.mic-listening-active {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5) !important;
    animation: micPulse 1.5s infinite !important;
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

@keyframes micPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7) !important;
    }
    70% {
        transform: scale(1.08);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0) !important;
    }
}

/* --- Global Modal Form Styling Overrides --- */
.modal-body label,
.modal-body .form-label {
    display: block !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    margin-bottom: 0.4rem !important;
}

.modal-body .mb-3,
.modal-body .form-group {
    margin-bottom: 1.1rem !important;
}

/* --- Login Page Top Actions & Password Toggle & Remember Me --- */
.login-top-actions {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 100;
}

.login-top-actions .theme-dropdown-menu {
    bottom: auto;
    top: calc(100% + 8px);
    left: auto;
    right: 0;
    transform-origin: top right;
    transform: none;
    animation: themeMenuInTopRight 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes themeMenuInTopRight {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    z-index: 10;
    transition: color 0.2s ease;
}

.password-toggle-btn:hover {
    color: var(--text-primary);
}

.remember-me-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 1rem 0;
}

.remember-me-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

.remember-me-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.remember-me-label:hover {
    color: var(--text-primary);
}