/* ═══════════════════════════════════════════════════
   ADMIN LOGIN — Beautiful Green Theme with 2FA
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --g-dark:    #1a3d2b;
    --g-main:    #16a34a;
    --g-pale:    #dcfce7;
    --g-ghost:   #f0fdf4;
    --cream:     #fafaf8;
    --border:    #e5e7eb;
    --text:      #111827;
    --text-mid:  #374151;
    --text-soft: #6b7280;
    --red:       #ef4444;
    --amber:     #f59e0b;
    --radius:    14px;
    --radius-sm: 8px;
    --shadow:    0 4px 24px rgba(0,0,0,.08);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.14);
    --transition: all .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'DM Sans', sans-serif;
}

body {
    background: var(--g-dark);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ── BG DECORATION ── */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(22,163,74,.18) 0%, transparent 70%);
    top: -120px; right: -120px;
}

body::after {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(22,163,74,.12) 0%, transparent 70%);
    bottom: -100px; left: -100px;
}

/* ── LOGIN CARD ── */
.login-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    animation: slideUp .4s ease both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Green top accent bar */
.login-card::before {
    content: '';
    display: block;
    height: 5px;
    background: linear-gradient(90deg, var(--g-main), var(--g-dark));
}

/* ── HEADER ── */
.login-header {
    text-align: center;
    padding: 1.25rem 2rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--g-ghost);
}

.login-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--g-main), var(--g-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto .65rem;
    box-shadow: 0 8px 24px rgba(22,163,74,.3);
}

.login-icon i { color: white; font-size: 1.15rem; }

.login-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--g-dark);
    margin-bottom: .2rem;
}

.login-header p {
    font-size: .8rem;
    color: var(--text-soft);
}

/* ── BODY ── */
.login-body {
    padding: 1.1rem 1.75rem 1.4rem;
}

/* Security badge */
.security-badge {
    display: none;
    align-items: center;
    gap: .5rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--g-main);
    background: var(--g-pale);
    border: 1px solid #a3d9b1;
    border-radius: var(--radius-sm);
    padding: .4rem .85rem;
    margin-bottom: .9rem;
}

.security-badge i { font-size: .8rem; }

/* ── MESSAGES ── */
.error-message,
.success-message,
.warning-message {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .83rem;
    font-weight: 500;
    margin-bottom: 1.1rem;
    animation: fadeIn .3s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.error-message   { background: #fee2e2; color: #991b1b; border-left: 3px solid var(--red); }
.success-message { background: var(--g-pale); color: #166534; border-left: 3px solid var(--g-main); }
.warning-message { background: #fffbeb; color: #92400e; border-left: 3px solid var(--amber); }

.error-message i, .success-message i, .warning-message i { flex-shrink: 0; }

/* ── FORM STEPS ── */
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn .3s ease; }

/* Step indicator */
.step-indicator {
    display: none;
    align-items: center;
    gap: .4rem;
    margin-bottom: .9rem;
}

.step-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition);
}

.step-dot.active { background: var(--g-main); width: 20px; border-radius: 4px; }
.step-dot.done   { background: var(--g-pale); border: 1.5px solid var(--g-main); }

.step-label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-left: auto;
}

/* ── FORM GROUPS ── */
.form-group { margin-bottom: .75rem; }

.form-group label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-soft);
    margin-bottom: .3rem;
}

/* Input wrapper */
.input-field {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: .85rem;
    color: var(--text-soft);
    font-size: .85rem;
    pointer-events: none;
    transition: var(--transition);
    z-index: 1;
}

.input-field input,
.input-field select {
    width: 100%;
    padding: .6rem .9rem .6rem 2.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: .875rem;
    color: var(--text);
    background: white;
    transition: var(--transition);
    appearance: none;
}

.input-field input:focus,
.input-field select:focus {
    outline: none;
    border-color: var(--g-main);
    box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}

.input-field input:focus + .input-icon,
.input-field input:focus ~ .input-icon {
    color: var(--g-main);
}

/* Select arrow */
.input-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236b7280' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    padding-right: 2.5rem;
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: .9rem;
    color: var(--text-soft);
    font-size: .85rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
}

.password-toggle:hover { color: var(--g-main); }

/* Disabled state */
.input-field input:disabled,
.input-field select:disabled {
    background: var(--cream);
    color: var(--text-soft);
    cursor: not-allowed;
}

/* ── OTP INPUT GROUP ── */
.otp-group {
    display: flex;
    gap: .6rem;
    justify-content: center;
    margin: .4rem 0 .75rem;
}

.otp-input {
    width: 44px; height: 48px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    color: var(--g-dark);
    background: white;
    transition: var(--transition);
    padding: 0;
}

.otp-input:focus {
    outline: none;
    border-color: var(--g-main);
    box-shadow: 0 0 0 3px rgba(22,163,74,.12);
    background: var(--g-ghost);
}

.otp-input.filled { border-color: var(--g-main); background: var(--g-pale); }

.otp-hint {
    font-size: .78rem;
    color: var(--text-soft);
    text-align: center;
    margin-bottom: .6rem;
}

.otp-hint strong { color: var(--text); }

/* OTP timer */
.otp-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font-size: .78rem;
    color: var(--text-soft);
    margin-bottom: .75rem;
}

.timer-count { font-weight: 700; color: var(--g-main); }
.timer-count.expired { color: var(--red); }

/* Resend */
.resend-link {
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: .78rem;
    color: var(--g-main);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: var(--transition);
    display: none;
}

.resend-link.visible { display: inline; }
.resend-link:hover { color: var(--g-dark); }

/* ── SUBMIT BUTTON ── */
.btn-submit {
    width: 100%;
    padding: .7rem;
    background: var(--g-main);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: .35rem;
}

.btn-submit:hover:not(:disabled) { background: var(--g-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(22,163,74,.25); }
.btn-submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* Back link */
.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin-top: .85rem;
    font-size: .8rem;
    color: var(--text-soft);
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    transition: var(--transition);
    width: 100%;
}

.back-link:hover { color: var(--g-dark); }

/* ── FOOTER LINKS ── */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: .9rem;
    padding-top: .9rem;
    border-top: 1px solid var(--border);
}

.footer-links a {
    font-size: .78rem;
    color: var(--text-soft);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .3rem;
    transition: var(--transition);
}

.footer-links a:hover { color: var(--g-main); }

/* ── SPINNER ── */
.spinner { animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
   
    .security-badge {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--g-main);
    background: var(--g-pale);
    border: 1px solid #a3d9b1;
    border-radius: var(--radius-sm);
    padding: .4rem .85rem;
    margin-bottom: .9rem;
}
/* Step indicator */
.step-indicator {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .9rem;
}
    .login-body  { padding: 1.25rem 1.25rem 1.5rem; }
    .login-header { padding: 1.5rem 1.25rem 1.25rem; }
    .otp-input   { width: 42px; height: 48px; font-size: 1.1rem; }
    .otp-group   { gap: .4rem; }
}