/* ============================================================
   JRM Capital Investor Portal — Registration Styles
   portal.jrmcapinc.com
   ============================================================ */

:root {
    --navy:      #162B43;
    --oak:       #947856;
    --whitewash: #F7F5EC;
    --blue:      #1B4078;
    --gold:      #C59F4F;
    --orange:    #E5A041;
    --white:     #FFFFFF;
    --gray-100:  #F5F5F5;
    --gray-200:  #E0E0E0;
    --gray-400:  #9E9E9E;
    --gray-600:  #616161;
    --gray-800:  #212121;
    --red:       #C62828;
    --green:     #2E7D32;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    background-color: var(--whitewash);
    color: var(--gray-800);
    min-height: 100vh;
}

/* ── Portal Header ─────────────────────────────────────────────────────────── */
.portal-header {
    background-color: var(--navy);
    padding: 16px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.portal-header .logo-text {
    font-family: 'Times New Roman', Times, serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.5rem;
    color: var(--gold);
    letter-spacing: 0.08em;
}
.portal-header .tagline {
    font-size: 0.72rem;
    color: var(--oak);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 2px;
}
.portal-header .secure-badge {
    font-size: 0.76rem;
    color: var(--oak);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Progress Bar ──────────────────────────────────────────────────────────── */
.progress-wrapper {
    background-color: var(--navy);
    padding: 0 40px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.progress-steps {
    display: flex;
    align-items: flex-start;
    max-width: 680px;
    margin: 0 auto;
    position: relative;
}
.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px;
    left: 58%;
    width: 84%;
    height: 2px;
    background-color: rgba(255,255,255,0.12);
    z-index: 0;
}
.step-item.done:not(:last-child)::after,
.step-item.active:not(:last-child)::after {
    background-color: var(--gold);
    opacity: 0.5;
}
.step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 1;
    transition: all 0.3s ease;
}
.step-item.active .step-circle {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
    box-shadow: 0 0 0 4px rgba(197,159,79,0.2);
}
.step-item.done .step-circle {
    background-color: var(--green);
    border-color: var(--green);
    color: var(--white);
}
.step-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    margin-top: 7px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1.3;
}
.step-item.active .step-label { color: var(--gold); }
.step-item.done  .step-label  { color: var(--oak);  }

/* ── Main Container ────────────────────────────────────────────────────────── */
.form-container {
    max-width: 780px;
    margin: 36px auto 72px;
    padding: 0 20px;
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
    background-color: var(--white);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(22,43,67,0.08), 0 4px 16px rgba(22,43,67,0.06);
    padding: 32px 36px;
    margin-bottom: 20px;
}
.card-title {
    font-family: 'Times New Roman', Times, serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    color: var(--navy);
    letter-spacing: 0.07em;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 2px solid var(--gold);
}
.card-subtitle {
    font-size: 0.88rem;
    color: var(--gray-600);
    margin-bottom: 24px;
    margin-top: 8px;
    line-height: 1.55;
}

/* ── Form Layout ───────────────────────────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.form-row.single  { grid-template-columns: 1fr; }
.form-row.triple  { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; }

/* ── Labels ────────────────────────────────────────────────────────────────── */
.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-group label .required { color: var(--red); margin-left: 2px; }
.form-group label .optional {
    color: var(--gray-400);
    font-weight: 400;
    text-transform: none;
    font-size: 0.7rem;
    margin-left: 4px;
    letter-spacing: 0;
}

/* ── Inputs & Selects ──────────────────────────────────────────────────────── */
.form-control {
    height: 48px;
    border: 1.5px solid var(--gray-200);
    border-radius: 4px;
    padding: 0 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--gray-800);
    background-color: var(--white);
    width: 100%;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197,159,79,0.14);
}
.form-control.is-invalid { border-color: var(--red); }
.form-control[readonly]  { background-color: var(--gray-100); color: var(--gray-600); cursor: default; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%23947856' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

/* ── Validation Messages ───────────────────────────────────────────────────── */
.invalid-feedback {
    font-size: 0.82rem;
    color: var(--red);
    margin-top: 4px;
    line-height: 1.4;
}

/* ── Radio Group (Domicile) ────────────────────────────────────────────────── */
.radio-group {
    display: flex;
    gap: 28px;
    margin-bottom: 14px;
    margin-top: 2px;
}
.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--gray-800);
}
.radio-option input[type="radio"] {
    accent-color: var(--gold);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}
.domicile-note {
    font-size: 0.76rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 10px;
    margin-top: 2px;
}

/* ── Password ──────────────────────────────────────────────────────────────── */
.password-wrapper { position: relative; }
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 0.75rem;
    font-family: 'DM Sans', sans-serif;
    padding: 2px 4px;
    border-radius: 3px;
    transition: color 0.15s;
}
.toggle-password:hover { color: var(--oak); }

.password-requirements {
    margin-top: 10px;
    padding: 12px 14px;
    background-color: var(--gray-100);
    border-radius: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 20px;
}
.req-item {
    font-size: 0.82rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 7px;
    transition: color 0.2s;
}
.req-item.met { color: var(--green); font-weight: 500; }
.req-icon { font-size: 0.65rem; }

/* ── Username / Inline Status ──────────────────────────────────────────────── */
.field-status {
    font-size: 0.82rem;
    margin-top: 4px;
    min-height: 16px;
    line-height: 1.4;
}
.field-status.checking  { color: var(--gray-400); }
.field-status.available { color: var(--green); font-weight: 500; }
.field-status.taken     { color: var(--red); }

/* ── Section Divider ───────────────────────────────────────────────────────── */
.section-divider {
    height: 1px;
    background-color: var(--gray-200);
    margin: 22px 0;
}

/* ── "Copy from Signer" Checkbox ───────────────────────────────────────────── */
.copy-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: rgba(197,159,79,0.07);
    border: 1px solid rgba(197,159,79,0.28);
    border-radius: 4px;
    margin-bottom: 20px;
    cursor: pointer;
}
.copy-checkbox-row input[type="checkbox"] {
    accent-color: var(--gold);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}
.copy-checkbox-row label {
    font-size: 0.92rem;
    color: var(--navy);
    cursor: pointer;
    line-height: 1.4;
}

/* ── Alert Banner ──────────────────────────────────────────────────────────── */
.alert {
    padding: 13px 16px;
    border-radius: 4px;
    font-size: 0.90rem;
    margin-bottom: 20px;
    line-height: 1.5;
}
.alert-error {
    background-color: #FFEBEE;
    color: var(--red);
    border-left: 3px solid var(--red);
}
.alert-error div + div { margin-top: 3px; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
}
.btn {
    padding: 13px 30px;
    border-radius: 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary {
    background-color: var(--navy);
    color: var(--white);
}
.btn-primary:hover { background-color: var(--blue); }

.btn-secondary {
    background-color: transparent;
    color: var(--gray-600);
    border: 1.5px solid var(--gray-200);
}
.btn-secondary:hover { border-color: var(--navy); color: var(--navy); }

.btn-gold {
    background-color: var(--gold);
    color: var(--navy);
}
.btn-gold:hover { background-color: var(--orange); }

/* ── "Other" title reveal ──────────────────────────────────────────────────── */
.other-reveal { margin-top: 8px; }

/* ── Success Page ──────────────────────────────────────────────────────────── */
.success-card { text-align: center; padding: 64px 40px; }
.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #E8F5E9;
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}
.success-title {
    font-family: 'Times New Roman', Times, serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.45rem;
    color: var(--navy);
    letter-spacing: 0.07em;
    margin-bottom: 14px;
}
.success-msg {
    color: var(--gray-600);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── Helper Text ───────────────────────────────────────────────────────────── */
.field-hint {
    font-size: 0.80rem;
    color: var(--gray-400);
    margin-top: 4px;
    line-height: 1.4;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 620px) {
    .portal-header  { padding: 14px 18px; }
    .progress-wrapper { padding: 0 18px 22px; }
    .card           { padding: 22px 18px; }
    .form-row,
    .form-row.triple { grid-template-columns: 1fr; }
    .password-requirements { grid-template-columns: 1fr; }
    .radio-group    { flex-direction: column; gap: 12px; }
    .btn-row        { flex-direction: column-reverse; gap: 12px; }
    .btn            { width: 100%; justify-content: center; }
}

/* ── Login page ─────────────────────────────────── */
.jrm-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f9;
    padding: 2rem 1rem;
}

.jrm-login-card {
    background: #ffffff;
    border-top: 4px solid #C59F4F;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.09);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
}

.jrm-login-logo {
    text-align: center;
    margin-bottom: 1.25rem;
}

.jrm-login-logo img {
    height: 56px;
    width: auto;
}

.jrm-login-title {
    font-family: 'Times New Roman', serif;
    color: #162B43;
    font-size: 1.6rem;
    text-align: center;
    margin: 0 0 0.25rem;
}

.jrm-login-subtitle {
    font-family: 'DM Sans', sans-serif;
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 1.75rem;
}

.jrm-alert--error {
    background: #fff0f0;
    border-left: 4px solid #c0392b;
    color: #7b1e1e;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.jrm-field {
    margin-bottom: 1.1rem;
}

.jrm-field label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #162B43;
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.jrm-field input[type="text"],
.jrm-field input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: #1f2937;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.jrm-field input:focus {
    outline: none;
    border-color: #C59F4F;
    box-shadow: 0 0 0 3px rgba(197,159,79,0.18);
}

.jrm-btn--full {
    width: 100%;
    margin-top: 0.5rem;
}

.jrm-login-help {
    text-align: center;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 1.5rem;
}

.jrm-login-help a {
    color: #C59F4F;
    text-decoration: none;
}

/* =============================================================================
   LOGIN PAGE — append to public/css/jrm-portal.css
   ============================================================================= */

.jrm-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f9;
    padding: 2rem 1rem;
}

.jrm-login-card {
    background: #ffffff;
    border-top: 4px solid #C59F4F;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
}

/* Logo */
.jrm-login-logo {
    text-align: center;
    margin-bottom: 1.25rem;
}

.jrm-login-logo img {
    height: 56px;
    width: auto;
}

/* Heading */
.jrm-login-title {
    font-family: 'Times New Roman', serif;
    color: #162B43;
    font-size: 1.6rem;
    text-align: center;
    margin: 0 0 0.25rem;
}

.jrm-login-subtitle {
    font-family: 'DM Sans', sans-serif;
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 1.75rem;
}

/* Error alert */
.jrm-alert--error {
    background: #fff0f0;
    border-left: 4px solid #c0392b;
    color: #7b1e1e;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.45;
}

/* Form fields */
.jrm-field {
    margin-bottom: 1.1rem;
}

.jrm-field label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #162B43;
    margin-bottom: 0.35rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.jrm-field input[type="text"],
.jrm-field input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: #1f2937;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.jrm-field input:focus {
    outline: none;
    border-color: #C59F4F;
    box-shadow: 0 0 0 3px rgba(197, 159, 79, 0.18);
}

/* Full-width button modifier */
.jrm-btn--full {
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

/* Help text */
.jrm-login-help {
    text-align: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 1.5rem;
    line-height: 1.5;
}

.jrm-login-help a {
    color: #C59F4F;
    text-decoration: none;
}

.jrm-login-help a:hover {
    text-decoration: underline;
}

