/* ============================================================
   PNJ Admin Panel — admin.css
   Brand: #003B7A (Blue) | #F5A623 (Gold)
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --pnj-blue: #003B7A;
    --pnj-blue-dark: #002A5C;
    --pnj-blue-mid: #1A5494;
    --pnj-blue-light: #E6F1FB;
    --pnj-gold: #F5A623;
    --pnj-gold-dark: #D4891A;
    --pnj-gold-light: #FEF3DC;

    --sidebar-w: 240px;
    --sidebar-w-col: 64px;
    --header-h: 60px;
    --transition: 0.22s ease;

    --text-primary: #1a1a1a;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --bg-page: #F3F4F6;
    --bg-card: #FFFFFF;
    --border: #E5E7EB;
    --border-mid: #D1D5DB;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
}

html,
body {
    height: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul,
ol {
    list-style: none;
}

/* ── Layout ───────────────────────────────────────────────── */
.admin-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.admin-sidebar {
    width: var(--sidebar-w);
    background: var(--pnj-blue);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    transition: width var(--transition);
    position: relative;
    z-index: 100;
}

.admin-sidebar.collapsed {
    width: var(--sidebar-w-col);
}

/* Brand */
.sidebar-brand {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--pnj-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--pnj-blue);
    letter-spacing: 0.5px;
}

.brand-text {
    overflow: hidden;
    white-space: nowrap;
    transition: opacity var(--transition), width var(--transition);
}

.brand-name {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.brand-sub {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    font-weight: 400;
}

.admin-sidebar.collapsed .brand-text {
    opacity: 0;
    width: 0;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.nav-section {
    margin-bottom: 4px;
}

.nav-section-label {
    display: block;
    padding: 10px 16px 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition);
}

.admin-sidebar.collapsed .nav-section-label {
    opacity: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 400;
    border-radius: 0;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nav-item.active {
    background: var(--pnj-gold);
    color: var(--pnj-blue);
    font-weight: 600;
}

.nav-item.active .nav-icon {
    color: var(--pnj-blue);
}

.nav-icon {
    width: 18px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: color var(--transition);
}

.nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition), width var(--transition);
}

.admin-sidebar.collapsed .nav-label {
    opacity: 0;
    width: 0;
}

.nav-badge {
    flex-shrink: 0;
    background: var(--pnj-gold);
    color: var(--pnj-blue);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    transition: opacity var(--transition);
}

.nav-item.active .nav-badge {
    background: var(--pnj-blue);
    color: var(--pnj-gold);
}

.admin-sidebar.collapsed .nav-badge {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Tooltip on collapse */
.admin-sidebar.collapsed .nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(var(--sidebar-w-col) + 8px);
    background: var(--pnj-blue-dark);
    color: #fff;
    padding: 5px 10px;
    border-radius: var(--radius-md);
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 200;
}

.admin-sidebar.collapsed .nav-item:hover::after {
    opacity: 1;
}

/* Footer */
.sidebar-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pnj-gold);
    color: var(--pnj-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    overflow: hidden;
    transition: opacity var(--transition);
}

.user-name {
    display: block;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    white-space: nowrap;
}

.admin-sidebar.collapsed .user-info {
    opacity: 0;
    width: 0;
}

.logout-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    transition: background var(--transition), color var(--transition);
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.logout-form {
    margin: 0;
}

.admin-sidebar.collapsed .logout-btn {
    display: none;
}

/* ── Header ───────────────────────────────────────────────── */
.admin-header {
    height: var(--header-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    flex-shrink: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background var(--transition), border-color var(--transition);
    flex-shrink: 0;
    font-size: 13px;
}

.sidebar-toggle:hover {
    background: var(--bg-page);
    border-color: var(--border-mid);
    color: var(--text-primary);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb-item {
    color: var(--text-secondary);
    font-size: 13px;
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-sep {
    color: var(--text-muted);
    font-size: 12px;
}

/* Right */
.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 200px;
    transition: border-color var(--transition);
}

.header-search:focus-within {
    border-color: var(--pnj-blue);
}

.search-icon {
    color: var(--text-muted);
    font-size: 12px;
}

.search-input {
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-primary);
    width: 100%;
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Header Buttons */
.header-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background var(--transition), border-color var(--transition);
    font-size: 14px;
}

.header-btn:hover {
    background: var(--bg-page);
    border-color: var(--border-mid);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--pnj-gold);
    color: var(--pnj-blue);
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--bg-card);
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pnj-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.profile-btn {
    width: auto;
    padding: 2px;
    border-radius: var(--radius-full);
}

/* Dropdowns */
.notif-dropdown,
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    z-index: 200;
    display: none;
    min-width: 300px;
}

.header-btn.open .notif-dropdown,
.header-btn.open .profile-dropdown {
    display: block;
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
}

.notif-count-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--pnj-blue);
    background: var(--pnj-blue-light);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.notif-item {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.notif-item:hover {
    background: var(--bg-page);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pnj-gold);
    flex-shrink: 0;
    margin-top: 4px;
}

.notif-text {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 2px;
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notif-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.notif-empty i {
    font-size: 24px;
    margin-bottom: 6px;
    display: block;
}

.notif-dropdown-footer {
    display: block;
    padding: 10px 16px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--pnj-blue);
    border-top: 1px solid var(--border);
    transition: background var(--transition);
}

.notif-dropdown-footer:hover {
    background: var(--pnj-blue-light);
}

/* Profile dropdown */
.profile-dropdown {
    min-width: 240px;
}

.profile-dropdown-header {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.profile-avatar-lg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pnj-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-name {
    font-size: 13px;
    font-weight: 600;
}

.profile-email {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.profile-role-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--pnj-blue-light);
    color: var(--pnj-blue);
}

.profile-dropdown-menu {
    padding: 6px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    font-size: 13px;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    width: 100%;
    transition: background var(--transition);
    font-family: inherit;
}

.profile-menu-item:hover {
    background: var(--bg-page);
}

.profile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.profile-logout {
    color: #A32D2D;
}

.profile-logout:hover {
    background: #FCEBEB;
}

/* ── Content Area ─────────────────────────────────────────── */
.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.admin-content::-webkit-scrollbar {
    width: 5px;
}

.admin-content::-webkit-scrollbar-thumb {
    background: var(--border-mid);
    border-radius: 3px;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Alert ────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-success {
    background: #EAF3DE;
    color: #27500A;
    border: 1px solid #C0DD97;
}

.alert-danger {
    background: #FCEBEB;
    color: #791F1F;
    border: 1px solid #F7C1C1;
}

.alert-close {
    margin-left: auto;
    color: inherit;
    opacity: 0.6;
    font-size: 12px;
}

.alert-close:hover {
    opacity: 1;
}

/* ── Stat Cards ───────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-left: 4px solid transparent;
    transition: box-shadow var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card--blue {
    border-left-color: var(--pnj-blue);
}

.stat-card--gold {
    border-left-color: var(--pnj-gold);
}

.stat-card--green {
    border-left-color: #3B6D11;
}

.stat-card--red {
    border-left-color: #A32D2D;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.stat-card--blue .stat-icon {
    background: var(--pnj-blue-light);
    color: var(--pnj-blue);
}

.stat-card--gold .stat-icon {
    background: var(--pnj-gold-light);
    color: var(--pnj-gold-dark);
}

.stat-card--green .stat-icon {
    background: #EAF3DE;
    color: #3B6D11;
}

.stat-card--red .stat-icon {
    background: #FCEBEB;
    color: #A32D2D;
}

.stat-body {
    flex: 1;
    min-width: 0;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
}

.stat-change {
    display: block;
    font-size: 11px;
    margin-top: 4px;
}

.stat-change--up {
    color: #3B6D11;
}

.stat-change--warn {
    color: #854F0B;
}

.stat-change--danger {
    color: #A32D2D;
}

/* ── Dashboard Grid ───────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: start;
}

.dashboard-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Card ─────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 14px;
    font-weight: 600;
}

.card-action {
    font-size: 12px;
    color: var(--pnj-blue);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-action:hover {
    text-decoration: underline;
}

.card-body {
    padding: 16px 18px;
}

.card-body.p-0 {
    padding: 0;
}

/* ── Data Table ───────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 10px 18px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    background: var(--bg-page);
    text-align: left;
    white-space: nowrap;
}

.data-table td {
    padding: 11px 18px;
    font-size: 13px;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:hover td {
    background: #F9FAFB;
}

.table-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--pnj-blue-light);
    color: var(--pnj-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.table-empty {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
}

.table-empty i {
    font-size: 28px;
    display: block;
    margin-bottom: 6px;
}

.table-empty p {
    font-size: 13px;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge--success {
    background: #EAF3DE;
    color: #27500A;
}

.badge--warning {
    background: var(--pnj-gold-light);
    color: #854F0B;
}

.badge--info {
    background: var(--pnj-blue-light);
    color: var(--pnj-blue);
}

.badge--danger {
    background: #FCEBEB;
    color: #791F1F;
}

/* ── Progress ─────────────────────────────────────────────── */
.progress-item {
    margin-bottom: 14px;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 5px;
}

.progress-count {
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-track {
    height: 6px;
    background: var(--bg-page);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--pnj-blue);
    transition: width 0.5s ease;
}

.progress-fill--gold {
    background: var(--pnj-gold);
}

/* ── Activity ─────────────────────────────────────────────── */
.activity-list {
    padding: 4px 0;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.activity-dot--blue {
    background: var(--pnj-blue);
}

.activity-dot--gold {
    background: var(--pnj-gold);
}

.activity-dot--green {
    background: #3B6D11;
}

.activity-dot--red {
    background: #A32D2D;
}

.activity-text {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 11px;
    color: var(--text-muted);
}

.activity-empty {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--pnj-blue);
    color: #fff;
}

.btn-primary:hover {
    background: var(--pnj-blue-mid);
}

.btn-gold {
    background: var(--pnj-gold);
    color: var(--pnj-blue);
}

.btn-gold:hover {
    background: var(--pnj-gold-dark);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-mid);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-page);
}

.btn-danger {
    background: #FCEBEB;
    color: #791F1F;
    border-color: #F7C1C1;
}

.btn-danger:hover {
    background: #F7C1C1;
}

/* ── Utilities ────────────────────────────────────────────── */
.text-muted {
    color: var(--text-muted);
}

.text-sm {
    font-size: 12px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        transition: transform var(--transition), width var(--transition);
        width: var(--sidebar-w) !important;
    }

    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 99;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .header-search {
        display: none;
    }
}

/* ============================================================
   FORM UI UPGRADES
   ============================================================ */

/* ── Form Groups & Spacing ── */
.form-group {
    margin-bottom: 1.25rem;
}

/* ── Labels ── */
.form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    /* 14px */
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.form-label .required {
    color: #DC2626;
    /* Red for required asterisk */
    margin-left: 2px;
}

/* ── Base Inputs (Text, Email, Password, Number, Textarea) ── */
.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    /* 12px 16px */
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: #F9FAFB;
    background-clip: padding-box;
    border: 1.5px solid var(--border-mid);
    border-radius: var(--radius-sm, 8px);
    appearance: none;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease;
}

/* Placeholder Styling */
.form-control::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

/* ── Focus States ── */
.form-control:focus {
    outline: none;
    background-color: #FFFFFF;
    border-color: var(--pnj-blue);
    /* Creates a beautiful glowing blue ring around the input */
    box-shadow: 0 0 0 4px var(--pnj-blue-light);
}

/* ── Disabled & Readonly States ── */
.form-control:disabled,
.form-control[readonly] {
    background-color: var(--bg-page);
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: var(--border);
}

/* ── Custom Select Dropdowns ── */
select.form-control {
    padding-right: 2.5rem;
    cursor: pointer;
    /* Custom SVG chevron arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23003B7A' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* ── Checkboxes & Radios ── */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.15em;
    vertical-align: top;
    background-color: #FFFFFF;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1.5px solid var(--border-mid);
    appearance: none;
    color-adjust: exact;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.form-check-input[type="checkbox"] {
    border-radius: 0.25em;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input:checked {
    background-color: var(--pnj-blue);
    border-color: var(--pnj-blue);
}

.form-check-input[type="checkbox"]:checked {
    /* Custom checkmark for checkboxes */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-input[type="radio"]:checked {
    /* Custom dot for radio buttons */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-input:focus {
    outline: none;
    border-color: var(--pnj-blue);
    box-shadow: 0 0 0 4px var(--pnj-blue-light);
}

/* ── Validation States (Error) ── */
.form-control.is-invalid {
    border-color: #DC2626;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc2626'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc2626' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
    border-color: #DC2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #DC2626;
    font-weight: 500;
}

/* ── Helper Text ── */
.form-text {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}