﻿/* =========================================
   PAGE BACKGROUND (NOW THEME CONTROLLED)
========================================= */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--page-bg);
    color: var(--text-color);
    position: relative;
    padding-top: 68px;
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Header (auto from main.css) */
.admin-header {
    backdrop-filter: blur(18px);
    background: var(--header-bg);
}

/* =========================================
   MAIN LAYOUT
========================================= */
.admin-login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 16px;
    overflow: hidden;
}

/* =========================================
   FLOATING BLOBS (THEME COLOR BASED)
========================================= */
.admin-bg-blob {
    position: absolute;
    border-radius: 999px;
    filter: blur(50px);
    opacity: 0.55;
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 0;
}

.admin-bg-blob-1 {
    width: 420px;
    height: 420px;
    background: color-mix(in srgb, var(--primary) 55%, transparent);
    right: 14%;
    top: 22%;
}

.admin-bg-blob-2 {
    width: 360px;
    height: 360px;
    background: color-mix(in srgb, var(--primary-soft) 55%, transparent);
    left: 18%;
    bottom: 8%;
}

/* =========================================
   LOGIN CARD (FULL THEME SUPPORT)
========================================= */
.admin-login-card {
    max-width: 420px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.admin-login-card-inner {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 32px 28px 26px;
    box-shadow: 0 20px 55px rgba(0,0,0,0.35);
    backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* =========================================
   TITLES
========================================= */
.admin-login-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
}

.admin-login-subtitle {
    font-size: 13px;
    margin: 0 0 4px 0;
    color: var(--subtext-color);
}

/* =========================================
   INPUTS
========================================= */
.admin-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}

    .admin-input-group label {
        font-size: 12px;
        color: var(--subtext-color);
    }

.admin-input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.55);
    padding: 10px 14px;
    font-size: 13px;
    background: var(--section-bg);
    color: var(--text-color);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

    .admin-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 1px var(--primary), 0 0 0 8px color-mix(in srgb, var(--primary) 25%, transparent);
    }

/* =========================================
   REMEMBER ME
========================================= */
.admin-remember-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--subtext-color);
}

.admin-checkbox input,
.admin-checkbox {
    cursor: pointer;
}

/* =========================================
   PRIMARY BUTTON (THEME COLOR)
========================================= */
.admin-btn-primary {
    margin-top: 18px;
    width: 100%;
    border-radius: 999px;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary);
    color: #0b1120;
    box-shadow: 0 18px 45px color-mix(in srgb, var(--primary) 55%, transparent);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

    .admin-btn-primary:hover {
        transform: translateY(-1px);
        filter: brightness(1.04);
        box-shadow: 0 22px 60px color-mix(in srgb, var(--primary) 70%, transparent);
    }

/* =========================================
   SECONDARY / TERTIARY BUTTONS
========================================= */
.admin-btn-secondary,
.admin-btn-tertiary {
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(148,163,184,0.45);
    margin-top: 8px;
    background: var(--section-bg);
    color: var(--text-color);
    text-decoration: none;
}

    .admin-btn-secondary:hover,
    .admin-btn-tertiary:hover {
        border-color: var(--primary);
    }

/* dashed version */
.admin-btn-tertiary {
    border-style: dashed;
    opacity: .9;
}

/* =========================================
   DIVIDER
========================================= */
.admin-login-divider {
    margin-top: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(148,163,184,0.35);
}

/* =========================================
   ERROR LABEL
========================================= */
.admin-error-label {
    background: color-mix(in srgb, #f87171 10%, var(--card-bg));
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    color: #b91c1c;
    border: 1px solid rgba(248,113,113,0.6);
}

/* =========================================
   THEME TOGGLE BUTTON
========================================= */
.theme-toggle {
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.4);
    background: var(--section-bg);
    width: 40px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .theme-toggle span {
        font-size: 14px;
        color: var(--text-color);
    }

/* =========================================
   FOOTER
========================================= */
.admin-footer {
    height: 70px;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--subtext-color);
}

/* MATCH ALL OTHER PAGES */
.fixed-header-height {
    height: 68px;
    display: flex;
    align-items: center;
    padding: 0 22px;
}

.fixed-footer-height {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   LOGIN PAGE LAYOUT
========================================= */

.admin-login-wrapper {
    min-height: 100vh;
    padding-top: 120px; /* space for fixed header */
    padding-bottom: 90px; /* space for fixed footer */
    display: flex;
    justify-content: center;
    align-items: center;
    background-attachment: fixed; /* FIX #3 — background no scroll */
    position: relative;
}

/* center card */
.admin-login-card {
    width: 420px;
}

/* remove create account etc (not used anymore) */
.hide {
    display: none !important;
}

/* FIX: no overlap with footer */
body {
    padding-bottom: 100px !important;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.remember-label {
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
}

html[data-mode="dark"] body {
    background: #0f0f0f;
    color: #e5e7eb;
}

html[data-mode="dark"] .admin-login-card {
    background: rgba(20, 20, 20, 0.9);
    color: #e5e7eb;
}

html[data-mode="dark"] input {
    background: #111;
    color: #fff;
    border-color: #333;
}
