/* ============================================================
   Castle Hosting — Login page
   ============================================================ */

.auth-body {
    background: #f4f7fb;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.auth-body::before,
.auth-body::after {
    content: '';
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 280px;
    opacity: .35;
    pointer-events: none;
    background-image: radial-gradient(circle, #cbd5e1 1.5px, transparent 1.5px);
    background-size: 14px 14px;
}
.auth-body::before { left: 2%; }
.auth-body::after  { right: 2%; }

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px);
    padding: 2.5rem 1.5rem 3rem;
}

.auth-card {
    display: grid;
    grid-template-columns: 340px 1fr;
    width: min(100%, 920px);
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(15,39,68,.12);
    border: 1px solid #e2e8f0;
}

/* Left panel */
.auth-panel-left {
    background: linear-gradient(180deg, #dbeafe 0%, #e0e7ff 45%, #ede9fe 100%);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-castle-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9rem;
    opacity: .12;
    pointer-events: none;
    filter: grayscale(1);
}

.auth-panel-badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 16px rgba(37,99,235,.2);
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.auth-panel-left h2 {
    margin: 0 0 .65rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f2744;
    line-height: 1.25;
    position: relative;
    z-index: 1;
}
.auth-panel-left p {
    margin: 0;
    font-size: .82rem;
    color: #64748b;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Right panel */
.auth-panel-right {
    padding: 2.5rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-icon {
    margin-bottom: .75rem;
}

.auth-panel-right h1 {
    margin: 0 0 .35rem;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f2744;
    letter-spacing: -.02em;
}
.auth-subtitle {
    margin: 0 0 1.75rem;
    font-size: .88rem;
    color: #64748b;
    line-height: 1.5;
}

.auth-alert {
    padding: .75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: .82rem;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.auth-field { margin-bottom: 1.1rem; }
.auth-field label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: .4rem;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-icon {
    position: absolute;
    left: .85rem;
    font-size: .9rem;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}
.auth-input-wrap input {
    width: 100%;
    padding: .72rem .85rem .72rem 2.5rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: .88rem;
    font-family: 'Poppins', system-ui, sans-serif;
    color: #0f2744;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.auth-input-wrap input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.auth-input-wrap input::placeholder { color: #94a3b8; }

.auth-password-toggle {
    position: absolute;
    right: .75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: .95rem;
    color: #94a3b8;
    padding: .25rem;
    line-height: 1;
}
.auth-password-toggle:hover { color: #64748b; }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: .75rem;
    flex-wrap: wrap;
}
.auth-remember {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .78rem;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}
.auth-remember input { width: auto; margin: 0; accent-color: #2563eb; }
.auth-forgot {
    font-size: .78rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}
.auth-forgot:hover { text-decoration: underline; }

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .85rem 1.5rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 700;
    font-family: 'Poppins', system-ui, sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37,99,235,.35);
    transition: background .15s, transform .12s;
}
.auth-submit:hover { background: #1d4ed8; transform: translateY(-1px); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0 1.25rem;
    color: #94a3b8;
    font-size: .78rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-signup {
    text-align: center;
    font-size: .82rem;
    color: #64748b;
    margin: 0;
}
.auth-signup a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}
.auth-signup a:hover { text-decoration: underline; }

/* Auth header — hide cart on login */
.auth-body .nav-cart { display: none; }

@media (max-width: 768px) {
    .auth-card { grid-template-columns: 1fr; }
    .auth-panel-left { padding: 2rem 1.5rem; min-height: 180px; }
    .auth-panel-right { padding: 2rem 1.5rem; }
    .auth-body::before,
    .auth-body::after { display: none; }
}
