@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;900&family=Inter:wght@300;400;500&display=swap");

/* ── Theme tokens ─────────────────────────────────── */
:root {
    --bg: #030303;
    --surface: #0a0a0a;
    --border: rgba(255, 255, 255, 0.08);
    --primary: #ffffff;
    --secondary: #888888;
    --text: #ffffff;
    --muted: #a0a0a0;
    --danger: #f87171;
    --success: #4ade80;
    --shadow: rgba(0, 0, 0, 0.8);
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

[data-theme="light"] {
    --bg: #030303;
    --surface: #0a0a0a;
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --muted: #a0a0a0;
    --shadow: rgba(0, 0, 0, 0.8);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ── Wrap (subtle bg pattern) ────────────────────── */
.login-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Card ─────────────────────────────────────────── */
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 42px 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 24px 60px var(--shadow), 0 0 120px rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Logo mark ────────────────────────────────────── */
.login-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.85);
    letter-spacing: -1px;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

/* ── Headings ─────────────────────────────────────── */
.login-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-title span {
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.login-sub {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 28px;
}

/* ── Flash ────────────────────────────────────────── */
.flash {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.flash-danger {
    background: rgba(248, 113, 113, 0.1);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.flash-success {
    background: rgba(74, 222, 128, 0.1);
    color: var(--success);
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.flash-info {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ── Form ─────────────────────────────────────────── */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Input row with icon */
.field {
    position: relative;
    display: flex;
    align-items: center;
}

.field>i {
    position: absolute;
    left: 14px;
    font-size: 1rem;
    color: var(--muted);
    pointer-events: none;
}

.field input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.field input::placeholder {
    color: var(--muted);
}

.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

/* Show/hide password button */
.eye-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 1rem;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.eye-btn:hover {
    color: var(--primary);
}

/* Submit button */
.login-btn {
    margin-top: 6px;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff, #a0a0a0);
    color: #000000;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.2s;
}

.login-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

/* ── Back link ────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 22px;
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px 28px;
    }
}