:root {
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #fca311;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fc;
    --text-color: #333;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --sidebar-bg: #ffffff;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: all 0.3s ease;
}

.logo {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

.logo i {
    margin-right: 12px;
    font-size: 28px;
}

.menu {
    padding: 24px 0;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 5px;
    border-right: 3px solid transparent;
}

.menu-item i {
    margin-right: 15px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.menu-item:hover, .menu-item.active {
    background-color: rgba(67, 97, 238, 0.05);
    color: var(--primary-color);
    border-right-color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.topbar {
    height: 70px;
    background-color: var(--sidebar-bg);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 5;
}

.topbar h2 {
    font-size: 20px;
    color: var(--dark-color);
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.content-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* Cards & UI Elements */
.card {
    background-color: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark-color);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
}

.stat-icon.primary { background: linear-gradient(135deg, var(--primary-color), var(--primary-light)); }
.stat-icon.success { background: linear-gradient(135deg, #11998e, #38ef7d); }
.stat-icon.warning { background: linear-gradient(135deg, #f2994a, #f2c94c); }

.stat-details h3 {
    font-size: 28px;
    margin: 0;
    color: var(--dark-color);
}

.stat-details p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    filter: brightness(0.9);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    background-color: #f8f9fa;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.02);
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-present {
    background-color: rgba(76, 201, 240, 0.1);
    color: #00b4d8;
}

.badge-absent {
    background-color: rgba(247, 37, 133, 0.1);
    color: var(--danger-color);
}

.badge-late {
    background-color: rgba(252, 163, 17, 0.1);
    color: var(--warning-color);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(76, 201, 240, 0.1);
    color: #00b4d8;
    border: 1px solid rgba(76, 201, 240, 0.2);
}

.alert-danger {
    background-color: rgba(247, 37, 133, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(247, 37, 133, 0.2);
}
