/* ============================================================
   admin/login.css
   ============================================================ */

.adlogin-wrap {
    --al-primary:     #e65100;
    --al-primary-lt:  #ff833a;
    --al-primary-dk:  #ac1900;
    --al-accent:      #ff6f00;
    --al-text:        #3e1a00;
    --al-text-muted:  #8d5524;
    --al-border:      #ffcc80;
    --al-bg:          #fff3e0;
    --al-white:       #ffffff;
    --al-success:     #2e7d32;
    --al-error:       #c62828;
    --al-warning:     #e65100;
    --al-radius:      8px;
    font-family: 'DM Sans', 'Jost', sans-serif;
    background: var(--al-bg);
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.adlogin-card {
    background: var(--al-white);
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(230,81,0,.14);
    overflow: hidden;
}

.adlogin-topbar {
    height: 5px;
    background: linear-gradient(90deg, #ac1900, #e65100, #ff833a);
}

/* ── Header ── */
.adlogin-header {
    text-align: center;
    padding: 2rem 2.5rem 1.25rem;
    border-bottom: 1px solid #ffe0b2;
}

.adlogin-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 2px solid var(--al-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--al-primary);
    font-size: 1.4rem;
}

.adlogin-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--al-primary-dk);
    margin: 0 0 .25rem;
}

.adlogin-header p {
    font-size: .75rem;
    font-weight: 300;
    color: var(--al-text-muted);
    margin: 0;
}

/* ── Body ── */
.adlogin-body {
    padding: 1.5rem 2.5rem 2.25rem;
}

/* ── Security badge ── */
.adlogin-sec-badge {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #fff3e0;
    border: 1px solid var(--al-border);
    border-radius: 20px;
    padding: .4rem .9rem;
    width: fit-content;
    margin: 0 auto 1.25rem;
    font-size: .7rem;
    color: var(--al-primary);
    font-weight: 500;
}

.adlogin-sec-badge i { font-size: .7rem; }

/* ── Alerts ── */
.adlogin-alert {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .8rem 1rem;
    border-radius: var(--al-radius);
    font-size: .78rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.adlogin-alert i { flex-shrink: 0; margin-top: .1rem; }

.adlogin-alert-error {
    background: #fee2e2;
    color: var(--al-error);
    border: 1px solid #fecaca;
}

.adlogin-alert-success {
    background: #fff3e0;
    color: var(--al-primary-dk);
    border: 1px solid var(--al-border);
}

.adlogin-alert-warning {
    background: #fff8e1;
    color: #795548;
    border: 1px solid #ffe082;
}

/* ── Step indicator ── */
.adlogin-step-ind {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.adlogin-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffe0b2;
    transition: background .3s;
}

.adlogin-step-dot.active { background: var(--al-primary); }
.adlogin-step-dot.done   { background: var(--al-primary-dk); }

.adlogin-step-label {
    font-size: .68rem;
    color: var(--al-text-muted);
    margin-left: auto;
    letter-spacing: .04em;
}

/* ── Form steps ── */
.adlogin-step { display: none; }
.adlogin-step.active { display: block; }

/* ── Form groups ── */
.adlogin-group {
    margin-bottom: 1.1rem;
}

.adlogin-label {
    display: block;
    font-size: .73rem;
    font-weight: 500;
    color: var(--al-text);
    margin-bottom: .4rem;
    letter-spacing: .02em;
}

.adlogin-field {
    position: relative;
}

.adlogin-field-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #ffb74d;
    font-size: .8rem;
    pointer-events: none;
    z-index: 1;
}

.adlogin-input,
.adlogin-select {
    width: 100%;
    padding: .68rem 1rem .68rem 2.5rem;
    border: 1.5px solid var(--al-border);
    border-radius: var(--al-radius);
    background: #fffaf7;
    font-family: 'DM Sans', 'Jost', sans-serif;
    font-size: .85rem;
    color: var(--al-text);
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    outline: none;
}

.adlogin-input:focus,
.adlogin-select:focus {
    border-color: var(--al-primary);
    background: var(--al-white);
    box-shadow: 0 0 0 3px rgba(230,81,0,.12);
}

.adlogin-input:disabled,
.adlogin-select:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* Password toggle icon */
.adlogin-pwd-toggle {
    position: absolute;
    right: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #ffb74d;
    font-size: .82rem;
    cursor: pointer;
    z-index: 1;
    transition: color .2s;
}

.adlogin-pwd-toggle:hover { color: var(--al-primary); }

/* ── Submit button ── */
.adlogin-btn-submit {
    width: 100%;
    padding: .78rem 1rem;
    background: linear-gradient(135deg, var(--al-primary), var(--al-accent));
    color: #fff;
    border: none;
    border-radius: var(--al-radius);
    font-family: 'DM Sans', 'Jost', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    box-shadow: 0 4px 14px rgba(230,81,0,.28);
    transition: all .2s;
    margin-top: .5rem;
}

.adlogin-btn-submit:hover {
    background: linear-gradient(135deg, var(--al-primary-dk), var(--al-primary));
    box-shadow: 0 6px 18px rgba(230,81,0,.36);
    transform: translateY(-1px);
}

.adlogin-btn-submit:active  { transform: translateY(0); }
.adlogin-btn-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

/* ── Footer links ── */
.adlogin-footer-links {
    text-align: center;
    margin-top: 1rem;
    font-size: .73rem;
}

.adlogin-footer-links a {
    color: var(--al-primary) !important;
    text-decoration: none;
    font-weight: 500;
}

.adlogin-footer-links a:hover { text-decoration: underline; }

/* ── OTP section ── */
.adlogin-otp-hint {
    text-align: center;
    font-size: .78rem;
    color: var(--al-text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.adlogin-otp-hint strong { color: var(--al-primary-dk); }

.adlogin-otp-group {
    display: flex;
    gap: .5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.adlogin-otp-input {
    width: 44px;
    height: 50px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    border: 1.5px solid var(--al-border);
    border-radius: var(--al-radius);
    background: #fffaf7;
    color: var(--al-text);
    outline: none;
    transition: all .2s;
    font-family: 'DM Sans', monospace;
}

.adlogin-otp-input:focus {
    border-color: var(--al-primary);
    background: var(--al-white);
    box-shadow: 0 0 0 3px rgba(230,81,0,.12);
}

.adlogin-otp-input.filled {
    border-color: var(--al-primary-dk);
    background: #fff3e0;
}

/* ── Timer ── */
.adlogin-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font-size: .72rem;
    color: var(--al-text-muted);
    margin-bottom: .75rem;
}

.adlogin-timer-count { font-weight: 600; color: var(--al-primary); }
.adlogin-timer-count.expired { color: var(--al-error); }

/* ── Resend / Back buttons ── */
.adlogin-resend-btn {
    background: none;
    border: none;
    color: var(--al-text-muted);
    font-size: .73rem;
    cursor: pointer;
    font-family: inherit;
    display: block;
    margin: 0 auto .85rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, color .2s;
}

.adlogin-resend-btn.visible {
    opacity: 1;
    pointer-events: auto;
    color: var(--al-primary);
    font-weight: 500;
}

.adlogin-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    background: none;
    border: none;
    color: var(--al-text-muted);
    font-size: .75rem;
    cursor: pointer;
    font-family: inherit;
    margin: .75rem auto 0;
    transition: color .2s;
}

.adlogin-back-btn:hover { color: var(--al-primary); }

/* Spinner */
@keyframes adlogin-spin { to { transform: rotate(360deg); } }
.adlogin-spinner { animation: adlogin-spin .8s linear infinite; display: inline-block; }

/* ── Bottom bar ── */
.adlogin-bottombar {
    height: 3px;
    background: linear-gradient(90deg, #ff833a, #ac1900);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .adlogin-body   { padding: 1.5rem 1.25rem 2rem; }
    .adlogin-header { padding: 1.75rem 1.25rem 1rem; }
    .adlogin-otp-input { width: 38px; height: 44px; font-size: 1rem; }
}