/* Genki customer portal: same visual language as the Genki Fitness Club website
   (ink background, brick red, Saira / Space Mono / Inter), laid out as a mobile app. */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url(../fonts/inter-latin.woff2) format("woff2");
}

@font-face {
    font-family: "Saira";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url(../fonts/saira-latin.woff2) format("woff2");
}

@font-face {
    font-family: "Space Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/spacemono-400-latin.woff2) format("woff2");
}

@font-face {
    font-family: "Space Mono";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../fonts/spacemono-700-latin.woff2) format("woff2");
}

:root {
    --ink: #0b0b0c;
    --ink-2: #121215;
    --ink-3: #191920;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --white: #f6f6f4;
    --muted: #9c9c9a;
    --muted-2: #6e6e6c;
    --red: #9a1b1b;
    --red-2: #b62327;
    --red-deep: #6b1212;
    --red-soft: rgba(154, 27, 27, 0.2);
    --success: #3ddc7e;
    --success-soft: rgba(61, 220, 126, 0.12);
    --warning: #d9b25a;
    --warning-soft: rgba(217, 178, 90, 0.12);
    --r: 14px;
    --tabbar-height: 4.4rem;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-head: "Saira", "Inter", system-ui, sans-serif;
    --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    /* Bootstrap's dark theme, pointed at our palette. */
    --bs-body-bg: var(--ink);
    --bs-body-color: var(--white);
    --bs-body-font-family: var(--font-body);
    --bs-secondary-color: var(--muted);
    --bs-border-color: var(--line);
    --bs-link-color: #d9686b;
    --bs-link-hover-color: var(--white);
}

html { background: var(--ink); -webkit-tap-highlight-color: transparent; }

body {
    background: var(--ink);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: #d9686b; text-decoration: none; }
a:hover { color: var(--white); }

h1, h2, h3 {
    font-family: var(--font-head);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1.05;
}

.u-icon { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }

/* ---- buttons: pills, Saira caps ---- */

.btn {
    --bs-btn-border-radius: 999px;
    --bs-btn-padding-y: 0.8rem;
    --bs-btn-padding-x: 1.5rem;
    --bs-btn-focus-box-shadow: 0 0 0 0.2rem var(--red-soft);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: transform 0.15s ease, background-color 0.2s, color 0.2s, border-color 0.2s;
}

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

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--red);
    --bs-btn-border-color: var(--red);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--red-2);
    --bs-btn-hover-border-color: var(--red-2);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--red-deep);
    --bs-btn-active-border-color: var(--red-deep);
    --bs-btn-disabled-bg: var(--red);
    --bs-btn-disabled-border-color: var(--red);
}

.btn-outline-light {
    --bs-btn-color: var(--white);
    --bs-btn-border-color: var(--line-strong);
    --bs-btn-hover-color: var(--white);
    --bs-btn-hover-bg: rgba(255, 255, 255, 0.04);
    --bs-btn-hover-border-color: #fff;
    --bs-btn-active-color: var(--white);
    --bs-btn-active-bg: rgba(255, 255, 255, 0.06);
    --bs-btn-active-border-color: #fff;
    --bs-btn-disabled-color: var(--muted-2);
    --bs-btn-disabled-border-color: var(--line);
}

.btn-outline-danger {
    --bs-btn-color: #e0777a;
    --bs-btn-border-color: rgba(182, 35, 39, 0.5);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--red);
    --bs-btn-hover-border-color: var(--red);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--red);
    --bs-btn-active-border-color: var(--red);
}

.btn-danger {
    --bs-btn-bg: var(--red);
    --bs-btn-border-color: var(--red);
    --bs-btn-hover-bg: var(--red-2);
    --bs-btn-hover-border-color: var(--red-2);
}

.btn-outline-success {
    --bs-btn-color: var(--success);
    --bs-btn-border-color: rgba(61, 220, 126, 0.4);
    --bs-btn-disabled-color: var(--success);
    --bs-btn-disabled-border-color: rgba(61, 220, 126, 0.4);
}

/* ---- forms ---- */

.form-control {
    background: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--white);
    padding: 0.8rem 0.9rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    background: var(--ink);
    color: var(--white);
    border-color: var(--red-2);
    box-shadow: none;
}

.form-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.form-text { color: var(--muted-2); font-size: 0.82rem; }
.form-check-input { background-color: var(--ink); border-color: var(--line-strong); }
.form-check-input:checked { background-color: var(--red); border-color: var(--red); }
.form-check-label { color: var(--muted); font-size: 0.92rem; }

/* ---- alerts and modal ---- */

.alert { border: 1px solid transparent; border-radius: 10px; font-size: 0.92rem; }
.alert-success { background: var(--success-soft); border-color: rgba(61, 220, 126, 0.3); color: #7ee8a5; }
.alert-danger { background: var(--red-soft); border-color: var(--red); color: #f0a0a2; }
.alert-warning { background: var(--warning-soft); border-color: rgba(217, 178, 90, 0.3); color: var(--warning); }

.modal-content { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); }
.modal-header, .modal-footer { border-color: var(--line); }
.modal-title { font-family: var(--font-head); font-weight: 800; text-transform: uppercase; }
.modal-footer { gap: 0.5rem; }
.modal-footer form { margin: 0; }

/* ---- app shell: one centred column, tab bar floating at the bottom ---- */

.u-app { max-width: 520px; margin: 0 auto; min-height: 100vh; position: relative; }

.u-app::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 420px;
    pointer-events: none;
    background: radial-gradient(420px 300px at 90% -10%, rgba(154, 27, 27, 0.32), transparent 70%);
}

.u-main {
    position: relative;
    padding: calc(1.5rem + env(safe-area-inset-top)) 1.25rem calc(var(--tabbar-height) + 2.75rem + env(safe-area-inset-bottom));
}

.u-tabbar {
    position: fixed;
    left: 50%;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 488px;
    height: var(--tabbar-height);
    display: flex;
    padding: 0.3rem;
    background: rgba(11, 11, 12, 0.88);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
    z-index: 1030;
}

.u-tab {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    border-radius: 999px;
    font-family: var(--font-head);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
}

.u-tab:hover { color: var(--white); }
.u-tab.active { color: #fff; background: var(--red); }

/* ---- page header ---- */

.u-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.u-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--red-2);
    margin: 0 0 0.6rem;
}

.u-eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--red); display: inline-block; }

.u-header h1 { font-size: clamp(1.9rem, 8vw, 2.5rem); margin: 0; }
.u-greeting { color: var(--muted); margin: 0.6rem 0 0; font-size: 0.95rem; }

/* ---- icon tiles ---- */

.u-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    background: var(--red-soft);
    border: 1px solid rgba(182, 35, 39, 0.35);
    color: #e0777a;
}

.u-tile-lg { width: 3.75rem; height: 3.75rem; border-radius: var(--r); }
.u-tile-lg .u-icon { width: 1.8rem; height: 1.8rem; }
.u-tile-sm { width: 2.4rem; height: 2.4rem; border-radius: 10px; }
.u-tile-sm .u-icon { width: 1.15rem; height: 1.15rem; }
.u-tile-success { background: var(--success-soft); border-color: rgba(61, 220, 126, 0.3); color: var(--success); }

/* ---- cards ---- */

.u-card {
    position: relative;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 1.5rem;
    margin-bottom: 1.1rem;
    transition: border-color 0.25s;
}

.u-card-flush { padding: 0.25rem 1.5rem; }
.u-card-error { border-color: var(--red); }

.u-card-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; color: var(--white); }
.u-card-head h2 { flex: 1; font-size: 1.3rem; margin: 0; }
.u-card-head-link { text-decoration: none; }
.u-card-head-link:hover { color: var(--white); }
.u-card-head-link > .u-icon:last-child { color: var(--muted); width: 1.3rem; height: 1.3rem; }

.u-section { font-size: 1.2rem; margin: 2.25rem 0 1rem; }

.u-muted { color: var(--muted); }
.u-hint { color: var(--muted-2); font-size: 0.82rem; margin: 0.7rem 0 0; }
.u-center { text-align: center; margin-top: 1.5rem; }

.u-status-text { color: var(--success); font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.02em; margin: 0 0 0.25rem; }

.u-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: var(--ink-2);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.92rem;
    margin: 0 0 1.1rem;
}

.u-steps { text-align: left; color: var(--muted); font-size: 0.95rem; margin: 0 0 1.1rem; padding-left: 1.3rem; }
.u-steps li { margin-bottom: 0.5rem; }
.u-steps strong { color: inherit; }

.u-note .u-icon { width: 1.2rem; height: 1.2rem; margin-top: 0.15rem; color: var(--red-2); }
.u-note-warning .u-icon { color: var(--warning); }
.u-card .u-note { margin: 1rem 0 0; background: var(--ink-3); }

/* ---- rows (label left, value right) ---- */

.u-rows { margin: 0 0 1.25rem; }

.u-rows > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3rem;
    border-top: 1px solid var(--line);
}

.u-rows > div:first-child { border-top: 0; }
.u-rows dt { color: var(--muted); font-weight: 400; font-size: 0.95rem; }
.u-rows dd { margin: 0; font-weight: 500; text-align: right; }

.u-pill {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.5;
    white-space: nowrap;
    border: 1px solid transparent;
}

.u-pill-success { background: var(--success-soft); color: var(--success); border-color: rgba(61, 220, 126, 0.3); }
.u-pill-warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(217, 178, 90, 0.3); }
.u-pill-muted { background: rgba(255, 255, 255, 0.06); color: var(--muted); border-color: var(--line); }

/* ---- progress ---- */

.u-progress {
    display: block;
    width: 100%;
    height: 0.45rem;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background: var(--ink-3);
}

.u-progress::-webkit-progress-bar { background: var(--ink-3); border-radius: 999px; }
.u-progress::-webkit-progress-value { background: linear-gradient(90deg, var(--red), var(--red-2)); border-radius: 999px; }
.u-progress::-moz-progress-bar { background: var(--red-2); border-radius: 999px; }

.u-progress-meta {
    display: flex;
    justify-content: space-between;
    margin: 0.7rem 0 1.5rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

/* ---- actions ---- */

.u-actions { display: flex; gap: 0.75rem; }
.u-actions > * { flex: 1; margin: 0; }
.u-actions-stack { flex-direction: column; }
.u-actions form { margin: 0; }

.u-quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }

.u-quick a {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    color: var(--white);
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    transition: border-color 0.25s, transform 0.25s, background-color 0.25s;
}

.u-quick a:hover { border-color: var(--red); background: var(--ink-3); transform: translateY(-3px); }

/* ---- plans ---- */

.u-plan-popular { border-color: var(--red); background: linear-gradient(180deg, rgba(154, 27, 27, 0.18), var(--ink-2)); }

.u-ribbon {
    position: absolute;
    top: -0.75rem;
    right: 1.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
    background: var(--red);
}

.u-plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.u-plan h2 { font-size: 1.4rem; margin: 0 0 0.35rem; }
.u-price { text-align: right; font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; line-height: 1.1; margin: 0; white-space: nowrap; }
.u-price small { display: block; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 0.3rem; }

.u-benefits { list-style: none; padding: 0; margin: 0 0 1.4rem; color: var(--muted); }
.u-benefits li { display: flex; gap: 0.75rem; padding: 0.7rem 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.u-benefits li::before { content: "—"; color: var(--red-2); }

/* ---- lists (history, profile info) ---- */

.u-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }

.u-list li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 0.9rem 1rem;
}

.u-list-text { flex: 1; display: flex; flex-direction: column; min-width: 0; font-size: 0.95rem; }
.u-list-text strong { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.02em; }
.u-list-text .u-muted { font-size: 0.82rem; }

.u-info { list-style: none; padding: 0; margin: 0; }
.u-info li { display: flex; align-items: center; gap: 1rem; padding: 0.95rem 0; min-width: 0; }
.u-info li + li { border-top: 1px solid var(--line); }
.u-info div { min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.u-info small { display: block; font-family: var(--font-mono); color: var(--muted); font-size: 0.64rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---- qr ---- */

.u-qr { text-align: center; padding: 2rem 1.4rem; }
.u-qr-icon { margin-bottom: 1.1rem; }
.u-qr-image { display: inline-block; padding: 1rem; background: #fff; border-radius: var(--r); }
.u-qr-image svg { display: block; width: 240px; height: 240px; max-width: 100%; }
.u-qr-text { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; text-transform: uppercase; margin: 1.25rem 0 0.25rem; }
.u-qr #qr-timer { font-family: var(--font-mono); font-size: 0.8rem; }
.u-qr .u-actions { margin-top: 1.25rem; }
.u-qr-expired { width: 272px; height: 272px; max-width: 100%; background: var(--ink-3); }

/* ---- payment result ---- */

.u-result { text-align: center; }
.u-result-state { padding: 0.5rem 0; }
.u-result .spinner-border { color: var(--red-2); }

/* ---- profile ---- */

.u-profile-card { display: flex; align-items: center; gap: 1.1rem; }

.u-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.6rem;
}

.u-profile-name { font-family: var(--font-head); font-size: 1.25rem; font-weight: 800; text-transform: uppercase; }
.u-logout-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; margin-top: 0.5rem; }
.u-logout-btn .u-icon { width: 1.1rem; height: 1.1rem; }

/* ---- sign in / register / payment redirect ---- */

.u-auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1.25rem;
    background:
        radial-gradient(520px 360px at 80% -5%, rgba(154, 27, 27, 0.34), transparent 65%),
        radial-gradient(420px 320px at 0% 105%, rgba(154, 27, 27, 0.14), transparent 65%),
        var(--ink);
}

.u-auth-container { width: 100%; max-width: 440px; }
.u-auth-brand { text-align: center; margin-bottom: 1.75rem; }
.u-auth-brand h1 { font-size: 1.9rem; margin: 1.1rem 0 0.4rem; }
.u-auth-brand p { color: var(--muted); margin: 0; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; }

.u-auth-card {
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 1.75rem 1.4rem;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}

.u-auth-switch { text-align: center; color: var(--muted); margin: 1.5rem 0 0; font-size: 0.92rem; }
.u-auth-footer { text-align: center; color: var(--muted-2); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; margin: 1.25rem 0 0; }
.u-auth-card .u-hint code { color: var(--white); }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---- brand wordmark ---- */

.u-logo { display: block; width: 100%; height: auto; fill: var(--white); }
.u-logo-title { margin: 0; line-height: 0; }
.u-auth-brand .u-logo-title { width: 15rem; max-width: 70%; margin: 0 auto 1.1rem; }
.u-logo-title-home { width: 13.5rem; max-width: 100%; }

/* ---- plan commitment ---- */

.u-commitment { margin: 0.6rem 0 0; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.u-commitment-yes { color: var(--warning); }

/* ---- payment problem ---- */

.u-alert { background: var(--red-soft); border: 1px solid var(--red); border-radius: 10px; padding: 1rem; margin-bottom: 1.25rem; }
.u-alert p { margin: 0 0 0.75rem; font-size: 0.92rem; color: #f0c4c5; }
.u-alert .u-alert-title { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-head); font-weight: 800; font-size: 1rem; text-transform: uppercase; color: #fff; }
.u-alert .u-alert-title .u-icon { width: 1.2rem; height: 1.2rem; color: var(--red-2); }
.u-alert form { margin: 0; }
