/* ============================================================
   MedPoint ERP — stylesheet
   Palette lifted from the MedPoint logo: the mint leaf/pin mark
   (#6ECEB6) and the charcoal-grey wordmark (#414042).
   Built by 0T0M8 TX
   ============================================================ */

:root {
    /* Brand */
    --mint:        #6ECEB6;   /* the leaf and map-pin mark */
    --mint-soft:   #A8E2D3;
    --mint-wash:   #E8F7F2;
    --teal:        #3FA98F;   /* primary action */
    --teal-deep:   #2F7F6E;   /* headers, sidebar */
    --teal-ink:    #1E5A4E;

    /* Neutrals from the wordmark */
    --ink:         #2B2C2E;
    --charcoal:    #414042;
    --slate:       #6D6E71;
    --mist:        #9A9CA0;
    --line:        #E3EAE8;
    --paper:       #F1F5F4;
    --white:       #FFFFFF;

    /* Status */
    --amber:       #E0A458;
    --rose:        #D9605C;
    --indigo:      #6C9BD1;

    --radius:      14px;
    --radius-sm:   10px;
    --shadow:      0 1px 2px rgba(30,60,55,.05), 0 6px 20px rgba(30,60,55,.06);
    --shadow-lift: 0 4px 12px rgba(30,60,55,.10), 0 12px 32px rgba(30,60,55,.10);

    --nav-h:       62px;      /* bottom nav height */
    --font-display: "Plus Jakarta Sans", "Segoe UI", Roboto, system-ui, sans-serif;
    --font-body:    "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }

body {
    background: var(--paper);
    font-family: var(--font-body);
    color: var(--charcoal);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .page-title, .navbar-brand {
    font-family: var(--font-display);
    letter-spacing: -.015em;
    color: var(--ink);
}

a { color: var(--teal-deep); }
a:hover { color: var(--teal); }

/* ---------- Focus: always visible, never a mystery ---------- */
:focus-visible {
    outline: 3px solid var(--mint);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.app-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: .55rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.app-topbar .brand-mark {
    height: 36px; width: 36px;
    border-radius: 10px;
    object-fit: contain;
    background: var(--white);
    border: 1px solid var(--line);
    padding: 2px;
}

.app-topbar .navbar-brand {
    display: flex; align-items: center; gap: .6rem;
    font-weight: 700; font-size: 1.02rem; color: var(--ink);
    text-decoration: none;
}
.app-topbar .brand-text small {
    display: block; font-size: .68rem; font-weight: 500;
    color: var(--mist); font-style: italic; margin-top: -2px;
}

.user-chip {
    display: flex; align-items: center; gap: .5rem;
    text-decoration: none; color: var(--charcoal);
}
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--mint-wash); color: var(--teal-deep);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .78rem; flex-shrink: 0;
    font-family: var(--font-display);
}
.user-chip .meta { line-height: 1.15; }
.user-chip .meta strong { font-size: .84rem; font-weight: 600; display: block; }
.user-chip .meta span { font-size: .7rem; color: var(--mist); text-transform: capitalize; }

/* ============================================================
   SHELL + SIDEBAR (desktop)
   ============================================================ */
.app-shell { display: flex; min-height: calc(100vh - 57px); }

.app-sidebar {
    width: 258px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--teal-deep) 0%, var(--teal-ink) 100%);
    padding: .5rem .65rem .75rem;
    position: sticky;
    top: 57px;
    height: calc(100vh - 57px);
}

/* The link list scrolls; the user card and credit stay pinned. */
.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.22) transparent;
}
.sidebar-scroll::-webkit-scrollbar { width: 6px; }
.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.18); border-radius: 6px;
}

.app-sidebar .nav-section {
    font-size: .63rem;
    text-transform: uppercase;
    letter-spacing: .11em;
    color: rgba(255,255,255,.38);
    font-weight: 700;
    padding: 1.15rem .85rem .4rem;
}
.app-sidebar .nav-section:first-child { padding-top: .75rem; }

.app-sidebar .nav-link {
    position: relative;
    color: #CFE7E0;
    border-radius: 11px;
    padding: .62rem .85rem;
    margin-bottom: .15rem;
    font-size: .885rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .7rem;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.app-sidebar .nav-link i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    opacity: .9;
}
.app-sidebar .nav-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-sidebar .nav-link:hover {
    background: rgba(255,255,255,.10);
    color: #fff;
}
.app-sidebar .nav-link:hover i { opacity: 1; }

/* Active: solid mint pill with a bright rail on the left edge. */
.app-sidebar .nav-link.active {
    background: var(--mint);
    color: var(--teal-ink);
    font-weight: 650;
    box-shadow: 0 3px 10px rgba(0,0,0,.16);
}
.app-sidebar .nav-link.active i { opacity: 1; }
.app-sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    left: -.65rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    border-radius: 0 3px 3px 0;
    background: #fff;
}

.app-sidebar .nav-badge {
    margin-left: auto;
    background: var(--rose);
    color: #fff;
    font-size: .66rem;
    font-weight: 700;
    padding: .1rem .44rem;
    border-radius: 20px;
    flex-shrink: 0;
}
.app-sidebar .nav-link.active .nav-badge { background: var(--teal-ink); color: #fff; }

/* ---------- Pinned user card ---------- */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: .6rem .15rem .5rem;
    padding: .6rem .65rem;
    border-radius: 12px;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.08);
}
.sidebar-user .avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--mint);
    color: var(--teal-ink);
    font-weight: 700;
    font-size: .78rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sidebar-user-meta { min-width: 0; flex: 1; line-height: 1.25; }
.sidebar-user-meta strong {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-user-meta span {
    display: block;
    font-size: .69rem;
    color: rgba(255,255,255,.55);
}
.sidebar-signout {
    color: rgba(255,255,255,.6);
    font-size: 1rem;
    padding: .25rem;
    border-radius: 8px;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease;
}
.sidebar-signout:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- Build credit ---------- */
.sidebar-footer {
    padding: .5rem .85rem .15rem;
    border-top: 1px solid rgba(255,255,255,.10);
    margin: 0 .15rem;
    line-height: 1.55;
}
.sidebar-footer-app,
.sidebar-footer-by { display: block; }
.sidebar-footer-app {
    font-size: .67rem;
    color: rgba(255,255,255,.42);
    padding-top: .45rem;
}
.sidebar-footer-by {
    font-size: .69rem;
    color: rgba(255,255,255,.62);
    letter-spacing: .02em;
}
.sidebar-footer-by strong {
    color: var(--mint);
    font-weight: 700;
}

/* ============================================================
   REPORTS
   ============================================================ */
.report-list { display: flex; flex-direction: column; }
.report-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .85rem 0;
    border-bottom: 1px solid var(--line);
}
.report-row:last-child { border-bottom: 0; padding-bottom: 0; }
.report-row:first-child { padding-top: 0; }
.report-icon {
    width: 40px; height: 40px;
    border-radius: 11px;
    background: var(--mint-wash);
    color: var(--teal-deep);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.report-copy { flex: 1; min-width: 0; line-height: 1.45; }
.report-copy strong {
    display: block;
    font-family: var(--font-display);
    font-size: .93rem;
    color: var(--ink);
}
.report-copy span { font-size: .81rem; color: var(--slate); }

@media (max-width: 575.98px) {
    .report-row { flex-wrap: wrap; }
    .report-copy { flex: 1 1 100%; order: 2; }
    .report-row .btn, .report-row .badge { order: 1; margin-left: auto; }
}

.app-content {
    flex: 1;
    padding: 1.4rem 1.75rem 2.5rem;
    min-width: 0;   /* lets tables scroll instead of stretching the layout */
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap;
}
.page-title { font-size: 1.4rem; font-weight: 700; margin: 0; }
.page-sub { font-size: .85rem; color: var(--slate); margin: .15rem 0 0; }

/* ============================================================
   CARDS & STATS
   ============================================================ */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--white);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--line);
    padding: .85rem 1.1rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
}

.stat-card { padding: 1rem 1.1rem; }
.stat-card .stat-label {
    font-size: .73rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--mist); font-weight: 600;
}
.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 1.65rem; font-weight: 700; color: var(--ink);
    line-height: 1.15; margin-top: .15rem;
}
.stat-card .stat-foot { font-size: .76rem; color: var(--slate); }
.stat-icon {
    width: 40px; height: 40px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: var(--mint-wash); color: var(--teal-deep);
    font-size: 1.1rem; flex-shrink: 0;
}

/* ---------- Leave balance card: the signature element ----------
   A slim meter under each type shows used vs available at a glance. */
.balance-card {
    padding: .85rem .9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--white);
    height: 100%;
}
.balance-card .bc-top {
    display: flex; align-items: center; justify-content: space-between; gap: .4rem;
}
.balance-card .bc-name {
    font-size: .78rem; font-weight: 600; color: var(--slate);
    text-transform: uppercase; letter-spacing: .04em;
}
.balance-card .bc-tag {
    font-size: .62rem; font-weight: 700; color: #fff;
    padding: .1rem .34rem; border-radius: 5px; letter-spacing: .04em;
}
.balance-card .bc-value {
    font-family: var(--font-display);
    font-size: 1.5rem; font-weight: 700; color: var(--ink); line-height: 1.1;
    margin-top: .3rem;
}
.balance-card .bc-value small { font-size: .72rem; font-weight: 500; color: var(--mist); }
.balance-card .bc-meter {
    height: 5px; border-radius: 4px; background: var(--line);
    margin-top: .5rem; overflow: hidden;
}
.balance-card .bc-meter span { display: block; height: 100%; border-radius: 4px; }
.balance-card .bc-foot { font-size: .7rem; color: var(--mist); margin-top: .35rem; }
.balance-card.is-locked { opacity: .58; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { border-radius: 9px; font-weight: 600; font-size: .875rem; }
.btn-brand {
    background: var(--teal); border-color: var(--teal); color: #fff;
}
.btn-brand:hover, .btn-brand:focus { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.btn-outline-brand { color: var(--teal-deep); border-color: var(--mint); background: transparent; }
.btn-outline-brand:hover { background: var(--mint-wash); color: var(--teal-ink); border-color: var(--mint); }
.btn-sm { font-size: .8rem; padding: .3rem .65rem; }

/* Anything tappable gets a comfortable target on touch screens */
@media (max-width: 991.98px) {
    .btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }
    .btn-sm { min-height: 38px; }
}

/* ============================================================
   FORMS
   ============================================================ */
.form-label { font-size: .8rem; font-weight: 600; color: var(--slate); margin-bottom: .3rem; }
.form-control, .form-select {
    border-radius: 9px; border-color: var(--line);
    font-size: .92rem; padding: .55rem .7rem;
    background-color: var(--white);
}
.form-control:focus, .form-select:focus {
    border-color: var(--mint);
    box-shadow: 0 0 0 3px rgba(110,206,182,.22);
}
.form-text { font-size: .76rem; color: var(--mist); }

/* iOS zooms the page if an input is under 16px — keep them at 16 on mobile */
@media (max-width: 991.98px) {
    .form-control, .form-select { font-size: 16px; padding: .65rem .75rem; }
}

/* ---------- Segmented choice (signup method, shift picker) ---------- */
.segmented { display: flex; gap: .5rem; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
    flex: 1; text-align: center; cursor: pointer;
    border: 1.5px solid var(--line); border-radius: 11px;
    padding: .7rem .5rem; font-size: .85rem; font-weight: 600; color: var(--slate);
    transition: all .15s ease; background: var(--white);
}
.segmented label i { display: block; font-size: 1.15rem; margin-bottom: .15rem; }
.segmented input:checked + label {
    border-color: var(--mint); background: var(--mint-wash); color: var(--teal-ink);
}
.segmented input:focus-visible + label { outline: 3px solid var(--mint); outline-offset: 2px; }

/* ---------- OTP boxes ---------- */
.otp-row { display: flex; gap: .5rem; justify-content: center; }
.otp-row input {
    width: 46px; height: 56px; text-align: center;
    font-size: 1.4rem; font-weight: 700; font-family: var(--font-display);
    border: 1.5px solid var(--line); border-radius: 11px;
    background: var(--white); color: var(--ink);
}
.otp-row input:focus {
    border-color: var(--mint); box-shadow: 0 0 0 3px rgba(110,206,182,.22); outline: none;
}
@media (max-width: 400px) {
    .otp-row input { width: 40px; height: 50px; font-size: 1.2rem; }
    .otp-row { gap: .35rem; }
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    font-weight: 600; font-size: .7rem; letter-spacing: .02em;
    padding: .32em .6em; border-radius: 6px;
}
.badge-pending, .badge-draft      { background: #FDF1DF; color: #96631C; }
.badge-approved, .badge-authorised,
.badge-active, .badge-reviewed    { background: var(--mint-wash); color: var(--teal-ink); }
.badge-rejected, .badge-disabled  { background: #FBE7E6; color: #A33B37; }
.badge-disbursed, .badge-returned,
.badge-cancelled, .badge-submitted,
.badge-received                   { background: #E9EDF2; color: #4E5B69; }
.badge-out                        { background: #E7F0FA; color: #2F5F92; }

.pill {
    display: inline-block; font-size: .7rem; font-weight: 600;
    padding: .2rem .5rem; border-radius: 20px;
    background: var(--mint-wash); color: var(--teal-ink);
}

/* ============================================================
   TABLES — become stacked cards on small screens
   ============================================================ */
table.table { margin-bottom: 0; }
table.table thead th {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--mist); font-weight: 700;
    border-bottom: 1px solid var(--line);
    background: #FAFCFB;
    padding: .7rem .9rem;
    white-space: nowrap;
}
table.table tbody td {
    padding: .75rem .9rem; vertical-align: middle;
    border-bottom: 1px solid var(--line); font-size: .88rem;
}
table.table tbody tr:last-child td { border-bottom: none; }
table.table tbody tr:hover { background: #FAFCFB; }

.table-empty {
    text-align: center; color: var(--mist); padding: 2.5rem 1rem;
}
.table-empty i { font-size: 2rem; display: block; margin-bottom: .5rem; color: var(--mint-soft); }

@media (max-width: 767.98px) {
    table.stack-mobile thead { display: none; }
    table.stack-mobile, table.stack-mobile tbody,
    table.stack-mobile tr, table.stack-mobile td { display: block; width: 100%; }
    table.stack-mobile tr {
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        margin-bottom: .7rem;
        padding: .3rem .1rem;
        background: var(--white);
    }
    table.stack-mobile tr:hover { background: var(--white); }
    table.stack-mobile td {
        border: none;
        display: flex; align-items: center; justify-content: space-between;
        gap: 1rem; padding: .42rem .9rem; text-align: right;
    }
    table.stack-mobile td::before {
        content: attr(data-label);
        font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
        color: var(--mist); font-weight: 700; text-align: left; flex-shrink: 0;
    }
    table.stack-mobile td[data-label=""] { justify-content: flex-end; padding-top: .6rem; }
    table.stack-mobile td[data-label=""]::before { content: none; }
    table.stack-mobile .cell-primary { font-weight: 600; color: var(--ink); }
}

/* ============================================================
   BOTTOM NAVIGATION (mobile)
   The active item drops a mint pin — a nod to the logo's map marker.
   ============================================================ */
.bottom-nav { display: none; }

@media (max-width: 991.98px) {
    .app-sidebar { display: none; }
    .app-shell { display: block; min-height: auto; }
    .app-content {
        padding: 1rem .9rem;
        padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 1.25rem);
    }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(255,255,255,.97);
        backdrop-filter: saturate(180%) blur(12px);
        -webkit-backdrop-filter: saturate(180%) blur(12px);
        border-top: 1px solid var(--line);
        z-index: 1040;
        box-shadow: 0 -2px 14px rgba(30,60,55,.06);
    }

    .bottom-nav a {
        flex: 1;
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        gap: 2px;
        text-decoration: none;
        color: var(--mist);
        font-size: .66rem;
        font-weight: 600;
        position: relative;
        padding-top: 6px;
        min-width: 0;
    }
    .bottom-nav a i { font-size: 1.28rem; line-height: 1; }
    .bottom-nav a span {
        max-width: 100%;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        padding: 0 2px;
    }
    .bottom-nav a.active { color: var(--teal-deep); }
    .bottom-nav a.active::before {
        content: "";
        position: absolute; top: 0; left: 50%;
        transform: translateX(-50%);
        width: 26px; height: 3px;
        background: var(--mint);
        border-radius: 0 0 4px 4px;
    }
    .bottom-nav a .nav-dot {
        position: absolute;
        top: 5px; left: 50%; margin-left: 6px;
        width: 8px; height: 8px; border-radius: 50%;
        background: var(--rose);
        border: 1.5px solid #fff;
    }

    /* "More" sheet */
    .more-sheet .offcanvas-body { padding: .5rem .75rem 1.5rem; }
    .more-grid {
        display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem;
    }
    .more-grid a {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: .4rem; text-align: center;
        padding: .95rem .4rem;
        border: 1px solid var(--line); border-radius: var(--radius-sm);
        text-decoration: none; color: var(--charcoal);
        font-size: .74rem; font-weight: 600; line-height: 1.25;
        background: var(--white);
    }
    .more-grid a i { font-size: 1.35rem; color: var(--teal); }
    .more-grid a.active { border-color: var(--mint); background: var(--mint-wash); color: var(--teal-ink); }
    .more-sheet .sheet-label {
        font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
        color: var(--mist); font-weight: 700; padding: 1rem .25rem .5rem;
    }

    .page-title { font-size: 1.2rem; }
    .app-content > .card { border-radius: var(--radius-sm); }
}

/* Desktop hides the mobile-only bits */
@media (min-width: 992px) {
    .mobile-only { display: none !important; }
}
@media (max-width: 991.98px) {
    .desktop-only { display: none !important; }
}

/* ============================================================
   AUTH SCREENS
   ============================================================ */
.auth-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem 1rem;
    background:
        radial-gradient(1000px 480px at 15% -10%, rgba(110,206,182,.28), transparent 60%),
        radial-gradient(900px 520px at 105% 108%, rgba(63,169,143,.22), transparent 62%),
        var(--paper);
}

.auth-card {
    width: 100%; max-width: 430px;
    background: var(--white);
    border-radius: 20px;
    padding: 2rem 1.75rem 1.75rem;
    box-shadow: var(--shadow-lift);
    border: 1px solid var(--line);
}
.auth-card.wide { max-width: 560px; }

.auth-logo {
    width: 76px; height: 76px;
    object-fit: contain;
    display: block; margin: 0 auto .85rem;
    border-radius: 18px;
    background: #fff;
}
.auth-title {
    text-align: center; font-size: 1.3rem; font-weight: 700;
    margin: 0 0 .2rem; color: var(--ink);
}
.auth-sub {
    text-align: center; font-size: .87rem; color: var(--slate);
    margin: 0 0 1.4rem; line-height: 1.5;
}
.auth-foot {
    text-align: center; font-size: .82rem; color: var(--slate);
    margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line);
}
.auth-copy {
    text-align: center; font-size: .72rem; color: var(--mist);
    margin-top: 1.25rem; line-height: 1.6;
}

/* Step dots on the signup flow */
.steps { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-bottom: 1.2rem; }
.steps .step {
    width: 26px; height: 4px; border-radius: 4px; background: var(--line);
}
.steps .step.done { background: var(--mint); }
.steps .step.now  { background: var(--teal); }

/* ============================================================
   MISC
   ============================================================ */
.alert { border-radius: var(--radius-sm); border: none; font-size: .88rem; padding: .8rem 1rem; }
.alert-success { background: var(--mint-wash); color: var(--teal-ink); }
.alert-danger  { background: #FBE7E6; color: #A33B37; }
.alert-info    { background: #E7F0FA; color: #2F5F92; }
.alert-warning { background: #FDF1DF; color: #96631C; }

.modal-content { border-radius: var(--radius); border: none; }
.modal-header { border-bottom: 1px solid var(--line); padding: 1rem 1.15rem; }
.modal-title { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; }
.modal-footer { border-top: 1px solid var(--line); padding: .8rem 1.15rem; }

@media (max-width: 575.98px) {
    /* Full-height sheets read better than floating boxes on a phone */
    .modal-dialog { margin: 0; max-width: 100%; }
    .modal-content { border-radius: 18px 18px 0 0; min-height: 60vh; }
    .modal-dialog-centered { align-items: flex-end; min-height: 100%; }
}

.nav-tabs { border-bottom: 1px solid var(--line); gap: .2rem; }
.nav-tabs .nav-link {
    border: none; border-bottom: 2.5px solid transparent;
    color: var(--slate); font-weight: 600; font-size: .88rem;
    padding: .6rem .9rem; border-radius: 0;
}
.nav-tabs .nav-link:hover { border-bottom-color: var(--mint-soft); color: var(--ink); }
.nav-tabs .nav-link.active {
    color: var(--teal-deep); border-bottom-color: var(--teal); background: transparent;
}
@media (max-width: 767.98px) {
    .nav-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tabs .nav-link { white-space: nowrap; }
}

.app-footer {
    text-align: center;
    font-size: .74rem;
    color: var(--mist);
    padding: 2rem 1rem .5rem;
    line-height: 1.7;
    border-top: 1px solid var(--line);
    margin-top: 2.25rem;
}
.app-footer strong { color: var(--slate); font-weight: 600; }
.app-footer .footer-brand,
.app-footer .footer-meta { display: block; }
.app-footer .footer-author { color: var(--teal-deep); font-weight: 700; }

/* Build credit on the signed-out pages (login, register, verify, reset) */
.auth-credit {
    text-align: center;
    font-size: .72rem;
    color: var(--mist);
    line-height: 1.7;
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
}
.auth-credit strong { color: var(--teal-deep); font-weight: 700; }

/* Checklist rows in the hand-over book */
.check-row {
    display: flex; gap: .8rem; align-items: flex-start;
    padding: .85rem .9rem;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    margin-bottom: .6rem; background: var(--white);
    transition: border-color .15s ease, background .15s ease;
}
.check-row.is-done { border-color: var(--mint); background: #FAFEFC; }
.check-row .form-check-input {
    width: 22px; height: 22px; margin-top: .1rem; flex-shrink: 0;
    border-color: var(--mist); cursor: pointer;
}
.check-row .form-check-input:checked { background-color: var(--teal); border-color: var(--teal); }
.check-row .cr-body { flex: 1; min-width: 0; }
.check-row .cr-label { font-weight: 600; font-size: .9rem; color: var(--ink); cursor: pointer; }
.check-row .cr-help { font-size: .76rem; color: var(--mist); margin-top: .1rem; line-height: 1.4; }
.check-row textarea { margin-top: .55rem; font-size: .86rem; }

.sig-line {
    font-size: .74rem; color: var(--slate);
    border-top: 1px dashed var(--line); padding-top: .45rem; margin-top: .5rem;
}

@media print {
    .app-topbar, .app-sidebar, .bottom-nav, .no-print, .btn { display: none !important; }
    .app-content { padding: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; }
    body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}
