* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #0f172a;
    color: #e5e7eb;
    min-height: 100vh;
}

/* Login */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Layout */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #020617;
    border-bottom: 1px solid #1f2937;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar h1 {
    font-size: 1.4rem;
    font-weight: 600;
}

.subtitle {
    font-size: 0.85rem;
    color: #9ca3af;
}

.user-info {
    margin-right: 1rem;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.container {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1rem 2rem;
}

.card {
    background: #020617;
    border-radius: 0.75rem;
    border: 1px solid #1f2937;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h2 {
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #374151;
    background: #111827;
    color: #e5e7eb;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn:hover {
    background: #1f2937;
    border-color: #4b5563;
}

.btn.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #22c55e;
    color: #ecfdf5;
}

.btn.primary:hover {
    filter: brightness(1.05);
}

.btn.danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border-color: #ef4444;
    color: #fee2e2;
}
.btn.update {
	background: linear-gradient(135deg, #a855f7, #6d28d9);
    border-color: #ef4444;
    color: #fee2e2;
}

.btn.small {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

.btn.secondary {
    background: #020617;
}

/* Forms */
.form {
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 0.9rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: #cbd5f5;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #1f2937;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.85rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.form-actions.right {
    justify-content: flex-end;
}

/* Alerts */
.alert {
    padding: 0.6rem 0.8rem;
    border-radius: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.6);
    color: #fecaca;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #bbf7d0;
}

/* Filter bar */
/* Filter bar – dibikin blok sendiri + dropdown gelap */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;

    margin: 1rem 0 1.5rem;
    padding: 0.75rem 1.25rem;

    background: #0a132e;
    border-radius: 999px;
    border: 1px solid #1f2937;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.filter-group label {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Dropdown khusus di filter bar (biar nggak putih) */
.filter-bar select {
    min-width: 130px;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid #374151;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.85rem;
    outline: none;
    appearance: none;
}

.filter-bar select:hover {
    border-color: #60a5fa;
}

.filter-bar select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #1d4ed8;
}

/* Biar tombol Filter/Reset nyatu bentuknya */
.filter-bar .btn.small {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
}


/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.data-table thead {
    background: #020617;
}

.data-table th,
.data-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #1f2937;
    text-align: left;
}

.data-table tbody tr:nth-child(even) {
    background: #020617;
}

.data-table tbody tr:nth-child(odd) {
    background: #020617;
}

.data-table tbody tr:hover {
    background: #020617;
    box-shadow: inset 0 0 0 1px #1f2937;
}

.data-table th {
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
}

.data-table td {
    vertical-align: top;
}

.data-table input[type="checkbox"] {
    cursor: pointer;
}

/* Sorting indicators */
.sortable a {
    color: #9ca3af;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.sortable.sort-asc a::after,
.sortable.sort-desc a::after {
    content: "";
    border: 4px solid transparent;
}

.sortable.sort-asc a::after {
    border-bottom-color: #22c55e;
}

.sortable.sort-desc a::after {
    border-top-color: #22c55e;
}

.sortable a:hover {
    color: #e5e7eb;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 1rem;
    color: #6b7280;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.pagination-links {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #1f2937;
    text-decoration: none;
    color: #e5e7eb;
}

.page-link:hover {
    background: #111827;
}

.page-link.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #022c22;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 550px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 1.4rem;
    cursor: pointer;
}

/* Keterangan link */
.keterangan-link {
    color: #38bdf8;
    text-decoration: none;
}

.keterangan-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .pagination {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
.title-link {
    color: var(--text);
    text-decoration: none;
}

.title-link:hover {
    color: var(--accent);
}
