:root {
    --bg: #f6f7f8;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #667085;
    --border: #e5e7eb;
    --shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    --radius: 18px;
    --accent-a: #5b5fd6;
    --accent-b: #67b6c6;
    --accent-c: #8ee3b8;
    --ring: rgba(103, 182, 198, 0.35);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    background: radial-gradient(1200px 500px at 20% 0%, rgba(91, 95, 214, 0.10), transparent 55%), radial-gradient(900px 450px at 90% 10%, rgba(142, 227, 184, 0.12), transparent 60%), var(--bg);
    color: var(--text);
}

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


/* --- Signup password layout --- */

.pw-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    width: 100%;
}

.pw-col {
    display: flex;
    flex-direction: column;
}

.pw {
    margin-top: 10px;
}

.pw__row {
    height: 10px;
    width: 100%;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.pw__bar {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef447a 0%, #ffc35c 40%, #8ee3b8 100%);
    transition: width 160ms ease;
}

.signup-actions {
    margin-top: 22px;
}


/* Responsive : sur mobile étroit on repasse en colonne */

@media (max-width: 520px) {
    .pw-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.card__header {
    padding: 18px 18px 10px;
}

.card__content {
    padding: 14px 18px 18px;
}


/* Logo */

.logo {
    --logo-size: clamp(22px, 4.5vw, 52px);
    display: inline-block;
    line-height: 1;
}

.logo__text {
    font-size: var(--logo-size);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
    background: linear-gradient(90deg, #5b5fd6 0%, #5a73d6 22%, #5f8fd0 45%, #67b6c6 60%, #76d2b2 78%, #8ee3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
    white-space: nowrap;
    display: inline-block;
}

.logo__subtitle {
    display: block;
    margin-top: 6px;
    font-size: clamp(12px, 2.2vw, 14px);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--muted);
}

.card__header .logo {
    margin-bottom: 10px;
}


/* Tabs: light pill-tabs */

.tabs {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    margin: 0 auto 10px auto;
    width: calc(100% - 40px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
}

.tab {
    flex: 1;
    height: 40px;
    border: 0;
    background: transparent;
    font-weight: 700;
    font-size: 13px;
    color: var(--muted);
    border-radius: 999px;
    cursor: pointer;
    text-align: center;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.tab--active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0px 14px rgba(15, 23, 42, 0.10);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.tab:hover {
    background: rgba(15, 23, 42, 0.04);
}

.form {
    display: none;
    gap: 10px;
}

.form--active {
    display: grid;
}

.label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.input {
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 0 12px;
    font-size: 15px;
    outline: none;
}

.input:focus {
    border-color: rgba(103, 182, 198, 0.55);
    box-shadow: 0 0 0 4px var(--ring);
}

.btn {
    height: 48px;
    border-radius: 16px;
    border: 0;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}

.btn--primary {
    color: #ffffff;
    background: linear-gradient(90deg, #5b5fd6 0%, #5a73d6 22%, #5f8fd0 45%, #67b6c6 60%, #76d2b2 78%, #8ee3b8 100%);
    box-shadow: 0 12px 28px rgba(91, 95, 214, 0.25);
}

.btn--primary:active {
    transform: translateY(1px);
    box-shadow: 0 8px 18px rgba(91, 95, 214, 0.20);
}

.btn--ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn--block {
    width: 100%;
}

.mt-16 {
    margin-top: 16px;
}

.mt-10 {
    margin-top: 10px;
}

.btn:focus-visible,
.input:focus-visible,
.tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--ring);
}

.hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.toast {
    margin-top: 12px;
    font-size: 13px;
    color: #fff;
    background: #0b1220;
    border-radius: 14px;
    padding: 10px 12px;
    display: none;
}

.toast--show {
    display: block;
}


/* App shell */

.topbar {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    height: 56px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.topbar__title {
    font-weight: 800;
}

.topbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pill {
    font-size: 12px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 10px;
    background: #fff;
}

.app {
    padding: 18px 16px;
    display: grid;
    place-items: start center;
}

.p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}