:root {
    --bk-green: #0b4d24;
    --bk-green-dark: #07371a;
    --bk-accent: #d46402;
    --bk-sidebar-w: 250px;
}

body {
    background: #f2f5f3;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--bk-sidebar-w);
    background: linear-gradient(180deg, var(--bk-green-dark), var(--bk-green));
    color: rgba(255, 255, 255, .85);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease;
}
.admin-sidebar .brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1rem 1.25rem;
    color: #fff;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    text-decoration: none;
}
.admin-sidebar .brand img { height: 34px; }
.admin-sidebar .nav {
    padding: 1rem .75rem;
    overflow-y: auto;
    flex-wrap: nowrap;
    min-height: 0;
}
.admin-sidebar .nav::-webkit-scrollbar { width: 6px; }
.admin-sidebar .nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 3px; }
.admin-sidebar .nav-label {
    font-size: .7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
    padding: .75rem .75rem .35rem;
}
.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, .82);
    border-radius: .6rem;
    padding: .55rem .85rem;
    font-size: .9rem;
    margin-bottom: .15rem;
    display: flex;
    align-items: center;
    gap: .65rem;
}
.admin-sidebar .nav-link i { font-size: 1rem; opacity: .85; }
.admin-sidebar .nav-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.admin-sidebar .nav-link.active { background: var(--bk-accent); color: #fff; font-weight: 600; }

/* ---------- Topbar ---------- */
.admin-topbar {
    position: sticky;
    top: 0;
    background: #fff;
    box-shadow: 0 2px 12px rgba(7, 55, 26, .08);
    z-index: 1030;
}
.admin-topbar .dropdown-toggle::after { display: none; }

/* ---------- Layout ---------- */
.admin-main { margin-left: var(--bk-sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.admin-content { flex: 1; padding: 1.75rem; }

.card {
    border: 0;
    border-radius: .9rem;
    box-shadow: 0 4px 18px rgba(7, 55, 26, .06);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid #eef1ef;
    font-weight: 700;
    border-radius: .9rem .9rem 0 0 !important;
    padding: 1rem 1.25rem;
}
.table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748b;
    border-bottom-width: 1px;
}
.table > :not(caption) > * > * { padding: .8rem .9rem; }

.btn-theme { background: var(--bk-green); border-color: var(--bk-green); color: #fff; font-weight: 600; }
.btn-theme:hover, .btn-theme:focus { background: var(--bk-green-dark); border-color: var(--bk-green-dark); color: #fff; }
.text-theme { color: var(--bk-green); }

.stat-card { border-radius: .9rem; color: #fff; overflow: hidden; position: relative; }
.stat-card .icon {
    position: absolute;
    right: -6px;
    bottom: -10px;
    font-size: 4.6rem;
    opacity: .18;
}
.stat-card h3 { font-weight: 800; margin-bottom: 0; }
.stat-1 { background: linear-gradient(135deg, #0b4d24, #15713a); }
.stat-2 { background: linear-gradient(135deg, #b35401, #d46402); }
.stat-3 { background: linear-gradient(135deg, #14532d, #2f7d4f); }
.stat-4 { background: linear-gradient(135deg, #334155, #64748b); }

.thumb-mini { width: 72px; height: 48px; object-fit: cover; border-radius: .45rem; }

.form-label { font-weight: 600; font-size: .875rem; margin-bottom: .35rem; }
.required::after { content: " *"; color: #dc3545; }

/* ---------- Login ---------- */
.login-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(212, 100, 2, .12), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(11, 77, 36, .12), transparent 45%),
        #eef3ef;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.login-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    width: 100%;
    max-width: 980px;
    min-height: 600px;
    background: #fff;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(7, 55, 26, .18);
}

/* Panel visual kiri */
.login-visual {
    position: relative;
    color: #fff;
    background:
        linear-gradient(160deg, rgba(7, 55, 26, .92) 0%, rgba(11, 77, 36, .82) 55%, rgba(212, 100, 2, .55) 130%),
        url("/images/background/bg-6.jpg") center/cover no-repeat;
}
.login-visual::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 40px solid rgba(255, 255, 255, .06);
}
.login-visual-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
}
.login-brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.login-brand:hover { color: #fff; }
.login-brand img { background: rgba(255, 255, 255, .12); border-radius: 50%; padding: 3px; }
.login-brand strong { display: block; font-size: 1.05rem; letter-spacing: .5px; text-transform: uppercase; }
.login-brand small { display: block; font-size: .72rem; opacity: .75; }
.login-hero { margin-top: auto; margin-bottom: 2rem; }
.login-eyebrow {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    padding: .3rem .8rem;
    margin-bottom: 1rem;
}
.login-hero h2 { font-weight: 800; font-size: 1.85rem; line-height: 1.25; margin-bottom: .75rem; }
.login-hero p { opacity: .85; margin: 0; max-width: 360px; }
.login-modules { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.login-modules li {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .9rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: .8rem;
    padding: .6rem .8rem;
    backdrop-filter: blur(4px);
}
.login-modules li span {
    width: 32px;
    height: 32px;
    border-radius: .55rem;
    display: grid;
    place-items: center;
    background: var(--bk-accent);
    flex: none;
}

/* Panel formulir kanan */
.login-panel { display: flex; align-items: center; justify-content: center; padding: 2.5rem; }
.login-form-wrap { width: 100%; max-width: 360px; }
.login-mobile-brand { display: none; text-align: center; margin-bottom: 1rem; }
.login-title { font-size: 1.6rem; font-weight: 800; color: var(--bk-green-dark); margin-bottom: .35rem; }
.login-subtitle { color: #64748b; font-size: .92rem; margin-bottom: 1.5rem; }
.login-panel .form-label { font-size: .82rem; color: #334155; }

.login-field {
    display: flex;
    align-items: center;
    gap: .6rem;
    height: 48px;
    padding: 0 .9rem;
    border: 1.5px solid #dfe6e2;
    border-radius: .8rem;
    background: #f8faf9;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.login-field:focus-within {
    border-color: #2f7d4f;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(11, 77, 36, .1);
}
.login-field.is-invalid { border-color: #dc3545; }
.login-field > i { color: #94a3b8; font-size: 1.05rem; }
.login-field:focus-within > i { color: var(--bk-green); }
.login-field input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: .95rem;
    height: 100%;
}
.login-field-action {
    border: 0;
    background: none;
    color: #94a3b8;
    padding: .25rem;
    line-height: 1;
}
.login-field-action:hover { color: var(--bk-green); }

.login-captcha { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: .5rem; align-items: center; }
.login-captcha .login-field { min-width: 0; padding: 0 .75rem; }
.login-captcha .login-field input { letter-spacing: 2px !important; }
.login-captcha img { height: 48px; width: 132px; object-fit: cover; border-radius: .7rem; border: 1.5px solid #dfe6e2; background: #f1f6f2; }
.login-captcha-refresh {
    width: 40px;
    height: 48px;
    border-radius: .7rem;
    border: 1.5px solid #dfe6e2;
    background: #fff;
    color: var(--bk-green);
    transition: transform .3s ease, background .2s ease;
}
.login-captcha-refresh:hover { background: var(--bk-green-soft, #e7f2ea); }
.login-captcha-refresh:active i { display: inline-block; transform: rotate(180deg); }

.login-submit {
    height: 50px;
    border-radius: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-size: 1rem;
    box-shadow: 0 10px 24px rgba(11, 77, 36, .25);
}
.login-submit i { transition: transform .2s ease; }
.login-submit:hover i { transform: translateX(4px); }
.login-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin-top: 1.5rem;
    font-size: .88rem;
    color: #64748b;
    text-decoration: none;
}
.login-back:hover { color: var(--bk-green); }
.login-footnote { text-align: center; color: #a0aab4; font-size: .75rem; margin: .75rem 0 0; }

@media (max-width: 860px) {
    .login-shell { grid-template-columns: 1fr; max-width: 440px; min-height: 0; }
    .login-visual { display: none; }
    .login-mobile-brand { display: block; }
    .login-title, .login-subtitle { text-align: center; }
    .login-panel { padding: 2rem 1.5rem; }
}
@media (max-width: 400px) {
    .login-captcha { grid-template-columns: 1fr auto; }
    .login-captcha .login-field { grid-column: 1 / -1; }
}

/* ---------- Responsif ---------- */
@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-main { margin-left: 0; }
}
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; display: none; }
.sidebar-backdrop.show { display: block; }
