@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap");

:root {
    --al-bg: #f0f5ef;
    --al-ink: #0f2419;
    --al-muted: #4f6458;
    --al-card: rgba(255,255,255,0.92);
    --al-border: rgba(15,36,25,0.10);
    --al-primary: #1b6b34;
    --al-primary-dark: #155a2b;
    --al-primary-soft: rgba(27,107,52,0.10);
    --al-shadow: 0 24px 80px rgba(8,30,36,0.14);
}

/* ── Full reset for standalone page ──────────────── */
body.admin-login-page,
body.admin-login-page *,
body.admin-login-page *::before,
body.admin-login-page *::after {
    box-sizing: border-box;
}

body.admin-login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--al-bg);
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--al-ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.admin-login-page h1,
body.admin-login-page h2,
body.admin-login-page h3,
body.admin-login-page h4,
body.admin-login-page p,
body.admin-login-page span {
    margin: 0;
    padding: 0;
}

body.admin-login-page img {
    max-width: 100%;
    display: block;
}

body.admin-login-page a {
    text-decoration: none;
}

.al-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

/* ── Left panel ─────────────────────────────────── */
.al-showcase {
    position: relative;
    padding: 40px clamp(32px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
    background:
        radial-gradient(ellipse 800px 600px at 10% 80%, rgba(27,107,52,0.12), transparent 70%),
        radial-gradient(ellipse 600px 500px at 90% 10%, rgba(27,107,52,0.08), transparent 70%),
        linear-gradient(160deg, #f0f5ef 0%, #e4f0e6 50%, #dbe9dd 100%);
}

.al-showcase::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(27,107,52,0.06);
    top: -180px;
    right: -160px;
    pointer-events: none;
}

.al-showcase::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(27,107,52,0.07);
    bottom: -140px;
    left: -120px;
    pointer-events: none;
}

.al-showcase-inner {
    position: relative;
    z-index: 1;
    max-width: 580px;
    animation: alFadeSlide 0.7s ease both;
}

/* Brand */
.al-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
}

.al-brand-mark {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.al-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.al-brand-text h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--al-ink);
    white-space: nowrap;
    line-height: 1.2;
}

.al-dot {
    color: var(--al-primary);
}

.al-brand-text > span {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--al-muted);
    letter-spacing: 0.01em;
    line-height: 1.3;
}

/* Heading */
.al-showcase h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(36px, 4.2vw, 52px);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.02em;
    color: var(--al-ink);
    margin-bottom: 12px;
}

p.al-tagline {
    font-size: 16px;
    line-height: 1.6;
    color: var(--al-muted);
    max-width: 50ch;
    margin-bottom: 32px;
}

/* Feature list */
.al-features {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 40px;
}

.al-feature {
    display: flex;
    align-items: center;
    gap: 16px;
}

.al-feature-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    background: var(--al-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.al-feature-icon svg {
    width: 26px;
    height: 26px;
    color: var(--al-primary);
}

.al-feature-text h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--al-ink);
    line-height: 1.3;
}

.al-feature-text p {
    font-size: 13px;
    color: var(--al-muted);
    margin-top: 2px;
    line-height: 1.4;
}

/* Illustration area */
.al-illustration {
    position: relative;
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.al-illustration svg {
    width: 100%;
    max-width: 440px;
    height: auto;
}

/* ── Right panel ─────────────────────────────────── */
.al-panel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 32px;
    background: var(--al-bg);
    overflow-y: auto;
    min-height: 0;
}

.al-card {
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    border: 1px solid var(--al-border);
    background: var(--al-card);
    box-shadow: var(--al-shadow);
    backdrop-filter: blur(8px);
    padding: 36px 32px;
    margin: auto 0;
    animation: alFadeSlide 0.8s ease both;
}

/* Card logo */
.al-card-logo {
    text-align: center;
    margin-bottom: 28px;
}

.al-card-logo-mark {
    width: 110px;
    height: 110px;
    margin: 0 auto 16px;
}

.al-card-logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.al-card-logo h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--al-ink);
    white-space: nowrap;
    line-height: 1.2;
}

.al-card-logo > span {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--al-muted);
    margin-top: 2px;
    line-height: 1.3;
}

.al-card > h3 {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--al-ink);
    line-height: 1.2;
    margin-bottom: 24px;
}

/* Alerts */
.al-alerts {
    margin-bottom: 16px;
}

.al-alerts .alert {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
}

.al-alerts .alert-error,
.al-alerts .alert-danger {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.al-alerts .alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* Form */
.al-form .al-field {
    margin-bottom: 16px;
}

.al-form .al-field label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: #27424a;
    margin-bottom: 6px;
    line-height: 1.3;
}

.al-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.al-input-wrap .al-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

.al-input-wrap input {
    width: 100%;
    border: 1px solid #d1d9dd;
    border-radius: 12px;
    padding: 13px 14px 13px 42px;
    background: #fff;
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 14px;
    color: var(--al-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.4;
}

.al-input-wrap input:focus {
    outline: none;
    border-color: var(--al-primary);
    box-shadow: 0 0 0 3px rgba(27,107,52,0.12);
}

.al-input-wrap input::placeholder {
    color: #94a3b8;
}

/* Password toggle */
.al-toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    z-index: 1;
}

.al-toggle-pw:hover {
    color: #64748b;
}

.al-toggle-pw svg {
    width: 20px;
    height: 20px;
}

/* Remember + Forgot */
.al-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.al-remember-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.al-remember-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    margin: 0;
    padding: 0;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}

.al-remember-label input[type="checkbox"]:checked {
    border-color: var(--al-primary);
    background: var(--al-primary);
}

.al-remember-label input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5.5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.al-forgot-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--al-primary);
    transition: color 0.15s;
}

.al-forgot-link:hover {
    color: var(--al-primary-dark);
    text-decoration: underline;
}

/* Sign In button */
.al-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
    border: 0;
    border-radius: 12px;
    padding: 14px 20px;
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #fff;
    background: var(--al-primary);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 8px 24px rgba(27,107,52,0.25);
}

.al-btn:hover {
    background: var(--al-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(27,107,52,0.3);
}

.al-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.al-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Authorized notice */
.al-authorized {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(27,107,52,0.06);
    border: 1px solid rgba(27,107,52,0.12);
}

.al-authorized-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: rgba(27,107,52,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.al-authorized-icon svg {
    width: 22px;
    height: 22px;
    color: var(--al-primary);
}

.al-authorized-text h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--al-ink);
    line-height: 1.3;
}

.al-authorized-text p {
    font-size: 12px;
    color: var(--al-muted);
    margin-top: 2px;
    line-height: 1.4;
}

/* Throttle */
.al-throttle-note {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.4;
    color: #b45309;
    font-weight: 600;
}

.al-throttle-note[hidden] {
    display: none !important;
}

/* ── Animation ─────────────────────────────────── */
@keyframes alFadeSlide {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 1100px) {
    .al-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        min-height: auto;
    }
    .al-showcase {
        min-height: auto;
        padding-bottom: 32px;
    }
    .al-illustration {
        display: none;
    }
    .al-panel {
        padding: 0 24px 40px;
        overflow-y: visible;
        min-height: auto;
    }
    .al-card {
        margin: 0 auto;
    }
}

@media (max-width: 680px) {
    .al-showcase {
        padding: 24px 20px;
    }
    .al-showcase h1 {
        font-size: clamp(28px, 8vw, 40px);
    }
    .al-features {
        gap: 14px;
    }
    .al-card {
        padding: 24px 20px;
        border-radius: 18px;
    }
}

/* Forgot password modal */
.al-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.al-modal-overlay[hidden] { display: none; }
.al-modal {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px 28px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}
.al-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: none;
    background: none;
    font-size: 22px;
    color: var(--al-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.al-modal-close:hover { background: #f1f5f9; color: var(--al-ink); }
.al-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #e4f3e8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.al-modal-icon svg { width: 26px; height: 26px; color: var(--al-primary); }
.al-modal h3 {
    margin: 0 0 6px;
    font-family: var(--al-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--al-ink);
}
.al-modal-desc {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--al-muted);
}
.al-modal .al-field { margin-bottom: 16px; }
.al-btn-modal {
    width: 100%;
    margin-top: 4px;
}
.al-modal-msg {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 14px;
    line-height: 1.4;
}
.al-modal-msg-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.al-modal-msg-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.al-field-error {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
    margin-top: 5px;
    min-height: 0;
}
.al-field-error:empty { display: none; }
.al-input-wrap.al-input-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220,38,38,0.12);
}
.al-input-wrap.al-input-error input {
    color: #dc2626;
}
