/* =================================
   RESET & FONT
   ================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #343a40;
    margin: 0;
    line-height: 1.6;
}

/* =================================
   LAYOUT & HEADER
   ================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #ffffff;
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
    text-decoration: none;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 15px;
}

nav a {
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

nav a:hover, nav a.active {
    background-color: #e9ecef;
    color: #007bff;
}

main {
    padding: 30px 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

h2 {
    margin: 0;
    font-size: 2rem;
}

/* =================================
   COMPONENTS (BUTTONS, FORMS, CARDS)
   ================================= */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.btn:active {
    transform: translateY(1px);
}
.btn-primary {
    background-color: #007bff;
    color: #fff;
}
.btn-primary:hover {
    background-color: #0056b3;
}
.btn-danger {
    background-color: #dc3545;
    color: #fff;
}
.btn-danger:hover {
    background-color: #c82333;
}
.btn-warning {
    background-color: #ffc107;
    color: #212529;
}
.btn-warning:hover {
    background-color: #e0a800;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
}
.alert-success { background-color: #d4edda; color: #155724; }
.alert-danger { background-color: #f8d7da; color: #721c24; }
.alert-info { background-color: #d1ecf1; color: #0c5460; }
.alert-warning { background-color: #fff3cd; color: #856404; }

/* =================================
   TABLES
   ================================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}
thead th {
    background-color: #f8f9fa;
    font-weight: 700;
}
tbody tr:hover {
    background-color: #f1f3f5;
}
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
}

/* Tombol Aksi di dalam Tabel */
td .btn, td .btn-edit, td .btn-delete {
    padding: 5px 10px;
    font-size: 0.8rem;
    margin-right: 5px;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}
.btn-edit { background-color: #ffc107; color: #212529; }
.btn-delete { background-color: #dc3545; }


/* =================================
   DASHBOARD
   ================================= */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
.stat-card-icon {
    font-size: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.stat-card:nth-child(1) .stat-card-icon { background-color: #007bff; }
.stat-card:nth-child(2) .stat-card-icon { background-color: #ffc107; }
.stat-card:nth-child(3) .stat-card-icon { background-color: #28a745; }
.stat-card:nth-child(4) .stat-card-icon { background-color: #dc3545; }
.stat-card-info p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}
.stat-card-info h3 {
    margin: 5px 0 0;
    font-size: 24px;
    color: #343a40;
}
.dashboard-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
.card h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 5px;
    height: 20px;
    position: relative;
    display: flex;
    align-items: center;
}
.progress-bar {
    background-color: #dc3545;
    height: 100%;
    border-radius: 5px;
}
.progress-bar-container span {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

/* =================================
   LOGIN PAGE
   ================================= */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.login-card {
    width: 100%;
    max-width: 400px;
}
.login-card h2 {
    text-align: center;
    margin-bottom: 25px;
}

/* Status Labels */
.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-success { background-color: #28a745; }
.status-warning { background-color: #ffc107; color: #212529; }
.status-danger { background-color: #dc3545; }

