*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0e0f13;
    --card-bg: #16181f;
    --border: #2a2d38;
    --gold: #c9a84c;
    --gold-light: #e8c97a;
    --text: #f0ece0;
    --muted: #7a7d8c;
    --error: #e05c5c;
    --success: #5caa7a;
}

body {
    min-height: 100vh;
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bg-layer {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201,168,76,0.07) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 420px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Brand */
.brand {
    text-align: center;
    animation: fadeDown 0.6s ease both;
}

.brand-icon {
    font-size: 2.5rem;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.02em;
}

.brand-sub {
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* Card */
.card {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeUp 0.5s ease both;
}

.card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.card-desc {
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: -0.5rem;
}

/* Role selector */
.role-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.role-btn {
    padding: 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.role-btn.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201,168,76,0.08);
}

/* Input */
.input {
    width: 100%;
    background: #1c1f29;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.input:focus {
    border-color: var(--gold);
}

.input::placeholder {
    color: var(--muted);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.85rem;
    border-radius: 10px;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--gold);
    color: #0e0f13;
}

.btn-primary:hover {
    background: var(--gold-light);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}

.btn-outline:hover {
    background: rgba(201,168,76,0.08);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    font-size: 0.85rem;
}

.btn-ghost:hover {
    color: var(--text);
}

/* Messages */
.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
    background: rgba(224,92,92,0.1);
    border-radius: 8px;
    border: 1px solid rgba(224,92,92,0.2);
}

.success-msg {
    color: var(--success);
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
    background: rgba(92,170,122,0.1);
    border-radius: 8px;
    border: 1px solid rgba(92,170,122,0.2);
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}