/* ==========================================================
   Hostel Administration Portal - Punjabi University, Patiala
   Shared stylesheet (used by header.php / footer.php / navbars
   and every page). Colors/type extracted from the reference
   login page so every page looks consistent.
   ========================================================== */

:root {
    --navy: #1a2f4f;
    --navy-dark: #0f1d30;
    --orange: #ff8c42;
    --orange-light: #ffa05c;
    --red: #d63447;
    --blue: #0891b2;
    --teal: #0d9488;
    --green: #10b981;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #6b7280;
    --border: #e5e7eb;
    --text-dark: #1f2937;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    background: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

a { color: inherit; }

/* ============ Header ============ */
.top-header {
    background: var(--white);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.university-logo { display: flex; align-items: center; gap: 1.5rem; }
.university-logo img { height: 70px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.university-text h1 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #003d82;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.university-text .punjabi { color: #003d82; font-size: 1.3rem; margin-bottom: 0.25rem; }
.university-text .tagline {
    font-size: 0.75rem;
    color: var(--white);
    background: #003d82;
    padding: 0.15rem 0.75rem;
    border-radius: 12px;
    display: inline-block;
}

/* Logged-in user chip shown top-right on staff pages */
.session-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray);
}
.session-chip b { color: var(--text-dark); }
.session-chip .role-tag {
    background: rgba(26,47,79,0.08);
    color: var(--navy);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ============ Nav ============ */
.main-nav {
    background: var(--navy);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo-small {
    width: 40px; height: 40px;
    background: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--navy); font-size: 0.9rem;
    flex-shrink: 0;
}
.nav-links { display: flex; flex: 1; }
.nav-link {
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.1); border-bottom-color: var(--orange); }
.nav-link.active { background: rgba(255, 255, 255, 0.15); border-bottom-color: var(--orange); }
.contact-btn {
    background: var(--green);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
    text-decoration: none;
    display: inline-block;
}
.contact-btn:hover { background: #059669; transform: translateY(-2px); }
.logout-btn { background: var(--red); }
.logout-btn:hover { background: #b32a3a; }

/* ============ Orange info bar ============ */
.orange-bar {
    background: var(--orange);
    padding: 0.75rem 0;
    text-align: center;
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ============ Page content wrapper ============ */
.page-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: 55vh;
}
.page-content h2 {
    font-family: 'Merriweather', serif;
    color: var(--navy);
    margin-bottom: 1rem;
}

/* Generic card, used across dashboard/report/list pages */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

/* Generic data table, used across search/report pages */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
}
.data-table th, .data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.data-table th {
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}
.data-table tr:hover td { background: var(--light-gray); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.65rem 1.3rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); }
.btn-success { background: var(--green); color: var(--white); }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #b32a3a; }

/* Status badges (bed condition, warden status, etc.) */
.badge { padding: 0.2rem 0.65rem; border-radius: 10px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.badge-good, .badge-active { background: rgba(16,185,129,0.12); color: var(--green); }
.badge-bad, .badge-inactive { background: rgba(214,52,71,0.1); color: var(--red); }
.badge-occupied { background: rgba(8,145,178,0.12); color: var(--blue); }
.badge-vacant { background: rgba(107,114,128,0.12); color: var(--gray); }

/* ============ Login page pieces (kept here so login.php can reuse) ============ */
.login-section { max-width: 1100px; margin: 3rem auto; padding: 0 2rem; }
.auth-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    min-height: 620px;
}
.campus-panel {
    flex: 1 1 42%;
    position: relative;
    background:
        linear-gradient(180deg, rgba(26,47,79,0.65) 0%, rgba(15,29,48,0.85) 100%),
        url('../img/campus.jpg') center/cover no-repeat;
    color: var(--white);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.welcome-title { font-family: 'Merriweather', serif; font-size: 1.9rem; font-weight: 700; margin-bottom: 0.6rem; margin-top: 1.5rem; }
.welcome-sub { color: rgba(255,255,255,0.85); font-size: 0.95rem; max-width: 32ch; line-height: 1.6; }
.feature-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.15rem; }
.feature-item { display: flex; align-items: flex-start; gap: 0.85rem; }
.feature-ic {
    width: 38px; height: 38px; border-radius: 8px;
    background: rgba(255,140,66,0.2);
    border: 1px solid rgba(255,140,66,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.feature-text b { display: block; font-size: 0.92rem; font-weight: 700; }
.feature-text span { font-size: 0.8rem; color: rgba(255,255,255,0.7); }
.quote-box {
    background: rgba(255,255,255,0.1);
    border-left: 3px solid var(--orange);
    border-radius: 6px;
    padding: 1rem 1.2rem;
    font-size: 0.88rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.92);
}
.form-panel { flex: 1 1 58%; padding: 3rem 3.5rem; display: flex; align-items: center; justify-content: center; }
.form-inner { width: 100%; max-width: 440px; }
.form-inner h2 { font-family: 'Merriweather', serif; font-size: 1.6rem; font-weight: 700; color: var(--navy); text-align: center; margin-bottom: 0.4rem; }
.form-inner .sub { text-align: center; color: var(--gray); font-size: 0.92rem; margin-bottom: 1.8rem; }
.alert-error {
    background: #fbeaec; color: var(--red); border: 1px solid #f2c6cb;
    border-radius: 8px; padding: 0.7rem 1rem; font-size: 0.85rem;
    margin-bottom: 1.3rem; text-align: center; font-weight: 600;
}
.field-label { font-size: 0.82rem; font-weight: 700; color: var(--text-dark); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.75rem; display: block; }
.role-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; margin-bottom: 1.6rem; }
.role-card { border: 1.5px solid var(--border); border-radius: 10px; padding: 0.9rem 0.4rem 0.8rem; text-align: center; cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease; background: var(--white); }
.role-card:hover { transform: translateY(-2px); border-color: var(--orange-light); }
.role-icon { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 0.55rem; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.role-card[data-role="warden"] .role-icon { background: rgba(13,148,136,0.12); color: var(--teal); }
.role-card[data-role="admin"] .role-icon { background: rgba(214,52,71,0.1); color: var(--red); }
.role-card span.role-name { font-size: 0.84rem; font-weight: 700; color: var(--text-dark); }
.role-card.active { border-color: var(--orange); background: #fff7f0; box-shadow: 0 2px 10px rgba(255,140,66,0.18); }
.divider-sm { display: flex; align-items: center; gap: 0.7rem; color: var(--gray); font-size: 0.8rem; margin: 1.6rem 0; }
.divider-sm::before, .divider-sm::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.field { margin-bottom: 1.2rem; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--text-dark); display: block; margin-bottom: 0.5rem; }
.input-wrap { position: relative; }
.input-wrap .ic { position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%); color: #9aa3b5; font-size: 0.95rem; pointer-events: none; }
.input-wrap input {
    width: 100%; padding: 0.85rem 1rem 0.85rem 2.7rem;
    border: 1.5px solid var(--border); border-radius: 8px;
    font-family: 'Open Sans', sans-serif; font-size: 0.94rem; color: var(--text-dark);
    background: #fbfcfe; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-wrap input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26,47,79,0.1); background: #fff; }
.toggle-eye { position: absolute; right: 0.95rem; top: 50%; transform: translateY(-50%); cursor: pointer; color: #9aa3b5; font-size: 0.95rem; background: none; border: none; }
.row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; font-size: 0.85rem; }
.remember { display: flex; align-items: center; gap: 0.5rem; color: var(--gray); }
.remember input { width: 15px; height: 15px; accent-color: var(--navy); }
.row-between a { color: var(--navy); font-weight: 600; text-decoration: none; }
.row-between a:hover { color: var(--orange); }
.btn-login {
    width: 100%; padding: 0.9rem; border: none; border-radius: 8px;
    background: var(--navy); color: var(--white); font-size: 0.97rem; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.55rem;
    transition: background 0.2s ease, transform 0.15s ease;
}
.btn-login:hover { background: var(--navy-dark); transform: translateY(-1px); }
.form-footer { margin-top: 1.7rem; text-align: center; font-size: 0.85rem; color: var(--gray); }
.form-footer a { color: var(--navy); font-weight: 600; text-decoration: none; }
.form-footer a:hover { color: var(--orange); }

/* ============ Admin Dashboard: KPI cards, panels, charts, heatmap ============ */
.pink-var { color: #b6467e; }
:root { --pink: #b6467e; --purple: #7c3aed; --amber: #b06a1a; --amber-bg: #fdf1e3; --green-bg: #e7f8f0; --blue-bg: #e6f4f8; --red-bg: #fbeaec; }

.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem; margin-bottom: 1.6rem; }
.kpi-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 1.4rem 1.5rem; }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
.kpi-ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.kpi-title { font-size: 0.82rem; color: var(--gray); font-weight: 600; }
.kpi-main { display: flex; align-items: baseline; gap: 0.4rem; margin-bottom: 0.5rem; }
.kpi-main .big { font-family: 'Merriweather', serif; font-size: 2.1rem; font-weight: 700; color: var(--navy); }
.kpi-main .of { font-size: 1rem; color: var(--gray); font-weight: 600; }
.kpi-bar { height: 8px; background: var(--light-gray); border-radius: 10px; overflow: hidden; margin-bottom: 0.6rem; }
.kpi-bar-fill { height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--orange) 0%, var(--orange-light) 100%); }
.kpi-foot { font-size: 0.78rem; color: var(--gray); display: flex; justify-content: space-between; }
.kpi-foot b { color: var(--text-dark); }

.panel { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem 1.6rem; margin-bottom: 1.15rem; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.2rem; gap: 1rem; }
.panel-head h3 { font-family: 'Merriweather', serif; font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.panel-head .sub { font-size: 0.78rem; color: var(--gray); margin-top: 0.2rem; }

.row-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.15rem; margin-bottom: 1.15rem; align-items: stretch; }
canvas { max-height: 320px; }

.heatmap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; }
.heat-tile { border-radius: 8px; padding: 0.75rem 0.85rem; color: #fff; }
.heat-tile .h-state { font-size: 0.8rem; font-weight: 700; margin-bottom: 0.3rem; }
.heat-tile .h-count { font-family: 'Merriweather', serif; font-size: 1.25rem; font-weight: 700; }
.heat-tile .h-pct { font-size: 0.7rem; opacity: 0.85; }

.gender-stackbar { display: flex; height: 34px; border-radius: 8px; overflow: hidden; margin-bottom: 1.2rem; }
.gender-seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.78rem; font-weight: 700; }
.gender-seg.male { background: var(--blue); }
.gender-seg.female { background: var(--pink); }

@media (max-width: 1100px) {
    .kpi-row { grid-template-columns: 1fr; }
    .row-2 { grid-template-columns: 1fr; }
}

/* ============ Key/value detail table (hostel & warden detail pages) ============ */
.detail-table-wrap {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
}
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th, .detail-table td {
    padding: 1rem 1.4rem;
    text-align: left;
    vertical-align: middle;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border);
}
.detail-table th {
    width: 200px;
    background: var(--navy);
    color: var(--white);
    font-weight: 700;
}
.detail-table td { background: var(--white); color: var(--text-dark); }
.detail-table tr:last-child th, .detail-table tr:last-child td { border-bottom: none; }

.btn-block { display: block; width: 100%; text-align: center; padding: 0.9rem; font-size: 0.95rem; }

/* ============ Hostel listing page (tabs) ============ */
.tabs-container { margin-top: 1rem; }
.tabs { display: flex; gap: 0.75rem; margin-bottom: 1.75rem; border-bottom: 2px solid var(--border); }
.tab {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    font-weight: 700; font-size: 0.92rem;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.tab:hover { color: var(--navy); }
.tab.active.boys-tab { color: var(--blue); border-bottom-color: var(--blue); }
.tab.active.girls-tab { color: var(--red); border-bottom-color: var(--red); }
.tab-icon { font-size: 1.1rem; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.hostels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.hostels-grid .hostel-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    padding: 0;
    border: none;
}
.hostels-grid .hostel-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-3px); }

.hostel-header {
    padding: 1.25rem 1.4rem;
    height: 104px;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.9rem;
}
.hostel-header.boys { background: linear-gradient(135deg, #2d4a73, var(--navy-dark)); }
.hostel-header.girls { background: linear-gradient(135deg, #d9691f, #a8430f); }
.hostel-number {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.22);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
/* .page-content h2 (class + element selector) has higher specificity
   than a lone .hostel-name class, so it was overriding the inherited
   white text color with navy - making the name unreadable against the
   dark header. Scoping this to .hostel-header .hostel-name (two
   classes) gives it enough specificity to win and forces white. */
.hostel-header .hostel-name {
    font-family: 'Merriweather', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hostel-body { padding: 1.3rem 1.4rem; }
.location-badge {
    display: inline-block;
    font-size: 0.82rem; color: var(--gray);
    background: var(--light-gray);
    padding: 0.3rem 0.7rem; border-radius: 8px;
    margin-bottom: 1rem;
}
.hostel-info { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.info-item { display: flex; flex-direction: column; gap: 0.15rem; }
.info-label { font-size: 0.72rem; color: var(--gray); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }
.info-value { font-size: 0.95rem; color: var(--text-dark); font-weight: 700; }

.hostel-cta { display: flex; gap: 0.6rem; }
.hostel-cta .btn { flex: 1; text-align: center; font-size: 0.85rem; padding: 0.6rem; }
.btn-secondary { background: var(--light-gray); color: var(--navy); border: 1px solid var(--border); }
.btn-secondary:hover { background: #eef0f3; }

/* ============ Hostels page ============ */
.hostel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}
.hostel-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.1rem 1.2rem;
    background: var(--white);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.hostel-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); }
.hostel-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.hostel-shortname { font-weight: 700; color: var(--navy); font-size: 0.85rem; letter-spacing: 0.03em; }
.hostel-card h3 { font-family: 'Merriweather', serif; font-size: 1.05rem; color: var(--text-dark); margin-bottom: 0.6rem; }
.hostel-meta { font-size: 0.85rem; color: var(--gray); margin-bottom: 0.3rem; }

/* ============ Footer ============ */
.footer { background: var(--navy); color: var(--white); padding: 2rem 0; text-align: center; margin-top: 3rem; }
.footer-content { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1rem; flex-wrap: wrap; }
.footer-link { color: var(--white); text-decoration: none; font-size: 0.9rem; transition: color 0.3s ease; }
.footer-link:hover { color: var(--orange); }
.footer p { color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; line-height: 1.6; }

/* ============ Page header (title + subtitle block) ============ */
.page-header { text-align: center; margin-bottom: 2.5rem; }
.page-title { font-family: 'Merriweather', serif; font-size: 2.2rem; font-weight: 900; color: var(--navy); margin-bottom: 0.4rem; }
.page-subtitle { color: var(--gray); font-size: 1.02rem; max-width: 760px; margin: 0 auto; }

/* ============ Stat cards (dashboard summary numbers) ============ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; margin-bottom: 2.2rem; }
.stat-card { background: var(--white); padding: 1.3rem; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); text-align: center; }
.stat-number { font-size: 2.2rem; font-weight: 900; color: var(--navy); }
.stat-label { color: var(--gray); font-weight: 700; font-size: 0.9rem; }
.stat-link { text-decoration: none; color: inherit; display: block; }

/* ============ Student profile page ============ */
.profile-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.accent-card { border-left: 4px solid var(--navy); }
.card-title { background: var(--navy); color: var(--white); font-weight: 900; font-size: 1rem; padding: 10px 16px; letter-spacing: 0.3px; }
.info-grid { padding: 6px 0; }
.info-row { display: grid; grid-template-columns: 200px 1fr; border-bottom: 1px solid var(--border); min-height: 38px; align-items: center; }
.info-row:last-child { border-bottom: none; }
.info-lbl { padding: 8px 16px; font-weight: 700; color: var(--gray); font-size: 0.92rem; background: #fafafa; border-right: 1px solid var(--border); height: 100%; display: flex; align-items: center; }
.info-val { padding: 8px 16px; font-size: 0.95rem; color: var(--text-dark); }
.btn-danger { background: #b00020; color: var(--white); border: none; border-radius: 8px; padding: 10px 20px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; font-size: 0.9rem; }
.btn-danger:hover { background: #8b0018; }
@media (max-width: 600px) {
    .info-row { grid-template-columns: 1fr; }
    .info-lbl { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ============ Student profile page ============ */
.profile-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.accent-card { border-left: 4px solid var(--navy); }
.profile-card .card-title { background: var(--navy); color: var(--white); font-weight: 900; font-size: 1rem; padding: 10px 16px; letter-spacing: 0.3px; }
.profile-card .info-grid { padding: 6px 0; }
.profile-card .info-row { display: grid; grid-template-columns: 200px 1fr; border-bottom: 1px solid var(--border); min-height: 38px; align-items: center; }
.profile-card .info-row:last-child { border-bottom: none; }
.profile-card .info-lbl { padding: 8px 16px; font-weight: 700; color: var(--gray); font-size: 0.92rem; background: #fafafa; border-right: 1px solid var(--border); height: 100%; display: flex; align-items: center; }
.profile-card .info-val { padding: 8px 16px; font-size: 0.95rem; color: var(--text-dark); }
@media (max-width: 600px) {
    .profile-card .info-row { grid-template-columns: 1fr; }
    .profile-card .info-lbl { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ============ Student search page ============ */
.search-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.search-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; align-items: end; }
@media (max-width: 768px) { .search-grid { grid-template-columns: 1fr; } }
.lbl { display: block; font-weight: 900; color: var(--gray); margin-bottom: 6px; }
.inp { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 12px; outline: none; font-family: 'Open Sans', sans-serif; }
.inp:focus { border-color: var(--navy); }
.hint { margin-top: 10px; color: var(--gray); font-weight: 700; font-size: 0.95rem; }

.badge.notok { background: #ffecec; color: #b00020; border: 1px solid #fecaca; padding: 5px 12px; border-radius: 999px; font-weight: 900; font-size: 0.85rem; }

.btn-download {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px;
    background: var(--navy); color: var(--white); border: none; border-radius: 10px;
    font-weight: 900; font-size: 0.95rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: opacity 0.15s ease;
}
.btn-download:hover { opacity: 0.88; }
.btn-download:disabled { opacity: 0.5; cursor: not-allowed; }

.pag-btn { display: inline-block; padding: 6px 14px; margin: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); cursor: pointer; font-weight: 700; font-size: 0.9rem; }
.pag-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pag-btn:hover:not(.active) { background: var(--light-gray); }

/* ============ Allocate Bed page ============ */
.alloc-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.step-block { margin-bottom: 18px; }
.step-label { font-weight: 900; color: var(--navy); font-size: 0.95rem; margin-bottom: 7px; display: flex; align-items: center; gap: 8px; }
.step-label::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }

.bed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 10px; }
.bed-tile { border: 2px solid var(--border); border-radius: 10px; padding: 10px 12px; text-align: center; font-size: 0.88rem; font-weight: 700; }
.bed-tile.free { border-color: #a7f3d0; background: #e8fff3; color: #047857; }
.bed-tile.occupied { border-color: #fecaca; background: #ffecec; color: #b00020; }
.bed-tile.disabled-adj { border-color: var(--border); background: #f3f4f6; color: var(--gray); opacity: 0.75; }
.bed-tile .bed-num { font-size: 1.1rem; font-weight: 900; display: block; }
.bed-tile .bed-sid { font-size: 0.75rem; font-weight: 600; opacity: 0.8; margin-top: 2px; display: block; word-break: break-all; }

.info-found { background: #f0f7ff; border: 1px solid #bfdbfe; border-radius: 10px; overflow: hidden; }
.info-row-s { display: grid; grid-template-columns: 120px 1fr; border-bottom: 1px solid #bfdbfe; }
.info-row-s:last-of-type { border-bottom: none; }
.info-lbl-s { padding: 8px 12px; font-weight: 700; font-size: 0.85rem; color: #1e40af; background: #dbeafe; }
.info-val-s { padding: 8px 12px; font-size: 0.9rem; color: #1e2a3a; }
.info-ok { padding: 8px 12px; background: #e8fff3; color: #047857; font-weight: 700; font-size: 0.85rem; border-top: 1px solid #a7f3d0; }
.info-warn { padding: 8px 12px; background: #fff7ed; color: #c2410c; font-weight: 700; font-size: 0.85rem; border-top: 1px solid #fed7aa; }
.info-notfound { padding: 10px 14px; background: #ffecec; border: 1px solid #fecaca; border-radius: 10px; color: #b00020; font-weight: 700; font-size: 0.88rem; }
.info-checking { padding: 8px 12px; color: var(--gray); font-weight: 600; font-size: 0.88rem; }

/* ============ Hostel header (warden home) ============ */
.hostel-name-lbl { display: block; font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-top: 0.3rem; }
.hostel-meta { color: var(--gray); font-size: 0.9rem; margin-top: 0.2rem; font-weight: 600; }
.room-count-badge { background: var(--navy); color: var(--white); padding: 0.5rem 1.1rem; border-radius: 999px; font-weight: 900; font-size: 0.95rem; }

/* ============ Room cards (bed/room selection grids) ============ */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 1rem; margin-bottom: 28px; }
.room-card {
    background: var(--white); border: 2px solid var(--border); border-radius: 14px;
    padding: 16px; cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.room-card:hover { border-color: var(--navy); box-shadow: 0 6px 20px rgba(0,0,0,0.12); transform: translateY(-2px); }
.room-card.active { border-color: var(--navy); background: #f0f4ff; box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.room-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.room-no { font-family: 'Merriweather', serif; font-size: 1.15rem; font-weight: 900; color: var(--navy); }
.block-badge { background: var(--navy); color: var(--white); font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.room-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.meta-item { display: flex; flex-direction: column; }
.meta-lbl { font-size: 0.72rem; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; }
.meta-val { font-size: 1rem; font-weight: 900; color: var(--navy); }
.alloc-count { color: #c2410c; }
.free-count { color: #047857; }
.occ-bar-wrap { background: #e5e7eb; border-radius: 999px; height: 6px; margin-bottom: 8px; overflow: hidden; }
.occ-bar { height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.room-condition { font-size: 0.78rem; color: var(--gray); font-weight: 600; min-height: 16px; }

/* ============ Students panel (click-to-expand on a room card) ============ */
.students-panel {
    background: var(--white); border: 2px solid var(--navy); border-radius: 16px;
    overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.1); margin-bottom: 32px;
}
.panel-header { background: var(--navy); color: var(--white); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.panel-title { font-weight: 900; font-size: 1.05rem; }
.panel-meta { font-size: 0.85rem; opacity: 0.75; margin-left: 10px; }
.close-btn { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: var(--white); padding: 6px 14px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 0.85rem; }
.close-btn:hover { background: rgba(255,255,255,0.25); }
.bed-pill { display: inline-block; background: var(--navy); color: var(--white); padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }

@media (max-width: 600px) {
    .rooms-grid { grid-template-columns: 1fr 1fr; }
}

/* ============ Availability progress bar ============ */
.availability-bar { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.availability-label { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.85rem; }
.progress-bar { height: 8px; background: var(--light-gray); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--green) 0%, var(--teal) 100%); border-radius: 10px; }
.progress-fill.high { background: linear-gradient(90deg, var(--red) 0%, #c13b4a 100%); }
.progress-fill.medium { background: linear-gradient(90deg, var(--orange) 0%, var(--orange-light) 100%); }

/* ============ Live-status result table (search/allocate results) ============ */
.result-box { background: var(--white); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.muted { padding: 14px; color: var(--gray); font-weight: 700; }
table.live { width: 100%; border-collapse: collapse; }
table.live th { text-align: left; padding: 12px; background: var(--navy); color: var(--white); font-weight: 900; }
table.live td { padding: 12px; border-bottom: 1px solid var(--border); }
.badge.ok { background: #e8fff3; color: #047857; border: 1px solid #a7f3d0; padding: 6px 10px; border-radius: 999px; font-weight: 900; font-size: 0.9rem; }
.badge.full { background: #ffecec; color: #b00020; border: 1px solid #fecaca; padding: 6px 10px; border-radius: 999px; font-weight: 900; font-size: 0.9rem; }

/* ============ Form input classes (login/search forms) ============ */
.aspNetTextBox { padding: 0.8rem 0.9rem; width: 100%; border: 1px solid var(--border); border-radius: 10px; outline: none; font-family: 'Open Sans', sans-serif; }
.aspNetTextBox:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26,47,79,0.1); }
.aspNetButton { padding: 0.8rem 1.0rem; border-radius: 10px; border: none; background: var(--navy); color: var(--white); cursor: pointer; font-weight: 700; }
.aspNetButton:hover { background: var(--navy-dark); }

/* ============ Mobile nav toggle (hamburger menu + slide-open links) ============ */
.menu-btn {
    display: none;
    margin-left: auto;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: var(--white);
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
}
.user-pill {
    color: var(--white); font-weight: 800;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
}
@media (max-width: 900px) {
    .nav-container { padding: 0 1rem; flex-wrap: wrap; gap: 0.6rem; }
    .nav-links { flex: 1 1 100%; overflow: visible; }
}
@media (max-width: 768px) {
    .logo-small { width: 38px; height: 38px; }
    .menu-btn { display: block; }
    .user-pill { margin-left: auto; }
    .contact-btn { width: 100%; text-align: center; margin-left: 0; margin-top: 0; }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        background: rgba(255,255,255,0.06);
        border-radius: 10px;
        padding: 0.4rem;
    }
    .nav-links.open { display: flex; }
    .nav-link { padding: 0.85rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.12); text-align: left; border-left: none; }
    .nav-link:last-child { border-bottom: none; }

    .container, .page-content { padding: 0 1rem; }
    .hostels-grid, .stats-grid { grid-template-columns: 1fr; }
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
    .auth-card { flex-direction: column; min-height: auto; }
    .campus-panel { padding: 2rem; }
    .form-panel { padding: 2.2rem 1.6rem; }
    .header-content { flex-direction: column; text-align: center; }
    .nav-container { flex-direction: column; padding: 1rem; }
    .nav-links { flex-direction: column; width: 100%; }
    .nav-link { text-align: center; border-bottom: none; border-left: 3px solid transparent; }
    .contact-btn { margin-left: 0; width: 100%; margin-top: 0.5rem; }
}
