@import url('https://fonts.googleapis.com/css2?family=Bruno+Ace&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --ink: #0f172a;
    --muted: #64748b;
    --teal: #136f6d;
    --teal-dark: #0f5e5c;
    --teal-deep: #0b4545;
    --panel: rgba(255,255,255,0.94);
    --line: rgba(255,255,255,0.28);
    --green: #6daa43;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, Arial, sans-serif;
    color: white;
    background:
        radial-gradient(circle at 85% 20%, rgba(109,170,67,0.18), transparent 28%),
        linear-gradient(135deg, var(--teal), var(--teal-deep));
}

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.office-topbar {
    height: 58px;
    padding: 0 38px;
    background: rgba(255,255,255,0.96);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 0 rgba(15,23,42,0.08);
}

.brand-mark {
    font-family: 'Bruno Ace', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.01em;
    color: var(--ink);
    line-height: 1;
}

.top-links {
    display: flex;
    gap: 34px;
    color: #475569;
    font-size: 0.92rem;
    font-weight: 500;
}

.hero-shell {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 86px 38px 56px 38px;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) 420px;
    gap: 64px;
    align-items: center;
    flex: 1;
}

.eyebrow {
    display: inline-flex;
    padding: 8px 12px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.86);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    font-family: 'Bruno Ace', sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 2.8rem);
    line-height: 1.06;
    letter-spacing: -0.05em;
    font-weight: 400;
    color: #dffefe;
    text-wrap: balance;
}

.hero-lead {
    max-width: 720px;
    margin: 26px 0 0 0;
    color: rgba(255,255,255,0.88);
    font-size: 1.08rem;
    line-height: 1.65;
}

.hero-sub {
    max-width: 660px;
    margin: 22px 0 0 0;
    color: rgba(255,255,255,0.78);
    font-size: 1rem;
    line-height: 1.6;
}

.login-card {
    background: var(--panel);
    color: var(--ink);
    border-left: 5px solid var(--green);
    padding: 32px 34px 30px 34px;
    box-shadow:
        0 28px 70px rgba(0,0,0,0.24),
        0 1px 0 rgba(255,255,255,0.8) inset;
    backdrop-filter: blur(12px);
}

.card-kicker {
    color: var(--teal-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.login-card h2 {
    margin: 0 0 22px 0;
    font-size: 1.58rem;
    color: #334155;
}

.login-error {
    margin: 0 0 18px 0;
    padding: 12px 14px;
    background: #fff1f2;
    border-left: 4px solid var(--danger);
    color: var(--danger);
    font-weight: 700;
    font-size: 0.92rem;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    display: grid;
    gap: 7px;
}

.login-form span {
    color: #475569;
    font-size: 0.83rem;
    font-weight: 800;
}

.login-form input {
    width: 100%;
    border: 1px solid #d66f14;
    background: white;
    color: var(--ink);
    padding: 13px 14px;
    font-size: 1rem;
    outline: none;
}

.login-form input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(19,111,109,0.14);
}

#login-button {
    margin-top: 8px;
    width: 100%;
    border: 0;
    background: #2f3032;
    color: white;
    padding: 14px 16px;
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
}

#login-button:hover {
    background: var(--teal-deep);
    transform: translateY(-1px);
}

.forgot-password {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.office-footer {
    padding: 18px 38px 24px 38px;
    display: flex;
    justify-content: space-between;
    color: rgba(255,255,255,0.72);
    font-size: 0.88rem;
}

@media (max-width: 980px) {
    .hero-shell {
        grid-template-columns: 1fr;
        padding-top: 54px;
    }

    .login-card {
        max-width: 520px;
    }
}

@media (max-width: 640px) {
    .office-topbar {
        padding: 0 20px;
    }

    .top-links {
        display: none;
    }

    .brand-mark {
        font-size: 1.65rem;
    }

    .hero-shell {
        padding: 38px 20px 34px 20px;
        gap: 34px;
    }

    .hero-copy h1 {
        font-size: 2.55rem;
    }

    .login-card {
        padding: 26px 22px;
    }

    .office-footer {
        padding: 18px 20px;
        display: grid;
        gap: 6px;
    }
}

/* ==========================================================================
   Platform tenant selection
   ========================================================================== */

.tenant-select-body {
    min-height: 100vh;
}

.tenant-select-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.tenant-select-topbar {
    flex-shrink: 0;
}

.tenant-select-account {
    display: flex;
    align-items: center;
    gap: 22px;
}

.tenant-select-identity {
    display: grid;
    gap: 2px;
    text-align: right;
    line-height: 1.25;
}

.tenant-select-admin-name {
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 700;
}

.tenant-select-admin-email {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.tenant-select-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 17px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #334155;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.14s ease,
        border-color 0.14s ease,
        transform 0.14s ease,
        box-shadow 0.14s ease;
}

.tenant-select-logout:hover {
    border-color: var(--teal-dark);
    background: var(--teal-dark);
    box-shadow: 0 8px 18px rgba(15, 94, 92, 0.2);
    transform: translateY(-1px);
}

.tenant-select-logout:focus-visible {
    outline: 3px solid rgba(19, 111, 109, 0.24);
    outline-offset: 3px;
}

.tenant-select-shell {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 58px 38px 64px;
    flex: 1;
}

.tenant-select-heading {
    margin-bottom: 32px;
}

.tenant-select-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    margin-bottom: 13px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.tenant-select-heading h1 {
    margin: 0;
    font-family: "Bruno Ace", sans-serif;
    color: #dffefe;
    font-size: clamp(1.8rem, 2.4vw, 2.8rem);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.tenant-select-heading p {
    max-width: 620px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.98rem;
    line-height: 1.5;
}

.tenant-select-error {
    margin-bottom: 24px;
    padding: 14px 16px;
    border-left: 4px solid var(--danger);
    background: #fff1f2;
    color: var(--danger);
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.tenant-select-empty {
    padding: 24px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.tenant-select-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, 230px), 1fr)
    );
    gap: 18px;
    width: 100%;
}

.tenant-select-form {
    min-width: 0;
    margin: 0;
}

.tenant-select-card {
    position: relative;
    width: 100%;
    min-height: 178px;
    margin: 0;
    padding: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.99),
            rgba(240, 253, 250, 0.96)
        );
    color: var(--ink);
    font-family: Inter, Arial, sans-serif;
    text-align: left;
    cursor: pointer;
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.17),
        0 1px 0 rgba(255, 255, 255, 0.92) inset;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.tenant-select-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--green);
}

.tenant-select-card:hover {
    border-color: rgba(109, 170, 67, 0.9);
    box-shadow:
        0 24px 52px rgba(0, 0, 0, 0.22),
        0 1px 0 rgba(255, 255, 255, 0.92) inset;
    transform: translateY(-3px);
}

.tenant-select-card:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
}

.tenant-select-card-label {
    color: var(--teal-dark);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.tenant-select-card-name {
    width: 100%;
    margin-top: 12px;
    color: #1e293b;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.tenant-select-card-slug {
    width: 100%;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.tenant-select-card-action {
    width: 100%;
    margin-top: auto;
    padding-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--teal-dark);
    font-size: 0.82rem;
    font-weight: 800;
}

.tenant-select-card-action span {
    font-size: 1.05rem;
    transition: transform 0.16s ease;
}

.tenant-select-card:hover .tenant-select-card-action span {
    transform: translateX(4px);
}

.tenant-select-footer {
    flex-shrink: 0;
}


/* ==========================================================================
   Tenant selection responsive layout
   ========================================================================== */

@media (min-width: 1600px) {
    .tenant-select-grid {
        /*
         * Six balanced columns on large desktop displays.
         * auto-fit remains active below this breakpoint.
         */
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .tenant-select-shell {
        padding-top: 44px;
    }

    .tenant-select-grid {
        grid-template-columns: repeat(
            auto-fit,
            minmax(min(100%, 220px), 1fr)
        );
    }
}

@media (max-width: 640px) {
    .tenant-select-topbar {
        height: auto;
        min-height: 66px;
        padding-top: 11px;
        padding-bottom: 11px;
    }

    .tenant-select-account {
        gap: 12px;
    }

    .tenant-select-identity {
        display: none;
    }

    .tenant-select-logout {
        min-height: 36px;
        padding: 0 14px;
    }

    .tenant-select-shell {
        padding: 34px 20px 42px;
    }

    .tenant-select-heading {
        margin-bottom: 24px;
    }

    .tenant-select-heading h1 {
        font-size: 1.85rem;
    }

    .tenant-select-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tenant-select-card {
        min-height: 158px;
        padding: 20px;
    }
}