/* admin/login.php — split layout (showcase + light form) */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100vh;
    font-family: "Cairo", sans-serif;
}

body {
    display: flex;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f8fafc;
    color: #0f172a;
}

@media (min-width: 900px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
        min-height: 100vh;
        height: auto;
        align-items: stretch;
    }
}

/* --- Showcase panel — Gemini templates (light) --- */
.login-showcase-col {
    display: none;
    width: 50%;
    position: relative;
    overflow: hidden;
    align-items: stretch;
    justify-content: stretch;
    border-inline-start: 1px solid #e8edf3;
    background: #f7f7f8;
}

@media (min-width: 900px) {
    .login-showcase-col {
        display: flex;
        flex-direction: column;
        position: sticky;
        top: 0;
        height: 100vh;
        min-height: 100vh;
        flex-shrink: 0;
    }
}

.login-showcase-visual {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.login-showcase-sky {
    display: none;
}

.login-showcase-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    animation: login-showcase-drift 26s ease-in-out infinite alternate;
    will-change: transform;
}

.login-showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.01);
}

@keyframes login-showcase-drift {
    0% {
        transform: scale(1.03) translate3d(0, -0.5%, 0);
    }
    100% {
        transform: scale(1.06) translate3d(0, 0.5%, 0);
    }
}

.login-showcase-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, transparent 38%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 38%, rgba(0, 0, 0, 0.18) 62%, transparent 100%);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .login-showcase-stage {
        animation: none;
    }

    .login-showcase-img {
        transform: none;
    }
}

.login-showcase-copy {
    position: relative;
    z-index: 4;
    margin-top: auto;
    width: 100%;
    padding: clamp(2rem, 3.5vw, 2.75rem) clamp(1.75rem, 3vw, 2.5rem) clamp(2.25rem, 4vw, 3rem);
    display: flex;
    justify-content: flex-start;
}

.login-showcase-copy__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    max-width: min(30rem, 100%);
    text-align: start;
}

.login-showcase-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.92);
}

.login-showcase-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15em;
    margin: 0 0 12px;
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
    font-weight: 800;
    line-height: 1.24;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.login-showcase-title__line {
    display: block;
}

.login-showcase-title__highlight {
    display: block;
    background: linear-gradient(135deg, #c4b5fd 0%, #f9a8d4 50%, #fde68a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-showcase-lead {
    margin: 0;
    max-width: none;
    font-size: clamp(0.88rem, 1.25vw, 0.98rem);
    line-height: 1.75;
    color: rgba(241, 245, 249, 0.88);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* --- Form column --- */
.login-form-col {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: clamp(1.25rem, 3vw, 2.75rem) clamp(1rem, 3vw, 1.5rem) 2.5rem;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 900px) {
    .login-form-col {
        width: 50%;
        min-height: 100vh;
    justify-content: center;
        border-start-start-radius: 7px;
        border-end-start-radius: 7px;
    }

    .login-page--signup .login-form-col {
        justify-content: flex-start;
        padding-top: 2rem;
        padding-bottom: 2.5rem;
    }
}

.login-form-wrap {
    width: 100%;
    max-width: 400px;
    animation: authFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    padding-bottom: 0.5rem;
}

.login-logo {
    display: block;
    margin: 0 0 1.75rem;
    text-decoration: none;
    text-align: center;
}

.login-logo img {
    display: block;
    height: clamp(3.25rem, 8vw, 4.25rem);
    width: auto;
    max-width: min(320px, 92%);
    margin-inline: auto;
    object-fit: contain;
    object-position: center center;
}

.login-label-muted {
    font-weight: 600;
    color: #94a3b8;
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-title {
    margin: 0 0 10px;
    font-size: clamp(1.45rem, 4.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: #0f172a;
    line-height: 1.25;
    word-wrap: break-word;
}

.login-subtitle {
    margin: 0 0 28px;
    font-size: clamp(0.88rem, 2.5vw, 0.94rem);
    color: #64748b;
    line-height: 1.65;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.login-alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    font-size: 0.875rem;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.login-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.login-alert--success {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
}

.login-field-hint {
    margin: 6px 0 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #64748b;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap .input-icon {
    position: absolute;
    inset-block: 0;
    right: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #94a3b8;
}

.login-input-wrap .input-icon svg {
    width: 18px;
    height: 18px;
}

.login-input {
    width: 100%;
    padding: 13px 44px 13px 14px;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    background: #f8fafc;
    font-family: inherit;
    font-size: 0.94rem;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-input:hover {
    border-color: #cbd5e1;
    background: #fff;
}

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

.login-input:focus,
.login-input:focus-visible {
    outline: none;
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.login-input--password {
    padding-left: 44px;
}

.login-toggle-password {
    position: absolute;
    inset-block: 0;
    left: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
}

.login-toggle-password:hover {
    color: #64748b;
}

.login-toggle-password svg {
    width: 18px;
    height: 18px;
}

.login-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 0.875rem;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #475569;
}

.login-remember input {
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
    cursor: pointer;
}

.login-forgot {
    font-weight: 600;
    color: #0f172a;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-forgot:hover {
    color: #4f46e5;
}

.login-submit {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    color: #fff;
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.login-submit:hover {
    filter: brightness(1.06);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
}

.login-submit:active {
    transform: scale(0.99);
}

.login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
}

.login-switch {
    margin-top: 22px;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

.login-switch a {
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
}

.login-switch a:hover {
    color: #4f46e5;
}

.login-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
}

@media (max-width: 520px) {
    .login-field-row {
        grid-template-columns: 1fr;
    }
}

.login-input--plain {
    padding-right: 14px;
}

.login-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #475569;
    cursor: pointer;
}

.login-terms input {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
    flex-shrink: 0;
}

.login-terms a {
    color: #0f172a;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-oauth {
    margin-bottom: 20px;
}

.login-oauth-card {
    margin-bottom: 22px;
    padding: clamp(14px, 3vw, 18px);
    border-radius: 18px;
    border: 1px solid #e8edf3;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #f8fafc 100%);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(99, 102, 241, 0.06);
}

.login-oauth-card__title {
    margin: 0 0 12px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #6366f1;
}

.login-oauth-card__hint {
    margin: 10px 0 0;
    text-align: center;
    font-size: 0.74rem;
    line-height: 1.5;
    color: #94a3b8;
}

.login-oauth--signup {
    margin-bottom: 0;
}

.login-oauth--signup .login-divider {
    margin-top: 16px;
    margin-bottom: 0;
}

.login-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-google-btn:hover {
    background: #f8f9fa;
    border-color: #c6c9cc;
    box-shadow:
        0 2px 6px rgba(60, 64, 67, 0.12),
        0 1px 2px rgba(60, 64, 67, 0.08);
}

.login-google-btn:active {
    transform: scale(0.99);
}

.login-google-btn__icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.login-google-btn__text {
    line-height: 1.3;
    text-align: center;
}

.login-signup-form {
    margin-top: 4px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

@media (max-width: 899px) {
    .login-form-col {
        padding-top: 1.25rem;
        padding-bottom: 2rem;
    }

    .login-showcase-copy {
        padding-inline: 1.25rem;
    }

    .login-showcase-title {
        font-size: clamp(1.35rem, 5vw, 1.75rem);
    }

    .login-showcase-lead {
        font-size: 0.86rem;
        line-height: 1.65;
    }
}

@media (max-width: 520px) {
    .login-form-wrap {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-form-wrap {
        animation: none;
    }
}

/* --- Signup closed modal (after submit only) --- */
.login-waitlist-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-waitlist-modal--open {
    display: flex;
}

.login-waitlist-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.login-waitlist-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 28px 24px 22px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
    border: 1px solid #e2e8f0;
}

.login-waitlist-modal__close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.login-waitlist-modal__close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.login-waitlist-modal__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #eef2ff;
    font-size: 1.5rem;
}

.login-waitlist-modal__title {
    margin: 0 0 10px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.login-waitlist-modal__lead {
    margin: 0 0 22px;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #64748b;
}

.login-waitlist-modal__panel--info {
    text-align: center;
}

.login-waitlist-modal__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
    margin-top: 4px;
}

.login-waitlist-modal__foot {
    margin: 16px 0 0;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #94a3b8;
}

.login-waitlist-modal__foot a {
    color: #4f46e5;
    font-weight: 700;
    text-decoration: none;
}

.login-waitlist-modal__foot a:hover {
    text-decoration: underline;
}

.login-oauth-card--waitlist {
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.08);
}

.login-oauth-card--waitlist .login-oauth-card__title {
    color: #b45309;
}

.login-google-btn--waitlist {
    border-color: #fcd34d;
}

.login-submit--waitlist {
    background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.22);
}

.login-waitlist-form {
    margin-top: 8px;
}

.login-waitlist-modal__panel--success {
    text-align: center;
}

.login-waitlist-modal__icon--success {
    background: #ecfdf5;
    color: #059669;
    font-weight: 800;
}

.login-waitlist-modal__email {
    margin: 0 0 18px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
}
