/* ============================================================
   login.css — Login Page Module Styles (Light Theme)
   Sistem Manajemen Media Sosial
   ============================================================ */

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

:root {
    --bg-deep:        #f4f6fb;
    --bg-card:        #ffffff;
    --border:         #e8edf5;
    --accent:         #2d6cdf;
    --accent-glow:    rgba(45,108,223,.2);
    --accent-dim:     #1e40af;
    --text-main:      #111827;
    --text-muted:     #6b7280;
    --error-bg:       #fef2f2;
    --error-border:   #fecaca;
    --error-text:     #dc2626;
    --success-bg:     #ecfdf5;
    --success-border: #a7f3d0;
    --success-text:   #059669;
    --sh-md:          0 8px 32px rgba(0,0,0,.08);
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-deep);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(45,108,223,.05) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139,92,246,.05) 0%, transparent 60%);
    pointer-events: none;
}

/* Grid dots */
body::after {
    content: '';
    position: fixed; inset: 0;
    background-image:
        radial-gradient(circle, rgba(0,0,0,.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

/* Logo/Brand */
.brand {
    text-align: center;
    margin-bottom: 32px;
}

.brand-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 0 24px var(--accent-glow);
}

.brand-icon svg { width: 28px; height: 28px; fill: white; }

.brand-title {
    font-size: 1.5rem; font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text-main);
}

.brand-sub {
    font-size: .8rem; color: var(--text-muted);
    margin-top: 4px; font-weight: 600;
    letter-spacing: .05em; text-transform: uppercase;
}

/* Card */
.card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: var(--sh-md);
}

.card-title {
    font-size: 1.25rem; font-weight: 800;
    margin-bottom: 6px;
}

.card-sub {
    font-size: .88rem; color: var(--text-muted);
    margin-bottom: 28px;
    font-weight: 500;
}

/* Alert */
.alert {
    padding: 12px 16px; border-radius: 12px;
    font-size: .85rem; margin-bottom: 20px;
    display: flex; align-items: flex-start; gap: 10px;
    font-weight: 500;
}
.alert-error   { background: var(--error-bg); border: 1.5px solid var(--error-border); color: var(--error-text); }
.alert-success { background: var(--success-bg); border: 1.5px solid var(--success-border); color: var(--success-text); }
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

/* Form */
.form-group { margin-bottom: 18px; }

label {
    display: block; font-size: .82rem;
    font-weight: 700; color: #374151;
    margin-bottom: 8px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%; padding: 12px 16px;
    background: #f9fafb;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: 'DM Sans', sans-serif;
    font-size: .95rem;
    font-weight: 500;
    outline: none;
    transition: all .2s;
}

input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder { color: #9ca3af; font-weight: 400; }

/* Password toggle */
.input-wrap { position: relative; }
.toggle-pass {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: #9ca3af; padding: 4px;
    display: flex; align-items: center;
    transition: color .2s;
}
.toggle-pass:hover { color: var(--text-main); }
.toggle-pass svg { width: 20px; height: 20px; }

/* Button */
.btn-login {
    width: 100%; padding: 14px;
    background: var(--accent);
    border: none; border-radius: 12px;
    color: white; font-family: 'DM Sans', sans-serif;
    font-size: .95rem; font-weight: 700;
    cursor: pointer; margin-top: 8px;
    transition: all .2s;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-login:hover  { opacity: .9; transform: translateY(-1px); box-shadow: 0 6px 16px var(--accent-glow); }
.btn-login:active { transform: scale(.98) translateY(0); }

/* Loading state */
.btn-login.loading { opacity: .7; cursor: not-allowed; pointer-events: none; }

/* Footer note */
.login-note {
    text-align: center; margin-top: 24px;
    font-size: .8rem; color: var(--text-muted);
    font-weight: 500;
}

.login-note a { color: var(--accent); text-decoration: none; font-weight: 700; }
.login-note a:hover { text-decoration: underline; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.card { animation: fadeIn .4s ease-out both; }
.brand { animation: fadeIn .4s ease-out both; animation-delay: .1s; }
