/* ============================================================
   BOAFO — Mentorship & University Transition Support System
   Main Stylesheet
   ============================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --primary: #0077ff;
    --primary-light: #3392ff;
    --primary-dark: #005ce6;
    --accent: #f4a11d;
    --accent-light: #f8c55a;
    --accent-dark: #d4880d;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    --dark: #09182a;
    --light: #f4f7fa;
    --muted: #6a82a4;
    --border: #d1dfef;
    --white: #ffffff;

    --gradient-primary: linear-gradient(135deg, #0077ff 0%, #3392ff 100%);
    --gradient-accent: linear-gradient(135deg, #f4a11d 0%, #f8c55a 100%);
    --gradient-hero: linear-gradient(135deg, #09182a 0%, #005ce6 50%, #0077ff 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 250, 0.7));

    --shadow-sm: 0 2px 8px rgba(0, 119, 255, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 119, 255, 0.10);
    --shadow-lg: 0 8px 40px rgba(0, 119, 255, 0.14);
    --shadow-xl: 0 16px 60px rgba(0, 119, 255, 0.18);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-body: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

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

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ── Navbar ────────────────────────────────────────────────── */
.boafo-navbar {
    background: var(--gradient-primary) !important;
    padding: 0.75rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.boafo-navbar .navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white) !important;
    letter-spacing: -0.5px;
}

.boafo-navbar .navbar-brand span {
    color: var(--accent);
}

.boafo-navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
}

.boafo-navbar .nav-link:hover,
.boafo-navbar .nav-link.active {
    color: var(--white) !important;
    background: rgba(255, 255, 255, 0.15);
}

.boafo-navbar .nav-link .nav-icon {
    margin-right: 5px;
    font-size: 0.85rem;
}

.boafo-navbar .btn-register {
    background: var(--gradient-accent);
    color: var(--dark) !important;
    font-weight: 700;
    border: none;
    padding: 0.4rem 1.2rem !important;
    border-radius: 50px !important;
}

.navbar-notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: 50%;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

/* ── App Shell Container Layout ────────────────────────────── */
.app-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--light);
}

.app-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0055cc 0%, #0077ff 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 1.75rem;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand .brand-icon {
    font-size: 1.5rem;
    color: var(--accent);
}

.sidebar-brand .brand-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.user-quick-profile {
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.1);
}

.quick-avatar-container {
    position: relative;
    width: 50px;
    height: 50px;
}

.quick-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #0055cc;
}

.status-indicator.online {
    background-color: var(--accent);
    /* Orange status dot */
    box-shadow: 0 0 0 2px rgba(244, 161, 29, 0.3);
}

.quick-info .quick-name {
    font-size: 0.9rem;
    font-weight: 650;
    color: var(--white);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.quick-info .quick-role {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu .menu-header {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 1.5px;
    padding: 0.75rem 1.75rem 0.5rem;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1.75rem;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover {
    color: var(--white) !important;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-menu li a.active {
    color: var(--white) !important;
    background: rgba(255, 255, 255, 0.08);
    border-left-color: var(--accent);
}

.sidebar-menu li a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-menu li a.active i {
    color: var(--accent);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.app-header {
    height: 70px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-search-container {
    position: relative;
    width: 320px;
}

.header-search-container .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.85rem;
}

.header-search {
    padding-left: 2.5rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    height: 38px;
    font-size: 0.85rem;
    background-color: var(--light);
}

.header-search:focus {
    background-color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.08);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid var(--border);
    background: var(--white);
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--light);
    color: var(--accent);
    border-color: var(--accent);
}

.vertical-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border);
}

.btn-profile {
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--white);
    transition: var(--transition);
}

.btn-profile:hover {
    background-color: var(--light);
    border-color: var(--primary);
}

.btn-profile .avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--primary);
}

.btn-profile .profile-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.page-content-wrapper {
    flex: 1;
    padding: 2.5rem;
    background-color: var(--light);
}

.app-footer-bar {
    padding: 1.25rem 2.5rem;
    background-color: var(--white);
    border-top: 1px solid var(--border);
}

.app-footer-bar .footer-copy {
    font-size: 0.8rem;
    color: var(--muted);
}

.app-footer-bar .footer-links a {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 550;
    margin-left: 1.5rem;
}

.app-footer-bar .footer-links a:hover {
    color: var(--accent);
}

/* ── Hero Section ──────────────────────────────────────────── */
.hero-section {
    background: var(--gradient-hero);
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(244, 161, 29, 0.15) 0%, transparent 60%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    border-radius: 50%;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
}

.hero-title .highlight {
    color: var(--accent);
    position: relative;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat .number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

.hero-stat .label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Cards ─────────────────────────────────────────────────── */
.boafo-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 119, 255, 0.06);
    transition: var(--transition);
    overflow: hidden;
}

.boafo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

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

.boafo-card .card-body-custom {
    padding: 1.5rem;
}

/* University Card */
.university-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.university-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.university-card .card-banner {
    height: 140px;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.university-card .card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.university-card .card-logo {
    position: absolute;
    bottom: -28px;
    left: 1.25rem;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: white;
    box-shadow: var(--shadow-md);
    object-fit: contain;
    padding: 4px;
}

.university-card .card-body {
    padding: 2.5rem 1.25rem 1.25rem;
}

.university-card .uni-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.university-card .uni-meta {
    font-size: 0.8rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0.75rem;
}

.university-card .uni-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Mentor Card */
.mentor-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.mentor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--gradient-primary);
}

.mentor-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.mentor-card .mentor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.mentor-card .availability-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success);
    position: absolute;
    bottom: 4px;
    right: 4px;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Scholarship Card */
.scholarship-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.scholarship-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.scholarship-card .sch-header {
    background: var(--gradient-primary);
    padding: 1.25rem;
    color: white;
}

.scholarship-card .sch-type-badge {
    background: rgba(244, 161, 29, 0.2);
    color: var(--accent-light);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.scholarship-card .sch-body {
    padding: 1.25rem;
}

/* ── Stat Cards (Dashboard) ────────────────────────────────── */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.stat-card .stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.3rem;
}

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

.stat-card .stat-trend {
    font-size: 0.78rem;
    margin-top: 0.5rem;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.06;
}

.stat-card.primary .stat-icon {
    background: rgba(0, 119, 255, 0.1);
    color: var(--primary);
}

.stat-card.primary .stat-value {
    color: var(--primary);
}

.stat-card.primary::after {
    background: var(--primary);
}

.stat-card.accent .stat-icon {
    background: rgba(244, 161, 29, 0.15);
    color: var(--accent-dark);
}

.stat-card.accent .stat-value {
    color: var(--accent-dark);
}

.stat-card.accent::after {
    background: var(--accent);
}

.stat-card.success .stat-icon {
    background: rgba(26, 170, 107, 0.1);
    color: var(--success);
}

.stat-card.success .stat-value {
    color: var(--success);
}

.stat-card.success::after {
    background: var(--success);
}

.stat-card.info .stat-icon {
    background: rgba(0, 100, 220, 0.12);
    color: var(--primary-light);
}

.stat-card.info .stat-value {
    color: var(--primary-light);
}

.stat-card.info::after {
    background: var(--primary-light);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary-boafo {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-boafo:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 119, 255, 0.3);
}

.btn-accent-boafo {
    background: var(--gradient-accent);
    color: var(--dark);
    border: none;
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-accent-boafo:hover {
    background: var(--accent-dark);
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 161, 29, 0.4);
}

.btn-outline-boafo {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-boafo:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ── Progress Bar ──────────────────────────────────────────── */
.boafo-progress {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.boafo-progress .progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1s ease;
}

/* ── Score Ring ────────────────────────────────────────────── */
.score-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.score-ring svg {
    transform: rotate(-90deg);
}

.score-ring .ring-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 8;
}

.score-ring .ring-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s ease;
}

.score-ring .ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-ring .ring-text .score {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-heading);
}

.score-ring .ring-text .label {
    font-size: 0.65rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Chat Interface ────────────────────────────────────────── */
.chat-container {
    display: flex;
    height: calc(100vh - 160px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: white;
}

.chat-sidebar {
    width: 300px;
    background: var(--white);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    flex-shrink: 0;
}

.chat-sidebar-header {
    padding: 1.25rem;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
}

.conversation-item {
    padding: 1rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.conversation-item:hover {
    background: rgba(0, 119, 255, 0.04);
}

.conversation-item.active {
    background: rgba(0, 119, 255, 0.08);
    border-left: 3px solid var(--primary);
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-header {
    padding: 1rem 1.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8faff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
}

.message-bubble.sent {
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

.message-bubble.received {
    background: white;
    color: var(--dark);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.message-meta {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 4px;
    text-align: right;
}

.chat-input-area {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    font-family: var(--font-body);
}

.chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.1);
}

/* ── Forms ─────────────────────────────────────────────────── */
.boafo-form .form-control,
.boafo-form .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
    background: white;
}

.boafo-form .form-control:focus,
.boafo-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.1);
    outline: none;
}

.boafo-form .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
    margin-bottom: 0.4rem;
}

/* ── Tags / Badges ─────────────────────────────────────────── */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-primary {
    background: rgba(0, 119, 255, 0.08);
    color: var(--primary);
}

.tag-accent {
    background: rgba(244, 161, 29, 0.15);
    color: var(--accent-dark);
}

.tag-success {
    background: rgba(0, 119, 255, 0.1);
    color: var(--success);
}

.tag-danger {
    background: rgba(244, 161, 29, 0.1);
    color: var(--danger);
}

/* ── Section Headers ────────────────────────────────────────── */
.section-header {
    margin-bottom: 2.5rem;
}

.section-header .overline {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--dark);
}

.section-header p {
    color: var(--muted);
    max-width: 500px;
    font-size: 1rem;
    line-height: 1.7;
}

/* ── Feature Grid ──────────────────────────────────────────── */
.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 119, 255, 0.15);
}

.feature-card .feature-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ── AI Score Display ──────────────────────────────────────── */
.ai-score-card {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ai-score-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.compatibility-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.compatibility-bar .mentor-name {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 160px;
}

.compatibility-bar .bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.compatibility-bar .bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1s ease;
}

.compatibility-bar .score {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 40px;
    text-align: right;
}

/* ── Admission Analyzer ────────────────────────────────────── */
.subject-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
}

.subject-row .subject-name {
    flex: 1;
}

.subject-row .subject-grade {
    width: 120px;
}

.eligible-program {
    background: rgba(0, 119, 255, 0.06);
    border: 1px solid rgba(0, 119, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.ineligible-program {
    background: rgba(244, 161, 29, 0.05);
    border: 1px solid rgba(244, 161, 29, 0.15);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.5rem;
}

/* ── Transition Checklist ──────────────────────────────────── */
.checklist-category {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.checklist-category .category-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.checklist-item:hover {
    background: rgba(0, 119, 255, 0.04);
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checklist-item .item-text {
    font-size: 0.9rem;
    color: var(--dark);
    transition: var(--transition);
}

.checklist-item.completed .item-text {
    text-decoration: line-through;
    color: var(--muted);
}

/* ── Footer ────────────────────────────────────────────────── */
.boafo-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.boafo-footer .footer-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
}

.boafo-footer .footer-brand span {
    color: var(--accent);
}

.boafo-footer .footer-link {
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    transition: var(--transition);
}

.boafo-footer .footer-link:hover {
    color: var(--accent);
}

.boafo-footer .footer-heading {
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.boafo-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.82rem;
}

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
    background: var(--gradient-primary);
    padding: 3rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--light);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.page-header h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
}

.page-header .breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
}

.page-header .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.9);
}

.page-header .breadcrumb-item a {
    color: var(--accent);
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.4);
}

/* ── Tables ────────────────────────────────────────────────── */
.boafo-table {
    border-collapse: separate;
    border-spacing: 0;
}

.boafo-table thead th {
    background: rgba(0, 119, 255, 0.05);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 1rem;
}

.boafo-table tbody td {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

.boafo-table tbody tr:hover td {
    background: rgba(0, 119, 255, 0.02);
}

/* ── Alerts ────────────────────────────────────────────────── */
.alert-boafo-success {
    background: rgba(0, 119, 255, 0.08);
    border: 1px solid rgba(0, 119, 255, 0.2);
    color: var(--primary-dark);
    border-radius: var(--radius-md);
}

.alert-boafo-danger {
    background: rgba(244, 161, 29, 0.08);
    border: 1px solid rgba(244, 161, 29, 0.25);
    color: var(--accent-dark);
    border-radius: var(--radius-md);
}

.alert-boafo-info {
    background: rgba(0, 119, 255, 0.06);
    border: 1px solid rgba(0, 119, 255, 0.15);
    color: var(--primary);
    border-radius: var(--radius-md);
}

/* ── Search Bar ────────────────────────────────────────────── */
.search-bar {
    position: relative;
    max-width: 520px;
}

.search-bar .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.9rem;
}

.search-bar input {
    padding-left: 2.75rem;
    border-radius: 50px;
    border: 1.5px solid var(--border);
    width: 100%;
    height: 48px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.1);
    outline: none;
}

/* ── Loading Spinner ───────────────────────────────────────── */
.boafo-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 119, 255, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
}

.empty-state .empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.4;
}

.empty-state h4 {
    color: var(--dark);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -260px;
        z-index: 1020;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .hero-stat .number {
        font-size: 1.5rem;
    }

    .chat-sidebar {
        width: 100%;
        display: none;
    }

    .chat-sidebar.mobile-show {
        display: block;
    }
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

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

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* ── Toast Notifications ───────────────────────────────────── */
.toast-container-boafo {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 9999;
}

/* ── Admin specific ────────────────────────────────────────── */
.admin-sidebar .sidebar-link.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: var(--accent);
    color: white !important;
}

/* Save/Heart button */
.save-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 1.1rem;
    transition: var(--transition);
    padding: 0.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-btn:hover,
.save-btn.saved {
    color: var(--accent);
}

.save-btn.saved {
    animation: heartbeat 0.4s ease;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

/* ============================================================
   BOOTSTRAP OVERRIDES (Blue, Orange, White only)
   ============================================================ */

/* Success states -> mapped to shades of Blue */
.bg-success {
    background-color: var(--primary) !important;
    color: var(--white) !important;
}

.bg-success-subtle {
    background-color: rgba(0, 119, 255, 0.08) !important;
    color: var(--primary) !important;
}

.text-success {
    color: var(--primary) !important;
}

.border-success {
    border-color: var(--primary) !important;
}

/* Danger states -> mapped to Orange */
.bg-danger {
    background-color: var(--accent) !important;
    color: var(--white) !important;
}

.bg-danger-subtle {
    background-color: rgba(244, 161, 29, 0.08) !important;
    color: var(--accent-dark) !important;
}

.text-danger {
    color: var(--accent-dark) !important;
}

.border-danger {
    border-color: var(--accent) !important;
}

/* Warning states -> mapped to Orange */
.bg-warning {
    background-color: var(--accent-light) !important;
    color: var(--dark) !important;
}

.bg-warning-subtle {
    background-color: rgba(248, 197, 90, 0.1) !important;
    color: var(--accent-dark) !important;
}

.text-warning {
    color: var(--accent-dark) !important;
}

.border-warning {
    border-color: var(--accent-light) !important;
}

/* Info states -> mapped to Blue */
.bg-info {
    background-color: var(--primary-light) !important;
    color: var(--white) !important;
}

.bg-info-subtle {
    background-color: rgba(0, 100, 220, 0.08) !important;
    color: var(--primary-light) !important;
}

.text-info {
    color: var(--primary-light) !important;
}

.border-info {
    border-color: var(--primary-light) !important;
}

/* Alerts overrides */
.alert-success {
    background-color: rgba(0, 119, 255, 0.08) !important;
    border-color: rgba(0, 119, 255, 0.2) !important;
    color: var(--primary-dark) !important;
}

.alert-danger {
    background-color: rgba(244, 161, 29, 0.08) !important;
    border-color: rgba(244, 161, 29, 0.2) !important;
    color: var(--accent-dark) !important;
}

.alert-warning {
    background-color: rgba(248, 197, 90, 0.1) !important;
    border-color: rgba(248, 197, 90, 0.2) !important;
    color: var(--accent-dark) !important;
}

.alert-info {
    background-color: rgba(0, 100, 220, 0.08) !important;
    border-color: rgba(0, 100, 220, 0.2) !important;
    color: var(--primary-dark) !important;
}

/* Form checkboxes and radio highlights */
.form-check-input:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Sidebar toggle menu adjustments for mobile */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        height: 100vh;
        z-index: 1050;
    }

    .app-sidebar.show {
        left: 0;
    }
}

/* ── Additional utility classes (Blue/Orange/White palette) ── */
.bg-primary-subtle {
    background-color: rgba(0, 119, 255, 0.08) !important;
    color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

/* Secondary -> mapped to muted blue */
.bg-secondary {
    background-color: var(--primary-light) !important;
    color: var(--white) !important;
}

.text-secondary {
    color: var(--muted) !important;
}

/* Accent utility */
.text-accent {
    color: var(--accent-dark) !important;
}

.bg-accent {
    background-color: var(--accent) !important;
    color: var(--dark) !important;
}

/* Muted -> blue-grey */
.text-muted {
    color: var(--muted) !important;
}

/* Pagination active state */
.page-item.active .page-link {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.page-link {
    color: var(--primary) !important;
}

.page-link:hover {
    color: var(--accent-dark) !important;
    border-color: var(--accent) !important;
}

/* Badge pill overrides */
.badge.bg-primary {
    background-color: var(--primary) !important;
}

.badge.bg-primary-subtle {
    background-color: rgba(0, 119, 255, 0.1) !important;
    color: var(--primary) !important;
}

.badge.text-primary {
    color: var(--primary) !important;
}

/* Progress bar default -> primary blue */
.progress-bar {
    background-color: var(--primary) !important;
}

/* List group active */
.list-group-item.active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Nav pills/tabs active -> primary */
.nav-pills .nav-link.active {
    background-color: var(--primary) !important;
    color: var(--white) !important;
}

.nav-tabs .nav-link.active {
    border-bottom-color: var(--primary) !important;
    color: var(--primary) !important;
}

/* Dropdown active item */
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(0, 119, 255, 0.06) !important;
    color: var(--primary) !important;
}

/* Form control focus ring */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 119, 255, 0.15) !important;
}

/* btn-warning / btn-primary / btn-danger full overrides */
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-warning {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--dark) !important;
}

.btn-warning:hover {
    background-color: var(--accent-dark) !important;
    border-color: var(--accent-dark) !important;
    color: var(--white) !important;
}

.btn-outline-warning {
    color: var(--accent-dark) !important;
    border-color: var(--accent) !important;
}

.btn-outline-warning:hover {
    background-color: var(--accent) !important;
    color: var(--dark) !important;
}

.btn-danger {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--white) !important;
}

.btn-danger:hover {
    background-color: var(--accent-dark) !important;
    border-color: var(--accent-dark) !important;
}

.btn-outline-danger {
    color: var(--accent-dark) !important;
    border-color: var(--accent) !important;
}

.btn-outline-danger:hover {
    background-color: var(--accent) !important;
    color: var(--white) !important;
}

.btn-success {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-outline-success {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-success:hover {
    background-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-info {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
    color: var(--white) !important;
}

.btn-outline-info {
    color: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}

.btn-outline-info:hover {
    background-color: var(--primary-light) !important;
    color: var(--white) !important;
}

.btn-secondary {
    background-color: var(--muted) !important;
    border-color: var(--muted) !important;
    color: var(--white) !important;
}

/* Link colors */
a.text-success {
    color: var(--primary) !important;
}

a.text-danger {
    color: var(--accent-dark) !important;
}

a.text-warning {
    color: var(--accent-dark) !important;
}

a.text-info {
    color: var(--primary-light) !important;
}

/* Global Text and Background Overrides to restrict color scheme to Blue, Orange & White */
.text-success {
    color: var(--primary) !important;
}

.text-danger {
    color: var(--accent-dark) !important;
}

.text-warning {
    color: var(--accent-dark) !important;
}

.text-info {
    color: var(--primary-light) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.bg-success {
    background-color: var(--primary) !important;
    color: var(--white) !important;
}

.bg-danger {
    background-color: var(--accent) !important;
    color: var(--white) !important;
}

.bg-warning {
    background-color: var(--accent-light) !important;
    color: var(--dark) !important;
}

.bg-info {
    background-color: var(--primary-light) !important;
    color: var(--white) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
    color: var(--white) !important;
}

.bg-success-subtle {
    background-color: rgba(0, 119, 255, 0.08) !important;
    color: var(--primary) !important;
}

.bg-danger-subtle {
    background-color: rgba(244, 161, 29, 0.1) !important;
    color: var(--accent-dark) !important;
}

.bg-warning-subtle {
    background-color: rgba(248, 197, 90, 0.15) !important;
    color: var(--accent-dark) !important;
}

.bg-info-subtle {
    background-color: rgba(0, 100, 220, 0.1) !important;
    color: var(--primary-light) !important;
}

.bg-primary-subtle {
    background-color: rgba(0, 119, 255, 0.08) !important;
    color: var(--primary) !important;
}

.alert-success {
    background-color: rgba(0, 119, 255, 0.08) !important;
    border-color: var(--border) !important;
    color: var(--primary) !important;
}

.alert-danger {
    background-color: rgba(244, 161, 29, 0.1) !important;
    border-color: var(--accent-light) !important;
    color: var(--accent-dark) !important;
}

.alert-warning {
    background-color: rgba(248, 197, 90, 0.15) !important;
    border-color: var(--accent-light) !important;
    color: var(--accent-dark) !important;
}

.alert-info {
    background-color: rgba(0, 100, 220, 0.1) !important;
    border-color: var(--border) !important;
    color: var(--primary-light) !important;
}

.alert-primary {
    background-color: rgba(0, 119, 255, 0.08) !important;
    border-color: var(--border) !important;
    color: var(--primary) !important;
}

/* Custom Purple / Other colors override to primary/accent */
.text-purple {
    color: var(--primary-light) !important;
}

.bg-purple-subtle {
    background-color: rgba(0, 100, 220, 0.1) !important;
    color: var(--primary-light) !important;
}

.bg-purple {
    background-color: var(--primary-light) !important;
    color: var(--white) !important;
}

.bg-pink-subtle {
    background-color: rgba(244, 161, 29, 0.1) !important;
    color: var(--accent-dark) !important;
}

.text-pink {
    color: var(--accent-dark) !important;
}

.progress-bar.bg-success {
    background-color: var(--primary) !important;
}

.progress-bar.bg-warning {
    background-color: var(--accent) !important;
}

.progress-bar.bg-danger {
    background-color: var(--accent) !important;
}

.progress-bar.bg-info {
    background-color: var(--primary-light) !important;
}

.progress-bar.bg-primary {
    background-color: var(--primary) !important;
}

/* Avatar Utilities */
.avatar-xs {
    width: 24px;
    height: 24px;
    object-fit: cover;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    object-fit: cover;
}

.avatar-md {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    object-fit: cover;
}

.avatar-xl {
    width: 96px;
    height: 96px;
    object-fit: cover;
}

/* =========================================================================
   RESPONSIVENESS (MOBILE & TABLET)
   ========================================================================= */
@media (max-width: 991.98px) {

    /* Collapse sidebar and overlay it */
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1040;
    }

    /* When a toggle class is active */
    .app-sidebar.show {
        transform: translateX(0);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    }

    .app-main {
        margin-left: 0;
        width: 100%;
    }

    .app-header {
        left: 0;
        width: 100%;
        padding: 0 1rem;
    }

    /* Add a mobile toggle button to the header */
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        color: var(--text);
        font-size: 1.2rem;
        margin-right: 1rem;
        cursor: pointer;
    }

    .row {
        margin-right: 0;
        margin-left: 0;
    }

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

/* Ensure tables are responsive on small screens */
@media (max-width: 767.98px) {
    .table-responsive {
        border: 0;
    }

    .auth-card {
        width: 90%;
        margin: 2rem auto;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .quick-stats .stat-card {
        margin-bottom: 1rem;
    }
}

/* Mobile-first adjustments for buttons and forms */
@media (max-width: 575.98px) {
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-xs,
    .btn-sm {
        width: auto;
    }

    .d-flex.gap-2 {
        flex-direction: column;
    }

    .d-flex.gap-2>* {
        width: 100%;
    }

    .btn-xs {
        width: 100%;
    }

    /* Shrink large avatars */
    img.rounded-circle[style*="width"] {
        max-width: 80px !important;
        max-height: 80px !important;
    }

    /* Ensure the sidebar/header mini avatars don't get messed up */
    .quick-avatar,
    .avatar-sm,
    .avatar-xs {
        max-width: none !important;
        max-height: none !important;
    }
}