@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-deep:       #0a0c14;
    --bg-mid:        #0f1221;
    --glass-bg:      rgba(255, 255, 255, 0.04);
    --glass-border:  rgba(255, 255, 255, 0.10);
    --glass-hover:   rgba(255, 255, 255, 0.07);
    --accent:        #6ee7f7;
    --accent-dim:    rgba(110, 231, 247, 0.15);
    --accent-glow:   rgba(110, 231, 247, 0.35);
    --text-primary:  #e8eaf2;
    --text-secondary:#7a8099;
    --text-muted:    #3d4260;
    --danger:        #f76e8a;
    --danger-dim:    rgba(247, 110, 138, 0.15);
    --success:       #6ef7b4;
    --radius:        16px;
    --radius-sm:     10px;
    --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Sora', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* ── Animated background ── */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    pointer-events: none;
    animation: drift 14s ease-in-out infinite alternate;
}

body::before {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, #6ee7f7, transparent 70%);
    top: -120px;
    left: -100px;
}

body::after {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #a78bfa, transparent 70%);
    bottom: -100px;
    right: -80px;
    animation-delay: -7s;
    animation-duration: 11s;
}

@keyframes drift {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.08); }
}

/* ── Dot grid overlay ── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

/* ── Card ── */
.card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 24px 64px rgba(0,0,0,0.5),
        0 0 80px rgba(110, 231, 247, 0.04);
    animation: fadeUp 0.55s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.card-header {
    margin-bottom: 32px;
    text-align: center;
}

.card-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-dim);
    border: 1px solid rgba(110, 231, 247, 0.2);
    margin-bottom: 20px;
}

.card-logo svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.card-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ── Form ── */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: rgba(110, 231, 247, 0.4);
    background: rgba(110, 231, 247, 0.03);
    box-shadow: 0 0 0 3px rgba(110, 231, 247, 0.08), 0 0 20px rgba(110, 231, 247, 0.05);
}

/* ── Button ── */
.btn {
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Sora', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn:hover::after { opacity: 1; }

.btn-primary {
    background: linear-gradient(135deg, rgba(110,231,247,0.18), rgba(110,231,247,0.08));
    border: 1px solid rgba(110, 231, 247, 0.3);
    color: var(--accent);
    box-shadow: 0 0 24px rgba(110, 231, 247, 0.08);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(110,231,247,0.26), rgba(110,231,247,0.14));
    border-color: rgba(110, 231, 247, 0.5);
    box-shadow: 0 0 32px rgba(110, 231, 247, 0.18);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    border-color: rgba(255,255,255,0.2);
    color: var(--text-primary);
    background: var(--glass-hover);
}

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

/* ── Link ── */
.card-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.card-link span {
    color: var(--accent);
    font-weight: 500;
}

.card-link:hover { color: var(--text-primary); }

/* ── Alert messages ── */
.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    margin-bottom: 20px;
    animation: fadeUp 0.3s ease both;
}

.alert-error {
    background: var(--danger-dim);
    border: 1px solid rgba(247, 110, 138, 0.25);
    color: var(--danger);
}

.alert-success {
    background: rgba(110, 247, 180, 0.08);
    border: 1px solid rgba(110, 247, 180, 0.2);
    color: var(--success);
}

/* ── Panel specific ── */
.panel-greeting {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.panel-greeting span {
    color: var(--accent);
}

.panel-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 32px;
}

.panel-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    padding: 10px 14px;
    background: rgba(110, 247, 180, 0.04);
    border: 1px solid rgba(110, 247, 180, 0.12);
    border-radius: var(--radius-sm);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}