/**
 * Admin Portal Login - Bám sát shared premium theme & auth screen styles.
 * Admin gradient: #f43f5e → #fb923c.
 * Hỗ trợ theme sáng/tối qua body.theme-light / body.theme-dark.
 */
:root {
    /* Base from premium_theme */
    --admin-gradient: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
    --admin-primary: #f43f5e;
    --admin-shadow: rgba(244, 63, 94, 0.3);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Auth body - Dark theme (mặc định) ===== */
.auth-body.admin-theme {
    padding-top: 56px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    box-sizing: border-box;
    color: var(--text-main);
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background: radial-gradient(circle at top right, rgba(244, 63, 94, 0.15), transparent 40%),
        radial-gradient(circle at bottom left, rgba(251, 146, 60, 0.15), transparent 40%),
        #0f172a;
}

.auth-body.admin-theme .auth-card-premium {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 48px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    animation: adminFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-body.admin-theme .auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-body.admin-theme .auth-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    background: var(--admin-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-body.admin-theme .auth-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Form */
.auth-body.admin-theme .premium-form-group {
    margin-bottom: 24px;
}

.auth-body.admin-theme .premium-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.auth-body.admin-theme .premium-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.auth-body.admin-theme .premium-label-row .premium-label {
    margin-bottom: 0;
}

.auth-body.admin-theme .premium-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.auth-body.admin-theme .premium-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

/* Buttons */
.auth-body.admin-theme .premium-btn {
    transition: var(--transition);
}

.auth-body.admin-theme .premium-btn-primary {
    background: var(--admin-gradient);
    color: white;
    box-shadow: 0 4px 12px var(--admin-shadow);
}

.auth-body.admin-theme .premium-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.auth-body.admin-theme .auth-link {
    color: var(--admin-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.auth-body.admin-theme .auth-link:hover {
    filter: brightness(1.2);
}

.auth-body.admin-theme .auth-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
}

.auth-body.admin-theme .auth-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Divider */
.auth-body.admin-theme .divider {
    height: 1px;
    background: var(--glass-border);
    margin: 32px 0;
    position: relative;
}

.auth-body.admin-theme .divider::after {
    content: 'または';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #1e293b;
    padding: 0 12px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Auth footer */
.auth-body.admin-theme .auth-footer {
    text-align: center;
    margin-top: 32px;
}

.auth-body.admin-theme .auth-footer-signup {
    margin-top: 0;
}

.auth-body.admin-theme .auth-footer-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

/* Actions */
.auth-body.admin-theme .auth-actions {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-body.admin-theme .auth-btn-primary {
    width: 100%;
    justify-content: center;
    padding: 14px;
}

/* Messages */
.auth-body.admin-theme .auth-messages {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.auth-body.admin-theme .auth-error {
    color: #fca5a5;
    font-size: 14px;
    padding: 10px 16px;
    background: rgba(220, 38, 38, 0.15);
    border-radius: 12px;
}

/* Password toggle */
.auth-body.admin-theme .password-input-wrap {
    position: relative;
}

.auth-body.admin-theme .password-input-wrap .premium-input {
    padding-right: 44px;
}

.auth-body.admin-theme .password-toggle-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 0 12px 12px 0;
    transition: var(--transition);
}

.auth-body.admin-theme .password-toggle-btn:hover {
    color: var(--text-main);
}

/* Auth controls (lang + theme) - tương tự shared navbar */
.auth-controls {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 24px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.auth-controls .control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-controls .control-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.auth-controls .control-options {
    display: flex;
    gap: 6px;
}

.auth-controls .lang-option,
.auth-controls .theme-option {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.auth-controls .lang-option:hover,
.auth-controls .theme-option:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

.auth-controls .lang-option.active,
.auth-controls .theme-option.active {
    background: var(--admin-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--admin-shadow);
}

@keyframes adminFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Light theme ===== */
body.theme-light.auth-body.admin-theme {
    background: linear-gradient(135deg, #fef2f2 0%, #ffe4e6 30%, #fff7ed 70%, #fef3c7 100%) !important;
    color: #0f172a !important;
}

body.theme-light.auth-body.admin-theme .auth-card-premium {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(244, 63, 94, 0.15) !important;
}

body.theme-light.auth-body.admin-theme .auth-header p,
body.theme-light.auth-body.admin-theme .premium-label,
body.theme-light.auth-body.admin-theme .auth-footer-text {
    color: #64748b !important;
}

body.theme-light.auth-body.admin-theme .premium-input {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
}

body.theme-light.auth-body.admin-theme .premium-input::placeholder {
    color: #94a3b8;
}

body.theme-light.auth-body.admin-theme .premium-input:focus {
    border-color: var(--admin-primary) !important;
    background: rgba(244, 63, 94, 0.04) !important;
}

body.theme-light.auth-body.admin-theme .auth-link {
    color: var(--admin-primary) !important;
}

body.theme-light.auth-body.admin-theme .auth-link:hover {
    color: #e11d48 !important;
}

body.theme-light.auth-body.admin-theme .auth-btn-secondary {
    background: rgba(244, 63, 94, 0.08) !important;
    border-color: rgba(244, 63, 94, 0.25) !important;
    color: #be123c !important;
}

body.theme-light.auth-body.admin-theme .auth-btn-secondary:hover {
    background: rgba(244, 63, 94, 0.15) !important;
    border-color: rgba(244, 63, 94, 0.4) !important;
    color: #9f1239 !important;
}

body.theme-light.auth-body.admin-theme .divider {
    background: rgba(0, 0, 0, 0.1) !important;
}

body.theme-light.auth-body.admin-theme .divider::after {
    background: #fff !important;
    color: #64748b !important;
}

body.theme-light .auth-controls {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

body.theme-light .auth-controls .control-label {
    color: rgba(0, 0, 0, 0.65) !important;
}

body.theme-light .auth-controls .lang-option,
body.theme-light .auth-controls .theme-option {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #64748b !important;
}

body.theme-light .auth-controls .lang-option:hover,
body.theme-light .auth-controls .theme-option:hover {
    color: #0f172a !important;
    background: rgba(0, 0, 0, 0.08) !important;
}

body.theme-light .auth-controls .lang-option.active,
body.theme-light .auth-controls .theme-option.active {
    background: var(--admin-gradient) !important;
    color: white !important;
}

/* ===== Warm Dark Theme ===== */
body.theme-dark.auth-body.admin-theme {
    background: radial-gradient(circle at top right, rgba(244, 63, 94, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(251, 146, 60, 0.1), transparent 40%),
        #1e1e1e !important;
    color: #e0e0e0 !important;
}

body.theme-dark.auth-body.admin-theme .auth-card-premium {
    background: #252525 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
}

body.theme-dark.auth-body.admin-theme .auth-header p,
body.theme-dark.auth-body.admin-theme .premium-label,
body.theme-dark.auth-body.admin-theme .auth-footer-text {
    color: #999 !important;
}

body.theme-dark.auth-body.admin-theme .premium-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e0e0e0 !important;
}

body.theme-dark.auth-body.admin-theme .premium-input::placeholder {
    color: #777;
}

body.theme-dark.auth-body.admin-theme .premium-input:focus {
    border-color: #3b82f6 !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

body.theme-dark.auth-body.admin-theme .auth-btn-secondary {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #e0e0e0 !important;
}

body.theme-dark.auth-body.admin-theme .auth-btn-secondary:hover {
    background: #383838 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.theme-dark.auth-body.admin-theme .divider {
    background: rgba(255, 255, 255, 0.08) !important;
}

body.theme-dark.auth-body.admin-theme .divider::after {
    background: #252525 !important;
    color: #777 !important;
}

body.theme-dark .auth-controls {
    background: rgba(37, 37, 37, 0.92) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body.theme-dark .auth-controls .control-label {
    color: #999 !important;
}

body.theme-dark .auth-controls .lang-option,
body.theme-dark .auth-controls .theme-option {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #999 !important;
}

body.theme-dark .auth-controls .lang-option:hover,
body.theme-dark .auth-controls .theme-option:hover {
    color: #e0e0e0 !important;
    background: #383838 !important;
}

body.theme-dark .auth-controls .lang-option.active,
body.theme-dark .auth-controls .theme-option.active {
    background: var(--admin-gradient) !important;
    color: white !important;
}
