/* ===== LOGIN PAGE STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600&family=Montserrat:wght@200;300;400;500&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --dark: #1e1c19;
    --accent: #a08968;
    --gold: #c9a96e;
    --border: #d8d0c4;
    --mid: #5a5650;
    --font-h: 'Cormorant Garamond', serif;
    --font-b: 'Montserrat', sans-serif;
}

body {
    font-family: var(--font-b);
    background: #f9f8f4;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 820px;
    min-height: 520px;
    box-shadow: 0 12px 60px rgba(30, 28, 25, .18);
    border-radius: 6px;
    overflow: hidden;
}

/* ─── Card (left) ─── */
.login-card {
    flex: 1;
    background: #fff;
    padding: 3rem 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.logo-text-fallback {
    font-family: var(--font-h);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark);
    letter-spacing: .2em;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-text-fallback span {
    font-size: .68rem;
    letter-spacing: .3em;
    font-weight: 300;
    color: var(--mid);
    margin-top: .2rem;
}

.login-title {
    font-family: var(--font-h);
    font-size: 1.7rem;
    font-weight: 400;
    color: var(--dark);
    margin-bottom: .25rem;
}

.login-subtitle {
    font-size: 12px;
    color: var(--mid);
    letter-spacing: .5px;
    margin-bottom: 1.8rem;
}

/* Error */
.error-box {
    width: 100%;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 3px;
    padding: .6rem .9rem;
    font-size: 12.5px;
    color: #b91c1c;
    margin-bottom: 1rem;
}

/* Form */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: .4rem;
}

.form-group input {
    width: 100%;
    border: 1px solid var(--border);
    padding: .75rem .9rem;
    font-family: var(--font-b);
    font-size: 14px;
    color: var(--dark);
    border-radius: 3px;
    outline: none;
    transition: border-color .2s;
    /* Bigger tap target for mobile */
    min-height: 48px;
}

.form-group input:focus {
    border-color: var(--accent);
}

.password-wrap {
    position: relative;
}

.toggle-pw {
    position: absolute;
    right: .7rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--mid);
    padding: .3rem;
    /* Larger touch target */
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn {
    width: 100%;
    margin-top: .5rem;
    padding: 1rem;
    background: var(--dark);
    color: #fff;
    border: none;
    font-family: var(--font-b);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 3px;
    transition: background .25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 52px;
    /* Prevent iOS zoom-in on tap */
    touch-action: manipulation;
}

.login-btn:hover,
.login-btn:active {
    background: var(--accent);
}

.login-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    font-size: 11px;
    color: #bbb;
    letter-spacing: .5px;
    text-align: center;
}

/* ─── Decorative Right Panel ─── */
.login-panel {
    width: 280px;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(160, 137, 104, .15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 169, 110, .1) 0%, transparent 50%);
}

.panel-content {
    text-align: center;
    color: #fff;
}

.panel-content h2 {
    font-family: var(--font-h);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: .15em;
    color: var(--gold);
    margin-bottom: .8rem;
}

.panel-content p {
    font-size: 12px;
    color: rgba(255, 255, 255, .55);
    line-height: 1.6;
}

.panel-divider {
    width: 40px;
    height: 1px;
    background: var(--gold);
    margin: 1.5rem auto;
    opacity: .5;
}

.panel-tagline {
    font-size: 11px !important;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .3) !important;
}

/* ─── RESPONSIVE / MOBILE ─── */
@media (max-width: 640px) {
    body {
        padding: 0;
        align-items: stretch;
    }

    .login-wrapper {
        flex-direction: column-reverse;
        box-shadow: none;
        border-radius: 0;
        min-height: 100vh;
    }

    .login-card {
        padding: 2rem 1.5rem 1.5rem;
        flex: 1;
        justify-content: center;
    }

    .login-panel {
        width: 100%;
        min-height: 140px;
        padding: 1.5rem;
        flex-shrink: 0;
    }

    .login-panel .panel-content h2 {
        font-size: 1.2rem;
    }

    .panel-divider {
        margin: .8rem auto;
    }

    .panel-content p {
        display: none;
    }
}