/* === GLOBAL ADMIN STYLES === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #4a90e2;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-gray-color: #f8f9fa;
    --medium-gray-color: #e9ecef;
    --dark-gray-color: #6c757d;
    --text-color: #343a40;
    --bg-color: #f4f7f6;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-active: #34495e;
    --white-color: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--sidebar-active);
}

.sidebar-header h3 {
    margin: 0;
    font-weight: 600;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding-top: 15px;
}

.nav-link {
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 15px 20px;
    transition: background-color 0.2s ease;
}

.nav-link:hover {
    background-color: var(--sidebar-active);
}

.nav-link.active {
    background-color: var(--primary-color);
    font-weight: 600;
}

/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

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

.main-header h2 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
}

.content-wrapper {
    background: var(--white-color);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* === BUTTONS === */
.btn {
    text-decoration: none;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-block;
}

.btn-logout {
    background-color: var(--medium-gray-color);
    color: var(--text-color);
}
.btn-logout:hover { background-color: #d3d9df; }

.btn-primary { background-color: var(--primary-color); color: var(--white-color); }
.btn-primary:hover { background-color: #357abd; }

.btn-success { background-color: var(--success-color); color: var(--white-color); }
.btn-success:hover { background-color: #218838; }

.btn-danger { background-color: var(--error-color); color: var(--white-color); }
.btn-danger:hover { background-color: #c82333; }

.btn-info { background-color: var(--info-color); color: var(--white-color); }
.btn-info:hover { background-color: #138496; }

.btn-warning { background-color: var(--warning-color); color: var(--text-color); }
.btn-warning:hover { background-color: #e0a800; }

/* === FORMS === */
.form-card {
    margin-bottom: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    box-sizing: border-box;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* === TABLES === */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray-color);
}

thead th {
    background-color: var(--light-gray-color);
    font-weight: 600;
}

tbody tr:hover {
    background-color: var(--light-gray-color);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* === ALERTS === */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    color: var(--white-color);
    text-align: center;
}
.alert.sukses { background-color: var(--success-color); }
.alert.error { background-color: var(--error-color); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .admin-container { flex-direction: column; }
    .sidebar { width: 100%; height: auto; }
    .main-content { padding: 15px; }
    .main-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: auto;
    background: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.header h1 {
    margin: 0;
    font-size: 1.8em;
    color: #2c3e50;
}

.header a {
    text-decoration: none;
    color: #3498db;
    font-weight: 500;
}
.header a:hover {
    text-decoration: underline;
}

h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
    margin-top: 30px;
}

hr {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 30px 0;
}

/* Form Styles */
.form-container {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9em;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn-submit, .btn-cancel {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-submit {
    background-color: #28a745;
    color: white;
}
.btn-submit:hover {
    background-color: #218838;
}

.btn-cancel {
    background-color: #6c757d;
    color: white;
    margin-left: 10px;
}
.btn-cancel:hover {
    background-color: #5a6268;
}

/* Table Styles */
.table-responsive-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

thead th {
    background-color: #f2f2f2;
    font-weight: 600;
    color: #333;
}

tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

tbody tr:hover {
    background-color: #f1f1f1;
}

.aksi-container {
    display: flex;
    gap: 8px;
}

.btn-aksi {
    padding: 5px 10px;
    text-decoration: none;
    color: white;
    border-radius: 4px;
    font-size: 0.85em;
}

.btn-edit { background-color: #ffc107; }
.btn-edit:hover { background-color: #e0a800; }
.btn-hapus { background-color: #dc3545; }
.btn-hapus:hover { background-color: #c82333; }

/* Status and Alert Styles */
.status-ya {
    color: #28a745;
    font-weight: bold;
}

.status-tidak {
    color: #dc3545;
    font-weight: bold;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    color: #fff;
}
.alert.sukses { background-color: #28a745; }
.alert.error { background-color: #dc3545; }
