/* ═══════════════════════════════════════════
   GLEAM — Web Auth Pages
   Split-panel design (image + form)
   ═══════════════════════════════════════════ */

:root {
    --a-wine:       #B08D57;
    --a-wine-dark:  #3B332C;
    --a-wine-glow:  rgba(176, 141, 87, 0.16);
    --a-ink:        #2D2D2D;
    --a-text:       #2D2D2D;
    --a-text-light: #777777;
    --a-border:     #DDDDDD;
    --a-bg:         #ffffff;
    --a-bg-page:    #EFE9E2;
    --a-bg-input:   #F8F6F2;
}

/* ═══════════════════════════════════════════
   PAGE + CONTAINER
   ═══════════════════════════════════════════ */

/* Fill viewport so card centers between nav and footer */
body.g-auth-page .page-container {
    min-height: 100vh;
}

body.g-auth-page .main {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #EFE9E2;
}

.auth-page {
    flex: 1;
    padding: 48px 20px 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 1100px;
    background: var(--a-bg);
    border-radius: 16px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: flex;
    min-height: 560px;
}

/* ═══════════════════════════════════════════
   IMAGE PANEL — Left side
   ═══════════════════════════════════════════ */
.auth-image-panel {
    flex: 0 0 50%;
    position: relative;
    overflow: hidden;
    background: #1E1E1E;
}

.auth-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.auth-image-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(30, 30, 30, 0.32) 0%,
        rgba(59, 51, 44, 0.16) 100%
    );
    pointer-events: none;
}

/* ═══════════════════════════════════════════
   FORM PANEL — Right side
   ═══════════════════════════════════════════ */
.auth-form-panel {
    flex: 1;
    padding: 52px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 420px;
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 34px;
    font-weight: 500;
    color: var(--a-ink);
    margin-bottom: 8px;
    letter-spacing: -0.2px;
    line-height: 1.1;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--a-text-light);
    font-weight: 400;
}

/* ═══════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════ */
.auth-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid;
    line-height: 1.5;
}

.auth-alert--success {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}

.auth-alert--danger {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

/* ═══════════════════════════════════════════
   DESCRIPTION TEXT
   ═══════════════════════════════════════════ */
.auth-desc {
    font-size: 14px;
    color: var(--a-text-light);
    line-height: 1.6;
    margin-bottom: 22px;
    text-align: center;
}

/* ═══════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════ */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--a-text);
    margin-bottom: 7px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--a-text);
    background: var(--a-bg-input);
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
}

.form-control::placeholder {
    color: #b0aab5;
    font-weight: 400;
}

.form-control:hover {
    border-color: #c8c8c8;
    background: #fff;
}

.form-control:focus {
    border-color: var(--a-wine);
    background: #fff;
    box-shadow: 0 0 0 3px var(--a-wine-glow);
}

.form-control.is-invalid {
    border-color: #ef4444;
}

/* Input Group (input + eye button) */
.input-group {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: var(--a-bg-input);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-group:hover {
    border-color: #c8c8c8;
    background: #fff;
}

.input-group:focus-within {
    border-color: var(--a-wine);
    background: #fff;
    box-shadow: 0 0 0 3px var(--a-wine-glow);
}

.input-group .form-control {
    border: none !important;
    background: transparent;
    box-shadow: none !important;
    border-radius: 0;
    flex: 1;
}

.input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: transparent;
    border: none;
    color: var(--a-text-light);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    flex-shrink: 0;
}

.input-group-text .eye-shut {
    display: none;
}

.input-group-text:hover {
    color: var(--a-ink);
}

/* Section label above paired fields */
.form-section-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--a-text-light);
    margin: 4px 0 10px;
}

/* Two-column grid */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 16px;
    height: 16px;
    border: 1px solid var(--a-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    position: relative;
    background: #fff;
}

.form-check-input:hover {
    border-color: var(--a-wine);
}

.form-check-input:checked {
    background: var(--a-wine);
    border-color: var(--a-wine);
}

.form-check-input:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.form-check-label {
    font-size: 13px;
    color: var(--a-text);
    cursor: pointer;
    user-select: none;
}

/* Terms checkbox (register) */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--a-text);
    line-height: 1.5;
}

.terms-check .form-check-input {
    margin-top: 2px;
}

.terms-check a {
    color: var(--a-wine);
    text-decoration: none;
}

.terms-check a:hover {
    text-decoration: underline;
}

/* Meta row (remember me + forgot pw) */
.auth-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.22s ease;
    line-height: 1;
}

.btn-primary {
    background: #1E1E1E;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
    background: #3B332C;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
    color: #fff;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-dark {
    background: #fff;
    color: var(--a-text);
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
    font-weight: 500;
}

.btn-outline-dark:hover {
    background: #f8f8f8;
    border-color: #c0c0c0;
    color: var(--a-text);
}

.w-100 {
    width: 100%;
}

.mb-3 {
    margin-bottom: 16px !important;
}

.mb-4 {
    margin-bottom: 22px !important;
}

/* ═══════════════════════════════════════════
   DIVIDER
   ═══════════════════════════════════════════ */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 18px 0;
    color: var(--a-text-light);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--a-border);
}

.auth-divider span {
    padding: 0 14px;
}

/* ═══════════════════════════════════════════
   LINKS
   ═══════════════════════════════════════════ */
.auth-link {
    color: var(--a-wine);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--a-wine-dark);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--a-border);
    font-size: 13px;
    color: var(--a-text-light);
}

/* ═══════════════════════════════════════════
   OTP (verify-email)
   ═══════════════════════════════════════════ */
.otp-row {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.otp-digit {
    flex: 1;
    height: 56px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    color: var(--a-ink);
    background: var(--a-bg-input);
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.otp-digit:focus {
    border-color: var(--a-wine);
    box-shadow: 0 0 0 3px var(--a-wine-glow);
    background: #fff;
}

/* Resend (verify-email) */
.auth-resend {
    text-align: center;
    font-size: 13px;
    color: var(--a-text-light);
    margin-top: 16px;
}

.auth-resend button {
    background: none;
    border: none;
    color: var(--a-wine);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    transition: color 0.2s;
}

.auth-resend button:hover {
    color: var(--a-wine-dark);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .auth-container { max-width: 880px; }
    .auth-image-panel { flex: 0 0 38%; }
    .auth-form-panel { padding: 48px 40px; }
}

@media (max-width: 768px) {
    .auth-page { padding: 28px 14px 48px; }
    .auth-container { max-width: 520px; min-height: auto; }
    .auth-image-panel { display: none; }
    .auth-form-panel { padding: 36px 28px 40px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .auth-title { font-size: 26px; }
}

@media (max-width: 480px) {
    .auth-page { padding: 16px 10px 40px; }
    .auth-container { border-radius: 12px; }
    .auth-form-panel { padding: 28px 20px 36px; }
    .auth-form-inner { max-width: 100%; }
    .auth-title { font-size: 24px; }
    .otp-digit { height: 48px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
