/* Standalone journey shell: no theme header, menu, footer or store chrome. */
html:has(body.sdtf-standalone-mode),
body.sdtf-standalone-mode {
    margin: 0 !important;
    min-height: 100%;
    background: #fbf8f7;
}

body.sdtf-standalone-mode {
    min-height: 100vh;
    overflow-x: hidden;
}

body.sdtf-standalone-mode #wpadminbar {
    display: none !important;
}

html:has(body.sdtf-standalone-mode) {
    margin-top: 0 !important;
}

.sdtf-standalone-page {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #fbf8f7;
}

:root {
    --sdtf-wine: #8f1f1a;
    --sdtf-wine-dark: #68130f;
    --sdtf-wine-soft: #f7ecea;
    --sdtf-ink: #201817;
    --sdtf-muted: #756b69;
    --sdtf-line: #eadfdd;
    --sdtf-surface: #ffffff;
    --sdtf-bg: #fbf8f7;
    --sdtf-success: #198754;
    --sdtf-shadow: 0 20px 60px rgba(82, 34, 29, .10);
}

.sdtf-selector-wrap,
.sdtf-flow,
.sdtf-login-card {
    box-sizing: border-box;
    width: min(100%, 1080px);
    margin: 0 auto;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--sdtf-ink);
}

.sdtf-selector-wrap *,
.sdtf-flow *,
.sdtf-login-card * { box-sizing: border-box; }

.sdtf-selector-wrap { padding: 34px 24px 88px; }
.sdtf-brand-logo-wrap { display: flex; justify-content: center; margin-bottom: 30px; }
.sdtf-brand-logo { display: inline-flex; align-items: center; justify-content: center; text-decoration: none !important; }
.sdtf-brand-logo img { display: block; width: 88px; height: 88px; object-fit: contain; }
.sdtf-selector-header { text-align: center; max-width: 700px; margin: 0 auto 34px; }
.sdtf-eyebrow { display: inline-block; color: var(--sdtf-wine); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; margin-bottom: 8px; }
.sdtf-selector-header h1 { margin: 0; font-size: clamp(34px, 5vw, 62px); line-height: 1.02; letter-spacing: -.05em; }
.sdtf-selector-header p { margin: 16px auto 0; max-width: 620px; color: var(--sdtf-muted); font-size: 18px; line-height: 1.6; }
.sdtf-selector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sdtf-selector-card { position: relative; display: flex; min-height: 310px; flex-direction: column; justify-content: flex-end; padding: 28px; text-decoration: none !important; color: var(--sdtf-ink) !important; background: var(--sdtf-surface); border: 1px solid var(--sdtf-line); border-radius: 26px; box-shadow: 0 8px 34px rgba(66, 33, 29, .06); overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.sdtf-selector-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 7px; background: linear-gradient(90deg, var(--sdtf-wine), #bd5b52); }
.sdtf-selector-card:hover { transform: translateY(-6px); box-shadow: var(--sdtf-shadow); border-color: rgba(143,31,26,.35); }
.sdtf-selector-icon { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: auto; border-radius: 18px; background: var(--sdtf-wine-soft); color: var(--sdtf-wine); font-size: 28px; font-weight: 900; }
.sdtf-selector-card h2 { margin: 26px 0 8px; font-size: 24px; letter-spacing: -.03em; }
.sdtf-selector-card p { color: var(--sdtf-muted); line-height: 1.6; margin: 0 0 20px; }
.sdtf-card-cta { color: var(--sdtf-wine); font-weight: 800; }

.sdtf-flow { max-width: 760px; padding: 24px 24px 72px; }
.sdtf-flow-brand { display: flex; justify-content: center; margin-bottom: 22px; }
.sdtf-progress-wrap { margin-bottom: 30px; }
.sdtf-progress-meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 9px; color: var(--sdtf-muted); font-size: 12px; font-weight: 700; }
.sdtf-progress-name { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdtf-progress { height: 6px; background: #eee7e5; border-radius: 999px; overflow: hidden; }
.sdtf-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sdtf-wine), #c65a4d); border-radius: 999px; transition: width .3s ease; }
.sdtf-form { background: var(--sdtf-surface); border: 1px solid var(--sdtf-line); border-radius: 28px; box-shadow: var(--sdtf-shadow); overflow: hidden; }
.sdtf-step { display: none; padding: 38px; animation: sdtfFade .25s ease; }
.sdtf-step.is-active { display: block; }
@keyframes sdtfFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sdtf-step-heading { text-align: center; margin-bottom: 28px; }
.sdtf-step-heading h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -.04em; }
.sdtf-step-heading p { margin: 10px auto 0; max-width: 520px; color: var(--sdtf-muted); line-height: 1.55; }
.sdtf-fields { display: grid; gap: 20px; }
.sdtf-field[hidden] { display: none !important; }
.sdtf-label { display: block; margin-bottom: 9px; color: #594e4c; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.sdtf-field input[type="text"],
.sdtf-field input[type="email"],
.sdtf-field input[type="tel"],
.sdtf-field input[type="number"],
.sdtf-field textarea,
.sdtf-field select {
    width: 100%; min-height: 54px; padding: 13px 16px; border: 1px solid #d9cfcd; border-radius: 14px; background: #fff; color: var(--sdtf-ink); font: inherit; outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.sdtf-field textarea { min-height: 110px; resize: vertical; }
.sdtf-field input:focus,
.sdtf-field textarea:focus,
.sdtf-field select:focus { border-color: var(--sdtf-wine); box-shadow: 0 0 0 4px rgba(143,31,26,.10); }
.sdtf-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sdtf-choice-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sdtf-choice { min-height: 58px; padding: 13px 16px; border: 1px solid #d9cfcd; border-radius: 14px; background: #fff; color: var(--sdtf-ink); font: inherit; font-weight: 800; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .12s ease; }
.sdtf-choice:hover { border-color: rgba(143,31,26,.55); transform: translateY(-1px); }
.sdtf-choice.is-selected { border-color: var(--sdtf-wine); background: var(--sdtf-wine-soft); color: var(--sdtf-wine-dark); box-shadow: inset 0 0 0 1px var(--sdtf-wine); }
.sdtf-field-error { display: none; margin-top: 7px; color: #b42318; font-size: 12px; font-weight: 700; }
.sdtf-field.has-error .sdtf-field-error { display: block; }
.sdtf-field.has-error input,
.sdtf-field.has-error textarea { border-color: #b42318; }
.sdtf-nav { display: flex; gap: 10px; margin-top: 28px; }
.sdtf-btn { min-height: 56px; flex: 1; display: inline-flex; align-items: center; justify-content: center; padding: 14px 20px; border: 0; border-radius: 14px; text-decoration: none !important; font: inherit; font-weight: 850; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease; }
.sdtf-btn:hover { transform: translateY(-1px); }
.sdtf-btn:disabled { cursor: wait; opacity: .65; }
.sdtf-btn-primary { background: linear-gradient(135deg, var(--sdtf-wine), var(--sdtf-wine-dark)); color: #fff !important; box-shadow: 0 10px 24px rgba(143,31,26,.22); }
.sdtf-btn-secondary { background: #f3efee; color: #4f4543 !important; }
.sdtf-btn-whatsapp { background: #1fa855; color: #fff !important; margin-top: 18px; }
.sdtf-completion { padding: 44px 34px; text-align: center; background: var(--sdtf-surface); border: 1px solid var(--sdtf-line); border-radius: 28px; box-shadow: var(--sdtf-shadow); }
.sdtf-completion[hidden] { display: none; }
.sdtf-success-icon { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 22px; background: #e8f7ef; color: var(--sdtf-success); font-size: 38px; font-weight: 900; }
.sdtf-completion h1 { margin: 0; font-size: 38px; letter-spacing: -.04em; }
.sdtf-completion p { color: var(--sdtf-muted); line-height: 1.6; }
.sdtf-protocol { display: inline-block; margin-top: 8px; padding: 9px 12px; border-radius: 999px; background: var(--sdtf-wine-soft); color: var(--sdtf-wine); font-size: 13px; font-weight: 800; }
.sdtf-empty { max-width: 720px; margin: 40px auto; padding: 24px; border: 1px solid var(--sdtf-line); border-radius: 18px; background: #fff; color: var(--sdtf-muted); text-align: center; }

.sdtf-login-card { max-width: 520px; margin-top: 70px; margin-bottom: 70px; padding: 36px; background: #fff; border: 1px solid var(--sdtf-line); border-radius: 24px; box-shadow: var(--sdtf-shadow); }
.sdtf-login-card h1 { margin: 0 0 8px; font-size: 38px; letter-spacing: -.04em; }
.sdtf-login-card p { color: var(--sdtf-muted); line-height: 1.55; }
.sdtf-login-card label { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 800; }
.sdtf-login-card input[type="text"],
.sdtf-login-card input[type="password"] { width: 100%; min-height: 52px; border: 1px solid var(--sdtf-line); border-radius: 12px; padding: 12px 14px; }
.sdtf-login-card input[type="submit"] { width: 100%; min-height: 52px; margin-top: 14px; border: 0; border-radius: 12px; background: var(--sdtf-wine); color: #fff; font-weight: 800; cursor: pointer; }

@media (max-width: 820px) {
    .sdtf-selector-grid { grid-template-columns: 1fr; }
    .sdtf-selector-card { min-height: 230px; }
}

@media (max-width: 600px) {
    .sdtf-selector-wrap { padding: 24px 16px 64px; }
    .sdtf-flow { padding: 18px 12px 48px; }
    .sdtf-brand-logo img { width: 74px; height: 74px; }
    .sdtf-step { padding: 26px 18px; }
    .sdtf-choice-grid { grid-template-columns: 1fr; }
    .sdtf-choice-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sdtf-nav { flex-direction: column-reverse; }
    .sdtf-progress-name { display: none; }
    .sdtf-completion { padding: 34px 20px; }
}

/* v0.2.0 */
.sdtf-selector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sdtf-selector-card { min-height: 260px; }
.sdtf-field input[type="date"] {
    width: 100%; min-height: 54px; padding: 13px 16px; border: 1px solid #d9cfcd; border-radius: 14px; background: #fff; color: var(--sdtf-ink); font: inherit; outline: none;
}
.sdtf-field input[type="date"]:focus { border-color: var(--sdtf-wine); box-shadow: 0 0 0 4px rgba(143,31,26,.10); }

.sdtf-login-screen {
    box-sizing: border-box;
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 48px 18px 70px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--sdtf-ink);
}
.sdtf-login-screen * { box-sizing: border-box; }
.sdtf-login-logo-wrap { display: flex; justify-content: center; margin-bottom: 20px; }
.sdtf-login-logo-wrap img { width: 92px; height: 92px; object-fit: contain; }
.sdtf-login-screen .sdtf-login-card { width: 100%; max-width: none; margin: 0; padding: 34px; }
.sdtf-login-screen .sdtf-login-card h1 { margin: 0 0 8px; }
.sdtf-client-login-form { margin-top: 22px; }
.sdtf-client-login-form label:not(.sdtf-login-remember) { display: block; margin: 14px 0 6px; color: #514745; font-size: 12px; font-weight: 850; }
.sdtf-client-login-form input[type="text"],
.sdtf-client-login-form input[type="password"] { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--sdtf-line); border-radius: 12px; background: #fff; color: var(--sdtf-ink); font: inherit; outline: none; }
.sdtf-client-login-form input:focus { border-color: var(--sdtf-wine); box-shadow: 0 0 0 4px rgba(143,31,26,.09); }
.sdtf-login-remember { display: flex !important; align-items: center; gap: 8px; margin: 14px 0 !important; color: var(--sdtf-muted); font-size: 12px !important; font-weight: 650 !important; }
.sdtf-login-remember input { width: 16px; height: 16px; }
.sdtf-client-login-form .sdtf-btn { width: 100%; }
.sdtf-login-error { margin: 16px 0 0; padding: 11px 12px; border: 1px solid #f2c8c4; border-radius: 10px; background: #fff3f2; color: #9c2b22; font-size: 12px; font-weight: 750; }
.sdtf-login-footnote { margin: 14px 0 0; color: var(--sdtf-muted); text-align: center; font-size: 11px; }

body.sdtf-client-panel-page .sdtf-standalone-page { background: #f1edec; }
body.sdtf-client-login-page .sdtf-standalone-page { background: #fbf8f7; }

@media (max-width: 820px) {
    .sdtf-selector-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .sdtf-login-screen { padding: 28px 14px 48px; }
    .sdtf-login-screen .sdtf-login-card { padding: 26px 20px; }
}

.sdtf-catalog-empty {
    margin: 10px 0 0;
    color: #7d7373;
    font-size: 14px;
}

.sdtf-upload-box {
    border: 1px dashed rgba(140, 24, 23, .35);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255,255,255,.72);
}
.sdtf-upload-box input[type="file"] { width: 100%; }
.sdtf-upload-box small { display: block; margin-top: 8px; color: #796f6d; line-height: 1.4; }

.sdtf-upload-feedback { margin-top: 10px; color: #4d4442; font-size: 12px; font-weight: 750; line-height: 1.4; }
.sdtf-upload-feedback.is-error { color: #b42318; }
