:root {
    --tp-primary: #2563eb;
    --tp-primary-dark: #1d4ed8;
    --tp-accent: #0f766e;
    --tp-ink: #172033;
    --tp-muted: #64748b;
    --tp-surface: #ffffff;
    --tp-soft: #f5f7fb;
    --tp-line: #dfe6f1;
    --tp-shadow: 0 .75rem 1.75rem rgba(23, 32, 51, .08);
}

body {
    color: var(--tp-ink);
    background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 44%, #ffffff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.btn-primary,
.bg-primary {
    --bs-btn-bg: var(--tp-primary);
    --bs-btn-border-color: var(--tp-primary);
    --bs-btn-hover-bg: var(--tp-primary-dark);
    --bs-btn-hover-border-color: var(--tp-primary-dark);
}

.text-primary {
    color: var(--tp-primary) !important;
}

a {
    color: var(--tp-primary);
}

.app-navbar {
    background: #092a60 !important;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 .75rem 1.8rem rgba(9, 42, 96, .18);
    padding-block: .75rem;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: #f8fbff;
    text-decoration: none;
    letter-spacing: 0;
}

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

.brand-mark {
    width: 2.1rem;
    height: 2.1rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(96, 165, 250, .55);
    border-radius: .55rem;
    background: rgba(37, 99, 235, .18);
    color: #fff;
    font-size: .9rem;
    font-weight: 800;
}

.brand-title {
    font-size: 1rem;
    font-weight: 800;
    color: #f8fbff;
    text-transform: uppercase;
}

.app-nav-links {
    padding: .25rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.nav-link {
    color: rgba(241, 245, 249, .78);
    font-weight: 600;
    border-radius: 999px;
    padding: .5rem .9rem !important;
    transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

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

.nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, .14);
    box-shadow: 0 .35rem .9rem rgba(0, 0, 0, .12);
}

.app-nav-links > .nav-link[href$="/login"] {
    background: rgba(255, 255, 255, .08);
}

.app-dropdown {
    min-width: 14rem;
    padding: .45rem;
    border: 1px solid var(--tp-line);
    border-radius: .5rem;
    box-shadow: 0 .65rem 1.4rem rgba(23, 32, 51, .09);
}

.dropdown-item {
    border-radius: .42rem;
    padding: .55rem .7rem;
    color: #334155;
    font-weight: 600;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #eef6ff;
    color: var(--tp-primary);
}

.dropdown-item:active {
    background: var(--tp-primary);
}

.dropdown-header {
    padding: .4rem .7rem .25rem;
    color: #64748b;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dropdown-divider {
    border-color: var(--tp-line);
    margin: .45rem 0;
}

.account-toggle {
    display: inline-flex;
    align-items: center;
    padding-left: .68rem !important;
}

.account-name {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-user {
    display: flex;
    align-items: center;
    padding: .6rem .7rem;
    border-radius: .45rem;
    background: #f8fafc;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: .45rem;
    padding: .45rem .6rem;
}

.navbar-toggler-icon {
    filter: invert(1) grayscale(1) brightness(2);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 .2rem rgba(96, 165, 250, .22);
}

main {
    min-height: 62vh;
}

.card {
    border-radius: .5rem;
    border: 1px solid rgba(223, 230, 241, .9) !important;
    box-shadow: var(--tp-shadow) !important;
}

.interactive-surface {
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(223, 230, 241, .95);
    box-shadow: var(--tp-shadow);
}

.card-header {
    border-bottom-color: var(--tp-line);
}

.btn {
    border-radius: .45rem;
    font-weight: 700;
    letter-spacing: 0;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn.is-loading {
    opacity: .78;
    pointer-events: none;
}

.btn-outline-primary {
    --bs-btn-color: var(--tp-primary);
    --bs-btn-border-color: rgba(37, 99, 235, .45);
    --bs-btn-hover-bg: var(--tp-primary);
    --bs-btn-hover-border-color: var(--tp-primary);
}

.form-control,
.form-select {
    border-color: #cfd8e6;
    border-radius: .45rem;
    min-height: 2.65rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(37, 99, 235, .72);
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .14);
}

.form-label {
    color: #334155;
    font-size: .88rem;
    font-weight: 700;
}

.table {
    --bs-table-color: var(--tp-ink);
    --bs-table-striped-bg: #f8fafc;
    border-color: var(--tp-line);
}

.table thead th {
    color: #475569;
    font-size: .76rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-hover tbody tr {
    transition: background-color .15s ease, box-shadow .15s ease;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .2);
    outline-offset: -3px;
}

.clickable-row:hover td {
    background: #f1f7ff;
}

.badge {
    border-radius: 999px;
    font-weight: 700;
}

.progress {
    height: .8rem;
    border-radius: 999px;
    background: #e5ebf5;
}

.progress-bar {
    background: var(--tp-accent);
}

.page-hero {
    min-height: clamp(34rem, 72vh, 46rem);
    display: flex;
    align-items: center;
    position: relative;
    color: #fff;
    background-image:
        linear-gradient(90deg, rgba(9, 21, 43, .84), rgba(9, 21, 43, .52) 48%, rgba(9, 21, 43, .14)),
        url("https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=1800&q=80");
    background-position: center;
    background-size: cover;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .75rem;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #eff6ff;
    font-size: .9rem;
    font-weight: 700;
}

.hero-copy {
    max-width: 43rem;
}

.hero-copy h1 {
    font-size: clamp(2.45rem, 5vw, 4.8rem);
    line-height: 1.02;
}

.hero-copy .lead {
    color: rgba(255, 255, 255, .84) !important;
    max-width: 38rem;
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.4rem;
}

.hero-metric {
    min-width: 9rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: .5rem;
    background: rgba(255, 255, 255, .12);
}

.hero-metric strong {
    display: block;
    font-size: 1.25rem;
}

.hero-metric span {
    color: rgba(255, 255, 255, .78);
    font-size: .83rem;
}

.hero-actions .btn {
    min-height: 3.1rem;
    padding-inline: 1.35rem;
}

.hero-actions .btn-light {
    color: #12315f;
}

.hero-actions .btn-outline-light {
    border-color: rgba(255, 255, 255, .72);
}

.home-section {
    margin-top: -3rem;
    position: relative;
    z-index: 2;
}

.step-card {
    height: 100%;
    transition: transform .15s ease, border-color .15s ease;
}

.step-card:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 118, 110, .35) !important;
}

.step-number {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-weight: 800;
}

.landing-hero {
    overflow: hidden;
    min-height: clamp(38rem, 78vh, 50rem);
    background: #082a61;
    background-image: none;
}

.landing-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 27, 62, .94) 0%, rgba(8, 27, 62, .78) 38%, rgba(8, 27, 62, .34) 66%, rgba(8, 27, 62, .08) 100%),
        linear-gradient(180deg, rgba(8, 27, 62, .18), rgba(8, 27, 62, .58));
    z-index: 0;
}

.landing-hero-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    z-index: 0;
}

.landing-hero .container,
.landing-hero .hero-copy {
    position: relative;
    z-index: 1;
}

.landing-hero .hero-copy h1 {
    max-width: 47rem;
}

.landing-search-section {
    padding-bottom: 2rem;
}

.landing-search-panel,
.landing-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.4rem;
    border: 1px solid rgba(223, 230, 241, .95);
    border-radius: .65rem;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--tp-shadow);
}

.landing-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    flex-shrink: 0;
}

.section-kicker {
    display: inline-flex;
    margin-bottom: .65rem;
    color: var(--tp-primary);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.landing-section-intro {
    position: sticky;
    top: 7rem;
}

.landing-section-intro h2,
.landing-band h2,
.landing-cta h2 {
    color: #10203a;
    font-weight: 800;
}

.landing-step,
.landing-feature,
.landing-panel {
    height: 100%;
    padding: 1.35rem;
    border: 1px solid rgba(223, 230, 241, .95);
    border-radius: .6rem;
    background: #fff;
    box-shadow: 0 .55rem 1.25rem rgba(23, 32, 51, .06);
}

.landing-step {
    transition: transform .15s ease, border-color .15s ease;
}

.landing-step:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, .32);
}

.landing-band {
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    border-block: 1px solid rgba(223, 230, 241, .85);
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.landing-feature {
    min-height: 9rem;
}

.landing-narrow {
    max-width: 32rem;
}

.subject-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.subject-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: .5rem .85rem;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 999px;
    background: #fff;
    color: #1e3a5f;
    font-weight: 700;
    box-shadow: 0 .35rem .9rem rgba(23, 32, 51, .05);
}

.landing-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.stat-tile {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.py-lg-6 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.application-checklist li {
    position: relative;
    padding: .55rem 0 .55rem 1.75rem;
    color: var(--bs-secondary-color);
}

.application-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .85rem;
    width: .75rem;
    height: .75rem;
    border: 2px solid var(--bs-secondary-color);
    border-radius: 50%;
}

.application-checklist li.done {
    color: var(--bs-success);
}

.application-checklist a {
    color: inherit;
    text-decoration: none;
}

.application-checklist a:hover {
    text-decoration: underline;
}

.application-checklist li.done::before {
    border-color: var(--bs-success);
    background: var(--bs-success);
}

.swal-validation-message {
    white-space: pre-line;
}

.location-flow {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

.min-width-0 {
    min-width: 0;
}

.dashboard-link-card {
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.dashboard-link-card:hover {
    color: inherit;
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, .35) !important;
    box-shadow: 0 .9rem 1.8rem rgba(23, 32, 51, .12) !important;
}

.dashboard-link-card:focus-visible {
    outline: 3px solid rgba(52, 87, 213, .35);
    outline-offset: 3px;
}

.admin-shortcut-card {
    min-height: 13.25rem;
}

.admin-shortcut-card .card-body {
    display: flex;
    flex-direction: column;
}

.admin-shortcut-card h2 {
    font-size: 1.08rem;
    line-height: 1.18;
}

.admin-shortcut-card p {
    font-size: .9rem;
    line-height: 1.45;
    margin-bottom: 1rem;
}

.admin-shortcut-card .btn {
    width: 100%;
    margin-top: auto;
    font-size: .88rem;
    line-height: 1.25;
    padding: .65rem .8rem;
}

.tutor-enquiry-card {
    overflow: hidden;
}

.tutor-enquiry-contact,
.tutor-enquiry-action {
    border: 1px solid var(--tp-line);
    border-radius: .5rem;
    background: #f8fafc;
    padding: 1rem;
}

.tutor-enquiry-action-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--tp-line);
    border-radius: .5rem;
    background: #fff;
    padding: .85rem 1rem;
}

.tutor-student-list {
    display: grid;
    gap: .75rem;
}

.tutor-student-item {
    display: grid;
    grid-template-columns: minmax(10rem, .65fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: .85rem 1rem;
    border: 1px solid var(--tp-line);
    border-radius: .5rem;
    background: #fff;
}

.tutor-enquiry-message {
    padding: 1rem;
    border-left: 3px solid var(--tp-primary);
    border-radius: .4rem;
    background: #f8fafc;
    color: #475569;
    white-space: pre-line;
}

.tuition-start-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #bfdbfe;
    border-radius: .5rem;
    background: #eff6ff;
    padding: 1rem;
}

.tuition-start-form {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.tuition-start-form .form-control {
    min-width: 10.5rem;
}

.monthly-fee-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.monthly-fee-strip > div {
    border: 1px solid var(--tp-line);
    border-radius: .5rem;
    background: #fff;
    padding: .8rem 1rem;
}

.ui-reveal {
    animation: ui-reveal .42s ease both;
    animation-delay: var(--reveal-delay, 0ms);
}

@keyframes ui-reveal {
    from {
        opacity: 0;
        transform: translateY(.65rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-shell {
    position: sticky;
    top: 4.65rem;
    z-index: 5;
}

.tutor-profile-panel {
    position: sticky;
    top: 5.5rem;
}

.student-row-card {
    background: #f8fafc;
    border: 1px solid var(--tp-line) !important;
    border-radius: .5rem !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.student-row-card:focus-within,
.student-row-card:hover {
    border-color: rgba(37, 99, 235, .36) !important;
    box-shadow: 0 .65rem 1.2rem rgba(23, 32, 51, .07);
}

.student-row-new {
    animation: student-row-pop .28s ease both;
}

@keyframes student-row-pop {
    from {
        opacity: 0;
        transform: scale(.985);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.admin-review-actions {
    top: 5rem;
}

.admin-passport-photo {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: .75rem;
    border: 1px solid var(--bs-border-color);
    background: #fff;
}

.document-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.document-details {
    min-width: 0;
}

.document-filename {
    font-size: .75em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.document-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    justify-self: end;
    flex-shrink: 0;
}

.admin-document-review-form {
    margin: 0;
    padding: .75rem 1rem 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}

.admin-document-review-form:last-child {
    border-bottom: 0;
}

.activity-message {
    max-width: 34rem;
    overflow-wrap: anywhere;
}

@media (max-width: 420px) {
    .document-list-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .document-actions {
        justify-self: start;
    }
}
.parent-tutor-table {
    font-size: 0.75em;
}

.admin-tuition-services-table {
    font-size: 0.75em;
}

@media (max-width: 767.98px) {
    .page-hero {
        min-height: 38rem;
        background-image:
            linear-gradient(180deg, rgba(9, 21, 43, .84), rgba(9, 21, 43, .54)),
            url("https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=1200&q=80");
    }

    .landing-hero {
        min-height: 44rem;
        background-image: none;
    }

    .landing-hero::after {
        background:
            linear-gradient(180deg, rgba(8, 27, 62, .92) 0%, rgba(8, 27, 62, .78) 48%, rgba(8, 27, 62, .46) 100%);
    }

    .landing-hero-art {
        object-position: 62% center;
        opacity: .72;
    }

    .home-section {
        margin-top: -2rem;
    }

    .display-6 {
        font-size: 2rem;
    }

    .tutor-student-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .tuition-start-box,
    .tuition-start-form {
        align-items: stretch;
        flex-direction: column;
    }

    .monthly-fee-strip {
        grid-template-columns: minmax(0, 1fr);
    }

    .filter-shell,
    .tutor-profile-panel {
        position: static;
    }

    .landing-search-panel,
    .landing-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .landing-search-actions {
        width: 100%;
    }

    .landing-search-actions .btn {
        flex: 1 1 12rem;
    }

    .landing-section-intro {
        position: static;
    }

    .landing-feature-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 991.98px) {
    .app-nav-links {
        align-items: stretch !important;
        gap: .15rem;
        margin-top: .9rem;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .app-nav-links .nav-link {
        border-radius: .45rem;
        padding: .7rem .85rem !important;
        background: transparent;
    }

    .app-nav-links .nav-link:hover,
    .app-nav-links .nav-link:focus {
        background: rgba(255, 255, 255, .08);
    }

    .app-nav-links .nav-link.active {
        display: flex;
        width: 100%;
        border-radius: 999px;
        background: #2f8df5;
        color: #fff !important;
        padding-inline: 1rem !important;
    }

    .app-nav-links > .nav-link[href$="/login"] {
        background: transparent;
    }

    .app-dropdown {
        border: 0;
        box-shadow: none;
        margin: .1rem 0 .45rem;
        padding: .35rem;
        background: #f8fafc;
    }

    .account-toggle {
        justify-content: flex-start;
    }

    .account-name {
        max-width: none;
    }
}

@media (max-width: 420px) {
    .brand-mark {
        width: 1.9rem;
        height: 1.9rem;
    }
}

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