/* ─────────────────────────────────────────────────────
   login.css — Premium Dark/Glassmorphism Auth Page
───────────────────────────────────────────────────── */

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

:root {
    --primary: #ef4444;
    --primary-hover: #dc2626;
    --bg-dark: #0a0f1e;
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.09);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Deep, layered dark background */
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(239,68,68,0.18) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 90% 100%, rgba(99,102,241,0.1) 0%, transparent 70%),
        #090d1a;
    color: var(--text-white);
    overflow: hidden;
    margin: 0;
}

/* Subtle animated grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.login-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1;
}

/* Glowing orb behind the card */
.login-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(239,68,68,0.12), transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    filter: blur(20px);
}

/* Card */
.login-card {
    position: relative;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 40px 80px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.05) inset,
        0 1px 0 rgba(255,255,255,0.12) inset;
    text-align: center;
    animation: cardIn 0.55s cubic-bezier(0.16,1,0.3,1);
}

/* Top highlight line */
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    border-radius: 50%;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Header */
.login-header {
    margin-bottom: 36px;
}

.login-header h1 {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,0.65));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.77rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.login-form input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.22s;
    box-sizing: border-box;
    caret-color: var(--primary);
    letter-spacing: -0.01em;
}

.login-form input::placeholder { color: rgba(255,255,255,0.25); }

.login-form input:focus {
    border-color: rgba(239,68,68,0.5);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.14), 0 0 20px rgba(239,68,68,0.06);
}

/* Button */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s;
    margin-top: 6px;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 16px rgba(239,68,68,0.35), 0 1px 0 rgba(255,255,255,0.15) inset;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
    border-radius: 14px 14px 0 0;
    pointer-events: none;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(239,68,68,0.45), 0 4px 8px rgba(239,68,68,0.2);
    filter: brightness(1.06);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

.login-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 22px 0;
    color: rgba(255,255,255,0.25);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0 12px;
}

/* Social Buttons */
.btn-social {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-social:hover {
    background: rgba(255,255,255,0.11);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-1px);
}

.btn-social img { width: 20px; }

/* Error Message */
.error-msg {
    display: none;
    color: #fca5a5;
    font-size: 0.83rem;
    margin-top: 16px;
    text-align: center;
    background: rgba(239,68,68,0.12);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(239,68,68,0.25);
    line-height: 1.5;
}

/* Footer Links */
.footer-links {
    margin-top: 28px;
    font-size: 0.83rem;
    color: rgba(255,255,255,0.35);
}

.footer-links a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: #f87171;
}
