:root { --primary: #1e3a8a; --side-w: 250px; }
body { font-family: 'Kanit', sans-serif; font-weight: 300; background: #f3f4f6; }
.admin-wrap { display: flex; min-height: 100vh; }

.admin-side {
  width: var(--side-w);
  background: color-mix(in srgb, var(--primary) 70%, #000);
  color: #fff;
}
@media (min-width: 992px) {
  .admin-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; }
  .admin-side.offcanvas-lg { background-color: color-mix(in srgb, var(--primary) 70%, #000) !important; }
}
.list-group-item.active { background: var(--primary); border-color: var(--primary); }
.admin-side.offcanvas-lg { --bs-offcanvas-width: var(--side-w); --bs-offcanvas-bg: color-mix(in srgb, var(--primary) 70%, #000); --bs-offcanvas-color: #fff; }
.side-brand { display: flex; gap: .7rem; align-items: center; padding: 1.1rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.side-brand > i { font-size: 1.6rem; color: #f2c94c; }
.side-nav { padding: .8rem .6rem; display: flex; flex-direction: column; gap: 2px; }
.side-nav a { color: rgba(255,255,255,.82); text-decoration: none; padding: .55rem .8rem; border-radius: .45rem; display: flex; gap: .6rem; align-items: center; }
.side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav a.active { background: #fff; color: var(--primary); font-weight: 400; }
.side-nav hr { border-color: rgba(255,255,255,.2); }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top { background: #fff; padding: .8rem 1.25rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 1020; }
.admin-content { padding: 1.25rem; }
@media (max-width: 575.98px) { .admin-content { padding: 1rem .75rem; } }

.card { border: 0; box-shadow: 0 1px 6px rgba(0,0,0,.06); border-radius: .7rem; }
.card-header { background: #fff; font-weight: 400; border-bottom: 1px solid #eee; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background: color-mix(in srgb, var(--primary) 80%, #000); border-color: color-mix(in srgb, var(--primary) 80%, #000); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.page-link { color: var(--primary); }
.table th { font-weight: 400; color: #555; white-space: nowrap; }
.table td { vertical-align: middle; }
.thumb-sm { width: 64px; height: 44px; object-fit: cover; border-radius: .3rem; background: #eee; }
.thumb-person { width: 44px; height: 56px; object-fit: cover; border-radius: .3rem; background: #eee; }
.preview-img { max-width: 100%; max-height: 200px; border-radius: .4rem; border: 1px solid #ddd; }
.stat-tile { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; }
.stat-tile .ic { width: 52px; height: 52px; border-radius: .7rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; background: var(--primary); flex-shrink: 0; }
.stat-tile .n { font-size: 1.6rem; font-weight: 500; line-height: 1.1; }
.form-label { font-weight: 400; }
.req::after { content: ' *'; color: #dc3545; }
.gallery-admin img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: .4rem; }
.input-stat { width: 70px; text-align: center; padding: .2rem .3rem; }

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #000)); padding: 1rem; }
.login-card { width: 100%; max-width: 400px; }
.input-stat.is-imported { background: #fff3cd; border-color: #f0ad4e; font-weight: 600; }
