:root {
    --primary: #001e40;
    --primary-hover: #003366;
    --primary-light: #e8f0fe;
    --secondary: #0059bb;
    --accent: #0070ea;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f1f5f9;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Badge styles */
.badge-hikvision {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}
.badge-zkteco {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.badge-face {
    background-color: #ede9fe;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}
.badge-finger {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.badge-card {
    background-color: #ffedd5;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

/* Glassmorphism card */
.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.table-header {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Animations */
@keyframes pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.animate-live {
    animation: pulse-subtle 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Transitions */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}
.tab-content.active {
    display: block;
    opacity: 1;
}

/* Modal backdrop */
.modal-backdrop {
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

/* Mobile optimizations */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    nav.md\:hidden {
        padding-bottom: calc(0.375rem + env(safe-area-inset-bottom));
    }
}

.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

/* Tap highlight removal on mobile */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Department Tree View Styles */
.dept-tree-item {
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
}
.dept-tree-item:hover {
    background-color: #f1f5f9;
}
.dept-tree-item.active {
    background-color: #e0e7ff;
    border-color: #c7d2fe;
    font-weight: 600;
}
.dept-tree-children {
    position: relative;
    padding-left: 1rem;
    margin-left: 0.5rem;
    border-left: 1.5px solid #e2e8f0;
}

