@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --font-sans: 'Manrope', 'Inter', 'Segoe UI', 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --primary-color: #6366f1;
    --primary-hover: #7c83ff;
    --primary-contrast: #f8faff;
    --secondary-color: #22d3ee;
    --accent-color: #8b5cf6;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    --background-top: #eef2ff;
    --background-mid: #f5f7ff;
    --background-bottom: #fdf2ff;

    --surface-color: rgba(255, 255, 255, 0.78);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --surface-muted: rgba(255, 255, 255, 0.55);
    --surface-inverse: rgba(15, 23, 42, 0.85);

    --border-color: rgba(99, 102, 241, 0.12);
    --border-strong: rgba(99, 102, 241, 0.32);

    --text-color: #0f172a;
    --text-muted: rgba(15, 23, 42, 0.62);
    --text-inverse: #f8fafc;

    --shadow: 0 12px 40px rgba(99, 102, 241, 0.18);
    --shadow-md: 0 20px 45px rgba(79, 70, 229, 0.18);
    --shadow-lg: 0 30px 95px rgba(14, 165, 233, 0.18);

    --radius-sm: 14px;
    --radius: 18px;
    --radius-lg: 26px;
    --blur-amount: 24px;

    --grid-gap: clamp(1.25rem, 1.8vw, 2.5rem);
    --transition: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
    --background-top: #020617;
    --background-mid: #0f172a;
    --background-bottom: #1e1b4b;

    --surface-color: rgba(14, 23, 42, 0.78);
    --surface-strong: rgba(17, 24, 39, 0.85);
    --surface-muted: rgba(17, 24, 39, 0.6);
    --surface-inverse: rgba(248, 250, 252, 0.92);

    --border-color: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(59, 130, 246, 0.38);

    --text-color: #e2e8f0;
    --text-muted: rgba(148, 163, 184, 0.72);
    --text-inverse: #020617;

    --shadow: 0 20px 60px rgba(15, 23, 42, 0.55);
    --shadow-md: 0 26px 70px rgba(37, 99, 235, 0.35);
    --shadow-lg: 0 40px 120px rgba(37, 99, 235, 0.4);
}

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

html, body {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--background-top) 0%, var(--background-mid) 38%, var(--background-bottom) 100%);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    width: clamp(420px, 45vw, 680px);
    height: clamp(420px, 45vw, 680px);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.6;
    z-index: -2;
    pointer-events: none;
}

body::before {
    top: -15vh;
    left: -18vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.55) 0%, transparent 68%);
}

body::after {
    bottom: -8vh;
    right: -12vw;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.55) 0%, transparent 75%);
}

main {
    flex: 1;
    width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.35s var(--transition), opacity 0.35s var(--transition);
}

a:hover {
    color: var(--primary-color);
}

ul { list-style: none; }

.container {
    width: min(1200px, 100% - 48px);
    margin: 0 auto;
    padding: clamp(1.5rem, 2vw, 2.5rem) 0;
}

.page-shell {
    width: min(1200px, 100% - 48px);
    margin: clamp(80px, 12vh, 120px) auto clamp(48px, 8vh, 88px);
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: clamp(1.5rem, 2vw, 2.8rem);
}

.page-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.page-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text-muted);
    max-width: 720px;
}

.navbar {
    position: sticky;
    top: clamp(16px, 3vh, 32px);
    width: min(1180px, 100% - 32px);
    margin: clamp(16px, 3vh, 32px) auto 0;
    padding: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--surface-color), var(--surface-muted));
    backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(0.9rem, 1.1vw, 1.4rem) clamp(1.5rem, 2vw, 2.8rem);
    gap: clamp(1rem, 2.4vw, 3rem);
}

.nav-brand h1 {
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.2vw, 2.4rem);
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 0.35rem 0;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    inset: auto 0 -0.65rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-logout {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}

.nav-logout:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: var(--danger-color) !important;
}

.nav-logout .muted {
    color: var(--danger-color) !important;
    font-weight: 600;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}
.status-dot.online { background: #22c55e; }
.status-dot.offline { background: #94a3b8; }
.status-dot.away { background: #f59e0b; }
.status-dot.dnd { background: #ef4444; }

/* Status Menu */
.status-menu {
    position: absolute;
    right: 16px;
    top: calc(100% + 10px);
    width: min(340px, 92vw);
    background: var(--surface-strong);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: none;
    overflow: hidden;
    z-index: 101;
}
.status-menu-header {
    padding: 0.8rem 1rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}
.status-menu-list {
    display: grid;
}
.status-menu-item {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    transition: background 0.2s var(--transition);
}
.status-menu-item:last-child {
    border-bottom: none;
}
.status-menu-item:hover {
    background: rgba(99, 102, 241, 0.08);
}
.status-menu-item .status-dot {
    flex-shrink: 0;
}
.status-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}
.status-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Navigation buttons - unified style with 35% size increase */
.nav-button {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.65rem 1.3rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.35s var(--transition), border 0.35s var(--transition), color 0.35s var(--transition), background 0.35s var(--transition);
}

.nav-button:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.14);
}

.nav-button .muted {
    color: var(--text-color);
}

.theme-toggle {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: transform 0.35s var(--transition), border 0.35s var(--transition), color 0.35s var(--transition);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    color: var(--primary-color);
}

/* Notifications */
.notif-btn {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}
.notif-badge { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; border-radius: 10px; background: #ef4444; color: #fff; font-size: 12px; text-align: center; padding: 0 6px; margin-left: 6px; }
.notif-panel { position: absolute; right: 16px; top: calc(100% + 10px); width: min(420px, 92vw); background: var(--surface-strong); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: var(--shadow-lg); display: none; overflow: hidden; z-index: 101; }
.notif-header { padding: 0.8rem 1rem; font-weight: 700; border-bottom: 1px solid var(--border-color); }
.notif-list { max-height: 60vh; overflow: auto; display: grid; }
.notif-empty { padding: 1rem; color: var(--text-muted); }
.notif-item { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border-color); display: grid; gap: 0.25rem; cursor: pointer; }
.notif-item.unread { background: rgba(99, 102, 241, 0.08); }
.notif-item:hover { background: rgba(99, 102, 241, 0.12); }
.ni-title { font-weight: 700; }
.ni-body { color: var(--text-muted); }
.ni-ts { color: var(--text-muted); font-size: 0.85rem; }

.card,
.surface-card {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 1.8vw, 2rem);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(var(--blur-amount));
    position: relative;
    overflow: hidden;
    color: var(--text-color);
}

.card::after,
.surface-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(34, 211, 238, 0.12));
    mix-blend-mode: soft-light;
    opacity: 0.6;
}

.glass-card {
    background: var(--surface-muted);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: var(--shadow-md);
    padding: clamp(1.5rem, 2.2vw, 2.8rem);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(calc(var(--blur-amount) + 6px));
    color: var(--text-color);
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.26), transparent 65%);
    opacity: 0.8;
    pointer-events: none;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vw, 1.6rem);
}

.grid {
    display: grid;
    gap: var(--grid-gap);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.flex {
    display: flex;
    gap: 1rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.35s var(--transition), box-shadow 0.35s var(--transition), background 0.35s var(--transition), border 0.35s var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--primary-contrast);
    box-shadow: 0 18px 35px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 45px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.55);
    color: var(--text-color);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.btn-danger {
    background: linear-gradient(135deg, #fb7185, #ef4444);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #34d399, #22c55e);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
    border-color: var(--border-strong);
    color: var(--primary-color);
}

.btn-block { width: 100%; }

.btn.btn-small {
    padding: 0.6rem 1.1rem;
    font-size: 0.85rem;
    border-radius: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
}

.badge.success { background: rgba(34, 197, 94, 0.12); color: #059669; }
.badge.warn { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.badge.info { background: rgba(14, 165, 233, 0.12); color: #0284c7; }

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.2);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-control,
input,
select,
textarea {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    color: var(--text-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: border 0.3s var(--transition), box-shadow 0.3s var(--transition), background 0.3s var(--transition);
    backdrop-filter: blur(calc(var(--blur-amount) / 2));
}

textarea { resize: vertical; }

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

input::placeholder,
textarea::placeholder { color: rgba(15, 23, 42, 0.35); }

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: rgba(15, 23, 42, 0.65);
    color: var(--text-color);
    border-color: rgba(59, 130, 246, 0.18);
}

.alert {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(15, 23, 42, 0.05);
}

.alert-success { border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.12); color: #047857; }
.alert-danger { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.12); color: #991b1b; }
.alert-warning { border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.14); color: #92400e; }
.alert-info { border-color: rgba(14, 165, 233, 0.35); background: rgba(14, 165, 233, 0.12); color: #1e40af; }

.toast-container { position: fixed; z-index: 9999; right: 24px; bottom: 24px; display: grid; gap: 12px; }
.toast {
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}
.toast.success { background: rgba(4, 120, 87, 0.92); }
.toast.error { background: rgba(185, 28, 28, 0.92); }
.toast.info { background: rgba(30, 64, 175, 0.92); }

.modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(22px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3.5rem);
    z-index: 120;
}

.modal-content {
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 2.2vw, 2.5rem);
    width: min(560px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal .close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: clamp(2.5rem, 3.5vw, 4rem);
    background: var(--surface-muted);
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(99, 102, 241, 0.2);
    color: var(--text-muted);
}

.loading {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

.hero-gradient {
    position: relative;
    padding: clamp(2.5rem, 4vw, 4.5rem);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(34, 211, 238, 0.85));
    color: #f8fafc;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-gradient::after,
.hero-gradient::before {
    content: "";
    position: absolute;
    inset: auto;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    filter: blur(50px);
    opacity: 0.6;
}

.hero-gradient::before {
    width: 340px;
    height: 340px;
    top: -140px;
    right: -120px;
}

.hero-gradient::after {
    width: 260px;
    height: 260px;
    bottom: -120px;
    left: -90px;
}

.hero-gradient h1 {
    font-size: clamp(2.4rem, 4.2vw, 3.6rem);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero-gradient p {
    max-width: 520px;
    font-size: 1.05rem;
    color: rgba(241, 245, 249, 0.92);
}

.quick-link {
    background: var(--surface-muted);
    border-radius: var(--radius);
    padding: clamp(1.2rem, 1.8vw, 1.8rem);
    display: grid;
    gap: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.32);
    position: relative;
    overflow: hidden;
    transition: transform 0.35s var(--transition), box-shadow 0.35s var(--transition);
}

.quick-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.22), transparent 70%);
    opacity: 0;
    transition: opacity 0.35s var(--transition);
}

.quick-link:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.quick-link:hover::before {
    opacity: 1;
}

.quick-link-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    font-size: 1.25rem;
}

.quick-link-text {
    font-weight: 600;
    color: var(--text-color);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
}

.table-card {
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.table-card table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.75);
}

.table-card th,
.table-card td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    text-align: left;
}

.table-card tr:hover td {
    background: rgba(99, 102, 241, 0.08);
}

.chip-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.8rem;
}

.shadow-soft { box-shadow: var(--shadow); }

.text-muted { color: var(--text-muted); }
.muted { color: var(--text-muted); }
.text-gradient {
    background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

/* Command Palette */
.cmdk-trigger {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.35s var(--transition), border 0.35s var(--transition), color 0.35s var(--transition);
}
.cmdk-trigger:hover { transform: translateY(-2px); border-color: var(--border-strong); color: var(--primary-color); }
.kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.8rem;
    padding: 0.1rem 0.4rem;
    border: 1px solid var(--border-color);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: rgba(255,255,255,0.5);
    color: var(--text-color);
}
[data-theme="dark"] .kbd { background: rgba(2,6,23,0.5); }

.cmdk-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(12px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    z-index: 200;
}
.cmdk-panel {
    width: min(720px, 92%);
    background: var(--surface-strong);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: 14px;
    overflow: hidden;
}
.cmdk-header { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem; border-bottom: 1px solid var(--border-color); }
.cmdk-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-color);
}
[data-theme="dark"] .cmdk-input { background: rgba(15,23,42,0.6); }
.cmdk-list { max-height: 50vh; overflow: auto; padding: 0.4rem; display: grid; gap: 0.25rem; }
.cmdk-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4rem;
    padding: 0.8rem 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-color);
}
.cmdk-item:hover,
.cmdk-item.active { background: rgba(99,102,241,0.12); }
.cmdk-item .subtitle { color: var(--text-muted); font-size: 0.9rem; }
.cmdk-empty { padding: 1rem 1.2rem; color: var(--text-muted); }

.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-sm);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

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

@media (max-width: 992px) {
    .navbar { width: min(96%, 100% - 32px); }
    .nav-container { flex-wrap: wrap; gap: 1rem; }
    .nav-links { flex-wrap: wrap; justify-content: flex-start; }
    .page-shell { margin-top: clamp(72px, 10vh, 96px); }
}

@media (max-width: 768px) {
    body::before, body::after { filter: blur(90px); opacity: 0.45; }
    .container,
    .page-shell { width: min(96%, 100% - 24px); }
    .grid-cols-2,
    .grid-cols-3 { grid-template-columns: 1fr; }
    .nav-container { padding: 0.9rem 1.25rem; }
    .nav-links { gap: 1rem; }
}

@media (max-width: 520px) {
    .navbar { top: 12px; margin-top: 12px; }
    .btn { width: 100%; }
    .hero-gradient { padding: 2rem; }
}

/* ========== ПРОФЕССИОНАЛЬНЫЕ ВИЗУАЛЬНЫЕ УЛУЧШЕНИЯ ========== */

/* Улучшенный анимированный фон */
@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

body {
    background-size: 200% 200%;
    animation: gradientFlow 15s ease infinite;
}

/* Плавающие световые пятна */
body::before {
    animation: floatLight 20s ease-in-out infinite;
}

body::after {
    animation: floatLight 25s ease-in-out infinite reverse;
}

@keyframes floatLight {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.6;
    }
    33% {
        transform: translate(30px, -50px);
        opacity: 0.8;
    }
    66% {
        transform: translate(-40px, 30px);
        opacity: 0.5;
    }
}

/* Улучшенный navbar с glassmorphism */
.navbar {
    transition: all 0.3s var(--transition);
}

.navbar:hover {
    box-shadow: 0 24px 50px rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
}

/* Анимация появления навигации */
.navbar {
    animation: slideDownFade 0.6s ease-out;
}

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

/* Улучшенные кнопки с ripple-эффектом */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Пульсирующий эффект для primary кнопки */
.btn-primary {
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 18px 35px rgba(99, 102, 241, 0.25);
    }
    50% {
        box-shadow: 0 18px 35px rgba(99, 102, 241, 0.4), 0 0 30px rgba(99, 102, 241, 0.3);
    }
}

/* Улучшенные карточки */
.card,
.surface-card,
.glass-card {
    animation: fadeInScale 0.5s ease-out backwards;
    transition: all 0.3s var(--transition);
}

.card:hover,
.surface-card:hover,
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(99, 102, 241, 0.25);
}

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

/* Улучшенные input поля */
.form-control,
input,
select,
textarea {
    transition: all 0.3s var(--transition);
}

.form-control:hover,
input:hover,
select:hover,
textarea:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.75);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.85);
}

/* Анимация для меток форм */
.form-label {
    transition: all 0.3s var(--transition);
    display: inline-block;
}

.form-group:focus-within .form-label {
    color: var(--primary-color);
    transform: translateX(3px);
}

/* Улучшенные badge */
.badge {
    transition: all 0.3s var(--transition);
    position: relative;
    overflow: hidden;
}

.badge::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.badge:hover::before {
    left: 100%;
}

/* Улучшенные quick-link карточки */
.quick-link-icon {
    transition: all 0.4s var(--transition);
}

.quick-link:hover .quick-link-icon {
    transform: rotate(5deg);
    background: rgba(99, 102, 241, 0.2);
}

/* Анимированный градиентный текст */
.text-gradient {
    background-size: 200% auto;
    animation: gradientSlide 3s linear infinite;
}

@keyframes gradientSlide {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Улучшенные alerts с иконками анимации */
.alert {
    animation: slideInRight 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    animation: pulseBar 2s ease-in-out infinite;
}

.alert-success::before {
    background: linear-gradient(180deg, #22c55e, #059669);
}

.alert-danger::before {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

.alert-warning::before {
    background: linear-gradient(180deg, #f59e0b, #d97706);
}

.alert-info::before {
    background: linear-gradient(180deg, #0ea5e9, #0284c7);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseBar {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Улучшенные toast уведомления */
.toast {
    animation: toastSlide 0.4s ease-out;
    backdrop-filter: blur(12px);
}

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

/* Улучшенный modal */
.modal {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: modalBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

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

/* Улучшенный hero-gradient */
.hero-gradient {
    position: relative;
    animation: heroFloat 6s ease-in-out infinite;
}

.hero-gradient::before,
.hero-gradient::after {
    animation: blobFloat 8s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes blobFloat {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.6;
    }
    50% {
        transform: translate(20px, -20px);
        opacity: 0.8;
    }
}

/* Скелетон с улучшенной анимацией */
.skeleton {
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

@keyframes skeletonPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Улучшенные chip элементы */
.chip {
    transition: all 0.3s var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.chip::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.chip:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.chip:hover::before {
    left: 100%;
}

/* Улучшенный loading spinner */
.loading {
    animation: spin 0.85s linear infinite, pulse 2s ease-in-out infinite;
}

/* Улучшенные nav-links */
.nav-links a {
    transition: all 0.3s var(--transition);
}

.nav-links a:hover {
    transform: translateY(-2px);
}

/* Улучшенный theme-toggle */
.theme-toggle {
    transition: all 0.3s var(--transition);
}

.theme-toggle:hover {
    transform: translateY(-2px) rotate(15deg);
}

/* Улучшенная таблица */
.table-card {
    animation: fadeInScale 0.5s ease-out;
}

.table-card tr {
    transition: all 0.2s var(--transition);
}

.table-card tr:hover {
    background: rgba(99, 102, 241, 0.08);
}

/* Particle система для фона (опционально) */
.page-shell::before {
    content: "";
    position: fixed;
    top: 20%;
    right: 10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: floatParticle 15s ease-in-out infinite;
}

.page-shell::after {
    content: "";
    position: fixed;
    bottom: 15%;
    left: 15%;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.08), transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: floatParticle 18s ease-in-out infinite reverse;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.6;
    }
    33% {
        transform: translate(25px, -35px);
        opacity: 0.8;
    }
    66% {
        transform: translate(-30px, 25px);
        opacity: 0.5;
    }
}

/* Smooth scroll behavior улучшение */
html {
    scroll-behavior: smooth;
}

/* Улучшенная прокрутка */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-hover), var(--secondary-color));
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Улучшенный status dot */
.status-dot {
    animation: statusPulse 2s ease-in-out infinite;
    transition: all 0.3s var(--transition);
}

.status-dot:hover {
    box-shadow: 0 0 12px currentColor;
}

@keyframes statusPulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1), 0 0 12px currentColor;
    }
}

/* Улучшенное меню статусов */
.status-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Улучшенная панель уведомлений */
.notif-panel {
    animation: slideDown 0.3s ease-out;
}

.notif-item {
    transition: all 0.2s var(--transition);
}

.notif-item:hover {
    transform: translateX(5px);
}

/* Эффект набора текста для заголовков */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Cursor blink */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Улучшенный empty-state */
.empty-state {
    animation: fadeInScale 0.6s ease-out;
}

/* Accessibility: уменьшенное движение */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Улучшенная kbd клавиша */
.kbd {
    transition: all 0.2s var(--transition);
    display: inline-block;
}

.kbd:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* Глобальный selection color */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-color);
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-color);
}

/* Focus visible для accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Улучшенный pill */
.pill {
    transition: all 0.3s var(--transition);
}

.pill:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

/* Tag с анимацией */
.tag {
    transition: all 0.3s var(--transition);
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.tag:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.tag:hover::before {
    left: 100%;
}

/* Command palette улучшения */
.cmdk-overlay {
    animation: fadeIn 0.2s ease-out;
}

.cmdk-panel {
    animation: modalBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cmdk-item {
    transition: all 0.2s var(--transition);
}

.cmdk-item:hover {
    transform: translateX(5px);
}

/* ========== КОНЕЦ ПРОФЕССИОНАЛЬНЫХ УЛУЧШЕНИЙ ========== */
