:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --dark: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-700: #334155;
    --gray-800: #1e293b;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --radius: 0.75rem;
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--gray-100);
    color: var(--dark);
    margin: 0;
    overflow-x: hidden;
}

/* Layout */
#app-container {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

#sidebar {
    width: var(--sidebar-width);
    background: var(--gray-800);
    color: var(--white);
    flex-shrink: 0;
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

#main-content {
    flex-grow: 1;
    padding: 2rem;
    transition: all 0.3s;
}

/* Sidebar Navigation */
.sidebar-header {
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--white);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav {
    padding: 1rem 0.75rem;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--gray-300);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.nav-link-custom:hover {
    background: rgba(255,255,255,0.05);
    color: var(--white);
}

.nav-link-custom.active {
    background: var(--primary);
    color: var(--white);
}

.nav-link-custom i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

/* Cards & UI Elements */
.card-modern {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-modern:hover {
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.bg-primary-soft { background-color: rgba(79, 70, 229, 0.1); color: var(--primary); }
.bg-success-soft { background-color: rgba(16, 185, 129, 0.1); color: var(--success); }
.bg-info-soft { background-color: rgba(14, 165, 233, 0.1); color: var(--info); }
.bg-warning-soft { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }

/* Clock-in Focus Card */
.clock-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-100) 100%);
    border: 2px solid var(--primary);
}

.timer-display {
    font-size: 3.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
    color: var(--dark);
}

/* Forms */
.form-control-modern {
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.form-control-modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.btn-modern {
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s;
}

/* Tab Navigation Modern */
.nav-modern .nav-link {
    color: var(--gray-700) !important;
    background: var(--gray-200);
    border-radius: var(--radius);
    padding: 0.8rem 1.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-modern .nav-link:hover {
    background: var(--gray-300);
    color: var(--dark) !important;
}

.nav-modern .nav-link.active {
    background: var(--primary) !important;
    color: var(--white) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.bg-success-soft { background-color: rgba(16, 185, 129, 0.1); color: var(--success); }
.bg-warning-soft { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }
.bg-primary-soft { background-color: rgba(79, 70, 229, 0.1); color: var(--primary); }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid var(--gray-800);
    position: absolute;
    bottom: -2px;
    right: -2px;
}

.status-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
    opacity: 0.5;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(2.5); opacity: 0; }
}

@media (max-width: 768px) {

    #sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    #sidebar.show {
        margin-left: 0;
    }
    #main-content {
        padding: 1rem;
    }
}
