﻿/* =========================================================
   OVRS site.css — Light-Teal Theme (Auth, Dashboard, Sidebar)
   - Transparent login/app footers (no white band)
   - Compact auth card with inside eye toggle
   - Teal-accent buttons, focus rings
   - Mobile-friendly dashboard + sidebar
   ========================================================= */

/* ---------- Brand tokens ---------- */
:root {
    /* Base surface + ink */
    --ovrs-bg: #f7fbfc;
    --ovrs-surface: #ffffff;
    --ovrs-ink: #0f2133;
    --ovrs-ink-2: #3f5166;
    --ovrs-muted: #6a7a8a;
    --ovrs-border: #e7ecf2;
    --ovrs-white: #fff;
    /* Inputs */
    --ovrs-field: #dfe7ef;
    /* Teal palette */
    --teal-400: #6fded7;
    --teal-500: #43cec6;
    --teal-600: #22b6ad;
    --teal-700: #109c93;
    /* Sidebar/brand */
    --ovrs-teal: #10a39a;
    --ovrs-teal-600: #0d9488;
    --ovrs-teal-50: #e9f7f6;
}

/* ---------- Base layout ---------- */
html, body {
    height: 100%;
    background: var(--ovrs-bg);
}

body {
    margin: 0;
}

/* Ensure shells stretch to the viewport bottom */
#app, .layout-shell, .auth-shell, .page {
    min-height: 100dvh;
    background: var(--ovrs-bg);
}

/* Remove stray bottom gaps on pages that render footers */
.page, main.layout-body, main.layout-bodyx {
    padding-bottom: 0 !important;
}

/* ---------- Footers ---------- */
/* Generic site footer (use on non-login pages if desired) */
.site-footer {
    background: var(--ovrs-bg) !important;
    border: 0;
}

/* Transparent global/app footers (no white band) */
footer.login-footer,
footer.app-footer,
.login-footer__pill {
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border: 0 !important;
    box-shadow: none !important;
}

    /* Guard against pseudo elements painting backgrounds */
    footer.login-footer::before,
    footer.app-footer::before,
    .login-footer__pill::before {
        background: transparent !important;
        content: none !important;
    }

/* Optional: thin teal divider for the app footer on content pages */
footer.app-footer {
    border-top: 1px solid rgba(13,148,136,.35) !important;
}

@media (prefers-color-scheme: dark) {
    footer.app-footer {
        border-top-color: rgba(94,234,212,.35) !important;
    }
}

/* =========================================================
   AUTH SCOPE ONLY  (.auth-shell …)
   Wrap your auth pages with <div class="auth-shell">…</div>
   ========================================================= */
.auth-shell {
    background: var(--ovrs-bg) !important;
    background-image: none !important;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 16px;
    color: var(--ovrs-ink);
}

    /* Compact auth card */
    .auth-shell .auth-card {
        background: var(--ovrs-surface) !important;
        color: var(--ovrs-ink) !important;
        border: 1px solid var(--ovrs-border) !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 30px rgba(15,33,51,.08) !important;
        width: 100%;
        max-width: 360px; /* tighter width */
        padding: 16px 18px;
        box-sizing: border-box;
        margin: 0 auto;
    }

/* Brand above the card (local/global variants) */
.auth-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 6px auto 10px;
    text-align: center;
    color: #0f2133;
}

    .auth-branding img {
        width: 44px;
        height: 44px;
        object-fit: contain;
    }

    .auth-branding h1 {
        margin: 0;
        font-weight: 800;
        font-size: clamp(1rem, 2.6vw, 1.25rem);
        color: var(--teal-700);
    }

/* Fields */
.auth-shell .field {
    margin-bottom: 12px;
    position: relative; /* positioning context for eye */
}

    .auth-shell .field label {
        display: block;
        margin-bottom: 6px;
        color: var(--ovrs-ink);
        font-weight: 600;
    }

/* Inputs (text, email, password, selects) */
.auth-shell .input,
.auth-shell .form-control,
.auth-shell .form-select {
    width: 100%;
    background: var(--ovrs-surface);
    color: var(--ovrs-ink);
    border: 1px solid var(--ovrs-field);
    border-radius: 12px;
    padding: .65rem .85rem;
    line-height: 1.2;
    min-height: 44px;
}

    .auth-shell .input::placeholder,
    .auth-shell .form-control::placeholder {
        color: #9aa8b6;
    }

    .auth-shell .input:focus,
    .auth-shell .form-control:focus,
    .auth-shell .form-select:focus {
        border-color: var(--teal-500);
        box-shadow: 0 0 0 3px rgba(67,206,198,.25);
        outline: none;
    }

/* Eye toggle INSIDE password field (single source of truth) */
.auth-shell .field .input,
.auth-shell .field .form-control {
    padding-right: 3rem !important; /* room for eye */
}

.auth-shell .eye {
    position: absolute;
    inset-inline-end: 12px; /* right: 12px; */
    top: 50%;
    transform: translateY(calc(-50% + 6px)); /* slightly lower */
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    background: transparent;
    border: 0;
    padding: 0;
    color: #6a7a8a;
    cursor: pointer;
    border-radius: 6px;
    font-size: 18px; /* if using emoji 👁 */
    line-height: 1;
    z-index: 3;
    pointer-events: auto;
}

    .auth-shell .eye:hover {
        color: var(--teal-700);
        background: #f1f7f8;
    }

    .auth-shell .eye:focus {
        outline: 3px solid rgba(67,206,198,.35);
        outline-offset: 2px;
    }

/* Primary action button (teal, compact) */
.auth-shell .btn-teal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    background: var(--teal-600);
    border: 1px solid var(--teal-600);
    color: #fff;
    border-radius: 12px;
    padding: .65rem .9rem;
    font-weight: 600;
}

    .auth-shell .btn-teal:hover {
        background: var(--teal-700);
        border-color: var(--teal-700);
    }

/* Divider text */
.auth-shell .sep {
    text-align: center;
    color: var(--ovrs-muted);
    margin: 10px 0;
    font-size: .95rem;
}

/* OAuth (Google) */
.auth-shell .btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 42px;
    background: #fff;
    color: var(--ovrs-ink);
    border: 1px solid var(--ovrs-border);
    border-radius: 12px;
    padding: .6rem .85rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.1;
}

    .auth-shell .btn-google:hover {
        border-color: var(--teal-500);
        box-shadow: 0 0 0 3px rgba(67,206,198,.15);
    }

.auth-shell .icon-google {
    width: 14px;
    height: 14px;
    display: inline-block;
    flex: 0 0 14px;
}

/* Footer note inside auth card */
.auth-shell .foot {
    margin-top: 10px;
    color: var(--ovrs-muted);
    font-size: .95rem;
}

    .auth-shell .foot a {
        color: var(--teal-700);
        text-decoration: none;
    }

        .auth-shell .foot a:hover {
            color: var(--teal-600);
            text-decoration: underline;
        }

/* Validation + alerts (Blazor-friendly) */
.auth-shell .validation-message {
    color: #c62828;
    font-size: .92rem;
}

.auth-shell .input-validation-error {
    border-color: #e57373 !important;
}

    .auth-shell .input-validation-error:focus {
        box-shadow: 0 0 0 3px rgba(229,115,115,.25) !important;
    }

.auth-shell .alert {
    margin-top: 10px;
    background: #fff6f6;
    color: #8a1f1f;
    border: 1px solid #ffd9d9;
    border-radius: 12px;
    padding: .6rem .85rem;
}

/* Responsive tweaks (auth) */
@media (max-width: 480px) {
    .auth-shell {
        padding: 16px;
    }

        .auth-shell .auth-card {
            padding: 16px;
            max-width: 100%;
        }

    .auth-branding h1 {
        font-size: clamp(1rem, 2.8vw, 1.15rem);
    }
}

/* =========================================================
   Utilities (non-invasive)
   ========================================================= */
.u-full {
    width: 100%;
}

.u-center {
    display: grid;
    place-items: center;
}

.u-muted {
    color: var(--ovrs-muted);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.u-focus {
    outline: 3px solid rgba(67,206,198,.35);
    outline-offset: 2px;
}

/* =========================================================
   Dashboard (teal / mobile-first)
   ========================================================= */
.dash {
    min-height: 100dvh;
    background: var(--ovrs-bg);
    padding: clamp(12px, 2.5vw, 20px);
    color: var(--ovrs-ink);
}

/* Header */
.dash-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 12px;
    background: linear-gradient(135deg, rgba(34,182,173,.08), rgba(111,222,215,.08));
    border: 1px solid var(--ovrs-border);
    border-radius: 16px;
    padding: clamp(14px, 3vw, 22px);
    margin-bottom: clamp(14px, 3vw, 22px);
    box-shadow: 0 8px 24px rgba(15,33,51,.05);
}

.dash-badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    color: var(--teal-700);
    background: rgba(34,182,173,.14);
    border: 1px solid rgba(34,182,173,.25);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.dash-title {
    margin: 0 0 4px 0;
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    font-weight: 800;
    color: var(--ovrs-ink);
}

.dash-sub {
    margin: 0;
    color: var(--ovrs-muted);
    font-size: .95rem;
}

/* Grid of cards */
.dash-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr; /* mobile */
}

@media (min-width: 560px) {
    .dash-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .dash-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Card */
.dash-card {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 6px;
    background: var(--ovrs-surface);
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--ovrs-border);
    border-radius: 16px;
    padding: clamp(14px, 2.5vw, 18px);
    box-shadow: 0 6px 18px rgba(15,33,51,.05);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.dash-card__icon {
    font-size: 1.6rem;
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    color: var(--teal-700);
    background: rgba(34,182,173,.1);
    border: 1px solid rgba(34,182,173,.25);
    border-radius: 12px;
}

.dash-card__title {
    font-weight: 800;
    color: var(--ovrs-ink);
    margin-top: 4px;
}

.dash-card__sub {
    color: var(--ovrs-muted);
    font-size: .95rem;
}

.dash-card:hover {
    transform: translateY(-2px);
    border-color: var(--teal-500);
    box-shadow: 0 10px 26px rgba(34,182,173,.14);
}

.dash-card:focus-visible {
    outline: 3px solid rgba(67,206,198,.35);
    outline-offset: 3px;
    transform: translateY(-2px);
}

/* Touch target comfort on small screens */
@media (max-width: 480px) {
    .dash-card {
        padding: 14px;
    }

    .dash-header {
        padding: 14px;
    }
}

/* Optional right-side slot holder */
.dash-header__right {
    min-height: 24px;
}

/* =========================================================
   Sidebar (light teal)
   ========================================================= */
.ovrs-nav {
    position: sticky;
    top: 0;
    align-self: start;
    width: 260px;
    min-height: 100dvh;
    background: var(--ovrs-white);
    border-right: 1px solid var(--ovrs-border);
    display: flex;
    flex-direction: column;
}

/* Brand */
.ovrs-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: linear-gradient(180deg, var(--ovrs-teal-50), #f7fbfc);
    border-bottom: 1px solid var(--ovrs-border);
    position: relative;
}

.ovrs-brand__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-inline: auto; /* center group */
    justify-content: center; /* center contents */
}

:root {
    --ovrs-logo: 44px;
}

.ovrs-brand__logo {
    width: var(--ovrs-logo);
    height: var(--ovrs-logo);
    object-fit: contain;
}

.ovrs-brand__text {
    text-align: center;
}

.ovrs-brand__title {
    font-weight: 800;
    color: var(--ovrs-teal-600);
    font-size: 0.98rem;
}

.ovrs-brand__sub {
    color: var(--ovrs-ink-2);
    font-size: .76rem;
}

/* Mobile toggle */
.ovrs-toggle {
    display: none;
    width: 44px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--ovrs-border);
    background: var(--ovrs-white);
    cursor: pointer;
}

.ovrs-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px auto;
    background: var(--ovrs-ink);
}

/* Menu */
.ovrs-menu {
    padding: 10px 8px;
}

.ovrs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.ovrs-section {
    padding: 12px 10px 6px;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ovrs-ink-2);
}

/* Links */
.ovrs-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ovrs-ink);
    text-decoration: none;
    border: 1px solid transparent;
}

    .ovrs-link .ovrs-ico {
        width: 20px;
        text-align: center;
        font-size: 1.05rem;
    }

    .ovrs-link:hover {
        background: #f0fbfa;
        border-color: var(--ovrs-border);
    }

    a.active.ovrs-link, .ovrs-link.active {
        background: var(--ovrs-teal-50);
        border-color: var(--ovrs-teal-600);
        color: var(--ovrs-teal-600);
        font-weight: 700;
    }

/* Responsive sidebar */
@media (max-width: 980px) {
    :root {
        --ovrs-logo: 40px;
    }

    .ovrs-nav {
        position: relative;
        width: 100%;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--ovrs-border);
    }

    .ovrs-toggle {
        display: inline-block;
    }

    .ovrs-menu {
        display: none;
        padding: 8px;
        background: var(--ovrs-white);
        border-top: 1px solid var(--ovrs-border);
    }

        .ovrs-menu.is-open {
            display: block;
        }
}

/* Layout helper (outer grid with sidebar + content) */
.ovrs-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
}

@media (max-width: 980px) {
    .ovrs-layout {
        grid-template-columns: 1fr;
    }
}









/* === Login tabs (Email / Phone) ===================================== */

.auth-card {
    /* Just in case you want to keep it tighter on wide screens */
    max-width: 420px;
    margin: 0 auto;
}

/* Tab strip container */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    border-radius: 999px;
    padding: 0.25rem;
    background: rgba(15, 110, 108, 0.07); /* light teal wash */
}

/* Individual tab button */
.auth-tab {
    flex: 1 1 0;
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    color: #4a5568; /* neutral text */
    transition: background-color 0.15s ease-out, color 0.15s ease-out, box-shadow 0.15s ease-out, transform 0.1s ease-out;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    /* Active tab (Email or Phone) */
    .auth-tab.active {
        background: var(--teal-700, #0F6E6C);
        color: #ffffff;
        box-shadow: 0 0.15rem 0.35rem rgba(0, 0, 0, 0.18);
    }

    /* Hover + focus states */
    .auth-tab:not(.active):hover {
        background: rgba(15, 110, 108, 0.12);
    }

    .auth-tab:focus-visible {
        box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--teal-600, #178f8b);
    }

    /* Slight press animation */
    .auth-tab:active {
        transform: translateY(1px);
    }

/* === Outline teal button (Send code / Resend code) =================== */

.btn-outline-teal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 0.45rem;
    border: 1px solid var(--teal-600, #178f8b);
    background-color: transparent;
    color: var(--teal-700, #0F6E6C);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease-out, color 0.15s ease-out, box-shadow 0.15s ease-out, transform 0.1s ease-out;
}

    .btn-outline-teal:hover:not(:disabled) {
        background-color: rgba(23, 143, 139, 0.06);
    }

    .btn-outline-teal:focus-visible {
        outline: none;
        box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--teal-600, #178f8b);
    }

    .btn-outline-teal:disabled,
    .btn-outline-teal[aria-busy="true"] {
        opacity: 0.6;
        cursor: default;
    }

/* === Hint text under phone code ===================================== */

.hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #718096; /* cool gray */
}

/* Optional: make the alert match your teal theme a bit nicer */
.auth-card .alert {
    margin-bottom: 0.85rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
}

/* Small tweak so fields in phone login don’t look cramped */
.auth-card .field + .field {
    margin-top: 0.8rem;
}

