body {
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 220px;
    background: #1e1e2f;
    height: 100vh;
    padding: 20px;
    color: white;
}

.sidebar a {
    display: block;
    color: white;
    padding: 10px;
    margin-bottom: 10px;
    text-decoration: none;
}

.sidebar a:hover {
    background: #444;
}

/* Content */
.main-content {
    flex: 1;
    padding: 20px;
}

/* Card */
.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

td, th {
    padding: 10px;
    border-bottom: 1px solid #eee;
}
/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY */
body {
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6f9;
    display: flex;
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    height: 100vh;
    background: #1e1e2f;
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    display: block;
    padding: 12px;
    color: #ddd;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    background: #343a40;
    color: white;
}

/* ACTIVE MENU */
.sidebar a.active {
    background: #4facfe;
    color: white;
}

/* LOGOUT */
.logout-menu {
    background: #dc3545;
}

/* MAIN CONTENT */
.main-content {
    margin-left: 240px;
    width: 100%;
    padding: 25px;
}

/* CARD */
.card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* HEADER */
.header {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

/* TITLE */
h2 {
    margin-bottom: 10px;
}

h3 {
    margin-bottom: 10px;
}

/* FORM */
.form-group {
    margin-bottom: 15px;
}

label {
    font-size: 13px;
    color: #555;
}

/* INPUT */
input, select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-top: 5px;
    font-size: 14px;
}

/* BUTTON */
button {
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #4facfe;
    color: white;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
}

button:hover {
    background: #007bff;
}

/* BUTTON VARIAN */
.btn-success {
    background: #28a745;
}

.btn-danger {
    background: #dc3545;
}

/* TABLE */
.table-container {
    overflow-x: auto;
}

/* RESET BODY */
body {
    margin: 0;
}

/* KHUSUS LOGIN */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

/* HILANGKAN OFFSET ADMIN */
.login-container {
    margin-left: 0 !important;
}

/* OVERRIDE kalau ada main-content */
.login-container ~ .main-content {
    margin-left: 0 !important;
}

/* CARD */
.login-container .card {
    width: 350px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table th {
    background: #f1f1f1;
    padding: 12px;
    text-align: left;
    font-size: 13px;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

/* ROW HOVER */
table tr:hover {
    background: #f9f9f9;
}

/* IMAGE */
img {
    border-radius: 8px;
}

/* BADGE */
.badge {
    padding: 5px 10px;
    border-radius: 6px;
    color: white;
    font-size: 12px;
}

.badge-hadir {
    background: #28a745;
}

.badge-telat {
    background: #ffc107;
    color: black;
}

.badge-alpha {
    background: #dc3545;
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat {
    padding: 20px;
    border-radius: 12px;
    color: white;
    text-align: center;
}

.stat a{
    color: white;
}

.stat.blue {
    background: #4facfe;
}

.stat.green {
    background: #28a745;
}

.stat.red {
    background: #d30d0d;
}

.stat.gold {
    background: #f4d008;
}

.stat.blue {
    background: #2f05d8;
}

.stat.orange {
    background: #f39c12;
}

/* LOGIN PAGE */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* CARD LOGIN */
.login-page .card {
    width: 350px;
}

/* MOBILE */
@media (max-width: 768px) {
    body {
        display: block;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}