:root {
    --ink: #10231e;
    --muted: #6f7f79;
    --green: #006b53;
    --green-dark: #005443;
    --mint: #e8f3ec;
    --surface: #ffffff;
    --canvas: #f3f7f2;
    --line: #dce6df;
    --danger: #c03d3d;
    --danger-soft: #fff0ef;
    --success-soft: #e9f7ef;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; background: var(--canvas); }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
a { color: inherit; }
.customer-page { width: 100%; max-width: 100%; min-height: 100svh; overflow-x: hidden; }
.customer-shell { width: min(100%, 520px); max-width: 100%; min-height: 100svh; margin: 0 auto; overflow-x: hidden; background: var(--surface); }
.auth-shell { display: flex; flex-direction: column; }
.brand-header { padding: max(42px, env(safe-area-inset-top)) 24px 36px; color: white; background: #163f35; }
.brand { display: inline-block; text-decoration: none; color: inherit; font-size: 32px; line-height: 1; font-weight: 900; }
.brand span, .eyebrow { color: #00a87f; }
.brand-header p { margin: 16px 0 0; max-width: 290px; color: #d7e7e0; font-size: 15px; line-height: 1.55; }
.form-panel { padding: 30px 24px max(30px, env(safe-area-inset-bottom)); }
.form-panel.wide { padding-top: 26px; }
.form-heading { margin-bottom: 26px; }
.form-heading h1 { margin: 8px 0 9px; font-size: 28px; line-height: 1.16; letter-spacing: 0; }
.form-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.eyebrow { display: block; font-size: 11px; font-weight: 800; }
.customer-form { display: grid; gap: 17px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea {
    width: 100%; min-height: 48px; border: 1px solid #cbd8d0; border-radius: 8px; background: white; color: var(--ink); padding: 11px 13px; outline: none;
}
.field textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 107, 83, .1); }
.field input[readonly] { color: #62736c; background: #f5f8f6; }
.field select:disabled { color: #91a099; background: #f3f6f4; }
.field small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.has-error > small { color: var(--danger); }
.password-field { position: relative; }
.password-field input { padding-right: 74px; }
.password-toggle { position: absolute; inset: 0 4px 0 auto; border: 0; background: transparent; color: var(--green); padding: 0 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
.primary-button, .secondary-button {
    min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; padding: 11px 16px; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer;
}
.primary-button { border: 1px solid var(--green); color: white; background: var(--green); }
.primary-button:hover { background: var(--green-dark); }
.primary-button:disabled { opacity: .68; cursor: wait; }
.secondary-button { border: 1px solid #bfcfc6; color: var(--green); background: white; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 21px 0; color: #96a29d; font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-login-button { min-height: 48px; display: grid; grid-template-columns: 27px minmax(0, 1fr) 27px; align-items: center; gap: 8px; border: 1px solid #cbd8d0; border-radius: 8px; padding: 10px 14px; color: #23352e; background: #fff; font-size: 14px; font-weight: 800; text-align: center; text-decoration: none; }
.google-login-button::after { width: 27px; content: ""; }
.google-login-button:hover { border-color: #91aa9c; background: #f8fbf9; }
.google-mark { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #dce4df; border-radius: 50%; color: #4285f4; background: #fff; font-size: 15px; font-weight: 900; }
.google-login-note { margin: 9px 5px 0; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: center; }
.switch-auth { margin: 25px 0 0; color: var(--muted); text-align: center; font-size: 14px; }
.switch-auth a, .document-link { color: var(--green); font-weight: 800; }
.alert { margin-bottom: 20px; border: 1px solid transparent; border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.45; }
.alert-error { border-color: #f4cdca; color: #8e2f2f; background: var(--danger-soft); }
.alert-success { border-color: #c7e7d3; color: #17633e; background: var(--success-soft); }
.onboarding-shell { min-height: 100svh; }
.onboarding-header { position: sticky; z-index: 5; top: 0; padding: max(20px, env(safe-area-inset-top)) 24px 17px; color: white; background: #163f35; }
.onboarding-header .brand { font-size: 23px; }
.step-copy { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 22px; }
.step-copy span { color: #a7c6ba; font-size: 10px; font-weight: 800; }
.step-copy strong { font-size: 13px; }
.step-track { height: 3px; margin-top: 10px; background: rgba(255,255,255,.2); }
.step-track span { display: block; width: 50%; height: 100%; background: #37c09a; }
.step-track.complete span { width: 100%; }
.section-label { display: flex; align-items: center; gap: 12px; margin-top: 9px; color: var(--green); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field-grid { display: grid; gap: 17px; }
.upload-box { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; overflow: hidden; border: 1px dashed #91afa1; border-radius: 8px; padding: 18px; color: var(--green); background: #f6faf7; text-align: center; cursor: pointer; }
.upload-box .upload-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 24px; font-weight: 300; }
.upload-box strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-box small { color: var(--muted); }
.upload-box img { width: 100%; max-height: 210px; object-fit: contain; border-radius: 5px; }
.upload-box.has-preview .upload-icon, .upload-box.has-preview > strong, .upload-box.has-preview > small { display: none; }
.document-link { width: fit-content; font-size: 13px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
.contact-list { display: grid; gap: 14px; }
.contact-item { position: relative; display: grid; gap: 15px; margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 17px 14px 15px; }
.contact-item legend { padding: 0 7px; font-size: 13px; font-weight: 900; }
.remove-contact { position: absolute; top: 7px; right: 8px; border: 0; color: var(--danger); background: transparent; padding: 7px; font-size: 12px; font-weight: 800; cursor: pointer; }
.form-actions { display: grid; grid-template-columns: 1fr 1.45fr; gap: 10px; padding-top: 3px; }

@media (min-width: 640px) {
    body { padding: 32px 0; }
    .customer-shell { min-height: calc(100svh - 64px); border: 1px solid #dbe6df; box-shadow: 0 22px 70px rgba(25, 55, 45, .12); }
    .auth-shell { border-radius: 8px; overflow: hidden; }
    .onboarding-shell { width: min(100% - 40px, 760px); border-radius: 8px; overflow: clip; }
    .onboarding-header { position: static; }
    .form-panel.wide { padding: 34px 42px 42px; }
    .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .field-grid.compact { grid-template-columns: 1fr 1fr; }
}

/* Basecamp-configurable brand sizing. */
.brand { max-width: 100%; line-height: 1.12; overflow-wrap: anywhere; }
body.brand-size-small .brand { font-size: 22px; }
body.brand-size-medium .brand { font-size: 27px; }
body.brand-size-large .brand { font-size: 32px; }
.onboarding-header .brand { font-size: inherit; }
body.brand-size-small .onboarding-header .brand { font-size: 18px; }
body.brand-size-medium .onboarding-header .brand { font-size: 21px; }
body.brand-size-large .onboarding-header .brand { font-size: 23px; }

/* Prevent browser auto-zoom while filling customer forms. */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: pan-y;
}

.customer-page, .customer-shell, main, section, form {
    min-width: 0;
    max-width: 100%;
}

img, video, canvas {
    max-width: 100%;
}

button, a, input, select, textarea {
    touch-action: manipulation;
}

input:not([type="hidden"]), select, textarea {
    font-size: 16px;
}
