/* ==========================================================================
   Knapsack Hostel — design system
   Built on Bootstrap 5.3. Brand tokens first, then shared components,
   then the three layouts: public site, auth pages and the app shell.
   ========================================================================== */

:root {
    --kh-navy: #060240;
    --kh-navy-700: #120c5c;
    --kh-navy-600: #231b7a;
    --kh-navy-050: #eeedf8;
    --kh-accent: #f24e62;       /* coral, from the "HOSTEL" in the logo */
    --kh-accent-050: #ffeef0;
    --kh-bg: #f5f6fb;
    --kh-surface: #ffffff;
    --kh-border: #e6e7f0;
    --kh-text: #16153a;
    --kh-muted: #6b6e86;
    --kh-success: #12a26a;
    --kh-danger: #e0424f;
    --kh-radius: 14px;
    --kh-radius-lg: 22px;
    --kh-shadow-sm: 0 1px 2px rgba(16, 14, 60, .06), 0 1px 3px rgba(16, 14, 60, .05);
    --kh-shadow: 0 10px 30px -12px rgba(16, 14, 60, .18);
    --kh-sidebar-w: 264px;

    /* Chart palette — validated for colour-blind separation and contrast on white. */
    --series-1: #5b5cdb;
    --series-1-strong: #3d34b0;
    --series-1-tint: #ecebfb;
    --series-2: #eb6834;
    --series-2-tint: #fdeee7;
    --chart-grid: #eef0f5;

    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: var(--kh-text);
    --bs-body-bg: var(--kh-bg);
    --bs-primary: var(--kh-navy);
    --bs-primary-rgb: 6, 2, 64;
    --bs-link-color: var(--kh-navy-600);
    --bs-link-color-rgb: 35, 27, 122;
    --bs-link-hover-color: var(--kh-navy);
    --bs-border-color: var(--kh-border);
    --bs-border-radius: 10px;
    --bs-focus-ring-color: rgba(35, 27, 122, .2);
}

body {
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--kh-text);
}

a {
    text-decoration: none;
}

::selection {
    background: var(--kh-navy);
    color: #fff;
}

/* ---------- Buttons ---------- */

.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-padding-x: 1.1rem;
    --bs-btn-padding-y: .6rem;
    --bs-btn-border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.btn-lg {
    --bs-btn-padding-x: 1.5rem;
    --bs-btn-padding-y: .85rem;
    --bs-btn-font-size: 1rem;
}

.btn-sm {
    --bs-btn-padding-x: .7rem;
    --bs-btn-padding-y: .35rem;
    --bs-btn-border-radius: 8px;
}

.btn-primary {
    --bs-btn-bg: var(--kh-navy);
    --bs-btn-border-color: var(--kh-navy);
    --bs-btn-hover-bg: var(--kh-navy-600);
    --bs-btn-hover-border-color: var(--kh-navy-600);
    --bs-btn-active-bg: var(--kh-navy-700);
    --bs-btn-active-border-color: var(--kh-navy-700);
    --bs-btn-disabled-bg: var(--kh-navy);
    --bs-btn-disabled-border-color: var(--kh-navy);
}

.btn-primary:hover {
    box-shadow: 0 8px 18px -8px rgba(6, 2, 64, .6);
}

.btn-outline-primary {
    --bs-btn-color: var(--kh-navy);
    --bs-btn-border-color: var(--kh-border);
    --bs-btn-hover-bg: var(--kh-navy-050);
    --bs-btn-hover-color: var(--kh-navy);
    --bs-btn-hover-border-color: var(--kh-navy-050);
    --bs-btn-active-bg: var(--kh-navy-050);
    --bs-btn-active-color: var(--kh-navy);
    --bs-btn-active-border-color: var(--kh-navy-050);
    background: var(--kh-surface);
}

.btn-accent {
    --bs-btn-bg: var(--kh-accent);
    --bs-btn-border-color: var(--kh-accent);
    --bs-btn-color: var(--kh-navy);
    --bs-btn-hover-bg: #e03a50;
    --bs-btn-hover-border-color: #e03a50;
    --bs-btn-hover-color: var(--kh-navy);
    --bs-btn-active-bg: #d98a12;
    --bs-btn-active-border-color: #d98a12;
}

.btn-soft-danger {
    --bs-btn-color: var(--kh-danger);
    --bs-btn-bg: #fdecee;
    --bs-btn-border-color: #fdecee;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--kh-danger);
    --bs-btn-hover-border-color: var(--kh-danger);
}

.btn-soft-primary {
    --bs-btn-color: var(--kh-navy-600);
    --bs-btn-bg: var(--kh-navy-050);
    --bs-btn-border-color: var(--kh-navy-050);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--kh-navy-600);
    --bs-btn-hover-border-color: var(--kh-navy-600);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--kh-border);
    background: var(--kh-surface);
    color: var(--kh-text);
}

.btn .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: .15em;
}

/* ---------- Forms ---------- */

.form-label {
    font-weight: 600;
    font-size: .875rem;
    margin-bottom: .4rem;
}

.form-control,
.form-select {
    border-radius: 10px;
    border-color: var(--kh-border);
    padding: .65rem .9rem;
    background-color: #fbfbfe;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--kh-navy-600);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(35, 27, 122, .1);
}

.form-text {
    color: var(--kh-muted);
}

.input-icon {
    position: relative;
}

.input-icon > .icon {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--kh-muted);
    pointer-events: none;
}

.input-icon > .form-control {
    padding-left: 2.6rem;
}

.input-icon > .toggle-password {
    position: absolute;
    right: .4rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--kh-muted);
    padding: .4rem .6rem;
}

.input-icon.has-toggle > .form-control {
    padding-right: 2.8rem;
}

.form-section-title {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--kh-muted);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.form-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--kh-border);
}

.upload-drop {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    border: 1.5px dashed var(--kh-border);
    border-radius: var(--kh-radius);
    background: #fbfbfe;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.upload-drop:hover {
    border-color: var(--kh-navy-600);
    background: var(--kh-navy-050);
}

.upload-drop.is-invalid {
    border-color: var(--kh-danger);
    background: #fdecee;
}

.upload-drop img {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--kh-navy-050);
    flex-shrink: 0;
}

/* ---------- Cards, badges, avatars ---------- */

.card {
    --bs-card-border-color: var(--kh-border);
    --bs-card-border-radius: var(--kh-radius);
    --bs-card-cap-bg: transparent;
    box-shadow: var(--kh-shadow-sm);
}

.card-header {
    padding: 1.1rem 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card-header h2,
.card-title {
    font-size: 1rem;
    margin: 0;
}

.card-body {
    padding: 1.35rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: var(--kh-accent-050);
    color: #9a5b00;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-soft.success { background: #e3f6ee; color: #0c7a4f; }
.badge-soft.danger  { background: #fdecee; color: #b42532; }
.badge-soft.primary { background: var(--kh-navy-050); color: var(--kh-navy-600); }
.badge-soft.neutral { background: #f0f1f6; color: var(--kh-muted); }
.badge-soft.accent  { background: var(--kh-accent-050); color: #c42a3f; }

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--kh-navy-050);
    color: var(--kh-navy-600);
    font-weight: 700;
    font-size: .85rem;
    object-fit: cover;
}

.avatar-sm { width: 36px; height: 36px; font-size: .75rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2rem; }

.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: var(--kh-muted);
}

.empty-state .icon {
    font-size: 2.25rem;
    color: #c4c6d8;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.05rem;
    margin-bottom: .35rem;
}

.alert {
    border-radius: 12px;
    border: 0;
    font-weight: 500;
}

.alert-success { background: #e3f6ee; color: #0c6b45; }
.alert-danger  { background: #fdecee; color: #a11f2b; }
.alert-info    { background: var(--kh-navy-050); color: var(--kh-navy-600); }
.alert-warning { background: var(--kh-accent-050); color: #8a5200; }

.progress {
    --bs-progress-height: .5rem;
    --bs-progress-bg: #eceef5;
    --bs-progress-bar-bg: var(--kh-navy-600);
    border-radius: 999px;
}

/* ---------- Tables ---------- */

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #f8f8fd;
    margin: 0;
    vertical-align: middle;
}

.table > thead th {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--kh-muted);
    background: #fafafd;
    border-bottom-width: 1px;
    padding: .85rem 1rem;
    white-space: nowrap;
}

.table > tbody td {
    padding: .85rem 1rem;
    border-color: var(--kh-border);
}

.table > tbody tr:last-child td {
    border-bottom: 0;
}

.person {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 200px;
}

.person strong {
    display: block;
    font-weight: 600;
}

.person small {
    color: var(--kh-muted);
}

/* DataTables (Bootstrap 5 integration) */
div.dataTables_wrapper div.dataTables_length,
div.dataTables_wrapper div.dataTables_filter,
div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_paginate {
    padding: 1rem 1.25rem;
    color: var(--kh-muted);
    font-size: .875rem;
}

div.dataTables_wrapper div.dataTables_filter input {
    border-radius: 10px;
    padding: .45rem .8rem;
    margin-left: .5rem;
    min-width: 220px;
}

div.dataTables_wrapper .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    border: 0;
    color: var(--kh-text);
}

div.dataTables_wrapper .page-item.active .page-link {
    background: var(--kh-navy);
    color: #fff;
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .btn { transition: none; }
}

/* ==========================================================================
   Public website
   ========================================================================== */

.public-body {
    background: var(--kh-surface);
}

/* Slim contact bar above the navbar */
.site-topbar {
    background: var(--kh-navy);
    color: rgba(255, 255, 255, .7);
    font-size: .8rem;
}

.site-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-block: .5rem;
}

.site-topbar .icon {
    color: var(--kh-accent);
    margin-right: .35rem;
}

.site-topbar-links {
    display: flex;
    gap: 1.5rem;
}

.site-topbar a {
    color: rgba(255, 255, 255, .78);
}

.site-topbar a:hover {
    color: #fff;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    isolation: isolate;
    border-bottom: 1px solid transparent;
    transition: box-shadow .25s ease, border-color .25s ease;
}

/* The frosted background sits on a layer behind the header. A backdrop-filter on the header itself
   would make it the frame for the "fixed" phone menu, which then hangs off the side and widens the page. */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
}

.site-header .navbar {
    padding-block: .9rem;
    transition: padding .25s ease;
}

.site-header.is-scrolled {
    border-bottom-color: var(--kh-border);
    box-shadow: 0 10px 30px -18px rgba(16, 14, 60, .35);
}

.site-header.is-scrolled .navbar {
    padding-block: .55rem;
}

.site-header .site-brand .brand-mark {
    transition: width .25s ease, height .25s ease;
}

.site-header.is-scrolled .site-brand .brand-mark {
    width: 38px;
    height: 38px;
}

.site-header .nav-link {
    position: relative;
    font-weight: 600;
    color: var(--kh-muted);
    padding-inline: .85rem !important;
    border-radius: 8px;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
    color: var(--kh-navy);
}

/* Desktop: an accent underline marks the current section. */
@media (min-width: 992px) {
    .site-header .nav-link::after {
        content: "";
        position: absolute;
        left: .85rem;
        right: .85rem;
        bottom: .2rem;
        height: 2px;
        border-radius: 2px;
        background: var(--kh-accent);
        transform: scaleX(0);
        transition: transform .2s ease;
    }

    .site-header .nav-link:hover::after,
    .site-header .nav-link.active::after {
        transform: scaleX(1);
    }

    .site-nav-panel .offcanvas-body {
        display: flex;
        align-items: center;
        flex: 1;
    }

    .site-nav-links {
        margin: 0 auto;
        gap: .25rem;
    }
}

.site-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: .25rem;
    border-radius: 50%;
    background: var(--kh-success);
    vertical-align: middle;
    box-shadow: 0 0 0 3px rgba(18, 162, 106, .18);
}

.site-nav-actions {
    display: flex;
    gap: .5rem;
}

.site-login-menu {
    min-width: 290px;
    padding: .5rem;
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius);
    box-shadow: var(--kh-shadow);
}

.site-login-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .75rem;
    border-radius: 10px;
    white-space: normal;
}

.site-login-menu .dropdown-item:hover,
.site-login-menu .dropdown-item:focus {
    background: var(--kh-bg);
}

.site-login-menu .stat-icon {
    width: 40px;
    height: 40px;
}

.site-login-menu strong {
    display: block;
    font-size: .9rem;
}

.site-login-menu small {
    color: var(--kh-muted);
    font-size: .78rem;
}

.site-menu-toggle {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--kh-border);
    border-radius: 12px;
    background: var(--kh-surface);
    color: var(--kh-navy);
    font-size: 1.1rem;
}

/* Phones: links open in a slide-in panel */
@media (max-width: 991.98px) {
    .site-nav-panel {
        --bs-offcanvas-width: min(340px, 88vw);
    }

    .site-nav-panel .offcanvas-header {
        padding: 1.1rem 1.25rem;
        border-bottom: 1px solid var(--kh-border);
    }

    .site-nav-panel .offcanvas-body {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        padding: 1rem 1.25rem 1.5rem;
    }

    .site-nav-links .nav-link {
        display: flex;
        align-items: center;
        gap: .85rem;
        padding: .8rem .85rem !important;
        font-size: 1rem;
        color: var(--kh-text);
    }

    .site-nav-links .nav-link .icon {
        color: var(--kh-navy-600);
    }

    .site-nav-links .nav-link.active,
    .site-nav-links .nav-link:hover {
        background: var(--kh-navy-050);
    }

    .site-nav-actions {
        flex-direction: column-reverse;
    }

    .site-nav-actions .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        margin-top: .5rem !important;
        min-width: 0;
    }

    .site-nav-contact {
        margin-top: auto;
        padding: 1rem;
        border-radius: var(--kh-radius);
        background: var(--kh-bg);
        display: grid;
        gap: .5rem;
        font-size: .9rem;
    }

    .site-nav-contact p {
        margin: 0 0 .25rem;
        color: var(--kh-muted);
    }

    .site-nav-contact a {
        font-weight: 600;
    }
}

/* Section anchors land below the sticky header. */
[id] {
    scroll-margin-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
    .site-header, .site-header .navbar, .site-header .site-brand .brand-mark { transition: none; }
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--kh-navy);
    letter-spacing: -.02em;
}

.site-brand .brand-mark {
    border-radius: 12px;
}

.site-brand em {
    font-style: normal;
    color: var(--kh-accent);
}

.site-brand-light {
    color: #fff;
}

.section {
    padding-block: clamp(4rem, 8vw, 6.5rem);
}

.section-muted {
    background: var(--kh-bg);
}

.section-heading {
    max-width: 640px;
    margin: 0 auto 3rem;
    text-align: center;
}

.section-heading h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin: .85rem 0 .75rem;
}

.section-heading p {
    color: var(--kh-muted);
    font-size: 1.05rem;
    margin: 0;
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(3rem, 7vw, 6rem);
    background:
        radial-gradient(800px 400px at 90% 10%, rgba(242, 78, 98, .14), transparent 60%),
        radial-gradient(700px 500px at 0% 100%, rgba(35, 27, 122, .08), transparent 60%);
}

.hero h1 {
    font-size: clamp(2.25rem, 5.2vw, 3.75rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.035em;
    margin: 1.1rem 0 1.25rem;
}

.hero h1 .brand-word {
    color: var(--kh-navy-600);
    background: linear-gradient(120deg, var(--kh-navy-600), #5b5cdb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead {
    font-size: 1.125rem;
    color: var(--kh-muted);
    max-width: 540px;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--kh-border);
}

.hero-stats strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--kh-navy);
}

.hero-stats > div > span {
    color: var(--kh-muted);
    font-size: .875rem;
}

.hero-visual {
    position: relative;
    max-width: 520px;
    margin-inline: auto;
}

.hero-visual-frame {
    border-radius: 32px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    box-shadow: var(--kh-shadow);
}

.hero-visual-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-float {
    position: absolute;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1.1rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--kh-shadow);
    font-size: .875rem;
}

.hero-float .icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    padding: 9px;
    box-sizing: border-box;
    background: var(--kh-navy-050);
    color: var(--kh-navy-600);
}

.hero-float strong {
    display: block;
}

.hero-float small {
    color: var(--kh-muted);
}

.hero-float-1 { left: -24px; bottom: 14%; }
.hero-float-2 { right: -18px; top: 10%; }

.hero-visual-inset {
    position: absolute;
    right: -28px;
    bottom: -28px;
    width: 38%;
    aspect-ratio: 1;
    border-radius: 24px;
    overflow: hidden;
    border: 6px solid #fff;
    box-shadow: var(--kh-shadow);
}

.hero-visual-inset img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-availability {
    color: inherit;
    transition: transform .2s ease;
}

.hero-availability:hover {
    transform: translateY(-2px);
    color: inherit;
}

.live-dot {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--kh-success);
    flex-shrink: 0;
}

.live-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--kh-success);
    animation: live-pulse 1.8s ease-out infinite;
}

.hero-availability.is-full .live-dot,
.hero-availability.is-full .live-dot::after {
    background: var(--kh-danger);
}

@keyframes live-pulse {
    from { transform: scale(1); opacity: .6; }
    to { transform: scale(2.6); opacity: 0; }
}

@media (max-width: 575.98px) {
    .hero-visual-inset { right: 8px; bottom: -20px; }
}

@media (prefers-reduced-motion: reduce) {
    .live-dot::after { animation: none; }
}

/* Highlights strip */
.highlights {
    border-block: 1px solid var(--kh-border);
    background: var(--kh-surface);
}

.highlights ul {
    list-style: none;
    margin: 0;
    padding: 1.1rem 3rem 1.1rem 0;
    display: flex;
    flex-shrink: 0;
    gap: 3rem;
}

.highlights li {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 600;
    color: var(--kh-muted);
}

.highlights .icon {
    color: var(--kh-navy-600);
}

/* How to book */
.step-cards {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    counter-reset: none;
}

.step-cards li {
    position: relative;
    padding: 1.75rem;
    border-radius: var(--kh-radius-lg);
    border: 1px solid var(--kh-border);
    background: var(--kh-surface);
}

/* Connector line between steps on wide screens. */
.step-cards li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 3.35rem;
    right: -1.5rem;
    width: 1.5rem;
    border-top: 2px dashed var(--kh-border);
}

.step-number {
    position: absolute;
    top: 1.25rem;
    right: 1.4rem;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--kh-navy-050);
}

.step-cards h3 {
    font-size: 1.05rem;
    margin-bottom: .4rem;
}

.step-cards p {
    color: var(--kh-muted);
    margin-bottom: .75rem;
}

.step-link {
    font-weight: 700;
    font-size: .875rem;
}

@media (max-width: 991.98px) {
    .step-cards { grid-template-columns: repeat(2, 1fr); }
    .step-cards li::after { display: none; }
}

@media (max-width: 575.98px) {
    .step-cards { grid-template-columns: 1fr; }
}

/* Student app promo */
.app-promo {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: clamp(2rem, 5vw, 3.5rem);
    background:
        radial-gradient(520px 300px at 85% 20%, rgba(91, 79, 216, .55), transparent 65%),
        var(--kh-navy);
    color: rgba(255, 255, 255, .78);
}

.app-promo h2 {
    color: #fff;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    margin: 1rem 0 .75rem;
}

.app-promo .eyebrow {
    background: rgba(242, 78, 98, .16);
    color: var(--kh-accent);
}

.app-promo-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 2rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem 1.5rem;
}

.app-promo-list li {
    display: flex;
    gap: .65rem;
    align-items: center;
    color: #fff;
    font-weight: 500;
}

.app-promo-list .icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    padding: 8px;
    box-sizing: border-box;
    flex-shrink: 0;
    background: rgba(255, 255, 255, .1);
    color: var(--kh-accent);
}

@media (max-width: 575.98px) {
    .app-promo-list { grid-template-columns: 1fr; }
}

.phone-mockup {
    width: 260px;
    margin: 0 auto -6rem;
    padding: 12px;
    border-radius: 40px;
    background: #1d1a4d;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .08);
    transform: rotate(-4deg);
}

.phone-screen {
    border-radius: 30px;
    background: var(--kh-bg);
    padding: 1.25rem 1rem 0;
    min-height: 430px;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    color: var(--kh-text);
}

.phone-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .35rem;
    font-size: .8rem;
}

.phone-header img { border-radius: 10px; }
.phone-header strong { display: block; }
.phone-header small { color: var(--kh-muted); }

.phone-card {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem;
    border-radius: 14px;
    background: #fff;
    font-size: .75rem;
    font-weight: 600;
    box-shadow: var(--kh-shadow-sm);
}

.phone-card .icon { color: var(--kh-navy-600); }
.phone-card.accent { background: var(--kh-navy); color: #fff; }
.phone-card.accent .icon { color: var(--kh-accent); }

.phone-tabbar {
    margin-top: auto;
    display: flex;
    justify-content: space-around;
    padding: .9rem 0 1.1rem;
    border-top: 1px solid var(--kh-border);
    color: var(--kh-muted);
}

.phone-tabbar .icon:first-child { color: var(--kh-navy-600); }

/* FAQ */
.faq-title {
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    margin: .85rem 0 .75rem;
}

.faq .accordion-item {
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius) !important;
    overflow: hidden;
    margin-bottom: .75rem;
    background: var(--kh-surface);
}

.faq .accordion-button {
    font-weight: 700;
    font-size: 1rem;
    color: var(--kh-text);
    padding: 1.15rem 1.35rem;
    background: var(--kh-surface);
    box-shadow: none;
}

.faq .accordion-button:not(.collapsed) {
    color: var(--kh-navy-600);
}

.faq .accordion-button:focus-visible {
    box-shadow: inset 0 0 0 2px var(--kh-navy-600);
}

.faq .accordion-body {
    padding: 0 1.35rem 1.25rem;
    color: var(--kh-muted);
    line-height: 1.7;
}

/* Sticky call / book bar on phones */
.mobile-cta {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-cta {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 1030;
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: .5rem;
        padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        backdrop-filter: saturate(180%) blur(12px);
        border-top: 1px solid var(--kh-border);
    }

    .has-mobile-cta .site-footer {
        padding-bottom: 4.5rem;
    }
}

/* Photo viewer extras */
.lightbox-caption {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .75rem;
    color: rgba(255, 255, 255, .85);
    font-size: .9rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .92);
    color: var(--kh-navy);
    box-shadow: var(--kh-shadow);
}

.lightbox-nav.prev { left: .75rem; }
.lightbox-nav.next { right: .75rem; }

.lightbox-nav:hover {
    background: #fff;
}

@media (max-width: 575.98px) {
    .hero-float-1 { left: 8px; }
    .hero-float-2 { right: 8px; }
}

/* Feature cards */
.feature-card {
    height: 100%;
    padding: 1.75rem;
    border-radius: var(--kh-radius-lg);
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    transition: transform .2s ease, box-shadow .2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--kh-shadow);
}

.feature-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--kh-navy);
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: .5rem;
}

.feature-card p {
    color: var(--kh-muted);
    margin: 0;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 240px;
    gap: 1rem;
}

/* Six photos: a 2×2 feature image plus five tiles fills a 3×3 grid exactly. */
.gallery-grid .gallery-item:first-child {
    grid-row: span 2;
    grid-column: span 2;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--kh-radius-lg);
    padding: 0;
    border: 0;
    background: var(--kh-navy-050);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.gallery-item::after {
    content: "\f00e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.5rem;
    background: rgba(6, 2, 64, .45);
    opacity: 0;
    transition: opacity .25s ease;
}

.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover::after,
.gallery-item:focus-visible::after { opacity: 1; }

@media (max-width: 767.98px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    .gallery-grid .gallery-item:first-child {
        grid-row: auto;
        grid-column: auto;
    }
}

.lightbox-modal .modal-content {
    background: transparent;
    border: 0;
}

.lightbox-modal img {
    width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--kh-radius);
}

.lightbox-modal .btn-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
}

/* Pricing */
.price-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-radius: var(--kh-radius-lg);
    border: 1px solid var(--kh-border);
    background: var(--kh-surface);
}

.price-card.featured {
    background: var(--kh-navy);
    border-color: var(--kh-navy);
    color: #fff;
    box-shadow: 0 24px 50px -20px rgba(6, 2, 64, .55);
}

.price-card.featured h3,
.price-card.featured .price { color: #fff; }

.price-card.featured .price-meta,
.price-card.featured li { color: rgba(255, 255, 255, .78); }

.price-card.featured li .icon { color: var(--kh-accent); }

.price-tag {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--kh-accent);
    color: var(--kh-navy);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .3rem .65rem;
    border-radius: 999px;
}

.price-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.price {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--kh-navy);
    line-height: 1;
}

.price small {
    font-size: 1rem;
    font-weight: 700;
    margin-right: .25rem;
}

.price-meta {
    color: var(--kh-muted);
    font-size: .875rem;
    margin: .5rem 0 1.5rem;
}

.price-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: grid;
    gap: .7rem;
    color: var(--kh-muted);
}

.price-card li .icon {
    color: var(--kh-success);
    margin-right: .5rem;
}

.price-card .btn {
    margin-top: auto;
}

/* Steps */
.steps {
    counter-reset: step;
    display: grid;
    gap: 1rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.steps li {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--kh-radius);
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
}

.steps li::before {
    counter-increment: step;
    content: counter(step);
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--kh-navy);
    color: #fff;
    font-weight: 700;
}

.steps h3 {
    font-size: 1rem;
    margin: .35rem 0 .25rem;
}

.steps p {
    color: var(--kh-muted);
    margin: 0;
}

/* Bank details */
.detail-list {
    display: grid;
    gap: .25rem;
    margin: 0;
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 0;
    border-bottom: 1px dashed var(--kh-border);
}

.detail-row:last-child { border-bottom: 0; }

.detail-row dt {
    font-weight: 500;
    color: var(--kh-muted);
    font-size: .875rem;
}

.detail-row dd {
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .5rem;
    text-align: right;
}

.copy-btn {
    border: 0;
    background: var(--kh-navy-050);
    color: var(--kh-navy-600);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: .8rem;
}

/* Contact */
.contact-card {
    display: flex;
    gap: 1rem;
    padding: 1.35rem;
    border-radius: var(--kh-radius);
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
}

.contact-card .feature-icon {
    margin: 0;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    font-size: 1rem;
}

.contact-card h3 {
    font-size: 1rem;
    margin-bottom: .35rem;
}

.contact-card a {
    display: block;
    color: var(--kh-muted);
    font-weight: 500;
}

.contact-card a:hover { color: var(--kh-navy); }

.map-frame {
    border-radius: var(--kh-radius-lg);
    overflow: hidden;
    border: 1px solid var(--kh-border);
    height: 100%;
    min-height: 360px;
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
    display: block;
}

/* CTA band */
.cta-band {
    border-radius: 28px;
    padding: clamp(2rem, 5vw, 3.5rem);
    background:
        radial-gradient(500px 260px at 100% 0%, rgba(242, 78, 98, .35), transparent 60%),
        var(--kh-navy);
    color: #fff;
}

.cta-band h2 {
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.cta-band p {
    color: rgba(255, 255, 255, .75);
    margin: 0;
}

/* Page hero (sub pages) */
.page-hero {
    padding-block: clamp(2.5rem, 5vw, 4rem);
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(242, 78, 98, .12), transparent 60%),
        var(--kh-bg);
    border-bottom: 1px solid var(--kh-border);
}

.page-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 800;
    margin: .85rem 0 .5rem;
}

.page-hero p {
    color: var(--kh-muted);
    max-width: 620px;
    margin: 0;
}

/* Footer */
.site-footer {
    background: var(--kh-navy);
    color: rgba(255, 255, 255, .65);
    padding-top: 4rem;
}

.site-footer h3 {
    color: #fff;
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .6rem;
}

.site-footer a {
    color: rgba(255, 255, 255, .7);
}

.site-footer a:hover { color: #fff; }

.site-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem;
    margin-top: 3rem;
    padding-block: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .875rem;
}

/* ==========================================================================
   Auth pages
   ========================================================================== */

.auth-body {
    background: var(--kh-surface);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.auth-visual {
    position: relative;
    background: url("../../images/p1.jpg") center / cover no-repeat;
}

.auth-visual-overlay {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
    color: #fff;
    background: linear-gradient(180deg, rgba(6, 2, 64, .55) 0%, rgba(6, 2, 64, .92) 100%);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
}

.auth-brand .brand-mark {
    border-radius: 12px;
    padding: 2px;
}

.auth-visual h2 {
    color: #fff;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    max-width: 420px;
}

.auth-visual p {
    color: rgba(255, 255, 255, .78);
    font-size: 1.05rem;
}

.auth-perks {
    list-style: none;
    padding: 0;
    margin: 1.75rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.auth-perks li {
    padding: .45rem .9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: .85rem;
    font-weight: 500;
}

.auth-perks .icon { color: var(--kh-accent); margin-right: .35rem; }

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-back {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: .5rem;
    color: var(--kh-muted);
    font-weight: 600;
    font-size: .875rem;
    margin-bottom: 2.5rem;
}

.auth-back:hover { color: var(--kh-navy); }

.auth-title {
    font-size: 1.9rem;
    font-weight: 800;
    margin: .9rem 0 .4rem;
}

.auth-subtitle {
    color: var(--kh-muted);
    margin-bottom: 2rem;
}

.auth-footer-link {
    margin-top: 1.75rem;
    text-align: center;
    color: var(--kh-muted);
    font-size: .9rem;
}

@media (max-width: 991.98px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
}

/* ==========================================================================
   App shell (admin + student portals)
   ========================================================================== */

.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--kh-sidebar-w);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(320px 220px at 0% 0%, rgba(91, 79, 216, .35), transparent 70%),
        var(--kh-navy);
    color: rgba(255, 255, 255, .7);
    transition: transform .25s ease, width .25s ease;
}

.app-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: 1.25rem 1rem 1rem 1.25rem;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}

.app-brand:hover {
    color: #fff;
}

.app-brand .brand-mark {
    border-radius: 10px;
    padding: 2px;
}

.app-brand small {
    display: block;
    font-size: .72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .55);
    letter-spacing: .02em;
}

.app-collapse {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .7);
    transition: background-color .15s ease, transform .25s ease;
}

.app-collapse:not(.d-lg-grid) {
    display: grid;
}

.app-collapse:hover {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.app-nav {
    flex: 1;
    overflow-y: auto;
    padding: .25rem .9rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
}

.app-nav-section + .app-nav-section {
    margin-top: 1rem;
}

.app-nav-heading {
    margin: 0 0 .35rem;
    padding: 0 .85rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .38);
    white-space: nowrap;
}

.app-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .8rem;
    width: 100%;
    margin-bottom: .15rem;
    padding: .62rem .85rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, .72);
    font-weight: 500;
    font-size: .9rem;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}

.app-nav-link .icon {
    width: 1.1rem;
    text-align: center;
    opacity: .85;
}

.app-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

.app-nav-link.active {
    color: var(--kh-navy);
    background: #fff;
    font-weight: 700;
    box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .45);
}

.app-nav-link.active .icon {
    color: var(--kh-navy-600);
    opacity: 1;
}

.app-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Count / alert badges on nav items */
.app-badge {
    margin-left: auto;
    min-width: 22px;
    height: 20px;
    padding: 0 .4rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1;
}

.app-badge.is-count {
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .75);
}

.app-badge.is-alert {
    background: var(--kh-danger);
    color: #fff;
}

.app-badge.is-dot {
    min-width: 0;
    width: 9px;
    height: 9px;
    padding: 0;
    background: var(--kh-accent);
    box-shadow: 0 0 0 3px rgba(242, 78, 98, .25);
}

.app-badge[hidden] {
    display: none;
}

.app-nav-link.active .app-badge.is-count {
    background: var(--kh-navy-050);
    color: var(--kh-navy-600);
}

/* Signed-in user, pinned to the bottom */
.app-user-card {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 .9rem 1rem;
    padding: .55rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
}

.app-user-card-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .65rem;
    color: #fff;
    line-height: 1.2;
}

.app-user-card-link:hover {
    color: #fff;
}

.app-user-card .avatar {
    background: var(--kh-accent);
    color: var(--kh-navy);
}

.app-user-card strong {
    display: block;
    font-size: .85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user-card small {
    color: rgba(255, 255, 255, .55);
    font-size: .72rem;
}

.app-logout {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: rgba(255, 255, 255, .65);
    transition: background-color .15s ease, color .15s ease;
}

.app-logout:hover {
    background: rgba(224, 66, 79, .2);
    color: #ffb3ba;
}

.app-main {
    margin-left: var(--kh-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .25s ease;
}

/* Desktop: sidebar collapsed to icons */
@media (min-width: 992px) {
    .sidebar-collapsed {
        --kh-sidebar-w: 84px;
    }

    .sidebar-collapsed .app-label,
    .sidebar-collapsed .app-badge.is-count {
        display: none;
    }

    .sidebar-collapsed .app-sidebar-head {
        flex-direction: column;
        padding-inline: .75rem;
    }

    .sidebar-collapsed .app-collapse {
        transform: rotate(180deg);
    }

    .sidebar-collapsed .app-nav {
        padding-inline: .9rem;
    }

    .sidebar-collapsed .app-nav-section + .app-nav-section {
        margin-top: .6rem;
        padding-top: .6rem;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }

    .sidebar-collapsed .app-nav-link {
        justify-content: center;
        padding-inline: 0;
    }

    /* Counts become a small marker on the icon. */
    .sidebar-collapsed .app-badge.is-alert,
    .sidebar-collapsed .app-badge.is-dot {
        position: absolute;
        top: 5px;
        right: 9px;
        min-width: 0;
        width: 9px;
        height: 9px;
        padding: 0;
        font-size: 0;
    }

    .sidebar-collapsed .app-user-card {
        flex-direction: column;
        margin-inline: .75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-sidebar, .app-main, .app-collapse { transition: none; }
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    background: rgba(245, 246, 251, .88);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--kh-border);
}

.app-topbar-title {
    flex: 1;
    min-width: 0;
}

.app-topbar-title h1 {
    font-size: 1.3rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-topbar-title p {
    margin: .1rem 0 0;
    color: var(--kh-muted);
    font-size: .85rem;
}

.app-user {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .35rem .85rem .35rem .35rem;
    border-radius: 999px;
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    line-height: 1.2;
    color: var(--kh-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.app-user:hover {
    color: var(--kh-text);
    border-color: #d5d7e6;
    box-shadow: var(--kh-shadow-sm);
}

/* Admin top bar: search + notifications */
.app-search {
    position: relative;
    align-items: center;
    width: min(320px, 30vw);
}

.app-search > .icon {
    position: absolute;
    left: .9rem;
    color: var(--kh-muted);
    pointer-events: none;
}

.app-search .form-control {
    padding: .55rem 2.4rem .55rem 2.5rem;
    border-radius: 999px;
    background: var(--kh-surface);
}

.app-search kbd {
    position: absolute;
    right: .7rem;
    padding: .1rem .45rem;
    border-radius: 6px;
    background: var(--kh-bg);
    border: 1px solid var(--kh-border);
    color: var(--kh-muted);
    font-size: .7rem;
    font-family: inherit;
}

.app-bell {
    position: relative;
    border-radius: 50%;
}

.app-bell-count {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 .3rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--kh-danger);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    border: 2px solid var(--kh-bg);
}

.app-notifications {
    width: min(360px, 92vw);
    padding: 0;
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius);
    box-shadow: var(--kh-shadow);
    overflow: hidden;
}

.app-notifications-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--kh-border);
}

.app-notification {
    display: flex;
    gap: .75rem;
    padding: .8rem 1rem;
    color: var(--kh-text);
    border-bottom: 1px solid var(--kh-border);
    font-size: .85rem;
}

.app-notification:hover {
    background: var(--kh-bg);
    color: var(--kh-text);
}

.app-notification > span:last-child {
    min-width: 0;
}

.app-notification strong {
    display: block;
    font-weight: 600;
}

.app-notification span span {
    display: block;
    color: var(--kh-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-notification time {
    color: var(--kh-muted);
    font-size: .72rem;
}

.app-notifications-empty {
    margin: 0;
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--kh-muted);
    font-size: .875rem;
}

.app-notifications-empty .icon {
    color: var(--kh-success);
    margin-right: .25rem;
}

.app-notifications-all {
    display: block;
    padding: .75rem;
    text-align: center;
    font-weight: 700;
    font-size: .85rem;
    background: var(--kh-bg);
}

.app-user strong {
    display: block;
    font-size: .85rem;
}

.app-user small {
    color: var(--kh-muted);
    font-size: .72rem;
}

.app-content {
    flex: 1;
    padding: clamp(1rem, 3vw, 2rem);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.app-footer {
    padding: 1.25rem clamp(1rem, 3vw, 2rem);
    color: var(--kh-muted);
    font-size: .8rem;
}

.app-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .app-main {
        margin-left: 0;
    }

    .sidebar-open .app-sidebar {
        transform: none;
        box-shadow: 20px 0 50px rgba(6, 2, 64, .25);
    }

    .sidebar-open .app-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1035;
        background: rgba(6, 2, 64, .35);
    }
}

/* ---------- Student portal as an installed app ---------- */

/* "Get the app" stands out in the student sidebar. */
.app-nav-link[href="install_app.php"]:not(.active) {
    background: rgba(242, 78, 98, .14);
    color: #ff9aa7;
}

.app-tab-icon {
    position: relative;
    display: inline-block;
}

.app-tab-icon .app-badge.is-dot {
    position: absolute;
    top: -2px;
    right: -6px;
}

.app-nav-link[href="install_app.php"]:not(.active):hover {
    background: rgba(242, 78, 98, .24);
    color: #fff;
}

.app-tabbar {
    display: none;
}

@media (max-width: 991.98px) {
    .app-student .app-tabbar {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 1030;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        backdrop-filter: saturate(180%) blur(12px);
        border-top: 1px solid var(--kh-border);
    }

    .app-tabbar a,
    .app-tabbar button {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .2rem;
        padding: .45rem 0;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: var(--kh-muted);
        font-size: .7rem;
        font-weight: 600;
    }

    .app-tabbar .icon {
        font-size: 1.15rem;
    }

    .app-tabbar .active {
        color: var(--kh-navy-600);
        background: var(--kh-navy-050);
    }

    /* The tab bar replaces the hamburger, and content must clear it. */
    .app-student .app-topbar [data-sidebar-toggle] {
        display: none;
    }

    .app-student .app-main {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .app-student .app-footer {
        display: none;
    }
}

/* Installed app: respect the phone's notch / status bar. */
.is-standalone .app-topbar {
    padding-top: calc(1rem + env(safe-area-inset-top));
}

.install-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--kh-radius);
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    box-shadow: var(--kh-shadow-sm);
}

.install-banner[hidden] {
    display: none;
}

.install-banner img {
    border-radius: 12px;
    flex-shrink: 0;
}

.install-banner > div {
    flex: 1;
    min-width: 0;
}

.install-banner strong {
    display: block;
}

.install-banner span {
    color: var(--kh-muted);
    font-size: .875rem;
}

/* ---------- SMS ---------- */

.sms-option {
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: var(--kh-navy-050);
}

.sms-option .form-check-input {
    margin-top: .2rem;
}

.audience-picker {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.audience-picker .btn-check:checked + .btn {
    background: var(--kh-navy);
    border-color: var(--kh-navy);
    color: #fff;
}

.audience-field[hidden] {
    display: none;
}

.code-input {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: .5em;
    padding-left: 1.25rem;
}

.form-check-input:checked {
    background-color: var(--kh-navy-600);
    border-color: var(--kh-navy-600);
}

/* Stat tiles */
.stat-card {
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem;
    border-radius: var(--kh-radius);
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    box-shadow: var(--kh-shadow-sm);
}

.stat-card .stat-label {
    color: var(--kh-muted);
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: .35rem;
}

.stat-card .stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.stat-card .stat-meta {
    color: var(--kh-muted);
    font-size: .8rem;
    margin-top: .35rem;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 1.05rem;
    background: var(--kh-navy-050);
    color: var(--kh-navy-600);
}

.stat-icon.accent  { background: var(--kh-accent-050); color: #c42a3f; }
.stat-icon.success { background: #e3f6ee; color: var(--kh-success); }
.stat-icon.danger  { background: #fdecee; color: var(--kh-danger); }

/* Room grid on dashboard */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: .5rem;
}

.room-chip {
    padding: .55rem .25rem;
    border-radius: 10px;
    text-align: center;
    font-size: .8rem;
    font-weight: 700;
    border: 1px solid var(--kh-border);
    background: #fbfbfe;
    color: var(--kh-muted);
}

.room-chip.taken {
    background: var(--kh-navy);
    border-color: var(--kh-navy);
    color: #fff;
}

/* Occupied beds carry the occupant's gender as colour + icon, never colour alone. */
.room-chip.male,
.room-chip-key.male {
    background: var(--series-1-tint);
    border-color: var(--series-1);
    color: var(--series-1-strong);
}

.room-chip.female,
.room-chip-key.female {
    background: var(--series-2-tint);
    border-color: var(--series-2);
    color: #a8401a;
}

.room-chip .icon {
    font-size: .7rem;
    margin-right: .15rem;
}

.room-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .8rem;
    color: var(--kh-muted);
    font-weight: 600;
}

.room-legend > span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.room-chip-key {
    width: 22px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid var(--kh-border);
    background: #fbfbfe;
    display: inline-grid;
    place-items: center;
    font-size: .6rem;
}

.room-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.room-summary > div {
    padding: .75rem 1rem;
    border-radius: 12px;
    background: var(--kh-bg);
}

.room-summary strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
}

.room-summary span {
    font-size: .8rem;
    color: var(--kh-muted);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: .35rem;
    vertical-align: middle;
}

/* Charts */
.card-subtitle {
    margin: .15rem 0 0;
    color: var(--kh-muted);
    font-size: .8rem;
}

.chart-box {
    position: relative;
    width: 100%;
}

.chart-mini-title {
    font-size: .8rem;
    font-weight: 700;
    color: var(--kh-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .75rem;
}

.chart-data {
    margin-top: .75rem;
    font-size: .8rem;
}

.chart-data summary {
    color: var(--kh-muted);
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
}

.chart-data summary:hover {
    color: var(--kh-navy-600);
}

.chart-data .table {
    margin-top: .5rem;
    font-size: .8rem;
}

.chart-data .table td,
.chart-data .table th {
    padding: .4rem .5rem;
}

/* Gender split bar */
.split-bar {
    display: flex;
    gap: 2px;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--chart-grid);
}

.split-male { background: var(--series-1); }
.split-female { background: var(--series-2); }

.split-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: 1rem;
}

.split-legend > div {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .5rem;
    align-items: center;
}

.split-legend strong {
    grid-column: 2;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.split-legend .text-muted {
    grid-column: 2;
    font-size: .8rem;
}

.split-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--kh-muted);
}

.legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* Data quality */
.quality-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quality-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .7rem 0;
    border-bottom: 1px solid var(--kh-border);
    font-size: .9rem;
}

.quality-list li:last-child {
    border-bottom: 0;
}

/* Activity feed */
.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-list li {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: .8rem 0;
    border-bottom: 1px solid var(--kh-border);
}

.activity-list li:last-child {
    border-bottom: 0;
}

.activity-list li > div {
    flex: 1;
    min-width: 0;
    font-size: .875rem;
}

.activity-list strong {
    display: block;
    font-weight: 600;
}

.activity-list span:not(.activity-icon) {
    display: block;
    color: var(--kh-muted);
    font-size: .8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-list time {
    color: var(--kh-muted);
    font-size: .75rem;
    white-space: nowrap;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: .8rem;
}

.activity-icon.registration { background: var(--series-1-tint); color: var(--series-1-strong); }
.activity-icon.issue { background: #fdecee; color: var(--kh-danger); }

/* Profile */
.profile-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--kh-radius-lg);
    background:
        radial-gradient(500px 220px at 100% 0%, rgba(242, 78, 98, .35), transparent 60%),
        var(--kh-navy);
    color: #fff;
    padding: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.profile-hero .avatar-xl {
    border: 4px solid rgba(255, 255, 255, .9);
}

.profile-hero h2 {
    color: #fff;
    font-size: 1.6rem;
    margin: 0 0 .35rem;
}

.profile-hero p {
    color: rgba(255, 255, 255, .75);
    margin: 0;
}

.profile-hero .badge-soft {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0;
}

.info-item {
    padding: 1rem 1.35rem;
    border-bottom: 1px solid var(--kh-border);
}

.info-item dt {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--kh-muted);
    margin-bottom: .3rem;
}

.info-item dd {
    margin: 0;
    font-weight: 600;
}

/* Announcements */
.announcement-list {
    display: grid;
    gap: 1rem;
}

.announcement-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border-radius: var(--kh-radius);
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    box-shadow: var(--kh-shadow-sm);
}

.announcement-card .stat-icon {
    width: 40px;
    height: 40px;
}

.announcement-body {
    flex: 1;
    min-width: 0;
}

.announcement-text {
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.announcement-meta {
    color: var(--kh-muted);
    font-size: .8rem;
    margin-bottom: .35rem;
    font-weight: 600;
}

/* ==========================================================================
   Illustrations (inline SVG from assets/svg, see svg() in helpers.php)
   Colours come from brand tokens so every drawing matches the theme.
   ========================================================================== */

.illustration {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.illustration * {
    transform-box: fill-box;
    transform-origin: center;
}

.s-navy        { fill: var(--kh-navy); }
.s-indigo      { fill: var(--series-1); }
.s-indigo-soft { fill: #cfcaf5; }
.s-tint        { fill: var(--kh-navy-050); }
.s-accent      { fill: var(--kh-accent); }
.s-paper       { fill: #fff; stroke: var(--kh-border); stroke-width: 2; }
.s-line        { fill: #dfe0ec; }
.s-window      { fill: #2f2885; }
.s-trunk       { fill: #8a6a4a; }
.s-leaf        { fill: #3dbb83; }
.s-success     { fill: var(--kh-success); }
.s-success-soft { fill: #c9efdd; }
.s-check       { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.s-on-accent   { fill: none; stroke: var(--kh-navy); }
.s-wave,
.s-wave path   { fill: none; stroke: var(--series-1); stroke-width: 6; stroke-linecap: round; }
.s-slash       { fill: none; stroke: var(--kh-danger); stroke-width: 8; stroke-linecap: round; }

.anim-float      { animation: kh-float 4s ease-in-out infinite; }
.anim-float-slow { animation: kh-float 7s ease-in-out infinite; }
.anim-twinkle > * { animation: kh-twinkle 2.6s ease-in-out infinite; }
.anim-twinkle > *:nth-child(2) { animation-delay: .8s; }
.anim-twinkle > *:nth-child(3) { animation-delay: 1.6s; }
.anim-twinkle > *:nth-child(4) { animation-delay: 2.2s; }
.s-window .anim-light { animation: kh-light 5s ease-in-out infinite; }
.anim-sway       { animation: kh-sway 5s ease-in-out infinite; transform-origin: bottom center; }
.anim-draw       { stroke-dasharray: 1; stroke-dashoffset: 1; animation: kh-draw .9s .3s ease-out forwards; }
.anim-pop        { animation: kh-pop .6s cubic-bezier(.34, 1.56, .64, 1) both, kh-pulse 3s 1s ease-in-out infinite; }
.anim-tilt       { animation: kh-tilt 3.2s ease-in-out infinite; transform-origin: left center; }
.anim-wave       { animation: kh-wave 2.4s ease-out infinite; }
.anim-bubble     { animation: kh-bubble 4.5s ease-in-out infinite; }
.delay-1 { animation-delay: .5s; }
.delay-2 { animation-delay: 1s; }
.anim-wave.delay-1 { animation-delay: .4s; }
.anim-wave.delay-2 { animation-delay: .8s; }
.anim-bubble.delay-1 { animation-delay: .6s; }
.anim-bubble.delay-2 { animation-delay: 1.2s; }

.empty-state .illustration {
    width: 170px;
    margin: 0 auto 1.25rem;
}

/* ==========================================================================
   Motion system
   ========================================================================== */

@keyframes kh-float   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes kh-twinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes kh-light   { 0%, 45%, 100% { fill: #2f2885; } 55%, 90% { fill: var(--kh-accent); } }
@keyframes kh-sway    { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes kh-draw    { to { stroke-dashoffset: 0; } }
@keyframes kh-pop     { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes kh-pulse   { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes kh-tilt    { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg); } }
@keyframes kh-wave    { 0% { opacity: 0; transform: translateX(-6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateX(6px); } }
@keyframes kh-bubble  { 0%, 8% { opacity: 0; transform: translateY(8px) scale(.9); } 18%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes kh-rise    { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes kh-slide-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes kh-grow-y  { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes kh-wiggle  { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg) scale(1.08); } 75% { transform: rotate(8deg) scale(1.08); } }
@keyframes kh-blob    {
    0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; transform: translate(0, 0) rotate(0); }
    50%      { border-radius: 60% 40% 35% 65% / 55% 62% 38% 45%; transform: translate(18px, -14px) rotate(20deg); }
}
@keyframes kh-dash    { to { stroke-dashoffset: -40; } }
@keyframes kh-ring    { from { stroke-dashoffset: 100; } }

/* App pages: content blocks rise in one after another. */
.app-content > * {
    animation: kh-rise .55s cubic-bezier(.2, .7, .2, 1) both;
}
.app-content > *:nth-child(2) { animation-delay: .06s; }
.app-content > *:nth-child(3) { animation-delay: .12s; }
.app-content > *:nth-child(4) { animation-delay: .18s; }
.app-content > *:nth-child(5) { animation-delay: .24s; }
.app-content > *:nth-child(n+6) { animation-delay: .3s; }

/* Cards inside a row stagger too. */
.app-content .row > [class*="col"] { animation: kh-rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.app-content .row > [class*="col"]:nth-child(2) { animation-delay: .08s; }
.app-content .row > [class*="col"]:nth-child(3) { animation-delay: .16s; }
.app-content .row > [class*="col"]:nth-child(4) { animation-delay: .24s; }

.alert { animation: kh-slide-down .4s ease-out both; }

/* Hover feedback */
.stat-card,
.announcement-card,
.contact-card,
.price-card {
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.stat-card:hover,
.announcement-card:hover,
.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--kh-shadow);
}

.price-card:hover {
    transform: translateY(-6px);
}

.stat-card:hover .stat-icon,
.feature-card:hover .feature-icon,
.contact-card:hover .feature-icon {
    animation: kh-wiggle .5s ease;
}

.btn .icon-arrow-right,
.step-link .icon-arrow-right {
    transition: transform .2s ease;
}

.btn:hover .icon-arrow-right,
.step-link:hover .icon-arrow-right {
    transform: translateX(4px);
}

.btn:active {
    transform: scale(.97);
}

/* Sidebar: an accent bar grows in beside the active link. */
.app-nav-link.active::before {
    content: "";
    position: absolute;
    left: -.9rem;
    top: 20%;
    bottom: 20%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--kh-accent);
    animation: kh-grow-y .35s ease-out both;
}

.app-nav-link .icon {
    transition: transform .15s ease;
}

.app-nav-link:hover .icon {
    transform: translateX(2px);
}

/* Success messages get a self-drawing check. */
.alert-check {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-check circle { fill: var(--kh-success); }
.alert-check path {
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: kh-draw .5s .25s ease-out forwards;
}

/* Reveal variants (scroll-triggered, see app.js) */
.reveal-zoom {
    opacity: 0;
    transform: scale(.94);
    transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}

.reveal-zoom.is-visible {
    opacity: 1;
    transform: none;
}

[data-stagger] > .reveal:nth-child(2),
[data-stagger] > * > .reveal:nth-child(1) { transition-delay: .08s; }
[data-stagger] > .reveal:nth-child(3) { transition-delay: .16s; }
[data-stagger] > .reveal:nth-child(4) { transition-delay: .24s; }
[data-stagger] > .reveal:nth-child(5) { transition-delay: .32s; }
[data-stagger] > .reveal:nth-child(6) { transition-delay: .4s; }

/* ---------- Public site decoration ---------- */

.hero {
    isolation: isolate;
}

.hero-deco {
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.hero-blob {
    width: 340px;
    height: 340px;
    opacity: .6;
    animation: kh-blob 14s ease-in-out infinite;
}

.hero-blob.one { top: -80px; right: -60px; background: radial-gradient(circle at 30% 30%, #ffd3d9, transparent 70%); }
.hero-blob.two { bottom: -120px; left: -100px; background: radial-gradient(circle at 60% 40%, #d9d5fb, transparent 70%); animation-delay: -5s; }

.hero-dots {
    top: 40px;
    left: 46%;
    width: 140px;
    color: var(--series-1);
    opacity: .22;
    animation: kh-float 8s ease-in-out infinite;
}

.hero-visual-frame {
    animation: kh-rise .9s .15s cubic-bezier(.2, .7, .2, 1) both;
}

.hero-float {
    animation: kh-float 5s ease-in-out infinite;
}

.hero-float-2 { animation-delay: -2.5s; }

.hero-visual-inset {
    animation: kh-float 6s -1s ease-in-out infinite;
}

/* Wave between sections */
.wave-divider {
    display: block;
    width: 100%;
    height: 56px;
    margin-bottom: -1px;
}

.wave-divider path { fill: var(--kh-bg); }

/* Booking steps: a dashed path that keeps moving above the cards. */
.step-path {
    display: none;
}

@media (min-width: 992px) {
    .step-cards li:not(:last-child)::after { display: none; }

    .step-path {
        display: block;
        width: 100%;
        height: 40px;
        margin-bottom: -8px;
    }

    .step-path path {
        fill: none;
        stroke: var(--series-1);
        stroke-width: 2.5;
        stroke-dasharray: 6 8;
        stroke-linecap: round;
        opacity: .5;
        animation: kh-dash 2s linear infinite;
    }

    .step-path circle { fill: var(--kh-accent); }
}

.step-cards li:hover .feature-icon { animation: kh-wiggle .5s ease; }

/* Map pin bobs on the contact card. */
.contact-card .icon-location-dot { animation: kh-float 2.4s ease-in-out infinite; }

/* Footer skyline */
.footer-skyline {
    display: block;
    width: 100%;
    height: 90px;
    margin-bottom: -1px;
}

.footer-skyline .sky-far  { fill: #1c1663; }
.footer-skyline .sky-near { fill: var(--kh-navy); }
.footer-skyline .sky-lit  { fill: var(--kh-accent); animation: kh-twinkle 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.footer-skyline .sky-lit:nth-of-type(2n) { animation-delay: 1.2s; }
.footer-skyline .sky-lit:nth-of-type(3n) { animation-delay: 2s; }

/* Auth pages: illustration in the visual panel */
.auth-illustration {
    width: min(240px, 60%);
    margin: 1.75rem 0 0;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35));
}

.auth-card {
    animation: kh-rise .6s cubic-bezier(.2, .7, .2, 1) both;
}

/* Dashboard occupancy ring */
.ring {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    transform: rotate(-90deg);
}

.ring circle {
    fill: none;
    stroke-width: 7;
}

.ring .ring-track { stroke: var(--kh-navy-050); }
.ring .ring-value {
    stroke: var(--kh-success);
    stroke-linecap: round;
    stroke-dasharray: 100;
    animation: kh-ring 1.4s .3s cubic-bezier(.2, .7, .2, 1) both;
}

/* ---------- Respect reduced-motion preferences everywhere ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Room map: beds pop in one by one, and lift on hover. */
.room-chip {
    animation: kh-pop .4s calc(var(--i, 0) * 18ms + .2s) cubic-bezier(.34, 1.56, .64, 1) both;
    transition: transform .15s ease, box-shadow .15s ease;
}

.room-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--kh-shadow-sm);
}

/* ==========================================================================
   Icons (SVG line icons from assets/icons.svg, see icon() in helpers.php)
   ========================================================================== */

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -.125em;
    flex-shrink: 0;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s ease, color .2s ease;
}

.icon-fw  { width: 1.25em; }
.icon-2xs { width: .6em; height: .6em; vertical-align: .05em; }

/* ==========================================================================
   More motion
   ========================================================================== */

@keyframes kh-icon-draw { from { stroke-dasharray: 120; stroke-dashoffset: 120; } to { stroke-dasharray: 120; stroke-dashoffset: 0; } }
@keyframes kh-bounce    { 0%, 100% { transform: none; } 40% { transform: scale(1.25); } 70% { transform: scale(.92); } }
@keyframes kh-shake     { 0%, 100% { transform: none; } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-7deg); } 80% { transform: rotate(4deg); } }
@keyframes kh-bell      { 0%, 60%, 100% { transform: none; } 6% { transform: rotate(16deg); } 12% { transform: rotate(-14deg); } 18% { transform: rotate(10deg); } 24% { transform: rotate(-7deg); } 30% { transform: rotate(3deg); } }
@keyframes kh-fly       { 0% { transform: none; } 45% { transform: translate(8px, -8px); opacity: 0; } 55% { transform: translate(-8px, 8px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes kh-swap      { from { transform: scale(.3) rotate(-45deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes kh-row-in    { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes kh-field-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes kh-shrink    { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes kh-ripple    { to { transform: scale(4); opacity: 0; } }
@keyframes kh-glow      { 0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .45); } 50% { box-shadow: 0 0 0 6px rgba(229, 72, 77, 0); } }

/* Icons draw their own lines when they first appear. ("backwards" only holds the start
   during the delay, so the icon is solid again once the animation ends.) */
.app-content .stat-icon .icon,
.app-content .empty-state .icon,
.alert > .icon,
.auth-card .eyebrow .icon,
.reveal.is-visible .feature-icon .icon,
.reveal.is-visible .stat-icon .icon {
    animation: kh-icon-draw 1.1s .2s ease-out backwards;
}

/* Buttons: each icon reacts in its own way on hover. */
.btn:hover .icon-paper-plane,
.btn:hover .icon-comment-sms { animation: kh-fly .6s ease; }
.btn:hover .icon-plus        { transform: rotate(90deg); }
.btn:hover .icon-rotate-right { transform: rotate(180deg); }
.btn:hover .icon-trash,
.btn:hover .icon-pen,
.btn:hover .icon-key         { animation: kh-shake .45s ease; }
.btn:hover .icon-check,
.btn:hover .icon-user-plus,
.btn:hover .icon-phone,
.btn:hover .icon-copy        { animation: kh-bounce .45s ease; }
.btn:hover .icon-arrow-left,
.btn:hover .icon-chevron-left  { transform: translateX(-4px); }
.btn:hover .icon-chevron-right,
a:hover > .icon-chevron-right  { transform: translateX(3px); }

/* Sidebar and tab bar: icons bounce on hover, and the current page's icon pops in. */
.app-nav-link:hover .icon { animation: kh-bounce .45s ease; }
.app-nav-link.active .icon,
.app-tabbar .active .icon { animation: kh-bounce .6s .25s ease both; }

/* The bell rings every few seconds while there are new issues. */
.app-bell .icon-bell { transform-origin: 50% 10%; }
.app-bell:hover .icon-bell,
.app-bell:has(.app-bell-count) .icon-bell { animation: kh-bell 2.6s 1s ease-in-out infinite; }
.app-bell-count { animation: kh-pop .4s .3s cubic-bezier(.34, 1.56, .64, 1) both, kh-glow 2s 1s ease-in-out infinite; }

/* Form fields: the leading icon lights up on focus; invalid fields give a little shake (see app.js). */
.input-icon:focus-within > .icon {
    color: var(--kh-navy-600);
    transform: translateY(-50%) scale(1.12);
}
.is-shaking { animation: kh-field-shake .4s ease; }

/* Show/hide password and copy buttons: the new icon spins in. */
.icon.is-swapped { animation: kh-swap .3s cubic-bezier(.34, 1.56, .64, 1); }

/* Flash messages show a bar that runs down until they close. */
[data-autodismiss] {
    position: relative;
    overflow: hidden;
}
[data-autodismiss]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: currentColor;
    opacity: .3;
    transform-origin: left;
    animation: kh-shrink 6s linear forwards;
}

/* Table rows slide in one after another (app.js numbers them with --i). */
.table tbody tr {
    animation: kh-row-in .4s calc(var(--i, 0) * 35ms + .15s) ease-out both;
}

/* Click ripple on buttons (added by app.js). */
.btn.has-ripple {
    position: relative;
    overflow: hidden;
}
.btn .ripple {
    position: absolute;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    background: currentColor;
    opacity: .25;
    transform: scale(0);
    pointer-events: none;
    animation: kh-ripple .55s ease-out forwards;
}

/* Pop-up windows zoom in with a little bounce. */
.modal.fade .modal-dialog {
    transform: scale(.92) translateY(14px);
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease;
}
.modal.show .modal-dialog { transform: none; }

/* Dropdowns slide down. */
.dropdown-menu.show { animation: kh-slide-down .2s ease-out; }

/* Pages cross-fade into each other (browsers that support view transitions). */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .25s; }

@media (prefers-reduced-motion: reduce) {
    .app-bell .icon-bell,
    .app-bell-count,
    [data-autodismiss]::after { animation: none !important; }
    .btn .ripple { display: none; }
}

/* ==========================================================================
   Get the app (install_app.php, driven by pwa.js)
   ========================================================================== */

.install-hero {
    background: linear-gradient(135deg, var(--kh-navy-050), #fff 70%);
}

.install-hero-icon {
    border-radius: 22px;
    box-shadow: var(--kh-shadow);
    animation: kh-float 4s ease-in-out infinite;
}

.install-action {
    flex-shrink: 0;
}

.install-action .btn {
    animation: kh-pop .5s .3s cubic-bezier(.34, 1.56, .64, 1) both;
}

.install-steps {
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.install-steps.is-current {
    border-color: var(--kh-navy-600);
    box-shadow: var(--kh-shadow);
    transform: translateY(-3px);
}

.install-steps .this-device { display: none; }
.install-steps.is-current .this-device { display: inline-block; }

.install-step-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .75rem;
}

.install-step-list li {
    counter-increment: step;
    position: relative;
    padding-left: 2.25rem;
    color: var(--kh-muted);
    font-size: .925rem;
}

.install-step-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -.1rem;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .8rem;
    font-weight: 700;
    background: var(--kh-navy-050);
    color: var(--kh-navy-600);
}

.install-steps.is-current .install-step-list li::before {
    background: var(--kh-navy-600);
    color: #fff;
}

/* Once the portal runs as the installed app, there is nothing left to install. */
.is-standalone .app-nav-link[href="install_app.php"],
.is-standalone .app-tabbar a[href="install_app.php"] {
    display: none;
}

/* ==========================================================================
   SMS history (sms_history.php)
   ========================================================================== */

.sms-details summary {
    cursor: pointer;
    list-style: none;
    color: var(--kh-text, inherit);
}

.sms-details summary::-webkit-details-marker { display: none; }

.sms-details summary::after {
    content: "Show more";
    margin-left: .4rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--kh-navy-600);
}

.sms-details[open] summary::after { content: "Show less"; }
.sms-details[open] summary { color: var(--kh-muted); }

.sms-details-body {
    margin-top: .6rem;
    padding: .75rem .9rem;
    border-radius: 10px;
    background: var(--kh-navy-050);
    animation: kh-slide-down .25s ease-out;
}

.sms-full-text {
    white-space: pre-wrap;
    margin-bottom: .5rem;
}

.sms-recipients {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 160px;
    overflow-y: auto;
    display: grid;
    gap: .15rem;
}

/* ==========================================================================
   Pagination (includes/partials/pagination.php)
   ========================================================================== */

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1.25rem;
}

.card-footer .pager { margin-top: 0; }

.pager-count {
    font-size: .85rem;
    color: var(--kh-muted);
}

.pager .page-link {
    min-width: 2rem;
    text-align: center;
    margin: 0 .1rem;
    border: 0;
    border-radius: 8px !important;
    color: var(--kh-navy-600);
    background: transparent;
    transition: background-color .15s ease, transform .15s ease;
}

.pager .page-link:hover { background: var(--kh-navy-050); transform: translateY(-1px); }
.pager .page-item.active .page-link { background: var(--kh-navy-600); color: #fff; }
.pager .page-item.disabled .page-link { color: var(--kh-muted); opacity: .5; }

/* "Check your phone" after a student asks for a temporary password. */
.sent-badge {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 50%;
    background: var(--kh-navy-050);
    color: var(--kh-navy-600);
    font-size: 36px;
    animation: kh-pop .5s cubic-bezier(.34, 1.56, .64, 1) both, kh-float 4s .6s ease-in-out infinite;
}
.sent-badge .icon { width: 100%; height: 100%; display: block; }

/* Birthday wishes (SMS settings) */
.birthday-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .5rem;
}

.birthday-list li {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .9rem;
}

.birthday-list .avatar {
    width: 32px;
    height: 32px;
}

.birthday-date {
    min-width: 5.5rem;
    font-weight: 600;
    color: var(--kh-navy-600);
}

#birthdays .card-header .icon-cake { animation: kh-sway 3s ease-in-out infinite; transform-origin: bottom center; }

/* ==========================================================================
   Logo (images/Knapsack.png, drawn from assets/svg/knapsack-logo.svg)
   ========================================================================== */

@keyframes kh-logo-in { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

.brand-mark {
    display: block;
    flex-shrink: 0;
    object-fit: contain;
    background: #fff;
    animation: kh-logo-in .5s cubic-bezier(.34, 1.56, .64, 1) both;
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

a:hover > .brand-mark { transform: rotate(-4deg) scale(1.06); }

@media (prefers-reduced-motion: reduce) {
    .brand-mark { animation: none !important; }
}

/* ==========================================================================
   Homepage extras (index.php, home.js)
   ========================================================================== */

@keyframes kh-blink      { 50% { opacity: 0; } }
@keyframes kh-ticker     { to { transform: translateX(-100%); } }
@keyframes kh-wave-drift { to { transform: translateX(-1440px); } }
@keyframes kh-orbit      { to { transform: rotate(360deg); } }
@keyframes kh-scroll-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@property --kh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes kh-spin-angle { to { --kh-angle: 360deg; } }

/* Typed heading: room for three lines, so the page doesn't jump while typing. */
.hero h1 { min-height: 3.3em; }
.hero h1 .typed-text {
    background: linear-gradient(120deg, #e03a50, var(--kh-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero h1 .typed-cursor {
    color: var(--kh-accent);
    font-weight: 400;
    animation: kh-blink .8s step-end infinite;
}

/* Paper plane on its flight path */
.hero-flight {
    top: 8%;
    left: -4%;
    width: min(760px, 70vw);
    opacity: .9;
}
.flight-path {
    fill: none;
    stroke: var(--series-1);
    stroke-width: 2;
    stroke-dasharray: 2 10;
    stroke-linecap: round;
    opacity: .35;
    animation: kh-dash 3s linear infinite;
}
.flight-plane { fill: var(--kh-accent); }
.flight-plane-fold { fill: none; stroke: #c42a3f; stroke-width: 1.5; }

/* Sparkles across the hero */
.hero-sparkles {
    inset: 0;
    width: 100%;
    height: 100%;
}
.hero-sparkles path {
    fill: var(--kh-accent);
    transform-box: fill-box;
    transform-origin: center;
    animation: kh-twinkle 3s ease-in-out infinite;
}
.hero-sparkles path:nth-child(2) { animation-delay: .7s; fill: var(--series-1); }
.hero-sparkles path:nth-child(3) { animation-delay: 1.4s; }
.hero-sparkles path:nth-child(4) { animation-delay: 2.1s; fill: var(--series-1); }
.hero-sparkles path:nth-child(5) { animation-delay: 2.6s; }

/* Logo badge on the hero photo, with a turning dashed ring */
.hero-logo-badge {
    position: absolute;
    top: -26px;
    right: -18px;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    animation: kh-float 6s -3s ease-in-out infinite;
}
.hero-logo-badge .brand-mark {
    border-radius: 16px;
    padding: 3px;
    box-shadow: 0 14px 30px -10px rgba(6, 2, 64, .45);
}
.hero-logo-orbit {
    position: absolute;
    inset: 0;
    animation: kh-orbit 18s linear infinite;
}
.hero-logo-orbit circle {
    fill: none;
    stroke: var(--kh-accent);
    stroke-width: 2;
    stroke-dasharray: 3 9;
    stroke-linecap: round;
}

/* "Scroll" cue at the bottom of the hero */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--kh-muted);
}
.scroll-cue svg { width: 22px; height: 33px; }
.scroll-cue rect { fill: none; stroke: currentColor; stroke-width: 2; }
.scroll-cue-wheel { fill: var(--kh-accent); animation: kh-scroll-wheel 1.8s ease-in-out infinite; }
.scroll-cue:hover { color: var(--kh-navy-600); }

/* Highlights ticker: two copies of the list slide left for ever; hovering pauses it. */
.ticker {
    display: flex;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker ul { animation: kh-ticker 32s linear infinite; }
.ticker:hover ul { animation-play-state: paused; }
.highlights li { white-space: nowrap; }

/* Waves: the back layer (amber tint) and front layer drift at different speeds. */
.wave-divider { overflow: hidden; }
.wave-divider .wave-back {
    fill: var(--kh-accent);
    opacity: .18;
    animation: kh-wave-drift 22s linear infinite;
}
.wave-divider .wave-front {
    fill: var(--kh-bg);
    animation: kh-wave-drift 14s linear infinite;
}

/* Knapsack in numbers */
.numbers-band {
    padding-block: 2.5rem;
    background: var(--kh-navy);
    background-image: radial-gradient(600px 200px at 85% 0%, rgba(242, 78, 98, .18), transparent 70%),
                      radial-gradient(500px 220px at 10% 100%, rgba(91, 79, 216, .35), transparent 70%);
    color: #fff;
}
.number-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.number-tile strong {
    display: block;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    line-height: 1.1;
}
.number-tile span { color: rgba(255, 255, 255, .7); font-size: .9rem; }
.number-tile strong span { color: inherit; font-size: inherit; }
.number-ring {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
}
.number-ring > svg:not(.icon) {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
}
.number-ring circle { fill: none; stroke-width: 5; }
.number-ring-track { stroke: rgba(255, 255, 255, .12); }
.number-ring-value {
    stroke: var(--kh-accent);
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1.6s .2s cubic-bezier(.2, .7, .2, 1);
}
.reveal.is-visible .number-ring-value { stroke-dashoffset: var(--ring); }
.number-ring .icon { font-size: 1.35rem; color: var(--kh-accent); }

/* The "Most popular" price card gets a slowly turning gradient border. */
.price-card.featured { isolation: isolate; }
.price-card.featured::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: calc(var(--kh-radius-lg) + 2px);
    background: conic-gradient(from var(--kh-angle), var(--kh-accent), #5b5cdb, var(--kh-navy-600), var(--kh-accent));
    animation: kh-spin-angle 5s linear infinite;
}

/* Back to top */
.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1030;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--kh-surface);
    color: var(--kh-navy-600);
    box-shadow: var(--kh-shadow);
    animation: kh-pop .4s cubic-bezier(.34, 1.56, .64, 1);
}
.back-to-top[hidden] { display: none; }
.back-to-top > svg:not(.icon) { position: absolute; inset: 0; transform: rotate(-90deg); }
.back-to-top circle { fill: none; stroke-width: 3; }
.back-to-top-track { stroke: var(--kh-navy-050); }
.back-to-top-progress { stroke: var(--kh-accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.back-to-top .icon { transform: rotate(-90deg); font-size: 1.1rem; }
.back-to-top:hover .icon { transform: rotate(-90deg) translateX(3px); }
/* Above the sticky "Call / Book" bar on phones */
@media (max-width: 991.98px) { .has-mobile-cta .back-to-top { bottom: 5.5rem; } }

@media (max-width: 575.98px) {
    .hero-logo-badge { width: 72px; height: 72px; top: -18px; right: -6px; }
    .hero-logo-badge .brand-mark { width: 44px; height: 44px; }
    .hero h1 { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ticker ul, .wave-divider path, .hero-logo-orbit, .price-card.featured::before { animation: none !important; }
    .ticker { overflow-x: auto; }
}

/* Previous / Next buttons in the pager */
.pager .pager-step {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding-inline: .75rem;
    font-weight: 600;
    background: var(--kh-navy-050);
}
.pager .page-item.disabled .pager-step { background: transparent; }
