/* Kurrent Kapacitor — auth-proxy login surface.
   Palette derived from the dark MudTheme used by the Blazor app
   (see src/Kapacitor.Ui/Components/Layout/MainLayout.razor). */

@font-face {
    font-family: 'Solina';
    src: url('fonts/Solina-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Solina';
    src: url('fonts/Solina-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Solina';
    src: url('fonts/Solina-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --background:      #080b0d; /* powder black */
    --background-gray: #161c1e; /* shade_10 */
    --surface:         #1e2528; /* shade_20 */
    --surface-raised:  #232b2e;
    --lines:           #262e31; /* shade_30 */
    --divider:         #1e2528;

    --text-primary:    #ffffff;
    --text-secondary:  #a79ab8; /* lavender gray */
    --text-tertiary:   #6b6478;

    --primary:         #ded9ff; /* pale lavender (brand accent in dark) */
    --primary-contrast:#080b0d;
    --secondary:       #8d5fff; /* electric lilac */
    --plum:            #631b3a;
    --rose:            #dbabc0;

    --error:           #ff4a80;
    --warning:         #ffed4e;

    --display-font: 'Solina', 'Work Sans', system-ui, sans-serif;
    --body-font:    'Work Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono-font:    'Spline Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--text-primary);
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Atmospheric backdrop — lavender glow top-left, plum glow bottom-right.
   Kept very low alpha so the powder-black stays dominant. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 50% at 15% 0%,  rgba(141, 95, 255, 0.14), transparent 60%),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(99,  27, 58,  0.20), transparent 60%);
    pointer-events: none;
}

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

.brand-bar {
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--display-font);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background:
        radial-gradient(circle at 30% 30%, var(--primary), var(--secondary) 60%, var(--plum) 110%);
    box-shadow:
        0 0 0 1px rgba(222, 217, 255, 0.18),
        0 8px 24px -8px rgba(141, 95, 255, 0.55);
}

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 32px 64px;
}

.card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--background-gray) 100%);
    border: 1px solid var(--lines);
    border-radius: 14px;
    padding: 40px 36px 36px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 30px 60px -30px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(141, 95, 255, 0.06);
    animation: card-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

@keyframes card-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
    color: var(--secondary);
    margin: 0 0 16px;
}

h1 {
    font-family: var(--display-font);
    font-weight: 500;
    font-size: 1.85rem;
    line-height: 1.2;
    letter-spacing: -0.005em;
    margin: 0 0 14px;
    color: var(--text-primary);
}

.lede {
    margin: 0 0 32px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    border-radius: 10px;
    font-family: var(--body-font);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.btn-github {
    background: var(--primary);
    color: var(--primary-contrast);
    border-color: var(--primary);
    box-shadow: 0 12px 32px -16px rgba(222, 217, 255, 0.55);
}

.btn-github:hover {
    background: #ffffff;
    border-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -16px rgba(222, 217, 255, 0.7);
}

.btn-github:active { transform: translateY(0); }

.btn-github svg { color: var(--primary-contrast); }

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--lines);
}

.btn-secondary:hover {
    background: var(--surface-raised);
    border-color: var(--secondary);
    color: var(--primary);
}

/* ---------- Tenant list (picker) ---------- */
.user-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 0 0 24px;
    background: var(--background);
    border: 1px solid var(--lines);
    border-radius: 10px;
}

.user-strip img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-raised);
    flex-shrink: 0;
}

.user-strip .meta {
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}

.user-strip .name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-strip .login {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--mono-font);
}

.section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin: 0 0 10px;
    font-weight: 500;
}

.tenants {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tenant {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--lines);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.012);
    text-decoration: none;
    color: inherit;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.tenant:hover {
    background: var(--surface-raised);
    border-color: rgba(222, 217, 255, 0.35);
    transform: translateX(2px);
}

.tenant:focus-visible {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(141, 95, 255, 0.25);
}

.tenant img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--surface-raised);
    flex-shrink: 0;
}

.tenant .info {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.tenant .org {
    font-family: var(--display-font);
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tenant .origin {
    font-family: var(--mono-font);
    font-size: 0.78rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tenant .arrow {
    color: var(--text-tertiary);
    transition: color 160ms ease, transform 160ms ease;
    flex-shrink: 0;
}

.tenant:hover .arrow {
    color: var(--primary);
    transform: translateX(3px);
}

/* ---------- No-access ---------- */
.empty-mark {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(141, 95, 255, 0.18), rgba(99, 27, 58, 0.16)),
        var(--surface-raised);
    border: 1px solid var(--lines);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    margin: 0 0 22px;
}

.signup-link {
    display: block;
    margin-top: 18px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.signup-link a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 160ms ease;
}

.signup-link a:hover { border-bottom-color: var(--primary); }

/* ---------- Footer ---------- */
.foot {
    padding: 24px 32px 32px;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    text-align: center;
    letter-spacing: 0.02em;
}

.foot a {
    color: var(--text-secondary);
    text-decoration: none;
}

.foot a:hover { color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
    .brand-bar { padding: 20px 20px; }
    .main { padding: 8px 16px 48px; }
    .card { padding: 32px 22px 28px; border-radius: 12px; }
    h1 { font-size: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
    .card { animation: none; }
    .btn, .tenant, .tenant .arrow { transition: none; }
}
