:root {
    --kk-brand: #0c93e9;
    --kk-accent: #ff7a11;
    --kk-surface-50: #f8fafc;
    --kk-surface-100: #f1f5f9;
    --kk-surface-200: #e2e8f0;
    --kk-surface-300: #cbd5e1;
    --kk-surface-400: #94a3b8;
    --kk-surface-500: #64748b;
    --kk-surface-600: #475569;
    --kk-surface-700: #334155;
    --kk-surface-800: #1e293b;
    --kk-surface-900: #0f172a;
    --kk-surface-950: #020617;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
}

.kk-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 40;
    background: #fff;
    border-right: 1px solid var(--kk-surface-200);
    transition: transform 0.3s ease;
}

.dark .kk-sidebar {
    background: var(--kk-surface-900);
    border-color: var(--kk-surface-700);
}

.kk-main {
    margin-left: 260px;
    min-height: 100vh;
    background: var(--kk-surface-50);
    transition: all 0.3s ease;
}

.dark .kk-main {
    background: var(--kk-surface-950);
}

.kk-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--kk-surface-200);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
}

.dark .kk-topbar {
    background: rgba(15, 23, 42, 0.85);
    border-color: var(--kk-surface-700);
}

.kk-card,
.kk-stat-card {
    background: #fff;
    border: 1px solid var(--kk-surface-200);
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.dark .kk-card,
.dark .kk-stat-card {
    background: var(--kk-surface-800);
    border-color: var(--kk-surface-700);
}

.kk-card:hover,
.kk-stat-card:hover {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
}

.kk-card-glass {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 1rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.dark .kk-card-glass {
    background: rgba(30, 41, 59, 0.65);
    border-color: rgba(51, 65, 85, 0.7);
}

.kk-stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
}

.kk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 0;
    cursor: pointer;
}

.kk-btn:hover {
    transform: translateY(-1px);
}

.kk-btn-primary {
    color: #fff;
    background: var(--kk-brand);
}

.kk-btn-primary:hover {
    background: #0074c7;
}

.kk-btn-accent {
    color: #fff;
    background: var(--kk-accent);
}

.kk-btn-accent:hover {
    background: #f05e06;
}

.kk-btn-ghost {
    color: var(--kk-surface-600);
    background: transparent;
}

.dark .kk-btn-ghost {
    color: var(--kk-surface-300);
}

.kk-btn-ghost:hover {
    background: var(--kk-surface-100);
}

.dark .kk-btn-ghost:hover {
    background: var(--kk-surface-800);
}

.kk-btn-danger {
    color: #fff;
    background: #ef4444;
}

.kk-btn-danger:hover {
    background: #dc2626;
}

.kk-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--kk-surface-300);
    border-radius: 0.75rem;
    background: #fff;
    color: var(--kk-surface-900);
    transition: all 0.2s ease;
}

.dark .kk-input {
    background: var(--kk-surface-800);
    color: #fff;
    border-color: var(--kk-surface-600);
}

.kk-input:focus {
    outline: none;
    border-color: var(--kk-brand);
    box-shadow: 0 0 0 3px rgba(12, 147, 233, 0.18);
}

.kk-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--kk-surface-700);
}

.dark .kk-label {
    color: var(--kk-surface-300);
}

.kk-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.kk-badge-success { background: #dcfce7; color: #15803d; }
.kk-badge-warning { background: #fef3c7; color: #b45309; }
.kk-badge-danger { background: #fee2e2; color: #b91c1c; }
.kk-badge-info { background: #dbeafe; color: #1d4ed8; }
.kk-badge-neutral { background: var(--kk-surface-100); color: var(--kk-surface-600); }

.kk-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.kk-table thead {
    background: var(--kk-surface-50);
    color: var(--kk-surface-500);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dark .kk-table thead {
    background: rgba(30, 41, 59, 0.45);
    color: var(--kk-surface-400);
}

.kk-table th {
    padding: 0.875rem 1.25rem;
    font-weight: 600;
}

.kk-table td {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--kk-surface-100);
}

.dark .kk-table td {
    border-color: rgba(51, 65, 85, 0.55);
}

.kk-table tbody tr:hover {
    background: rgba(248, 250, 252, 0.75);
}

.dark .kk-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.28);
}

.futuristic .kk-card,
.futuristic .kk-stat-card {
    border-color: rgba(12, 147, 233, 0.2);
    box-shadow: 0 0 20px rgba(12, 147, 233, 0.15);
}

.futuristic .kk-sidebar,
.futuristic .kk-topbar {
    border-color: rgba(12, 147, 233, 0.12);
}

.futuristic .kk-sidebar {
    background: var(--kk-surface-950);
}

.futuristic .kk-topbar {
    background: rgba(2, 6, 23, 0.9);
}

.futuristic .kk-stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(12, 147, 233, 0.08), transparent);
    pointer-events: none;
}

.animate-stagger > * {
    animation: slideUp 0.5s ease-out backwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.10s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.20s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.30s; }

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

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

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

@media (max-width: 1024px) {
    .kk-sidebar {
        transform: translateX(-100%);
    }

    .kk-main {
        margin-left: 0;
    }
}
