/* Shared layout for Login & Registration portal pages */

.auth-portal-body {
    min-height: 100vh;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-portal-header {
    padding: 1.5rem 2rem;
    gap: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-back-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.auth-back-short { display: none; }

.auth-section {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.auth-card-wide {
    max-width: 700px;
    border-radius: 20px;
    padding: 3rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: #0f172a;
    font-size: 1.8rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form */
.auth-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.auth-form .form-group {
    margin-bottom: 1.3rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.45rem;
    color: #334155;
    font-weight: 600;
    font-size: 0.88rem;
}

.auth-form input,
.auth-form select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #0f172a;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
}

.auth-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--gold);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-top: 0.5rem;
}

.auth-btn:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid #dc2626;
    color: #b91c1c;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.auth-copyright {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
    .auth-portal-header { padding: 1rem; }
    .auth-portal-header .site-logo { height: 26px; }
    .auth-back-btn { padding: 0.45rem 0.7rem; font-size: 0.8rem; }
    .auth-back-full { display: none; }
    .auth-back-short { display: inline; }
    .auth-card, .auth-card-wide { padding: 1.8rem 1.4rem; }
    .auth-form .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* Show / hide password */
.password-field { position: relative; }
.auth-form .password-field input { padding-right: 2.8rem; }
.toggle-password {
    position: absolute;
    top: 50%;
    right: 0.6rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.35rem;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
}
.toggle-password:hover { color: var(--gold); }

.alert-success {
    background: rgba(4, 120, 87, 0.1);
    border: 1px solid rgba(4, 120, 87, 0.35);
    color: #047857;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.terms-check {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin: 0.5rem 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
    cursor: pointer;
}

.terms-check input {
    width: 16px;
    height: 16px;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--gold);
}

.terms-check a,
.auth-legal-links a {
    color: var(--gold);
    font-weight: 600;
}

.auth-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.2rem;
    margin-bottom: 0.6rem;
}
