/* =========================================================
   DZIKORA CLIENT PORTAL
   Tenant-aware, mobile-first client experience
   ========================================================= */


/* =========================================================
   DESIGN TOKENS
   Values are overridden by the resolved tenant theme.
   ========================================================= */

:root {
    --portal-primary: #765660;
    --portal-accent: #b77f8b;
    --portal-page: #f8f1f3;
    --portal-surface: #ffffff;
    --portal-dark: #171416;
    --portal-heading: #171416;
    --portal-button: #171416;
    --portal-button-text: #ffffff;

    --portal-muted: #806c72;
    --portal-border: rgba(80, 52, 61, 0.11);
    --portal-shadow: 0 24px 70px rgba(54, 29, 37, 0.10);
    --portal-shadow-soft: 0 12px 36px rgba(54, 29, 37, 0.06);
}


/* =========================================================
   RESET & BASE
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(
            circle at 14% 8%,
            color-mix(in srgb, var(--portal-accent) 12%, transparent),
            transparent 30%
        ),
        radial-gradient(
            circle at 88% 24%,
            color-mix(in srgb, var(--portal-primary) 8%, transparent),
            transparent 28%
        ),
        var(--portal-page);
    color: var(--portal-heading);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   SHARED TYPOGRAPHY
   ========================================================= */

.portal-kicker,
.portal-eyebrow,
.section-kicker,
.next-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.portal-kicker {
    color: var(--portal-primary);
}

.portal-eyebrow,
.next-label {
    color: color-mix(in srgb, var(--portal-accent) 74%, #ffffff);
}

.portal-auth h1,
.portal-hello h1 {
    margin: 10px 0 12px;
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-weight: 600;
    letter-spacing: -0.035em;
}

.portal-auth h1 {
    font-size: clamp(38px, 5vw, 50px);
    line-height: 0.98;
}

.portal-hello h1 {
    max-width: 710px;
    margin-top: 8px;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 0.96;
}

.portal-lead {
    max-width: 410px;
    margin: 0;
    color: var(--portal-muted);
    font-size: 15px;
    line-height: 1.65;
}


/* =========================================================
   AUTHENTICATION SHELL
   ========================================================= */

.portal-auth {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
}

.portal-auth-shell {
    width: min(100%, 980px);
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(380px, 0.7fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 34px;
    background: var(--portal-surface);
    box-shadow: var(--portal-shadow);
}

.portal-auth-brand {
    position: relative;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 46px;
    background:
        radial-gradient(
            circle at 88% 10%,
            color-mix(in srgb, var(--portal-accent) 32%, transparent),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            color-mix(in srgb, var(--portal-dark) 94%, var(--portal-primary)),
            var(--portal-dark)
        );
    color: #ffffff;
}

.portal-auth-brand::before,
.portal-auth-brand::after {
    position: absolute;
    content: "";
    border-radius: 999px;
    pointer-events: none;
}

.portal-auth-brand::before {
    top: -90px;
    right: -90px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.portal-auth-brand::after {
    right: 42px;
    bottom: 52px;
    width: 90px;
    height: 90px;
    background: color-mix(in srgb, var(--portal-accent) 20%, transparent);
    filter: blur(2px);
}

.portal-brand-mark {
    position: relative;
    z-index: 1;
    min-height: 82px;
    display: flex;
    align-items: center;
}

.portal-brand-mark img {
    display: block;
    max-width: 210px;
    max-height: 82px;
    object-fit: contain;
    object-position: left center;
}

.portal-brand-mark > span {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    font-family: Georgia, serif;
    font-size: 34px;
}

.portal-auth-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 430px;
}

.portal-auth-brand-copy h2 {
    margin: 12px 0;
    font-family: Georgia, serif;
    font-size: clamp(40px, 5vw, 62px);
    font-weight: 500;
    letter-spacing: -0.04em;
}

.portal-auth-brand-copy p {
    max-width: 380px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
    line-height: 1.65;
}


/* =========================================================
   AUTHENTICATION CARD
   ========================================================= */

.portal-auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 52px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98),
            color-mix(in srgb, var(--portal-page) 38%, #ffffff)
        );
}

.portal-auth label {
    display: grid;
    gap: 9px;
    margin-top: 30px;
    font-size: 13px;
    font-weight: 750;
}

.portal-input-wrap {
    position: relative;
    display: block;
}

.portal-input-prefix {
    position: absolute;
    top: 50%;
    left: 17px;
    color: var(--portal-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.portal-auth input {
    width: 100%;
    padding: 16px 17px;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.78);
    color: var(--portal-heading);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.portal-input-wrap input {
    padding-left: 36px;
}

.portal-auth input:focus {
    border-color: color-mix(
        in srgb,
        var(--portal-primary) 64%,
        transparent
    );
    background: #ffffff;
    box-shadow:
        0 0 0 4px
        color-mix(in srgb, var(--portal-accent) 13%, transparent);
}

.portal-auth .otp {
    padding-left: 17px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-align: center;
}

.portal-auth button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding: 17px 19px;
    border: 0;
    border-radius: 16px;
    background: var(--portal-button);
    color: var(--portal-button-text);
    font-weight: 800;
    cursor: pointer;
    box-shadow:
        0 12px 26px
        color-mix(in srgb, var(--portal-button) 18%, transparent);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease;
}

.portal-auth button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 16px 30px
        color-mix(in srgb, var(--portal-button) 22%, transparent);
}

.portal-auth small {
    display: block;
    margin-top: 28px;
    color: #a08d92;
    text-align: center;
}

.portal-security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--portal-muted);
    font-size: 12px;
    line-height: 1.45;
}

.portal-security-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #3e9460;
    box-shadow: 0 0 0 4px rgba(62, 148, 96, 0.10);
}

.portal-alert {
    margin: 18px 0 0;
    padding: 13px 15px;
    border: 1px solid rgba(39, 121, 70, 0.10);
    border-radius: 13px;
    background: #eef7f1;
    color: #28623b;
    font-size: 13px;
    line-height: 1.5;
}

.portal-alert.error {
    border-color: rgba(139, 48, 48, 0.10);
    background: #fff0f0;
    color: #8b3030;
}

.portal-link {
    display: block;
    margin-top: 20px;
    color: var(--portal-primary);
    text-align: center;
}


/* =========================================================
   PORTAL APP SHELL
   ========================================================= */

.portal-app {
    padding-bottom: 96px;
}

.portal-top {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(
            90deg,
            var(--portal-dark),
            color-mix(in srgb, var(--portal-dark) 86%, var(--portal-primary))
        );
    color: #ffffff;
    box-shadow: 0 8px 30px rgba(20, 14, 16, 0.08);
}

.portal-top-inner {
    width: min(100% - 36px, 920px);
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
}

.portal-top-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.portal-top-logo {
    min-width: 46px;
    max-width: 180px;
    height: 48px;
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
}

.portal-top-logo img {
    width: auto;
    max-width: 170px;
    height: 100%;
    max-height: 46px;
    display: block;
    padding: 7px 10px;
    object-fit: contain;
    object-position: left center;
}

.portal-top-logo span {
    font-family: Georgia, serif;
    font-size: 22px;
}

.portal-top-brand > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.portal-top .portal-kicker {
    color: color-mix(in srgb, var(--portal-accent) 68%, #ffffff);
}

.text-button {
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    cursor: pointer;
}

.portal-shell {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 36px;
}


/* =========================================================
   PORTAL WELCOME
   ========================================================= */

.portal-hello {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.portal-hello p {
    margin: 0;
    color: var(--portal-primary);
    font-weight: 800;
}

.portal-client-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px 9px 9px;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
}

.portal-client-chip > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background:
        color-mix(in srgb, var(--portal-accent) 18%, #ffffff);
    color: var(--portal-primary);
    font-family: Georgia, serif;
    font-size: 20px;
}

.portal-client-chip div {
    display: grid;
    gap: 2px;
}

.portal-client-chip small {
    color: var(--portal-muted);
}


/* =========================================================
   FEATURED NEXT APPOINTMENT
   ========================================================= */

.next-card {
    position: relative;
    overflow: hidden;
    margin: 0 0 24px;
    padding: 28px;
    border-radius: 30px;
    background:
        radial-gradient(
            circle at 92% 10%,
            color-mix(in srgb, var(--portal-accent) 24%, transparent),
            transparent 32%
        ),
        linear-gradient(
            145deg,
            var(--portal-dark),
            color-mix(in srgb, var(--portal-dark) 88%, var(--portal-primary))
        );
    color: #ffffff;
    box-shadow: 0 22px 54px rgba(24, 16, 19, 0.16);
}

.next-card::after {
    position: absolute;
    right: -55px;
    bottom: -65px;
    width: 180px;
    height: 180px;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.next-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.next-card-top > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.next-booking {
    color: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    letter-spacing: 0.05em;
}

.status-pill {
    padding: 7px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--portal-accent) 22%, #ffffff);
    color: var(--portal-dark);
    font-size: 11px;
    font-weight: 850;
}

.next-card-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 34px 0 28px;
}

.date-tile {
    width: 76px;
    height: 84px;
    flex: 0 0 76px;
    display: grid;
    place-content: center;
    border-radius: 21px;
    background: #ffffff;
    color: var(--portal-dark);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
}

.date-tile b {
    font-size: 31px;
    line-height: 1;
}

.date-tile span {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

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

.next-copy h2 {
    margin: 0 0 8px;
    font-family: Georgia, serif;
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 500;
    letter-spacing: -0.025em;
}

.next-copy p {
    margin: 4px 0;
    color: rgba(255, 255, 255, 0.70);
}

.next-copy p span {
    margin: 0 4px;
}

.next-financials {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.055);
}

.next-financials > div {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.next-financials > div:last-child {
    border-right: 0;
}

.next-financials span,
.portal-action-strip span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.next-financials strong {
    font-size: 16px;
}

.balance-emphasis {
    background: rgba(255, 255, 255, 0.065);
}

.balance-clear strong {
    color: #b9e2c7;
}

.portal-action-strip {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 15px;
    padding: 14px 17px;
    border-radius: 17px;
    background: color-mix(
        in srgb,
        var(--portal-accent) 18%,
        rgba(255, 255, 255, 0.04)
    );
}

.portal-action-strip > div {
    display: grid;
    gap: 4px;
}

.portal-action-strip strong {
    font-size: 16px;
}

.portal-action-strip .portal-action-hint {
    color: rgba(255, 255, 255, 0.78);
    text-align: right;
    text-transform: none;
    letter-spacing: 0;
}

.portal-action-strip.paid {
    background: rgba(75, 157, 101, 0.14);
}


/* =========================================================
   PORTAL SUMMARY
   ========================================================= */

.portal-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.portal-summary-card {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 19px;
    border: 1px solid var(--portal-border);
    border-radius: 22px;
    background: color-mix(in srgb, var(--portal-surface) 91%, transparent);
    box-shadow: var(--portal-shadow-soft);
}

.portal-summary-card > span {
    margin-bottom: auto;
    color: var(--portal-primary);
    font-size: 12px;
    font-weight: 750;
}

.portal-summary-card strong {
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 500;
}

.portal-summary-card small {
    margin-top: 3px;
    color: var(--portal-muted);
}


/* =========================================================
   CONTENT SECTIONS
   ========================================================= */

.portal-section,
.empty-card {
    margin: 18px 0;
    padding: 24px;
    border: 1px solid var(--portal-border);
    border-radius: 26px;
    background: var(--portal-surface);
    box-shadow: var(--portal-shadow-soft);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 8px;
}

.section-head > div {
    display: grid;
    gap: 5px;
}

.section-head h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.section-kicker {
    color: var(--portal-primary);
    font-size: 10px;
}

.section-count {
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background:
        color-mix(in srgb, var(--portal-accent) 15%, #ffffff);
    color: var(--portal-primary);
    font-size: 12px;
    font-weight: 850;
}


/* =========================================================
   APPOINTMENT & RECEIPT ROWS
   ========================================================= */

.appointment-row,
.receipt-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid #f0e7e9;
}

.appointment-row:last-child,
.receipt-row:last-child {
    border-bottom: 0;
}

.appointment-row-date,
.receipt-icon {
    width: 48px;
    height: 50px;
    display: grid;
    flex: 0 0 48px;
    place-content: center;
    border-radius: 15px;
    background:
        color-mix(in srgb, var(--portal-accent) 12%, #ffffff);
    color: var(--portal-primary);
    text-align: center;
}

.appointment-row-date strong {
    font-size: 18px;
    line-height: 1;
}

.appointment-row-date span {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 850;
}

.receipt-icon {
    font-family: Georgia, serif;
    font-size: 19px;
}

.appointment-row-copy,
.receipt-row > div:nth-child(2) {
    min-width: 0;
    display: grid;
    flex: 1;
    gap: 5px;
}

.appointment-row-copy span,
.receipt-row span,
.muted {
    color: var(--portal-muted);
    font-size: 12px;
    line-height: 1.45;
}

.appointment-row-money {
    display: grid;
    gap: 3px;
    text-align: right;
}

.appointment-row-money small {
    color: var(--portal-muted);
}

.receipt-row > strong {
    margin-left: auto;
}

.featured-empty {
    display: flex;
    align-items: center;
    gap: 18px;
}

.empty-icon {
    width: 52px;
    height: 52px;
    display: grid;
    flex: 0 0 52px;
    place-items: center;
    border-radius: 18px;
    background:
        color-mix(in srgb, var(--portal-accent) 15%, #ffffff);
    color: var(--portal-primary);
    font-size: 20px;
}

.featured-empty h2 {
    margin: 0 0 5px;
    font-family: Georgia, serif;
}

.featured-empty p {
    margin: 0;
    color: var(--portal-muted);
}


/* =========================================================
   BOTTOM NAVIGATION
   ========================================================= */

.portal-nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 72px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    padding:
        8px
        max(16px, calc((100vw - 520px) / 2))
        calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--portal-border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 -12px 34px rgba(37, 23, 28, 0.05);
    backdrop-filter: blur(18px);
}

.portal-nav a,
.portal-nav > span {
    min-width: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 10px;
    border-radius: 14px;
    color: #8b777c;
    font-size: 10px;
    text-decoration: none;
}

.portal-nav .active {
    background:
        color-mix(in srgb, var(--portal-accent) 11%, #ffffff);
    color: var(--portal-heading);
    font-weight: 800;
}

.portal-nav-icon {
    font-size: 17px;
    line-height: 1;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 820px) {
    .portal-auth {
        padding: 18px;
    }

    .portal-auth-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .portal-auth-brand {
        min-height: 240px;
        padding: 28px;
    }

    .portal-auth-brand-copy h2 {
        font-size: 38px;
    }

    .portal-auth-brand-copy p {
        font-size: 14px;
    }

    .portal-brand-mark {
        min-height: 56px;
    }

    .portal-brand-mark img {
        max-width: 170px;
        max-height: 56px;
    }

    .portal-auth-card {
        padding: 38px 30px 34px;
    }
}

@media (max-width: 620px) {
    .portal-auth {
        padding: 0;
        background: var(--portal-page);
    }

    .portal-auth-shell {
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .portal-auth-brand {
        min-height: 210px;
        padding: 26px 24px;
    }

    .portal-auth-brand-copy h2 {
        margin: 8px 0 6px;
        font-size: 32px;
    }

    .portal-auth-brand-copy p {
        max-width: 320px;
    }

    .portal-auth-card {
        justify-content: flex-start;
        padding: 38px 24px 32px;
        border-radius: 26px 26px 0 0;
        transform: translateY(-22px);
    }

    .portal-auth h1 {
        font-size: 38px;
    }

    .portal-top-inner {
        width: calc(100% - 28px);
        min-height: 72px;
    }

    .portal-top-logo {
        min-width: 42px;
        max-width: 150px;
        height: 42px;
        flex-basis: auto;
    }

    .portal-top-logo img {
        max-width: 140px;
        max-height: 40px;
        padding: 6px 8px;
    }

    .portal-shell {
        width: calc(100% - 24px);
        padding-top: 28px;
    }

    .portal-hello {
        align-items: flex-start;
        margin-bottom: 22px;
    }

    .portal-hello h1 {
        max-width: 330px;
        font-size: 40px;
    }

    .portal-client-chip {
        display: none;
    }

    .next-card {
        padding: 21px;
        border-radius: 25px;
    }

    .next-booking {
        display: none;
    }

    .next-card-main {
        gap: 16px;
        padding: 27px 0 22px;
    }

    .date-tile {
        width: 64px;
        height: 72px;
        flex-basis: 64px;
        border-radius: 18px;
    }

    .date-tile b {
        font-size: 27px;
    }

    .next-copy h2 {
        font-size: 26px;
    }

    .next-copy p {
        font-size: 13px;
    }

    .next-financials {
        grid-template-columns: 1fr 1fr;
    }

    .next-financials > div {
        padding: 14px;
    }

    .next-financials > div:nth-child(2) {
        border-right: 0;
    }

    .next-financials > div:nth-child(3) {
        grid-column: 1 / -1;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-right: 0;
    }

    .portal-action-strip {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .portal-action-strip .portal-action-hint {
        text-align: left;
    }

    .portal-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .portal-summary-card:last-child {
        grid-column: 1 / -1;
        min-height: 92px;
    }

    .portal-section {
        padding: 20px 18px;
        border-radius: 23px;
    }

    .section-head h2 {
        font-size: 22px;
    }

    .appointment-row {
        align-items: flex-start;
    }

    .appointment-row-money {
        padding-top: 3px;
    }

    .appointment-row-money strong {
        font-size: 13px;
        white-space: nowrap;
    }

    .portal-nav {
        gap: 0;
        justify-content: space-around;
        padding-right: 8px;
        padding-left: 8px;
    }

    .portal-nav a,
    .portal-nav > span {
        min-width: 0;
        flex: 1;
        padding-right: 5px;
        padding-left: 5px;
    }
}

@media (max-width: 390px) {
    .portal-hello h1 {
        font-size: 36px;
    }

    .next-card-top > div {
        gap: 7px;
    }

    .next-label {
        font-size: 9px;
    }

    .appointment-row {
        gap: 10px;
    }

    .appointment-row-date {
        width: 43px;
        height: 46px;
        flex-basis: 43px;
    }
}


/* =========================================================
   CLIENT PORTAL MOBILE POLISH V2
   Shared mobile rhythm for auth + authenticated portal.
   Tenant branding remains resolved server-side.
   ========================================================= */

.portal-top-context {
    display: flex;
    align-items: center;
}

.portal-auth-brand-message {
    max-width: 360px;
    margin: 10px 0 0;
    color: rgba(255,255,255,.78);
    font-size: 15px;
    line-height: 1.55;
}

@media (max-width: 620px) {
    /* Authentication: branding first, task immediately afterwards */
    .portal-auth-brand {
        min-height: 172px;
        padding: 22px 24px 24px;
    }

    .portal-brand-mark {
        min-height: 48px;
    }

    .portal-brand-mark img {
        max-width: 205px;
        max-height: 54px;
    }

    .portal-auth-brand-copy {
        margin-top: 16px;
    }

    .portal-auth-brand-copy .portal-eyebrow {
        font-size: 10px;
    }

    .portal-auth-brand-message {
        max-width: 300px;
        margin-top: 7px;
        font-size: 13px;
        line-height: 1.45;
    }

    .portal-auth-card {
        padding: 30px 24px 26px;
        border-radius: 24px 24px 0 0;
        transform: translateY(-18px);
    }

    .portal-auth h1 {
        margin: 8px 0 10px;
        font-size: 34px;
        line-height: 1;
    }

    .portal-lead {
        font-size: 14px;
        line-height: 1.5;
    }

    .portal-auth form {
        margin-top: 24px;
    }

    .portal-auth label {
        gap: 8px;
    }

    .portal-input-wrap {
        min-height: 60px;
    }

    .portal-auth button[type="submit"] {
        min-height: 58px;
        margin-top: 14px;
    }

    .portal-security-note {
        margin-top: 18px;
        font-size: 12px;
    }

    .portal-auth-card > small {
        margin-top: 26px;
    }

    /* Authenticated header: logo becomes the tenant identity */
    .portal-top-inner {
        width: calc(100% - 28px);
        min-height: 78px;
    }

    .portal-top-brand {
        gap: 12px;
    }

    .portal-top-logo {
        min-width: 118px;
        max-width: 170px;
        height: 50px;
        flex-basis: auto;
    }

    .portal-top-logo img {
        width: auto;
        max-width: 164px;
        height: 100%;
        max-height: 48px;
        padding: 6px 9px;
    }

    .portal-top-context .portal-kicker {
        font-size: 10px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .portal-top .text-button {
        min-height: 44px;
        padding: 0 14px;
        white-space: nowrap;
    }

    /* Dashboard hierarchy: useful information reaches first viewport sooner */
    .portal-shell {
        width: calc(100% - 28px);
        padding-top: 24px;
        padding-bottom: 104px;
    }

    .portal-hello {
        margin-bottom: 18px;
    }

    .portal-hello > div > p {
        margin-bottom: 4px;
        font-size: 14px;
    }

    .portal-hello h1 {
        max-width: 430px;
        margin-top: 4px;
        margin-bottom: 0;
        font-size: clamp(31px, 9.3vw, 38px);
        line-height: .98;
        letter-spacing: -.035em;
    }

    .next-card {
        padding: 19px;
        border-radius: 24px;
    }

    .next-card-main {
        gap: 15px;
        padding: 22px 0 18px;
    }

    .date-tile {
        width: 62px;
        height: 68px;
        flex-basis: 62px;
        border-radius: 17px;
    }

    .date-tile b {
        font-size: 25px;
    }

    .next-copy h2 {
        font-size: 24px;
        line-height: 1.05;
    }

    .next-copy p {
        font-size: 12px;
        line-height: 1.45;
    }

    /* Keep all financial facts on one line on phones */
    .next-financials {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .next-financials > div {
        min-width: 0;
        padding: 13px 11px;
        border-top: 0 !important;
        border-right: 1px solid rgba(255,255,255,.08) !important;
    }

    .next-financials > div:last-child {
        grid-column: auto;
        border-right: 0 !important;
    }

    .next-financials span {
        font-size: 9px;
        letter-spacing: .08em;
    }

    .next-financials strong {
        font-size: 13px;
        white-space: nowrap;
    }

    .portal-action-strip {
        margin-top: 12px;
        padding: 12px 13px;
    }

    .portal-summary-grid {
        margin-top: 16px;
    }

    .portal-section {
        margin-top: 16px;
    }
}

@media (max-width: 390px) {
    .portal-top-logo {
        min-width: 102px;
        max-width: 138px;
    }

    .portal-top-logo img {
        max-width: 132px;
    }

    .portal-top-context .portal-kicker {
        font-size: 9px;
    }

    .portal-top .text-button {
        padding: 0 11px;
        font-size: 13px;
    }

    .portal-hello h1 {
        font-size: 31px;
    }

    .next-card {
        padding: 17px;
    }

    .next-financials > div {
        padding: 12px 8px;
    }

    .next-financials strong {
        font-size: 12px;
    }
}
\n\n/* =========================================================\n   CLIENT PORTAL BRAND PANEL V3\n   Josiee language: black stays black. No glow, orb or gradient.\n   ========================================================= */\n\n.portal-auth-brand {\n    background: var(--portal-dark);\n}\n\n.portal-auth-brand::before,\n.portal-auth-brand::after {\n    display: none;\n}\n\n.portal-auth-brand-copy {\n    display: flex;\n    flex-direction: column;\n    align-items: flex-start;\n}\n\n.portal-auth-brand-copy h2 {\n    max-width: 390px;\n    margin: 0 0 26px;\n    color: #ffffff;\n    font-family: Georgia, "Times New Roman", serif;\n    font-size: clamp(46px, 4.6vw, 62px);\n    font-weight: 500;\n    line-height: .96;\n    letter-spacing: -.045em;\n}\n\n.portal-auth-brand-copy .portal-eyebrow {\n    order: 2;\n}\n\n.portal-auth-brand-message {\n    order: 3;\n}\n\n@media (max-width: 820px) {\n    .portal-auth-brand-copy h2 {\n        max-width: 330px;\n        margin-bottom: 18px;\n        font-size: 38px;\n    }\n}\n\n@media (max-width: 620px) {\n    .portal-auth-brand {\n        min-height: 265px;\n        background: var(--portal-dark);\n    }\n\n    .portal-auth-brand-copy {\n        margin-top: 24px;\n    }\n\n    .portal-auth-brand-copy h2 {\n        max-width: 290px;\n        margin: 0 0 17px;\n        font-size: 32px;\n        line-height: .98;\n    }\n}\n\n@media (max-width: 390px) {\n    .portal-auth-brand {\n        min-height: 250px;\n    }\n\n    .portal-auth-brand-copy h2 {\n        font-size: 29px;\n    }\n}\n
/* =========================================================
   PORTAL UX PATCH — 04 OCT 2026
   Solid mobile auth + working section navigation
   ========================================================= */
html { scroll-behavior: smooth; }
#appointments, #receipts, #profile { scroll-margin-top: 110px; }
.portal-profile-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; overflow:hidden; border:1px solid var(--portal-border); border-radius:18px; background:var(--portal-border); }
.portal-profile-grid > div { display:grid; gap:7px; padding:20px; background:var(--portal-surface); }
.portal-profile-grid span { color:var(--portal-muted); font-size:12px; }
.portal-profile-grid strong { font-size:15px; overflow-wrap:anywhere; }
.portal-profile-note { margin:16px 0 0; color:var(--portal-muted); font-size:13px; line-height:1.6; }

/* Remove decorative gradients/flares from authentication. */
.portal-auth { background:var(--portal-page); }
.portal-auth-brand { background:var(--portal-dark); }
.portal-auth-brand::before, .portal-auth-brand::after { display:none; }

@media (max-width: 720px) {
  .portal-auth { display:block; padding:0; background:var(--portal-page); }
  .portal-auth-shell { width:100%; min-height:100vh; display:block; border:0; border-radius:0; box-shadow:none; background:var(--portal-page); }
  .portal-auth-brand { min-height:250px; padding:34px 24px 30px; justify-content:space-between; border-radius:0; }
  .portal-brand-mark { max-width:190px; }
  .portal-auth-brand-copy { max-width:330px; }
  .portal-auth-brand-copy h2 { margin-bottom:10px; font-size:32px; line-height:1; }
  .portal-auth-card { margin:0; padding:34px 24px 42px; border-radius:0; background:var(--portal-page); }
  .portal-auth h1 { font-size:42px; }
  .portal-auth-card form button { min-height:56px; }
  .portal-profile-grid { grid-template-columns:1fr; }
}
