/* --- Root & Global --- */
:root {
    --portal-blue: #0d6efd;
    --portal-dark: #212529;
    --portal-bg: #f8f9fa;
    --soft-blue: #e7f1ff;
    --soft-green: #dcfce7;
    --soft-info: #e0f2fe;
}

/* 1. Force the height on the very top elements */
html, body {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. Turn the body into a column-based flex container */
body {
    display: flex !important;
    flex-direction: column !important;
}

/* 3. The magic: Make 'main' grow to fill all empty space */
main {
    flex: 1 0 auto !important;
    display: block;
}

/* 4. Keep the footer at its natural height at the bottom */
footer {
    flex-shrink: 0 !important;
    background-color: #ffffff;
    border-top: 1px solid #eee;
    padding: 1.5rem 0;
    width: 100%;
}

/* --- Navbar & Logo --- */
.navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    padding: 0.75rem 0;
}

.navbar-brand img {
    height: 65px !important; /* Fixed height */
    min-height: 65px !important; /* Prevents shrinking */
    width: auto;
    object-fit: contain;
    margin-left: -10px;
    display: block; /* Ensures spacing is respected */
    transition: all 0.3s ease;
}

/* Ensure the container doesn't restrict it */
.navbar-brand {
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-link {
    color: #555 !important;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--portal-blue) !important;
}

/* --- Dashboard & Hero Cards --- */
.dashboard-card, .topic-card {
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.dashboard-card:hover, .topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0046b5 100%);
}

/* --- Icon Boxes --- */
.icon-box, .icon-box-glass, .feature-icon-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.icon-box { width: 54px; height: 54px; font-size: 1.5rem; }
.feature-icon-sm { width: 40px; height: 40px; font-size: 1.2rem; }

.icon-box-glass {
    width: 54px; height: 54px;
    background: rgba(255,255,255,0.2);
    font-size: 1.5rem;
}

/* --- Utility Classes --- */
.bg-soft-primary { background-color: var(--soft-blue); }
.bg-light-success { background-color: var(--soft-green); }
.bg-light-info { background-color: var(--soft-info); }

.rounded-4 { border-radius: 1.5rem !important; }
.btn-auth { border-radius: 50px; padding: 0.5rem 1.5rem; font-weight: 600; }

/* Styling the radio options to look like buttons */
.btn-check:checked + .btn-outline-light {
    background-color: var(--soft-blue) !important;
    border-color: var(--portal-blue) !important;
}
.btn-outline-light:hover {
    background-color: #fcfcfc;
    border-color: #ddd;
}
.opt-letter {
    width: 30px;
    height: 30px;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #6c757d;
}
.btn-check:checked + .btn-outline-light .opt-letter {
    background-color: var(--portal-blue);
    color: white;
}
.x-small { font-size: 0.75rem; }

.sticky-bottom {
    z-index: 1020;
}


/************* admin panel *****************/
.bg-soft-primary { background-color: #eef2ff; color: #4338ca; }
.bg-soft-success { background-color: #f0fdf4; color: #166534; }
.bg-soft-info { background-color: #f0f9ff; color: #0369a1; }
.bg-soft-warning { background-color: #fffbeb; color: #b45309; }
.x-small { font-size: 0.75rem; }
.uppercase { text-transform: uppercase; letter-spacing: 0.5px; }
.btn-white { background: #fff; }

/* Optional: Shrink it slightly on small mobile screens to prevent wrapping */
@media (max-width: 576px) {
    .navbar-brand img {
        height: 50px;
        margin-left: -5px;
    }
}