:root {
    --bw-plum: #5b3a70;
    --bw-plum-dark: #432b53;
    --bw-teal: #2f817b;
    --bw-teal-dark: #246660;
    --bw-cream: #f7f4ef;
    --bw-ink: #25313a;
    --bw-muted: #6e7881;
    --bw-border: #e7e2dc;
    --bw-white: #ffffff;
    --bw-sidebar: #fbfaf7;
}
* { box-sizing: border-box; }
body.bw-admin {
    margin: 0;
    color: var(--bw-ink);
    background: var(--bw-cream);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.admin-layout { min-height: 100vh; display: flex; }
.admin-sidebar {
    width: 270px;
    flex: 0 0 270px;
    min-height: 100vh;
    background: var(--bw-sidebar);
    border-right: 1px solid var(--bw-border);
    padding: 28px 20px 22px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 30px;
}
.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--bw-plum), var(--bw-teal));
    color: #fff;
    font-weight: 800;
    font-size: 20px;
}
.brand-name {
    color: var(--bw-plum-dark);
    font-size: 15px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: .04em;
}
.brand-name span { color: var(--bw-teal-dark); font-size: 12px; letter-spacing: .12em; }
.sidebar-label, .eyebrow {
    color: var(--bw-teal-dark);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 800;
}
.sidebar-label { padding: 0 10px 8px; opacity: .75; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-nav a, .sidebar-bottom a {
    color: #56616a;
    text-decoration: none;
    border-radius: 10px;
    padding: 11px 12px;
    font-weight: 600;
    font-size: 14px;
}
.sidebar-nav a:hover, .sidebar-bottom a:hover { background: #f0ece7; color: var(--bw-plum-dark); }
.sidebar-nav a.active {
    background: rgba(91,58,112,.10);
    color: var(--bw-plum-dark);
    box-shadow: inset 3px 0 0 var(--bw-plum);
}
.sidebar-bottom {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--bw-border);
    display: grid;
}
.admin-main { min-width: 0; flex: 1; padding: 0 38px 50px; }
.topbar {
    min-height: 82px;
    margin: 0 -38px 30px;
    padding: 16px 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,.82);
    border-bottom: 1px solid var(--bw-border);
    backdrop-filter: blur(8px);
}
.topbar-title { font-weight: 800; font-size: 22px; margin-top: 2px; }
.admin-user {
    background: #fff;
    border: 1px solid var(--bw-border);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 700;
}
h1, h2, h3, h4, h5 { color: var(--bw-plum-dark); letter-spacing: -.02em; }
.card, .card-bw { border: 1px solid var(--bw-border); border-radius: 16px; box-shadow: 0 8px 25px rgba(67,43,83,.045); }
.stat-card {
    min-height: 142px;
    background: #fff;
}
.stat-number { color: var(--bw-plum); font-size: 38px; line-height: 1; font-weight: 800; }
.table-card { background: #fff; }
.table > :not(caption) > * > * { padding: .8rem .65rem; border-bottom-color: #eee9e4; vertical-align: middle; }
.table thead th {
    color: #68727a;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    white-space: nowrap;
}
.form-control, .form-select {
    border-color: #dcd6d0;
    border-radius: 9px;
    min-height: 42px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--bw-teal);
    box-shadow: 0 0 0 .2rem rgba(47,129,123,.12);
}
.btn-bw {
    background: var(--bw-plum);
    color: #fff;
    border: 1px solid var(--bw-plum);
    border-radius: 9px;
    font-weight: 700;
}
.btn-bw:hover { background: var(--bw-plum-dark); color: #fff; border-color: var(--bw-plum-dark); }
.btn-outline-bw {
    color: var(--bw-plum);
    border: 1px solid rgba(91,58,112,.35);
    border-radius: 9px;
    font-weight: 700;
}
.btn-outline-bw:hover { background: var(--bw-plum); color: #fff; }
.text-purple { color: var(--bw-plum) !important; }
.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
}
.detail-label {
    color: #707a82;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
    margin-bottom: 3px;
}
.detail-value { white-space: pre-wrap; word-break: break-word; }
.section-title {
    border-bottom: 1px solid var(--bw-border);
    padding-bottom: 10px;
    margin-bottom: 16px;
}
.empty-state { color: var(--bw-muted); padding: 30px 10px; text-align: center; }
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top right, rgba(47,129,123,.12), transparent 34%), var(--bw-cream);
}
.login-card { width: min(430px, 100%); background: #fff; border: 1px solid var(--bw-border); border-radius: 20px; padding: 34px; box-shadow: 0 18px 60px rgba(67,43,83,.10); }
.login-brand { margin-bottom: 28px; }
@media (max-width: 991.98px) {
    .admin-layout { display: block; }
    .admin-sidebar {
        position: static;
        width: auto;
        min-height: auto;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--bw-border);
    }
    .sidebar-nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .sidebar-bottom { margin-top: 14px; grid-template-columns: repeat(2,1fr); }
    .admin-main { padding: 0 18px 35px; }
    .topbar { margin: 0 -18px 24px; padding: 14px 18px; }
}
@media (max-width: 575.98px) {
    .sidebar-nav { grid-template-columns: 1fr; }
    .brand-block { padding-bottom: 18px; }
}
