* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f6fb;
    color: #1f2937;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    padding: 24px 16px;
    background: #123c69;
    color: white;
}

.brand {
    margin-bottom: 35px;
    font-size: 23px;
    font-weight: bold;
}

.brand small {
    display: block;
    margin-top: 8px;
    color: #cbdced;
    font-size: 12px;
    font-weight: normal;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav a {
    padding: 13px 15px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.nav a:hover,
.nav a.active {
    background: #2563eb;
}

.main {
    flex: 1;
    min-width: 0;
    padding: 30px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

h2 {
    margin: 0;
    font-size: 20px;
}

.subtitle {
    color: #64748b;
    font-size: 14px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.card,
.panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.card {
    padding: 22px;
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    color: #123c69;
    font-size: 30px;
    font-weight: bold;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.panel {
    padding: 24px;
    margin-bottom: 24px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.list-item {
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.list-item:last-child {
    border-bottom: none;
}

.list-title {
    margin-bottom: 7px;
    font-weight: bold;
}

.list-meta {
    color: #64748b;
    font-size: 13px;
}

.empty {
    padding: 20px 0;
    color: #64748b;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: white;
    color: #334155;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background: #f1f5f9;
}

.btn-primary {
    border-color: #2563eb;
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-small {
    padding: 7px 10px;
    font-size: 12px;
}

.btn-danger {
    border-color: #dc2626;
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-family: inherit;
    font-size: 14px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #bfdbfe;
    border-color: #2563eb;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
}

th {
    background: #f8fafc;
    color: #334155;
    font-weight: bold;
}

td .btn {
    margin: 2px;
}

@media (max-width: 1000px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .app {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .main {
        padding: 18px;
    }

    .header {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: auto;
    }
}

/* ==========================================================
   STYLING HALAMAN LOGIN
   ========================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d2847 0%, #123c69 50%, #1d4ed8 100%);
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 14px;
    padding: 35px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-header .logo-icon {
    font-size: 44px;
    display: block;
    margin-bottom: 8px;
}

.login-header h1 {
    font-size: 22px;
    color: #123c69;
    margin: 0 0 5px;
}

.login-header p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #f87171;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.btn-secondary {
    background: #64748b;
    border-color: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.badge-primary {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
