/* ==========================================================================
   EPITA Housing — Design System (Bootstrap 5.3 custom theme)
   ========================================================================== */

:root {
    --eh-primary: #14407a;
    --eh-primary-dark: #0e2f5a;
    --eh-primary-light: #e8f0fa;
    --eh-accent: #f27405;
    --eh-accent-dark: #d06304;
    --eh-bg: #f4f6fa;
    --eh-surface: #ffffff;
    --eh-text: #1f2a3d;
    --eh-text-muted: #6b7a90;
    --eh-border: #cdd4de;
    --eh-radius: 0.75rem;
    --eh-radius-sm: 0.5rem;
    --eh-shadow-sm: 0 1px 2px rgba(16, 42, 82, 0.06);
    --eh-shadow: 0 4px 16px rgba(16, 42, 82, 0.08);
    --eh-shadow-lg: 0 12px 32px rgba(16, 42, 82, 0.14);
    --eh-sidebar-width: 260px;
    --eh-topbar-height: 64px;
}

/* Bootstrap variable overrides */
:root {
    --bs-primary: var(--eh-primary);
    --bs-primary-rgb: 20, 64, 122;
    --bs-link-color: var(--eh-primary);
    --bs-link-hover-color: var(--eh-primary-dark);
    --bs-body-bg: var(--eh-bg);
    --bs-body-color: var(--eh-text);
    --bs-border-color: var(--eh-border);
    --bs-border-radius: var(--eh-radius-sm);
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--eh-bg);
    color: var(--eh-text);
}

/* ---------- Buttons ---------- */
.btn-primary {
    --bs-btn-bg: var(--eh-primary);
    --bs-btn-border-color: var(--eh-primary);
    --bs-btn-hover-bg: var(--eh-primary-dark);
    --bs-btn-hover-border-color: var(--eh-primary-dark);
    --bs-btn-active-bg: var(--eh-primary-dark);
    --bs-btn-active-border-color: var(--eh-primary-dark);
}
.btn-accent {
    --bs-btn-bg: var(--eh-accent);
    --bs-btn-border-color: var(--eh-accent);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--eh-accent-dark);
    --bs-btn-hover-border-color: var(--eh-accent-dark);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--eh-accent-dark);
    --bs-btn-active-border-color: var(--eh-accent-dark);
    --bs-btn-active-color: #fff;
}
.btn-outline-primary {
    --bs-btn-color: var(--eh-primary);
    --bs-btn-border-color: var(--eh-primary);
    --bs-btn-hover-bg: var(--eh-primary);
    --bs-btn-hover-border-color: var(--eh-primary);
    --bs-btn-active-bg: var(--eh-primary-dark);
    --bs-btn-active-border-color: var(--eh-primary-dark);
}
.btn-outline-info, .btn-outline-warning {
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
}
.btn { border-radius: var(--eh-radius-sm); font-weight: 500; }

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius);
    box-shadow: var(--eh-shadow-sm);
    background: var(--eh-surface);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--eh-border);
    font-weight: 600;
    padding: 1rem 1.25rem;
}
.card-header:first-child { border-radius: var(--eh-radius) var(--eh-radius) 0 0; }

/* ---------- Stat cards (dashboards) ---------- */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--eh-radius);
    background: var(--eh-surface);
    border: 1px solid var(--eh-border);
    box-shadow: var(--eh-shadow-sm);
    height: 100%;
}
.stat-card .stat-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--eh-radius-sm);
    font-size: 1.5rem;
    color: #fff;
    background: var(--eh-primary);
}
.stat-card .stat-icon.accent { background: var(--eh-accent); }
.stat-card .stat-icon.success { background: #198754; }
.stat-card .stat-icon.info { background: #0dcaf0; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { color: var(--eh-text-muted); font-size: 0.875rem; }

/* ---------- App shell (authenticated) ---------- */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--eh-sidebar-width);
    flex: 0 0 var(--eh-sidebar-width);
    background: var(--eh-primary-dark);
    color: #dbe6f5;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: transform 0.25s ease;
}
.app-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    min-height: var(--eh-topbar-height);
}
.app-sidebar .sidebar-brand img { width: 100px; height: auto; }
.app-sidebar .sidebar-brand .brand-title { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.app-sidebar .sidebar-brand .brand-sub { font-size: 0.7rem; color: #9fb6d4; }

.sidebar-nav { padding: 0.75rem; overflow-y: auto; flex: 1 1 auto; }
.sidebar-nav .nav-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8ba6c9;
    padding: 0.9rem 0.75rem 0.35rem;
}
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #c6d6ea;
    border-radius: var(--eh-radius-sm);
    padding: 0.6rem 0.75rem;
    margin-bottom: 2px;
    font-size: 0.92rem;
}
.sidebar-nav .nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--eh-accent); color: #fff; font-weight: 600; }
.sidebar-nav .nav-link .bi { font-size: 1.05rem; }

.app-main {
    flex: 1 1 auto;
    margin-left: var(--eh-sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

/* Mini (icons-only) sidebar on desktop */
@media (min-width: 992px) {
    .app-sidebar.mini { width: 76px; flex-basis: 76px; }
    .app-sidebar.mini .sidebar-brand { justify-content: center; padding: 1rem 0.5rem; }
    .app-sidebar.mini .sidebar-brand img { width: 60px; }
    .app-sidebar.mini .sidebar-brand .brand-text { display: none; }
    .app-sidebar.mini .nav-section { display: none; }
    .app-sidebar.mini .nav-link { justify-content: center; padding: 0.7rem 0.5rem; }
    .app-sidebar.mini .nav-link .nav-label { display: none; }
    .app-sidebar.mini .nav-link .bi { font-size: 1.25rem; }
    .app-main.mini { margin-left: 76px; }
}

.app-topbar {
    height: var(--eh-topbar-height);
    background: var(--eh-surface);
    border-bottom: 1px solid var(--eh-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.app-topbar .topbar-title { font-size: 1.1rem; font-weight: 600; margin: 0; }
.app-topbar .sidebar-toggle {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    color: var(--eh-primary);
}

.app-content { padding: 1.5rem; flex: 1 1 auto; }

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); box-shadow: var(--eh-shadow-lg); }
    .app-main { margin-left: 0; }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(10, 25, 47, 0.5);
        z-index: 1035;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease;
    }
    .sidebar-backdrop.show { opacity: 1; visibility: visible; }
}

/* ---------- Public navbar ---------- */
.public-navbar {
    background: var(--eh-surface);
    border-bottom: 1px solid var(--eh-border);
    box-shadow: var(--eh-shadow-sm);
}
.public-navbar .navbar-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--eh-primary); }
.public-navbar .navbar-brand img { height: 50px; width: auto; }
.public-navbar .nav-link { color: var(--eh-text); font-weight: 500; }
.public-navbar .nav-link:hover, .public-navbar .nav-link.active { color: var(--eh-primary); }

/* ---------- Hero (public pages) ---------- */
.hero {
    background: linear-gradient(120deg, var(--eh-primary-dark), var(--eh-primary));
    color: #fff;
    border-radius: 0 0 var(--eh-radius) var(--eh-radius);
    padding: 4.5rem 0;
}
.hero h1 { font-weight: 700; }
.hero .lead { color: #cfe0f5; }
.hero-search {
    background: var(--eh-surface);
    border-radius: var(--eh-radius);
    box-shadow: var(--eh-shadow-lg);
    padding: 1rem;
    margin-top: 1.75rem;
}

/* ---------- Listing cards ---------- */
.listing-card { overflow: hidden; transition: box-shadow 0.2s ease, transform 0.2s ease; height: 100%; }
.listing-card:hover { box-shadow: var(--eh-shadow-lg); transform: translateY(-2px); }
.listing-card .listing-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--eh-primary-light);
}
.listing-card .listing-price { color: var(--eh-accent); font-weight: 700; font-size: 1.15rem; }
.listing-card .listing-badge { position: absolute; top: 0.75rem; left: 0.75rem; }
.listing-card .card-img-wrap { position: relative; }

/* ---------- Tables / DataTables ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead > tr > th {
    background: var(--eh-primary-light);
    color: var(--eh-primary-dark);
    font-weight: 600;
    border-bottom-width: 1px;
    white-space: nowrap;
    padding: 0.625rem 1rem;
}
.table > tbody > tr > td {
    padding: 0.625rem 1rem;
    vertical-align: middle;
}
.table-card { background: var(--eh-surface); border: 1px solid var(--eh-border); border-radius: var(--eh-radius); box-shadow: var(--eh-shadow-sm); overflow: hidden; }

/* Enhanced DataTables Styling for .table-card */
.table-card .dt-container {
    padding: 0;
}
.table-card .dt-container .row:first-child {
    padding: 1.25rem 1.25rem 0.5rem 1.25rem;
    margin: 0;
    align-items: center;
}
.table-card .dt-container .row:last-child {
    padding: 1rem 1.25rem;
    margin: 0;
    background: var(--eh-bg);
    border-top: 1px solid var(--eh-border);
    align-items: center;
}
.table-card .dt-container > .row:not(:first-child):not(:last-child) {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto;
    width: 100%;
}
.table-card .dt-container .dt-search {
    text-align: right;
}
.table-card .dt-container .dt-search input {
    min-width: 250px;
    border-radius: 2rem;
    padding: 0.4rem 1.2rem;
    border: 1px solid var(--eh-border);
    background: var(--eh-bg);
}
.table-card .dt-container .dt-search input:focus {
    border-color: var(--eh-primary);
    box-shadow: 0 0 0 0.2rem rgba(20, 64, 122, 0.15);
    outline: none;
}
.table-card .dt-container .dt-length select {
    border-radius: var(--eh-radius-sm);
    padding: 0.35rem 2rem 0.35rem 0.75rem;
    border: 1px solid var(--eh-border);
    background-color: var(--eh-surface);
}
.table-card .dt-container .pagination {
    margin: 0;
    gap: 0.25rem;
}
.table-card .dt-container .page-item.active .page-link {
    background-color: var(--eh-primary);
    border-color: var(--eh-primary);
    color: #fff;
    box-shadow: var(--eh-shadow-sm);
}
.table-card .dt-container .page-link {
    color: var(--eh-text);
    border-radius: var(--eh-radius-sm);
    border: 1px solid transparent;
    min-width: 36px;
    text-align: center;
    font-weight: 500;
}
.table-card .dt-container .page-item:not(.active) .page-link:hover {
    background-color: var(--eh-primary-light);
    color: var(--eh-primary-dark);
}
.dt-info {
    color: var(--eh-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}
table.dataTable > thead > tr > th.dt-orderable-asc, 
table.dataTable > thead > tr > th.dt-orderable-desc, 
table.dataTable > thead > tr > td.dt-orderable-asc, 
table.dataTable > thead > tr > td.dt-orderable-desc {
    padding-right: 2.5rem !important;
}

/* ---------- Status badges ---------- */
.badge-status { font-weight: 600; padding: 0.5em 1em; border-radius: 2rem; }

/* ---------- Form Switches & Checkboxes ---------- */
.form-switch {
    padding-left: 0;
}
.form-switch .form-check-input {
    margin-left: 0;
    margin-right: 4px;
}

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-color: var(--eh-border);
    border-radius: var(--eh-radius-sm);
    padding: 0.55rem 0.8rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--eh-primary);
    box-shadow: 0 0 0 0.2rem rgba(20, 64, 122, 0.15);
}
.form-label { font-weight: 600; font-size: 0.9rem; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: flex; }
.auth-side {
    flex: 1 1 45%;
    background: linear-gradient(150deg, var(--eh-primary-dark), var(--eh-primary));
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}
.auth-side .auth-side-inner { max-width: 420px; }
.auth-main {
    flex: 1 1 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--eh-bg);
}
.auth-card { width: 100%; max-width: 460px; }
@media (min-width: 992px) { .auth-side { display: flex; } }

/* ---------- Flash messages ---------- */
.flash-stack { position: relative; z-index: 1; }

/* ---------- Page headings ---------- */
.page-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.1rem 1.5rem;
    background: var(--eh-surface);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius);
    box-shadow: var(--eh-shadow-sm);
    overflow: hidden;
}

/* subtle accent bar on the left, ties it to card headers elsewhere */
.page-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--eh-primary);
    opacity: 0.85;
}

.page-heading-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-left: 0.25rem;
}

.page-heading .eh-breadcrumb { margin-bottom: 0; }

.page-heading-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-heading h1,
.page-heading h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--eh-text);
    letter-spacing: -0.01em;
}

.page-heading .breadcrumb { margin: 0; }

.page-back {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-sm);
    background: var(--eh-bg);
    color: var(--eh-text-muted);
    font-size: 0.85rem;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.page-back:hover {
    background: var(--eh-primary-light);
    border-color: var(--eh-primary-light);
    color: var(--eh-primary);
    transform: translateX(-2px);
}

.page-heading .btn-primary {
    box-shadow: var(--eh-shadow-sm);
    white-space: nowrap;
}

/* ---------- Breadcrumb ---------- */
.eh-breadcrumb .breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.82rem;
}
.eh-breadcrumb .breadcrumb-item { display: flex; align-items: center; }
.eh-breadcrumb .breadcrumb-item + .breadcrumb-item { padding-left: 0.45rem; }
.eh-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.5rem;
    color: var(--eh-border);
    padding-right: 0.45rem;
    float: none;
}
.eh-breadcrumb .breadcrumb-item a {
    color: var(--eh-text-muted);
    font-weight: 500;
    transition: color 0.15s ease;
}
.eh-breadcrumb .breadcrumb-item a:hover { color: var(--eh-primary); text-decoration: none; }
.eh-breadcrumb .breadcrumb-item.active { color: var(--eh-primary); font-weight: 600; }

/* ---------- Sortable settings lists (tags, badges) ---------- */
.list-card .card-header { padding-top: 0.9rem; padding-bottom: 0.9rem; }
.card-title-icon {
    width: 2.3rem;
    height: 2.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--eh-radius-sm);
    background: linear-gradient(150deg, var(--eh-primary), var(--eh-primary-dark));
    color: #fff;
    font-size: 0.95rem;
    flex: 0 0 auto;
}
.count-pill {
    background: var(--eh-primary-light);
    color: var(--eh-primary);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35em 0.8em;
}
.sortable-item { transition: background-color 0.15s ease; }
.sortable-item:hover { background-color: rgba(20, 64, 122, 0.035); }
.drag-handle { cursor: grab; color: var(--eh-border); transition: color 0.15s ease; }
.sortable-item:hover .drag-handle { color: var(--eh-text-muted); }
.drag-handle:active { cursor: grabbing; }
.list-icon {
    position: relative;
    width: 2.3rem;
    height: 2.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--eh-radius-sm);
    background: var(--eh-primary-light);
    color: var(--eh-primary);
    font-size: 0.9rem;
    flex: 0 0 auto;
    overflow: hidden;
}
.list-icon .badge-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--eh-surface);
}
.order-chip {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--eh-text-muted);
    background: var(--eh-bg);
    border: 1px solid var(--eh-border);
    border-radius: 50rem;
    padding: 0.1rem 0.55rem;
}

/* ---------- Footer ---------- */
.public-shell { display: flex; flex-direction: column; min-height: 100vh; }
.public-shell > main { flex: 1 0 auto; }

.app-footer {
    background: var(--eh-primary-dark);
    color: #9fb6d4;
    padding: 0.9rem 0;
    /* margin-top: 3rem; */
    flex-shrink: 0;
}
.app-footer a { color: #c6d6ea; text-decoration: none; }
.app-footer a:hover { color: #fff; }
.app-footer .footer-brand { color: #fff; font-weight: 600; }

/* ---------- Misc ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--eh-text-muted);
}
.empty-state .bi { font-size: 2.5rem; color: var(--eh-border); display: block; margin-bottom: 0.75rem; }
.img-thumb { border-radius: var(--eh-radius-sm); object-fit: cover; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.card a:hover { text-decoration: none; }

/* ---------- Amenities (grouped icon grid) ---------- */
.amenities .amenity-group-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--eh-text-muted);
    margin-bottom: 0.6rem;
}
.amenity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem 0.75rem;
}
@media (max-width: 767.98px) { .amenity-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .amenity-grid { grid-template-columns: 1fr; } }
.amenity-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.amenity-item .bi { color: var(--eh-primary); font-size: 1rem; flex: 0 0 auto; }
.amenity-divider { border-top: 1px dashed var(--eh-border); opacity: 1; margin: 1rem 0; }
.amenities-more { color: var(--eh-accent); font-weight: 600; font-size: 0.9rem; }
.amenities-more:hover { color: var(--eh-accent-dark); }

/* ---------- Amenity pills (form checkbox-style multi-select) ---------- */
.amenity-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
@media (max-width: 767.98px) { .amenity-pills { grid-template-columns: repeat(2, 1fr); } }
.amenity-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
    text-align: left;
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius-sm);
    background: var(--eh-surface);
    color: var(--eh-text);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.amenity-pill:hover { border-color: var(--eh-primary); }
.amenity-pill .bi { color: var(--eh-primary); flex: 0 0 auto; }
.amenity-pill.active {
    border-color: var(--eh-primary);
    background: var(--eh-primary-light);
    font-weight: 600;
}

/* ---------- Listing section tab bar ---------- */
.section-tabs {
    background: var(--eh-surface);
    border: 1px solid var(--eh-border);
    border-radius: var(--eh-radius);
    box-shadow: var(--eh-shadow-sm);
    padding: 0.4rem;
    overflow-x: auto;
    white-space: nowrap;
    z-index: 1020;
}
.section-tabs .nav { flex-wrap: nowrap; }
.section-tabs .nav-link {
    color: var(--eh-text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: var(--eh-radius-sm);
}
.section-tabs .nav-link:hover { color: var(--eh-primary); }
.section-tabs .nav-link.active { background: var(--eh-primary); color: #fff; }

/* ---------- Policy rows (house rules / payment & fees) ---------- */
.policy-row { display: flex; gap: 0.9rem; padding: 0.9rem 0; }
.policy-row + .policy-row { border-top: 1px solid var(--eh-border); }
.policy-row .policy-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--eh-radius-sm);
    background: var(--eh-primary-light);
    color: var(--eh-primary);
    font-size: 1.15rem;
}
.policy-row .policy-title { font-weight: 600; margin-bottom: 0.15rem; }

/* ---------- Room cards (shared property room types) ---------- */
.room-card { overflow: hidden; }
.room-card .room-thumb { object-fit: cover; min-height: 140px; border-radius: 0; }
.room-card .room-thumb-placeholder { background: var(--eh-primary-light); min-height: 140px; }

/* ---------- Detail grid (property details, house rules) ---------- */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}
@media (max-width: 767.98px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--eh-border);
    font-size: 0.9rem;
}
.detail-item:nth-child(odd) { padding-right: 1.5rem; }
.detail-item:nth-child(even) { padding-left: 1.5rem; border-left: 1px solid var(--eh-border); }
@media (max-width: 767.98px) {
    .detail-item:nth-child(even) { padding-left: 0; border-left: none; }
    .detail-item:nth-child(odd) { padding-right: 0; }
}
.detail-item .detail-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--eh-radius-sm);
    background: var(--eh-primary-light);
    color: var(--eh-primary);
    font-size: 0.95rem;
}
.detail-item .detail-label {
    color: var(--eh-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.detail-item .detail-value { font-weight: 600; }

/* ---------- Student listing view (Amber-style) ---------- */
.about-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gallery-main .gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--eh-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--eh-shadow);
    z-index: 2;
}
.gallery-main .gallery-nav:hover { background: #fff; }
.gallery-main .gallery-prev { left: 0.75rem; }
.gallery-main .gallery-next { right: 0.75rem; }
.room-card.border-accent { border-color: var(--eh-accent) !important; }
/* ==========================================================================
   Page preloader
   ========================================================================== */
.eh-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    background: var(--eh-surface);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.eh-preloader.eh-preloader-hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.eh-preloader-logo {
    height: 56px;
    width: auto;
    animation: eh-preloader-pulse 1.6s ease-in-out infinite;
}
.eh-preloader-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--eh-primary-light);
    border-top-color: var(--eh-primary);
    border-radius: 50%;
    animation: eh-preloader-spin 0.8s linear infinite;
}
.eh-preloader-text {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--eh-text-muted);
}
@keyframes eh-preloader-spin {
    to { transform: rotate(360deg); }
}
@keyframes eh-preloader-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.85; }
}
