* {
    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: var(--midnight);
    color: var(--text);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 18px;
}

/* subtle background glow */
.bg-glow {
    position: fixed;
    inset: -40vh -30vw auto -30vw;
    height: 90vh;
    background:
        radial-gradient(700px 420px at 20% 20%, rgba(220, 232, 250, .20), transparent 60%),
        radial-gradient(600px 360px at 75% 30%, rgba(236, 239, 242, .10), transparent 62%);
    pointer-events: none;
    filter: blur(8px);
    opacity: .85;
    z-index: -1;
}

/* navigation */
header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(10px);
    background: rgba(17, 37, 62, .72);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.logo {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(220, 232, 250, 1), rgba(236, 239, 242, 1));
    box-shadow: 0 12px 30px rgba(220, 232, 250, .18);
}

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

/* buttons */
.btn {
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .10);
}

.btn-primary {
    background: var(--powder);
    color: var(--midnight);
    border-color: rgba(220, 232, 250, .8);
    box-shadow: 0 18px 50px rgba(220, 232, 250, .18);
}

/* shared typography */
h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 5vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.sub {
    margin: 0 0 18px;
    max-width: 52ch;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

/* Auth/layout helpers */
.center {
    min-height: calc(100vh - 68px);
    display: grid;
    place-items: center;
    padding: 28px 18px;
}

.card {
    width: min(520px, 100%);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    box-shadow: var(--shadow);
    padding: 22px;
}

.card h2 {
    margin: 0 0 6px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.muted {
    color: var(--muted);
}

label {
    display: block;
    margin: 12px 0 6px;
    font-size: 12px;
    color: var(--muted);
}

input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    outline: none;
}

input::placeholder {
    color: rgba(255, 255, 255, .45);
}

.row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 12px;
}

.link {
    background: transparent;
    border: none;
    color: var(--text);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-weight: 700;
    font-size: 12px;
    opacity: .9;
}

.msg {
    margin-top: 12px;
    font-size: 12px;
}

.msg.err {
    color: #ff8e8e;
}

.msg.ok {
    color: #7CFFB3;
}

.logo-img {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 12px 30px rgba(220, 232, 250, .18);
    display: block;
}