/* css/style.css - Premium Design System for SCS Computer Education */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-primary: #090514;
    --bg-surface: #100a26;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(139, 92, 246, 0.5);
    
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.35);
    --primary-hover: #7c3aed;
    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    
    --text-main: #f3efff;
    --text-muted: #9c92b3;
    --text-inverse: #0f0b21;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Layout Sizes */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle at 10% 20%, rgba(90, 47, 209, 0.15) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(251, 191, 36, 0.04) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Compact Tabs */
.status-tabs {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0;
    margin-bottom: 1.2rem;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    max-width: 100%;
    overflow-x: auto;
    box-shadow: none;
}

.status-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    min-height: 42px;
    padding: 0.65rem 1.05rem;
    border-radius: 10px;
    color: #e8e2f5;
    font-size: 0.84rem;
    font-weight: 800;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.1);
    line-height: 1;
    letter-spacing: 0;
    min-width: 0;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.status-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255,255,255,0.16);
}

.status-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: rgba(139, 92, 246, 0.85);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.34), inset 0 1px 0 rgba(255,255,255,0.18);
}

.status-tab i {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    opacity: 0.95;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
}

.status-tab.active i {
    color: #fff;
    background: rgba(255,255,255,0.2);
}

@media (max-width: 720px) {
    .status-tabs {
        width: 100%;
    }

    .status-tab {
        min-width: max-content;
    }
}

/* Lightweight Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(6, 3, 15, 0.72);
    backdrop-filter: blur(8px);
}

.modal-backdrop.is-open {
    display: flex;
}

.modal-panel {
    width: 520px;
    max-width: 100%;
    background: #120b28;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3.5rem);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
}

.modal-subtitle {
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 0.9rem;
    overflow-y: auto;
}

.modal-panel.modal-panel-sm {
    width: 430px;
    max-width: 100%;
}

.modal-panel.modal-panel-lg {
    width: 920px;
    max-width: 95%;
}

.modal-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-grid-3-custom {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-grid-2-custom {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 850px) {
    .modal-grid-3, .modal-grid-3-custom {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 580px) {
    .modal-grid-3, .modal-grid-3-custom, .modal-grid-2-custom {
        grid-template-columns: 1fr !important;
    }
}


.modal-panel-sm .modal-header {
    padding: 0.85rem 0.95rem;
}

.modal-panel-sm .form-group {
    margin-bottom: 0.75rem;
}

.icon-only-actions {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: center;
}

.icon-only-actions .btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    justify-content: center;
}

.icon-select-wrap {
    position: relative;
    width: 34px !important;
    height: 30px;
    min-width: 34px;
    flex: 0 0 34px;
}

.icon-select-wrap i {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    pointer-events: none;
}

.icon-select-wrap .icon-select {
    width: 34px !important;
    height: 30px;
    min-height: 30px;
    padding: 0;
    color: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.icon-select option {
    background-color: #100a26;
    color: #ffffff;
}

.ho-status-stack {
    min-width: 175px;
    display: grid;
    gap: 0.45rem;
}

.ho-status-track {
    display: flex;
    align-items: center;
    gap: 0.28rem;
}

.ho-status-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
}

.ho-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-height: 26px;
    padding: 0.22rem 0.48rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.ho-status-pill i {
    font-size: 0.68rem;
}

.ho-status-pill.is-done {
    color: #d1fae5;
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(16, 185, 129, 0.11);
}

.ho-status-pill.is-active {
    color: #fef3c7;
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.1);
}

.ho-status-connector {
    width: 10px;
    height: 1px;
    background: rgba(255,255,255,0.14);
}

.ho-status-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
    min-width: 0;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--sidebar-width) 0.3s ease;
}

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

.sidebar-brand {
    height: var(--header-height);
    min-height: var(--header-height);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 0.8rem;
    text-shadow: 0 0 10px var(--primary-glow);
}

.sidebar-brand span {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #fff 0%, #b39bf5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-brand span {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 0;
}

.sidebar.collapsed .sidebar-brand i {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    opacity: 1;
    visibility: visible;
    flex: 0 0 38px;
    font-size: 1.45rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0.8rem;
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar-menu::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.sidebar-category {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.3);
    padding: 1.2rem 1rem 0.4rem;
    font-family: 'Outfit', sans-serif;
}
.sidebar.collapsed .sidebar-category {
    display: none !important;
}

.sidebar-item {
    margin-bottom: 0.4rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.sidebar-link i {
    font-size: 1.1rem;
    margin-right: 1rem;
    width: 20px;
    text-align: center;
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar.collapsed .sidebar-link i {
    margin-right: 0;
}

.sidebar-link:hover, .sidebar-item.active .sidebar-link {
    color: #fff;
    background: var(--bg-card-hover);
}

.sidebar-item.active .sidebar-link {
    background: linear-gradient(90deg, var(--primary-glow) 0%, transparent 100%);
    border-left: 3px solid var(--primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.sidebar-item.active .sidebar-link i {
    color: var(--primary);
}

.sidebar.collapsed .sidebar-link span {
    display: none;
}

/* User widget used by center-side pages. */
.sidebar-user {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.sidebar-user > div:first-child {
    flex: 0 0 38px;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50% !important;
    overflow: hidden;
}

.sidebar-user-info {
    min-width: 0;
    white-space: nowrap;
}

.sidebar-user-name {
    overflow: hidden;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.sidebar.collapsed .sidebar-user-info {
    display: none;
}

.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar.collapsed .sidebar-user > div:first-child {
    margin-right: 0 !important;
}

/* Main Content Area */
.main-wrapper {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* Header Styling */
.main-header {
    height: var(--header-height);
    min-height: var(--header-height);
    background: rgba(16, 10, 38, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.header-toggle:hover {
    background: var(--bg-card);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-admin-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.18s ease;
}

.header-admin-profile:hover {
    opacity: 0.82;
}

.header-admin-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.header-admin-name {
    display: block;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.15;
}

.header-admin-role {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1.2;
}

.wallet-badge {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notice-resource-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    margin-left: 0.45rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
    transition: transform 0.18s ease, background 0.18s ease;
}

.notice-resource-icon:hover {
    transform: translateY(-1px);
}

.notice-resource-icon-link {
    color: var(--accent);
    background: rgba(251, 191, 36, 0.1);
}

.notice-resource-icon-document {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

/* Page Content container */
.content-body {
    padding: 2rem;
    flex-grow: 1;
    min-width: 0;
}

.page-title-block {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Dashboard Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--border-focus);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.15);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-glow) 0%, transparent 100%);
    border-bottom-left-radius: 100%;
    opacity: 0.3;
}

.stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-top: 0.2rem;
}

.stat-lbl {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
}

.stat-card:nth-child(2n) .stat-icon {
    background: rgba(251, 191, 36, 0.1);
    color: var(--accent);
}
.stat-card:nth-child(3n) .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* Alert Boxes */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Cards & Containers */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.8rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}

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

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Tables Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.table th {
    background: rgba(16, 10, 38, 0.5);
    color: #fff;
    font-weight: 600;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-approved {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    justify-content: center;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6d28d9 100%);
    color: #fff;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, #9065f7 0%, #7c3aed 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #ef4444;
    color: #fff;
}

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: #10b981;
    color: #fff;
}

/* Custom Ghost/Outline Buttons with Transitions */
.btn-primary-ghost {
    background: rgba(139, 92, 246, 0.08) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(139, 92, 246, 0.25) !important;
    box-shadow: none !important;
    transition: var(--transition) !important;
}
.btn-primary-ghost:hover {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.btn-warning-ghost {
    background: rgba(245, 158, 11, 0.08) !important;
    color: var(--warning) !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
    box-shadow: none !important;
    transition: var(--transition) !important;
}
.btn-warning-ghost:hover {
    background: var(--warning) !important;
    color: #fff !important;
    border-color: var(--warning) !important;
}

.btn-secondary-ghost {
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: none !important;
    transition: var(--transition) !important;
}
.btn-secondary-ghost:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--text-muted) !important;
    color: #fff !important;
}

/* Forms Styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

/* Ensure select elements and dropdown options render with a readable solid dark background */
select,
select.form-control {
    background-color: #100a26 !important;
    color: #ffffff !important;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1.1em !important;
    padding-right: 2.5rem !important;
}

select option,
select.form-control option {
    background-color: #100a26 !important;
    color: #ffffff !important;
}


/* State and district selects need room for native option text and arrow. */
.form-control.location-select {
    min-height: 44px;
    height: auto;
    padding: 0.65rem 2.35rem 0.65rem 1rem;
    line-height: 1.35;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(0,0,0,0.3);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Search bar styling */
.search-bar-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

/* File Upload input custom style */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-wrapper:hover {
    border-color: var(--primary);
    background: var(--bg-card);
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-preview {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    margin-top: 0.5rem;
    display: none;
    object-fit: cover;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* Responsive adjustments */
@media (max-width: 1100px) {
    .content-body {
        padding: 1.25rem;
    }

    .content-body form[style*="grid-template-columns"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar {
        transform: translateX(-100%);
        width: min(86vw, var(--sidebar-width));
        box-shadow: none;
    }
    
    .sidebar.mobile-show {
        transform: translateX(0);
        width: min(86vw, var(--sidebar-width));
        box-shadow: 18px 0 50px rgba(0, 0, 0, 0.45);
    }

    .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 99;
        border: 0;
        background: rgba(5, 3, 12, 0.72);
        backdrop-filter: blur(3px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .mobile-sidebar-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100%;
    }

    .main-header {
        min-height: 60px;
        height: auto;
        padding: 0.55rem 1rem;
        gap: 0.75rem;
    }

    .header-toggle {
        flex: 0 0 auto;
    }

    .header-right {
        min-width: 0;
        gap: 0.55rem;
        margin-left: auto;
    }

    .header-date {
        display: none;
    }

    .header-admin-profile {
        gap: 0.5rem;
        padding-left: 0.65rem;
    }

    .header-admin-avatar {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .wallet-badge {
        max-width: 100%;
        padding: 0.38rem 0.7rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }
    
    .content-body {
        padding: 1rem;
    }

    .page-title-block {
        margin-bottom: 1.25rem;
    }

    .page-title {
        font-size: 1.45rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .page-subtitle {
        margin-top: 0.2rem;
        line-height: 1.45;
    }

    .card {
        padding: 1.1rem;
        border-radius: 13px;
    }

    .card-header {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .card-title {
        font-size: 1.05rem;
        line-height: 1.35;
    }

    .form-grid,
    .content-body form[style*="grid-template-columns"],
    .content-body div[style*="grid-template-columns: 1fr 1.2fr"],
    .content-body div[style*="grid-template-columns: 1.2fr 1fr"],
    .module-row {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .card > form[style*="display: flex"],
    .content-body > div[style*="display: flex"],
    .content-body > form[style*="display: flex"] {
        flex-wrap: wrap !important;
    }

    .card > form > div[style*="min-width"] {
        min-width: 0 !important;
        width: 100%;
        flex-basis: 100% !important;
    }

    .search-bar-container {
        align-items: stretch;
        flex-direction: column;
        gap: 0.75rem;
    }

    .table-responsive {
        border-radius: 10px;
    }

    .table {
        min-width: 680px;
        font-size: 0.82rem;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.85rem;
    }

    .modal-backdrop {
        align-items: flex-end;
        padding: 0.6rem;
    }

    .modal-panel {
        max-height: calc(100dvh - 1.2rem);
        overflow-y: auto;
        border-radius: 14px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .alert {
        align-items: flex-start;
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }

    .wallet-badge {
        display: none;
    }

    .header-admin-profile {
        border-left: 0;
        padding-left: 0;
    }

    .header-admin-name {
        font-size: 0.8rem;
    }

    .header-admin-role {
        font-size: 0.62rem;
    }

    .content-body {
        padding: 0.75rem;
    }

    .card {
        padding: 0.9rem;
        margin-bottom: 1rem;
    }

    .stat-card {
        padding: 1.1rem;
    }

    .form-grid {
        gap: 0.85rem;
    }

    .btn:not(.btn-sm) {
        min-height: 42px;
    }
}

@media (max-width: 992px) {
    .dashboard-grid-layout {
        grid-template-columns: 1fr !important;
    }
}
