* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:root {
    --primary: #2563eb;
    --primary-dk: #1d4ed8;
    --primary-lt: #eff6ff;
    --primary-glow: rgba(37, 99, 235, 0.25);
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --purple: #8b5cf6;
    --teal: #14b8a6;
    --bg: #f0f4ff;
    --card: #fff;
    --border: #e2e8f0;
    --border-subtle: #f1f5f9;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #64748b;
    --muted-lt: #94a3b8;
    --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --sidebar-w: 260px;
    --topbar: 64px;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.16);
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1)
}

[data-theme="dark"] {
    --bg: #0a0f1e;
    --card: #111827;
    --border: #1e293b;
    --border-subtle: #1a2436;
    --text: #f1f5f9;
    --text-2: #cbd5e1;
    --muted: #64748b;
    --muted-lt: #475569;
    --primary-lt: rgba(37, 99, 235, 0.15);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5)
}

body {
    font-family: 'Sora', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s
}

.app {
    display: flex;
    min-height: 100vh
}

/* ═══ TOAST ═══ */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none
}

.toast {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    pointer-events: all;
    animation: slideIn 0.3s ease;
    min-width: 260px;
    max-width: 380px
}

.toast-success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #10b981
}

.toast-error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444
}

.toast-info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 4px solid #2563eb
}

[data-theme="dark"] .toast-success {
    background: #052e16;
    color: #86efac
}

[data-theme="dark"] .toast-error {
    background: #2d0a0a;
    color: #fca5a5
}

[data-theme="dark"] .toast-info {
    background: #0c1a3d;
    color: #93c5fd
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

/* ═══ SIDEBAR ═══ */
.sidebar {
    width: var(--sidebar-w);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    scrollbar-width: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1)
}

.sidebar.collapsed {
    width: 68px
}

.sidebar::-webkit-scrollbar {
    display: none
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(ellipse at 30% 0%, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
    pointer-events: none
}

.sb-logo {
    padding: 20px 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    flex-shrink: 0
}

.sb-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5)
}

.sb-logo-text {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    transition: var(--transition)
}

.sb-logo-text span {
    color: #60a5fa
}

.sidebar.collapsed .sb-logo-text {
    opacity: 0;
    width: 0
}

.sb-collapse {
    margin-left: auto;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    transition: var(--transition);
    flex-shrink: 0
}

.sb-collapse:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff
}

.sb-section {
    padding: 10px 16px 5px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.22);
    letter-spacing: 1.4px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    transition: var(--transition)
}

.sidebar.collapsed .sb-section {
    opacity: 0;
    height: 0;
    padding: 0
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin: 2px 8px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    overflow: hidden
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.9)
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(29, 78, 216, 0.3));
    color: #fff
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 65%;
    background: linear-gradient(180deg, #60a5fa, #2563eb);
    border-radius: 4px
}

.nav-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 18px;
    text-align: center
}

.nav-label {
    transition: var(--transition)
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge-dot {
    opacity: 0;
    width: 0;
    overflow: hidden
}

.nav-badge-dot {
    margin-left: auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0
}

.sb-footer {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0
}

.sb-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    cursor: default;
    overflow: hidden
}

.sb-av {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff
}

.sb-uname {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.sb-urole {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.38);
    text-transform: capitalize
}

.sb-uinfo {
    overflow: hidden;
    transition: var(--transition)
}

.sidebar.collapsed .sb-uinfo {
    opacity: 0;
    width: 0;
    padding: 0
}

.sb-logout {
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px
}

.sb-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5
}

.sidebar.collapsed .sb-logout span {
    display: none
}

/* ═══ TOPBAR ═══ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 100;
    gap: 16px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
    backdrop-filter: blur(8px)
}

.topbar.collapsed {
    left: 68px
}

.topbar-left {
    display: flex;
    flex-direction: column
}

.topbar-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px
}

.topbar-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px
}

.topbar-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700
}

.tb-super {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e3a8a
}

.tb-admin {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #064e3b
}

.tb-user {
    background: var(--border-subtle);
    color: var(--text-2)
}

[data-theme="dark"] .tb-super {
    background: rgba(37, 99, 235, 0.2);
    color: #93c5fd
}

[data-theme="dark"] .tb-admin {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7
}

[data-theme="dark"] .tb-user {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-2)
}

.mobile-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text)
}

/* ═══ THEME TOGGLE ═══ */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    color: var(--text)
}

.theme-toggle:hover {
    background: var(--primary-lt);
    border-color: var(--primary)
}

/* ═══ MAIN ═══ */
.main {
    margin-left: var(--sidebar-w);
    padding-top: var(--topbar);
    min-height: 100vh;
    flex: 1;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1)
}

.main.collapsed {
    margin-left: 68px
}

.page-inner {
    padding: 24px
}

/* ═══ STATS ═══ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 20px
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px 16px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    cursor: default
}

.stat-card.clickable {
    cursor: pointer
}

.stat-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: transparent
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0
}

.stat-card.c-blue::before {
    background: linear-gradient(90deg, #2563eb, #60a5fa)
}

.stat-card.c-green::before {
    background: linear-gradient(90deg, #10b981, #6ee7b7)
}

.stat-card.c-orange::before {
    background: linear-gradient(90deg, #f59e0b, #fcd34d)
}

.stat-card.c-red::before {
    background: linear-gradient(90deg, #ef4444, #fca5a5)
}

.stat-card.c-purple::before {
    background: linear-gradient(90deg, #8b5cf6, #c4b5fd)
}

.stat-card.c-teal::before {
    background: linear-gradient(90deg, #14b8a6, #5eead4)
}

.stat-card.c-indigo::before {
    background: linear-gradient(90deg, #6366f1, #a5b4fc)
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    opacity: 0.06
}

.stat-card.c-blue::after {
    background: #2563eb
}

.stat-card.c-green::after {
    background: #10b981
}

.stat-card.c-orange::after {
    background: #f59e0b
}

.stat-card.c-red::after {
    background: #ef4444
}

.stat-card.c-purple::after {
    background: #8b5cf6
}

.stat-card.c-teal::after {
    background: #14b8a6
}

.stat-card.c-indigo::after {
    background: #6366f1
}

.stat-icon {
    font-size: 22px;
    margin-bottom: 10px;
    line-height: 1
}

.stat-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 5px
}

.stat-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.5px
}

.stat-val.sm {
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.2px
}

.stat-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px
}

/* ═══ CARD ═══ */
.card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: background 0.3s, border-color 0.3s
}

.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text)
}

.card-sub {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 1px
}

/* ═══ SEARCH ═══ */
.filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.search-wrap {
    position: relative
}

.search-wrap input {
    padding: 8px 12px 8px 36px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-size: 13px;
    width: 240px;
    outline: none;
    font-family: 'Sora', sans-serif;
    background: var(--card);
    color: var(--text);
    transition: var(--transition)
}

.search-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow)
}

.search-wrap input::placeholder {
    color: var(--muted-lt)
}

.search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 14px;
    pointer-events: none
}

.sel {
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-size: 13px;
    background: var(--card);
    color: var(--text);
    outline: none;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: var(--transition)
}

.sel:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow)
}

/* ═══ BUTTONS ═══ */
.btn {
    padding: 8px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    font-family: 'Sora', sans-serif;
    letter-spacing: -0.1px
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3)
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px)
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3)
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4)
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3)
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-1px)
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3)
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-1px)
}

.btn-ghost {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text)
}

.btn-ghost:hover:not(:disabled) {
    background: var(--border-subtle);
    border-color: var(--primary);
    color: var(--primary)
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 7px
}

.btn-xs {
    padding: 3px 9px;
    font-size: 11px;
    border-radius: 6px
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: var(--card);
    font-size: 14px;
    transition: var(--transition)
}

.icon-btn:hover {
    background: var(--primary-lt);
    border-color: var(--primary)
}

.icon-btn.danger:hover {
    background: #fef2f2;
    border-color: #fca5a5
}

[data-theme="dark"] .icon-btn.danger:hover {
    background: #2d0a0a
}

/* ═══ TABLE ═══ */
.table-wrap {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

th {
    padding: 10px 14px;
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--muted);
    background: var(--border-subtle);
    border-bottom: 1px solid var(--border);
    white-space: nowrap
}

td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
    color: var(--text)
}

tr:last-child td {
    border-bottom: none
}

tbody tr:hover td {
    background: var(--primary-lt)
}

[data-theme="dark"] tbody tr:hover td {
    background: rgba(37, 99, 235, 0.08)
}

/* ═══ BADGES ═══ */
.badge {
    display: inline-block;
    padding: 4px 4px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.5;
    max-width: 300px
}

.b-pending {
    background: #fef3c7;
    color: #92400e
}

.b-approved {
    background: #d1fae5;
    color: #065f46
}

.b-rejected {
    background: #fee2e2;
    color: #991b1b
}

.b-withheld {
    background: #ede9fe;
    color: #5b21b6
}

.b-info {
    background: #dbeafe;
    color: #1e3a8a
}

.b-super {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff
}

.b-admin {
    background: #d1fae5;
    color: #065f46
}

.b-user {
    background: var(--border-subtle);
    color: var(--text-2)
}

.b-active {
    background: #d1fae5;
    color: #065f46
}

.b-inactive {
    background: #fee2e2;
    color: #991b1b
}

.b-misc {
    display: inline-block;
    background: var(--border-subtle);
    color: var(--text-2);
    max-width: 300px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.4;
    padding: 4px 8px
}

[data-theme="dark"] .b-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24
}

[data-theme="dark"] .b-approved {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7
}

[data-theme="dark"] .b-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5
}

[data-theme="dark"] .b-withheld {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd
}

[data-theme="dark"] .b-info {
    background: rgba(37, 99, 235, 0.15);
    color: #93c5fd
}

[data-theme="dark"] .b-user {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-2)
}

[data-theme="dark"] .b-active {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7
}

[data-theme="dark"] .b-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5
}

/* ═══ LOGIN ═══ */
.login-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f2b60 100%);
    position: relative;
    overflow: hidden
}

.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 50%, rgba(37, 99, 235, 0.2) 0%, transparent 60%),
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
}

.login-orbs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px)
}

.login-orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(37, 99, 235, 0.3);
    top: -80px;
    right: -80px;
    animation: float 6s ease-in-out infinite
}

.login-orb-2 {
    width: 200px;
    height: 200px;
    background: rgba(139, 92, 246, 0.2);
    bottom: -50px;
    left: -50px;
    animation: float 8s ease-in-out infinite reverse
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-20px)
    }
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 42px;
    width: 100%;
    max-width: 430px;
    position: relative;
    z-index: 1;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1)
}

.login-head {
    text-align: center;
    margin-bottom: 32px
}

.login-head-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5)
}

.login-head h1 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px
}

.login-head p {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px
}

/* ═══ FORMS ═══ */
.form-grp {
    margin-bottom: 14px
}

.form-lbl {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 6px;
    letter-spacing: 0.2px
}

.form-inp {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
    background: var(--card);
    color: var(--text);
    font-family: 'Sora', sans-serif
}

.form-inp:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow)
}

.form-inp::placeholder {
    color: var(--muted-lt)
}

.form-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Sora', sans-serif;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4)
}

.form-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.5)
}

.form-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed
}

.err-box {
    background: #fef2f2;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #fecaca
}

.ok-box {
    background: #f0fdf4;
    color: #065f46;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #bbf7d0
}

[data-theme="dark"] .err-box {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.25)
}

[data-theme="dark"] .ok-box {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.25)
}

/* ═══ MODAL ═══ */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadein 0.2s ease
}

@keyframes fadein {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.modal {
    background: var(--card);
    border-radius: 20px;
    padding: 28px 28px 24px;
    width: 100%;
    max-width: 600px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border);
    animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1)
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(10px)
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0)
    }
}

.modal-sm {
    max-width: 430px
}

.modal-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px
}

.modal-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition)
}

.modal-close:hover {
    background: var(--border-subtle);
    color: var(--text)
}

.modal-ft {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border)
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.form-row.three {
    grid-template-columns: 1fr 1fr 1fr
}

/* ═══ PAGINATION ═══ */
.pagbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap
}

.pgbtn {
    padding: 5px 11px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
    font-family: 'Sora', sans-serif
}

.pgbtn:hover {
    background: var(--primary-lt);
    border-color: var(--primary);
    color: var(--primary)
}

.pgbtn.act {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3)
}

.pgbtn:disabled {
    opacity: 0.35;
    cursor: not-allowed
}

/* ═══ UPLOAD ═══ */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--border-subtle)
}

.dropzone:hover,
.dropzone.drag {
    border-color: var(--primary);
    background: var(--primary-lt)
}

.dz-icon {
    font-size: 48px;
    margin-bottom: 14px
}

.dz-text {
    font-size: 14px;
    color: var(--muted)
}

.dz-text strong {
    color: var(--primary)
}

/* ═══ PROGRESS BAR ═══ */
.progress-wrap {
    background: var(--border-subtle);
    border-radius: 99px;
    height: 8px;
    overflow: hidden
}

.progress-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s ease
}

/* ═══ MISC ═══ */
.loading {
    text-align: center;
    padding: 56px;
    color: var(--muted)
}

.spin {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.empty {
    text-align: center;
    padding: 64px 20px;
    color: var(--muted)
}

.empty-ico {
    font-size: 52px;
    margin-bottom: 14px;
    opacity: 0.7
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0
}

.tag {
    display: inline-block;
    padding: 2px 9px;
    background: var(--border-subtle);
    color: var(--text-2);
    border-radius: 5px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid var(--border)
}

.perm-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle)
}

.perm-row:last-child {
    border-bottom: none
}

.perm-check {
    color: var(--success);
    font-size: 14px;
    margin-top: 1px;
    flex-shrink: 0
}

.notice {
    background: var(--primary-lt);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 16px
}

textarea.form-inp {
    resize: vertical;
    min-height: 80px
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.4px
}

.section-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 3px
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px
}

/* ═══ USER TABLE ACTION BUTTONS ═══ */
.action-cell {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap
}

.btn-xs {
    white-space: nowrap;
    flex-shrink: 0
}

/* ═══ GRIEVANCE CARDS ═══ */
.grievance-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: var(--transition);
    position: relative
}

.grievance-card:hover {
    box-shadow: var(--shadow)
}

.grievance-card.g-open {
    border-left: 3px solid #f59e0b
}

.grievance-card.g-resolved {
    border-left: 3px solid #10b981
}

.grievance-card.g-forwarded {
    border-left: 3px solid #8b5cf6
}

/* ═══ CONTACT ═══ */
.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--border-subtle);
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 10px
}

.contact-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0
}

/* ═══ DISTRICT BADGE ═══ */
.dist-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: var(--primary-lt);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2)
}

/* ═══ SIDEBAR COLLAPSED TOOLTIP ═══ */
.sidebar.collapsed .nav-item[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 68px;
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #fff;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 7px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sidebar:not(.collapsed) .nav-item::after {
    display: none !important;
}

/* ═══ SIDEBAR OVERLAY (mobile) ═══ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    backdrop-filter: blur(2px)
}

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar {
    width: 5px;
    height: 5px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 99px
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted-lt)
}

@media(max-width:768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-w) !important
    }

    .sidebar.mobile-open {
        transform: translateX(0)
    }

    .sidebar-overlay.show {
        display: block
    }

    .main {
        margin-left: 0 !important
    }

    .topbar {
        left: 0 !important
    }

    .form-row {
        grid-template-columns: 1fr
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr)
    }

    .search-wrap input {
        width: 160px
    }

    .mobile-menu-btn {
        display: flex
    }

    .page-inner {
        padding: 16px
    }
}