* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #0c0a09;
    color: #ffffff;
}

a {
    text-decoration: none;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(28, 25, 23, 0.94);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.1);
}

.login-card h1 {
    margin: 0 0 8px;
}

.login-card p {
    margin: 0 0 24px;
    color: #a8a29e;
}

.login-note {
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    background: #f5f7fb;
    font-size: 14px;
}

.back-link {
    display: inline-block;
    margin-top: 16px;
    color: #0d6efd;
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar {
    background: #030303;
    color: #fff;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.sidebar h2 {
    margin: 0 0 8px;
}

.sidebar p {
    margin: 0;
    color: #cbd5e1;
}

.sidebar nav {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.sidebar nav a {
    color: #cbd5e1;
    padding: 12px 14px;
    border-radius: 10px;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #292524;
    color: #fff;
}

.content {
    padding: 32px;
    overflow-x: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
}

.page-header h1 {
    margin: 0 0 8px;
}

.page-header p {
    margin: 0;
    color: #a8a29e;
}

.card {
    background: rgba(28, 25, 23, 0.94);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
    margin-bottom: 22px;
}

.form-card {
    max-width: 900px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.3fr auto;
    gap: 16px;
    align-items: end;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-group label span {
    color: #dc3545;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: rgba(28, 25, 23, 0.94);
}

select:disabled {
    background: #f0f0f0;
    color: #999;
}

textarea {
    resize: vertical;
}

.span-2 {
    grid-column: span 2;
}

.filter-actions,
.form-actions,
.actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.form-actions {
    margin-top: 22px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    white-space: nowrap;
}

.btn.primary {
    background: #dc2626;
    color: #fff;
}

.btn.secondary {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.btn.danger {
    background: #991b1b;
    color: #fff;
}

.btn.small {
    padding: 8px 10px;
    font-size: 13px;
}

.btn.full {
    width: 100%;
}

.alert {
    padding: 13px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.alert.error {
    background: #ffe3e6;
    color: #981b1b;
}

.table-info {
    margin-bottom: 14px;
    color: #a8a29e;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid #ececec;
    text-align: left;
    vertical-align: top;
}

th {
    background: #dc2626;
    color: #fff;
    font-size: 14px;
}

td small {
    display: block;
    color: #a8a29e;
    margin-top: 4px;
}

.empty {
    text-align: center;
    color: #a8a29e;
    padding: 28px;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.badge.active {
    background: #d1f7dc;
    color: #146c2e;
}

.badge.inactive {
    background: #ffe0e0;
    color: #9b1c1c;
}

.action-col {
    width: 150px;
}

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: block;
    }

    .filter-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Revisi tema TAKUSI */
input,
select,
textarea {
    background: #1c1917;
    color: #ffffff;
}

input::placeholder {
    color: #78716c;
}

.card,
.login-card {
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

th {
    background: linear-gradient(135deg, #dc2626, #7f1d1d) !important;
}

td {
    color: #d6d3d1;
}

tr:hover td {
    background: rgba(41, 37, 36, 0.74);
}

.btn.primary {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #ef4444, #f59e0b);
}

.btn.secondary {
    border: 1px solid rgba(255,255,255,0.10);
}

.sidebar {
    border-right: 1px solid rgba(255,255,255,0.10);
}

.sidebar nav a.active,
.sidebar nav a:hover {
    background: rgba(220, 38, 38, 0.18);
    color: #ffffff;
}

.badge.active {
    background: rgba(22, 163, 74, 0.16);
    color: #bbf7d0;
}

.badge.inactive {
    background: rgba(220, 38, 38, 0.16);
    color: #fecaca;
}

.form-group small{display:block;margin-top:8px;color:#a8a29e;font-size:12px;}


/* Revisi posisi menu admin: navbar/menu berada di kiri atas */
.sidebar {
    justify-content: flex-start !important;
    align-items: stretch;
    gap: 28px;
}

.sidebar nav {
    margin-top: 0 !important;
    align-self: stretch;
}

.sidebar nav a {
    width: 100%;
}

/* FIX FINAL: menu admin agar berada di kiri atas */
.admin-layout {
    align-items: stretch !important;
}

.admin-layout .sidebar {
    display: block !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    height: 100vh !important;
    min-height: 100vh !important;
    padding-top: 28px !important;
}

.admin-layout .sidebar > div {
    margin-bottom: 28px !important;
}

.admin-layout .sidebar nav {
    display: grid !important;
    gap: 10px !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.admin-layout .sidebar nav a {
    display: block !important;
    width: 100% !important;
}
