:root {
    --template-primary: #2563eb;
    --template-primary-dark: #1e40af;
    --template-accent: #0f766e;
    --template-ink: #111827;
    --template-muted: #64748b;
    --template-border: #e2e8f0;
    --template-surface: #ffffff;
    --template-soft: #f6f8fb;
    --template-radius: 8px;
    --template-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

body {
    background-color: var(--template-soft);
    color: var(--template-ink);
}

.bc-title {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid var(--template-border);
    padding-bottom: 14px !important;
    margin-bottom: 18px !important;
}

.bc-title h4 {
    margin-bottom: 4px;
    color: var(--template-ink);
    font-size: 1.1rem;
    font-weight: 800;
}

label {
    margin-bottom: 6px !important;
    color: #334155;
    font-weight: 700;
}

.widget.box {
    border: 1px solid var(--template-border);
    border-radius: var(--template-radius);
    box-shadow: var(--template-shadow);
}

.widget-content {
    padding: 22px !important;
}

.btn,
.form-control,
.form-select,
.modal-content,
.dropdown-menu {
    border-radius: var(--template-radius);
}

.btn-primary {
    border-color: var(--template-primary);
    background-color: var(--template-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--template-primary-dark);
    background-color: var(--template-primary-dark);
}

.form-control,
.form-select {
    border-color: var(--template-border);
    min-height: 42px;
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

.table {
    color: var(--template-ink);
}

.table thead th {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.btn-icon i {
    color: white !important;
    stroke: white !important;
}

.template-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    min-height: 210px;
    padding: 32px;
    border-radius: var(--template-radius);
    background: #102033;
    color: #fff;
    box-shadow: var(--template-shadow);
}

.template-hero h1 {
    max-width: 760px;
    margin: 8px 0 10px;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.18;
}

.template-hero p {
    max-width: 680px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
}

.template-eyebrow {
    color: #93c5fd;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.template-user-card {
    flex: 0 0 240px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--template-radius);
    padding: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.template-user-card span,
.template-stat-card span,
.template-feature-item span {
    display: block;
    color: var(--template-muted);
    font-size: 0.88rem;
}

.template-user-card span {
    color: rgba(255, 255, 255, 0.62);
}

.template-user-card strong {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-size: 1rem;
}

.template-stat-card {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--template-border);
    border-radius: var(--template-radius);
    padding: 20px;
    background: var(--template-surface);
    box-shadow: var(--template-shadow);
}

.template-stat-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--template-radius);
    background: #eaf2ff;
    color: var(--template-primary);
}

.template-stat-icon svg {
    width: 20px;
    height: 20px;
}

.template-stat-card strong {
    display: block;
    margin-top: 4px;
    color: var(--template-ink);
    font-size: 1.25rem;
    font-weight: 800;
}

.template-panel-fill {
    height: 100%;
}

.template-feature-list {
    display: grid;
    gap: 14px;
}

.template-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--template-border);
    border-radius: var(--template-radius);
    background: #fbfdff;
}

.template-feature-item svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--template-accent);
}

.template-feature-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--template-ink);
}

.template-checklist {
    margin: 0;
    padding-left: 20px;
    color: var(--template-muted);
    line-height: 1.8;
}

.template-checklist code {
    color: var(--template-primary-dark);
    background: #eef4ff;
    border-radius: 4px;
    padding: 2px 5px;
}

@media (max-width: 767px) {
    .bc-title,
    .template-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .template-hero {
        padding: 24px;
    }

    .template-hero h1 {
        font-size: 1.55rem;
    }

    .template-user-card {
        flex-basis: auto;
    }
}
/* Hostel management */
.hostel-management-page .nav-pills .nav-link { display:flex; align-items:center; }
.hostel-allocation-form { padding:1rem; border:1px solid #d9e2ea; border-radius:.5rem; background:#f8fafc; }
.hostel-selected-student { display:flex; gap:.75rem; align-items:center; padding:.85rem 1rem; border-radius:.5rem; background:#e8f5ee; color:#164b31; }
.hostel-selected-student i { font-size:1.6rem; }
.hostel-selected-student small, .hostel-inventory-head small, .hostel-room-row small { display:block; color:#718096; }
.hostel-student-result { width:100%; border:1px solid #e3e8ee; border-radius:.5rem; background:#fff; padding:.75rem 1rem; margin-bottom:.5rem; display:flex; justify-content:space-between; align-items:center; text-align:left; transition:.15s ease; }
.hostel-student-result:hover { border-color:#696cff; background:#f7f7ff; transform:translateY(-1px); }
.hostel-student-result small { display:block; color:#697a8d; margin-top:.15rem; }
.hostel-inventory-group { border:1px solid #e4e7eb; border-radius:.65rem; overflow:hidden; margin-bottom:1rem; }
.hostel-inventory-head { padding:1rem; background:#f2f5ff; display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.hostel-room-row { padding:.7rem 1rem .7rem 1.5rem; border-top:1px solid #edf0f3; display:flex; justify-content:space-between; align-items:center; }
.hostel-room-row i { margin-right:.4rem; color:#696cff; }
.hostel-bed-list { display:flex; flex-wrap:wrap; gap:.45rem; padding:.55rem 1rem 1rem 3rem; }
.hostel-bed-chip { display:inline-flex; align-items:center; gap:.35rem; border:1px solid transparent; border-radius:999px; padding:.38rem .42rem .38rem .7rem; font-size:.82rem; font-weight:700; }
.hostel-bed-chip.active { background:#dcfce7; border-color:#24a45a; color:#075f31; box-shadow:0 1px 3px rgba(22,131,74,.12); }
.hostel-bed-chip.disabled { background:#fee2e2; border-color:#e05260; color:#8f1522; box-shadow:0 1px 3px rgba(185,28,28,.1); }
.hostel-bed-state-dot { width:8px; height:8px; border-radius:50%; background:#169447; }
.hostel-bed-chip.disabled .hostel-bed-state-dot { background:#cf2638; }
.hostel-bed-chip button { border:0; background:transparent; color:inherit; padding:0 .12rem; }
.hostel-item-actions { display:flex; align-items:center; gap:.4rem; }
.hostel-status-badge { display:inline-flex; align-items:center; gap:.3rem; border-radius:999px; padding:.42rem .7rem; color:#fff; font-size:.78rem; font-weight:800; letter-spacing:.01em; }
.hostel-status-badge.active { background:#16834a; box-shadow:0 2px 6px rgba(22,131,74,.25); }
.hostel-status-badge.inactive { background:#596579; box-shadow:0 2px 6px rgba(55,65,81,.2); }
.hostel-action-button { width:34px; height:34px; display:inline-grid; place-items:center; border:0; border-radius:.45rem; color:#fff; font-size:1.05rem; transition:.15s ease; }
.hostel-action-button i, .hostel-status-badge i { color:#fff!important; opacity:1!important; }
.hostel-action-button:hover { transform:translateY(-1px); filter:brightness(.92); }
.hostel-action-button.edit { background:#2563eb; }
.hostel-action-button.toggle { background:#d97706; }
.hostel-action-button.delete { background:#c92a3a; }
.hostel-chip-action { width:24px; height:24px; display:inline-grid; place-items:center; border:0!important; border-radius:50%; color:#fff!important; }
.hostel-chip-action i { color:#fff!important; opacity:1!important; }
.hostel-chip-action.edit { background:#2563eb!important; }
.hostel-chip-action.toggle { background:#b76508!important; }
.hostel-chip-action.delete { background:#b42332!important; }
.hostel-inventory-toolbar { display:grid; grid-template-columns:minmax(230px,1.4fr) minmax(190px,1fr) minmax(150px,.7fr) 90px; gap:.8rem; padding:1rem; border:1px solid #e3e8ef; border-radius:.65rem; background:#f8fafc; }
.hostel-inventory-toolbar .form-label { margin-bottom:.3rem; color:#4b5563; font-size:.78rem; font-weight:800; text-transform:uppercase; letter-spacing:.03em; }
.hostel-selected-summary { display:grid; grid-template-columns:minmax(220px,1fr) auto auto; align-items:center; gap:1rem; margin-bottom:.8rem; padding:1rem 1.15rem; border-radius:.65rem; background:linear-gradient(120deg,#eef2ff,#f8fafc); border:1px solid #dce3f2; }
.hostel-selected-summary>div:first-child { display:flex; align-items:center; gap:.7rem; }
.hostel-selected-summary h5,.hostel-selected-summary p { margin:0; }
.hostel-selected-summary p { color:#687386; font-size:.85rem; }
.hostel-summary-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:.55rem; background:#4f56d9; color:#fff; font-size:1.4rem; }
.hostel-summary-icon i { color:#fff!important; }
.hostel-summary-stats { display:flex; gap:.6rem; }
.hostel-summary-stats span { min-width:82px; padding:.5rem .7rem; border-radius:.5rem; background:#fff; color:#657084; text-align:center; font-size:.72rem; box-shadow:0 1px 3px rgba(15,23,42,.07); }
.hostel-summary-stats strong { display:block; color:#172033; font-size:1rem; }
.hostel-room-compact { border:1px solid #e4e8ee; border-radius:.55rem; margin-bottom:.55rem; overflow:hidden; background:#fff; }
.hostel-room-main { min-height:58px; display:grid; grid-template-columns:28px 34px minmax(180px,1fr) auto; align-items:center; gap:.6rem; padding:.65rem .8rem; }
.hostel-room-expand { width:30px; height:30px; display:grid; place-items:center; border:1px solid #cfd6df; border-radius:.4rem; background:#fff; color:#4f56d9; }
.hostel-room-expand i { transition:transform .18s ease; }
.hostel-room-expand.open i { transform:rotate(90deg); }
.hostel-room-name { display:flex; align-items:center; gap:.65rem; }
.hostel-room-name>i { color:#4f56d9; font-size:1.35rem; }
.hostel-room-name small { display:block; color:#768195; font-size:.78rem; }
.hostel-room-beds-collapsed { display:none; border-top:1px solid #e8ecf1; background:#f8fafc; }
.hostel-room-beds-collapsed.open { display:block; }
.hostel-empty-beds { width:100%; padding:.75rem; color:#778196; text-align:center; font-style:italic; }
.hostel-pagination { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-top:1rem; color:#687386; font-size:.85rem; }
.hostel-pagination>div { display:flex; gap:.3rem; }
.hostel-pagination button { min-width:32px; height:32px; border:1px solid #d5dbe5; border-radius:.4rem; background:#fff; color:#4b5563; }
.hostel-pagination button.active { border-color:#4f56d9; background:#4f56d9; color:#fff; }
.hostel-pagination button:disabled { opacity:.4; }
@media (max-width:991px) { .hostel-inventory-toolbar { grid-template-columns:1fr 1fr; } .hostel-selected-summary { grid-template-columns:1fr; } .hostel-summary-stats { flex-wrap:wrap; } }
@media (max-width:620px) { .hostel-inventory-toolbar { grid-template-columns:1fr; } .hostel-room-main { grid-template-columns:28px 32px 1fr; } .hostel-room-main>.hostel-item-actions { grid-column:1/-1; justify-content:flex-end; border-top:1px solid #edf0f3; padding-top:.55rem; } .hostel-pagination { align-items:flex-start; flex-direction:column; } }
@media (max-width:767px) { .hostel-student-search { display:grid; grid-template-columns:1fr; } .hostel-student-search>* { width:100%; border-radius:.375rem!important; margin-bottom:.4rem; } .hostel-inventory-head { align-items:flex-start; } }
.hostel-paid-students { max-height:420px; overflow:auto; padding-right:.25rem; }
.hostel-allocation-panel { position:sticky; top:90px; min-height:210px; border:1px solid #dfe5ec; border-radius:.65rem; background:#fff; box-shadow:0 4px 16px rgba(31,41,55,.06); }
.hostel-allocation-placeholder { min-height:210px; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:1.5rem; color:#697a8d; text-align:center; }
.hostel-allocation-placeholder i { width:52px; height:52px; display:grid; place-items:center; margin-bottom:.65rem; border-radius:50%; background:#eef0ff; color:#4f56d9; font-size:1.75rem; }
.hostel-allocation-placeholder h6 { margin-bottom:.25rem; color:#303b4d; }
.hostel-allocation-placeholder p { margin:0; font-size:.85rem; }
.hostel-allocation-panel .hostel-allocation-form { border:0; border-radius:.65rem; }
.hostel-list-serial,.hostel-bed-number { flex:0 0 auto; min-width:24px; height:24px; display:inline-grid; place-items:center; border-radius:999px; background:#eef2f7; color:#4c596d!important; font-size:.7rem!important; font-weight:800!important; line-height:1; }
.hostel-student-details { min-width:0; flex:1 1 auto; padding:0 .55rem; }
.hostel-occupancy-room-head strong { display:flex; align-items:center; gap:.4rem; }
.hostel-occupancy-bed>div { min-width:0; flex:1 1 auto; }
.hostel-student-result.already-allocated { border-left:4px solid #2563eb; }
.hostel-student-result em { display:block; margin-top:.3rem; color:#3757a6; font-size:.75rem; font-style:normal; font-weight:700; }
.hostel-student-state { border-radius:999px; padding:.38rem .65rem; color:#fff; font-size:.75rem; font-weight:800; white-space:nowrap; }
.hostel-student-state.waiting { background:#b45309; }
.hostel-student-state.allocated { background:#2563eb; }
.hostel-paid-summary,.hostel-occupancy-summary { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin-bottom:.75rem; }
.hostel-paid-summary span,.hostel-occupancy-summary span { min-width:100px; border-radius:.5rem; padding:.48rem .7rem; background:#eef2f7; color:#4c596d; font-size:.75rem; }
.hostel-paid-summary strong,.hostel-occupancy-summary strong { margin-right:.25rem; color:#172033; font-size:1rem; }
.hostel-paid-summary .allocated,.hostel-occupancy-summary .occupied { background:#dbeafe; color:#1d4ed8; }
.hostel-paid-summary .waiting { background:#fef3c7; color:#92400e; }
.hostel-occupancy-summary .available { background:#dcfce7; color:#08783c; }
.hostel-occupancy-summary .disabled { background:#fee2e2; color:#a61928; }
.hostel-occupancy-room { overflow:hidden; margin-bottom:.65rem; border:1px solid #e2e7ed; border-radius:.55rem; }
.hostel-occupancy-room-head { display:flex; justify-content:space-between; align-items:center; padding:.65rem .85rem; background:#f7f9fc; }
.hostel-occupancy-room-head i { color:#4f56d9; }
.hostel-occupancy-room-head span { color:#778196; font-size:.75rem; }
.hostel-occupancy-beds { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:.5rem; padding:.7rem; }
.hostel-occupancy-bed { display:flex; justify-content:space-between; align-items:center; gap:.4rem; min-height:55px; padding:.55rem .65rem; border:1px solid; border-radius:.5rem; }
.hostel-occupancy-bed small { display:block; margin-top:.15rem; font-size:.7rem; }
.hostel-occupancy-bed>span { font-size:.68rem; font-weight:800; }
.hostel-occupancy-bed.available { border-color:#34a866; background:#e5f9ed; color:#086936; }
.hostel-occupancy-bed.occupied { border-color:#4c78dc; background:#e8efff; color:#1e429f; }
.hostel-occupancy-bed.disabled { border-color:#de6570; background:#fee9eb; color:#9d1c2a; }
@media (max-width:991px) { .hostel-allocation-panel { position:static; } }
