/* ==========================================================================
   auth.css — Login & Register pages for Dasen B2B theme
   ========================================================================== */

:root {
    --navy:  #061b3d;
    --green: #28a745;
    --mint:  #e8f5ec;
    --muted: #627085;
    --text:  #0b1d35;
}

/* ── Page wrapper ── */
.auth-page {
    padding: 70px 0;
    background: linear-gradient(135deg, #f4f8ff 0%, #eef4fb 100%);
    min-height: calc(100vh - 120px);
}

/* ── Two-column grid ── */
.auth-wrap {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 52px;
    align-items: start;
}

/* ── Left panel ── */
.auth-content {
    /* no extra rule needed; children handle spacing */
}

.auth-badge {
    display: inline-block;
    background: var(--mint);
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 30px;
    margin-bottom: 14px;
}

.auth-content h1 {
    font-size: 48px;
    font-weight: 900;
    color: var(--navy);
    line-height: 1.15;
    margin: 0 0 16px;
}

.auth-content h1 em {
    color: var(--green);
    font-style: normal;
}

.auth-content p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 4px;
}

.auth-benefits {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.auth-benefit {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.auth-benefit > span {
    width: 46px;
    height: 46px;
    min-width: 46px;
    background: var(--mint);
    color: var(--green);
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.auth-benefit > div strong {
    display: block;
    color: var(--navy);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 3px;
}

.auth-benefit > div small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* ── Register image ── */
.reg {
    width: 100%;
    border-radius: 18px;
    margin-bottom: 24px;
    max-height: 260px;
    object-fit: cover;
    display: block;
}

/* ── Right panel / card ── */
.auth-card {
    background: #ffffff;
    border: 1px solid #e4edf7;
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 22px 55px rgba(6, 27, 61, 0.10);
}

.auth-card h2 {
    font-size: 22px;
    font-weight: 900;
    color: var(--navy);
    margin: 0 0 6px;
}

.form-note {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 24px;
}

/* ── Auth form ── */
.auth-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
}

.auth-form label,
.woocommerce-form-row label {
    color: var(--navy);
    font-size: 13px;
    font-weight: 900;
    display: block;
    margin-bottom: 4px;
}

/* ── Inputs, selects, textareas ── */
.auth-form input,
.auth-form select,
.auth-form textarea,
.woocommerce-Input,
.woocommerce-Input--text {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d8e3ef;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: auto;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus,
.woocommerce-Input:focus,
.woocommerce-Input--text:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.12);
}

.auth-form textarea,
.woocommerce-Input[rows] {
    resize: vertical;
    min-height: 100px;
}

/* ── Submit button ── */
.auth-submit,
.woocommerce-Button--submit,
.woocommerce-form-register__submit,
.woocommerce-Button.button {
    width: 100%;
    padding: 15px;
    background: var(--navy);
    color: #ffffff;
    border: 0;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 4px;
    display: block;
    text-align: center;
}

.auth-submit:hover,
.woocommerce-Button--submit:hover,
.woocommerce-form-register__submit:hover,
.woocommerce-Button.button:hover {
    background: var(--green);
}

/* ── Switch link (login/register) ── */
.auth-switch {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--muted);
}

.auth-switch a {
    color: var(--green);
    font-weight: 900;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e4edf7;
}

.auth-divider span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* ── Support line ── */
.auth-support {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.auth-support a {
    color: var(--green);
    font-weight: 900;
    text-decoration: none;
}

.auth-support a:hover {
    text-decoration: underline;
}

/* ── WooCommerce notices ── */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    list-style: none;
}

.woocommerce-error {
    background: #fff5f5;
    border: 1px solid #f5c6cb;
    color: #c0392b;
}

.woocommerce-message {
    background: #f0fff4;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* ── WooCommerce form-row overrides ── */
.woocommerce-form-row {
    margin-bottom: 16px;
}

.woocommerce-form-row .woocommerce-Input {
    margin-top: 4px;
}

/* ── Responsive ── */
@media (max-width: 860px) {
    .auth-wrap {
        grid-template-columns: 1fr;
    }

    .auth-content h1 {
        font-size: 34px;
    }
}

@media (max-width: 480px) {
    .auth-form .form-row {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 24px 18px;
    }
}

/* ── AJAX inline notices ── */
.auth-notice {
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 18px;
    line-height: 1.6;
}

.auth-notice p {
    margin: 0;
}

.auth-notice--success {
    background: #ecf9e8;
    border: 1px solid #bee8bd;
    color: #238b35;
}

.auth-notice--error {
    background: #fff0f0;
    border: 1px solid #f5c6cb;
    color: #c0392b;
}

/* Disabled submit state */
.auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Inline field-level errors ── */
.field-error {
    display: block;
    margin-top: 5px;
    color: #c0392b;
    font-size: 12px;
    font-weight: 800;
}

/* Red border on invalid inputs */
.field-invalid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12) !important;
}

/* Clear error state when user starts typing */
.field-invalid:focus {
    border-color: var(--green) !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.12) !important;
}
