/* ================================================================
   Barua Muazu College — Core Stylesheet
   Logo palette: Navy #1a1a8c | Sky #2d9ee0 | Gold #f5c518
================================================================ */

:root {
    --bmc-navy    : #1a1a8c;
    --bmc-sky     : #2d9ee0;
    --bmc-gold    : #f5c518;
    --bmc-sidebar : 240px;
    --bmc-topbar  : 56px;
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; }
img  { max-width: 100%; }

/* ─── Tables ─── */
.table th {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c757d;
    white-space: nowrap;
}
.table { font-size: 0.9rem; }

/* ─── Cards ─── */
.card { border-radius: 10px; }
.card-header { border-radius: 10px 10px 0 0 !important; font-size: 0.93rem; }

/* ─── Alerts / Badges / Buttons ─── */
.alert  { border-radius: 8px; font-size: 0.91rem; }
.badge  { font-weight: 600; }
.btn    { font-size: 0.88rem; border-radius: 6px; }
.form-label { font-size: 0.88rem; }

/* ════════════════════════════════════════════════════════════════
   ADMIN LAYOUT — sidebar + main content
════════════════════════════════════════════════════════════════ */

.bmc-admin-body {
    display: flex;
    min-height: 100vh;
    background: #f0f2f8;
}

/* ─── Sidebar ─── */
.bmc-sidebar {
    width: var(--bmc-sidebar);
    min-height: 100vh;
    background: var(--bmc-navy);
    position: fixed;
    top: 0; left: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    overflow-x: hidden;
}

.bmc-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.1rem 1.25rem 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.bmc-sidebar-brand img {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    padding: 2px;
    flex-shrink: 0;
}
.bmc-sidebar-brand-text .sb-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.bmc-sidebar-brand-text .sb-sub {
    font-size: 0.62rem;
    color: var(--bmc-sky);
}

.bmc-sidebar .nav { flex: 1; padding: 0.5rem 0; }

.bmc-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: rgba(255,255,255,0.72);
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    border-radius: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.bmc-sidebar .nav-link i { font-size: 1rem; width: 18px; flex-shrink: 0; }
.bmc-sidebar .nav-link:hover,
.bmc-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.11);
    border-left-color: var(--bmc-sky);
}

.bmc-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.bmc-sidebar-footer .admin-name {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ─── Sidebar backdrop (mobile) ─── */
.bmc-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 299;
    opacity: 0;
    transition: opacity 0.28s;
}
.bmc-sidebar-backdrop.show { display: block; opacity: 1; }

/* ─── Main content area ─── */
.bmc-main-content {
    margin-left: var(--bmc-sidebar);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* ─── Top bar ─── */
.bmc-topbar {
    background: #fff;
    border-bottom: 1px solid #e4e8ef;
    height: var(--bmc-topbar);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: 1rem;
}
.bmc-topbar-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #5a6475;
    flex: 1;
}

/* Hamburger button in topbar */
.bmc-sidebar-toggle {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #6c757d;
    padding: 0.3rem 0.5rem;
    font-size: 1.15rem;
    cursor: pointer;
    display: none;         /* shown via media query */
    align-items: center;
    line-height: 1;
    transition: background 0.15s;
}
.bmc-sidebar-toggle:hover { background: #f0f2f8; color: var(--bmc-navy); }

.bmc-page-content { flex: 1; }
.bmc-footer { border-top: 1px solid #e4e8ef; background: #fff; }

/* ─── Stat cards ─── */
.bmc-stat-card { border-radius: 12px; }
.bmc-stat-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════
   SHARED PASSWORD ROW — flex-based, no absolute positioning
   Used by student/login.php and student/profile.php
════════════════════════════════════════════════════════════════ */
.pw-row {
    display: flex;
    align-items: center;
    border: 1.5px solid #dee2e6;
    border-radius: 9px;
    background: #f9fafb;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.pw-row:focus-within {
    border-color: #2d9ee0;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(45,158,224,0.13);
}
.pw-row-icon {
    padding: 0 0.75rem;
    color: #9ca3af;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    font-size: 1rem;
    transition: color 0.2s;
    pointer-events: none;
    user-select: none;
}
.pw-row:focus-within .pw-row-icon { color: #2d9ee0; }
.pw-row-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.62rem 0;
    font-size: 0.9rem;
    color: #1f2937;
    outline: none;
    min-width: 0;
}
.pw-row-input::placeholder { color: #c4c9d4; }
.pw-row-btn {
    background: none;
    border: none;
    padding: 0.62rem 0.85rem;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
    border-radius: 0 8px 8px 0;
    -webkit-appearance: none;
}
.pw-row-btn:hover  { color: #2d9ee0; background: rgba(45,158,224,0.07); }
.pw-row-btn:focus  { outline: 2px solid rgba(45,158,224,0.4); outline-offset: -2px; }
.pw-row-btn:active { background: rgba(45,158,224,0.12); }

/* ════════════════════════════════════════════════════════════════
   STUDENT PORTAL NAVBAR
════════════════════════════════════════════════════════════════ */
.bmc-student-body {
    background: #f0f2f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bmc-student-nav {
    background: var(--bmc-navy);
    padding: 0.5rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.bmc-student-nav .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
}
.bmc-student-nav .navbar-brand img {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    padding: 2px;
}
.bmc-student-nav .nav-link { font-size: 0.87rem; }
.bmc-student-nav .navbar-toggler { border: 1px solid rgba(255,255,255,0.3); }
.bmc-student-nav .navbar-toggler-icon {
    filter: invert(1);
}

/* Collapsible nav links on mobile */
@media (max-width: 767px) {
    .bmc-student-nav .navbar-collapse {
        background: var(--bmc-navy);
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: 0.5rem;
        padding: 0.5rem 0;
        border-radius: 0 0 8px 8px;
    }
    .bmc-student-nav .navbar-collapse .nav-link {
        padding: 0.6rem 1rem;
        border-radius: 6px;
        margin: 0.1rem 0.5rem;
    }
    .bmc-student-nav .navbar-collapse .nav-link:hover {
        background: rgba(255,255,255,0.1);
    }
    .bmc-student-nav .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        padding: 0.5rem 1rem 0.75rem;
        gap: 0.5rem !important;
    }
}

/* ════════════════════════════════════════════════════════════════
   ADMIN RESPONSIVE BREAKPOINTS
════════════════════════════════════════════════════════════════ */

/* Tablet: sidebar hidden by default, hamburger shows */
@media (max-width: 991px) {
    .bmc-sidebar {
        transform: translateX(-100%);
    }
    .bmc-sidebar.show {
        transform: translateX(0);
    }
    .bmc-main-content {
        margin-left: 0;
    }
    .bmc-sidebar-toggle {
        display: flex;
    }
    /* Wider sidebar brand on small screens */
    .bmc-sidebar-brand-text .sb-name { font-size: 0.82rem; }
}

/* Very small screens */
@media (max-width: 575px) {
    .bmc-topbar { padding: 0 0.75rem; }
    .bmc-page-content { padding: 1rem !important; }
    .bmc-topbar-title { font-size: 0.82rem; }
    /* Stack table on tiny screens */
    .table-responsive { font-size: 0.82rem; }
    /* Smaller stat cards */
    .bmc-stat-card .fs-3 { font-size: 1.4rem !important; }
}

/* ════════════════════════════════════════════════════════════════
   UTILITY
════════════════════════════════════════════════════════════════ */
.bmc-welcome-bg {
    background: linear-gradient(135deg, var(--bmc-navy) 0%, #0d3358 60%, #153d5e 100%);
    min-height: 100vh;
}
