:root {
  --ink: #101827;
  --muted: #667085;
  --surface: #ffffff;
  --canvas: #f2f5f7;
  --green: #059669;
  --green-soft: #e8f7f1;
  --orange: #ff5a1f;
  --orange-soft: #fff0e8;
  --blue: #2563eb;
  --danger: #dc2626;
  --line: #e3e8ee;
  --shadow: 0 18px 45px rgba(16, 24, 39, .10);
  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; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.is-hidden { display: none !important; }

.global-loader {
  position: fixed;
  inset: max(12px, env(safe-area-inset-top)) 14px auto;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 28px);
  margin-inline: auto;
  padding: 11px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(16, 24, 39, .94);
  box-shadow: var(--shadow);
  font-size: .86rem;
  font-weight: 800;
}
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: radial-gradient(circle at 80% 10%, #ffe2d5, transparent 34%), linear-gradient(145deg, #101827, #243047 60%, #0f766e); }
.auth-card { width: min(100%, 460px); padding: 30px; border-radius: 28px; background: rgba(255,255,255,.98); box-shadow: 0 28px 70px rgba(0,0,0,.26); }
.brand-mark { display: inline-flex; align-items: center; min-height: 42px; padding: 0 13px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 1.6rem; font-weight: 1000; letter-spacing: -.08em; }
.brand-mark-small { min-height: 34px; font-size: 1.2rem; }
.auth-card h1 { margin: 8px 0; font-size: clamp(2rem, 7vw, 3rem); line-height: .98; letter-spacing: -.05em; }
.auth-card > p:not(.eyebrow):not(.form-message) { color: var(--muted); line-height: 1.55; }
.eyebrow { margin: 18px 0 4px; color: var(--orange); font-size: .72rem; font-weight: 950; letter-spacing: .14em; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 22px 0 16px; padding: 5px; border-radius: 14px; background: #edf1f5; }
.auth-tabs button { padding: 10px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-weight: 800; }
.auth-tabs button.is-active { color: var(--ink); background: #fff; box-shadow: 0 4px 14px rgba(16,24,39,.08); }
.auth-form, .stack-form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: #344054; font-size: .82rem; font-weight: 800; }
input, select, textarea { width: 100%; border: 1px solid #d6dde5; border-radius: 13px; padding: 12px 13px; background: #fff; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
textarea { resize: vertical; }
.consent { grid-template-columns: auto 1fr; align-items: start; }
.consent input { width: 18px; margin-top: 2px; }
.consent span { line-height: 1.4; }
.consent a { color: var(--blue); font-weight: 900; }
.consent small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.primary-button, .small-button { border: 0; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--orange), #ef3f0b); font-weight: 900; box-shadow: 0 10px 24px rgba(255,90,31,.24); }
.primary-button { padding: 14px 18px; }
.small-button { padding: 10px 13px; }
.primary-button:disabled, .small-button:disabled { opacity: .55; cursor: wait; }
.secondary-link { display: block; margin-top: 18px; color: var(--blue); text-align: center; font-weight: 800; text-decoration: none; }
.form-message { min-height: 20px; margin: 12px 0 0; color: var(--danger); font-size: .85rem; font-weight: 800; }

.services-shell { min-height: 100vh; padding-bottom: 98px; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) 18px 12px; color: #fff; background: rgba(16,24,39,.97); box-shadow: 0 8px 22px rgba(16,24,39,.18); backdrop-filter: blur(16px); }
.topbar > div { display: flex; align-items: center; gap: 9px; }
.app-label { font-weight: 900; }
.topbar-actions { gap: 7px !important; }
.connection-chip { padding: 7px 9px; border-radius: 999px; color: #b8f5dc; background: rgba(5,150,105,.18); font-size: .68rem; font-weight: 900; }
.connection-chip.is-offline { color: #fed7aa; background: rgba(234,88,12,.2); }
.icon-button { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; color: #fff; background: rgba(255,255,255,.08); font-size: 1.25rem; }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1120px; margin: 16px auto 0; padding: 14px 18px; }
.workspace-bar small { display: block; color: var(--muted); font-size: .65rem; font-weight: 900; letter-spacing: .12em; }
.workspace-bar strong { display: block; margin-top: 3px; font-size: 1.04rem; }
.workspace-selectors { display: flex; align-items: end; gap: 10px; }
.workspace-bar label { min-width: 145px; }
.workspace-bar select { padding: 8px 10px; }
.app-content { width: min(100%, 1120px); margin: 0 auto; padding: 12px 18px 30px; }
.app-view { display: none; animation: reveal .18s ease-out; }
.app-view.is-active { display: block; }
@keyframes reveal { from { opacity: .2; transform: translateY(5px); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 12px 0 18px; }
.page-heading h1 { margin: 2px 0 0; font-size: clamp(1.7rem, 6vw, 2.5rem); letter-spacing: -.045em; }
.status-chip { padding: 8px 11px; border-radius: 999px; color: #92400e; background: #fef3c7; font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.status-chip.is-approved { color: #047857; background: var(--green-soft); }
.status-chip.is-suspended, .status-chip.is-rejected { color: #b91c1c; background: #fee2e2; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric { min-height: 112px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 7px 22px rgba(16,24,39,.05); }
.metric small { color: var(--muted); font-size: .67rem; font-weight: 900; letter-spacing: .1em; }
.metric strong { display: block; margin-top: 12px; font-size: 1.8rem; letter-spacing: -.04em; }
.panel { margin-bottom: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 8px 24px rgba(16,24,39,.05); }
.panel-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-heading small { color: var(--orange); font-size: .65rem; font-weight: 900; letter-spacing: .12em; }
.panel h2, .panel-heading h2 { margin: 3px 0; font-size: 1.12rem; }
.card-list { display: grid; gap: 12px; }
.service-card { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 5px 17px rgba(16,24,39,.04); }
.service-card header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.service-card h3 { margin: 0; font-size: 1.02rem; }
.service-card p { margin: 7px 0; color: var(--muted); font-size: .87rem; line-height: 1.45; }
.service-card footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.tag { display: inline-flex; padding: 6px 8px; border-radius: 999px; color: #475467; background: #f2f4f7; font-size: .68rem; font-weight: 850; }
.card-action { padding: 9px 11px; border: 1px solid #d5dce4; border-radius: 11px; color: var(--ink); background: #fff; font-size: .78rem; font-weight: 850; }
.card-action.is-primary { border-color: var(--green); color: #fff; background: var(--green); }
.card-action.is-danger { color: var(--danger); }
.account-summary { display: grid; gap: 12px; margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #f8fafc; }
.account-summary p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.account-id-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-id-row code { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-weight: 900; user-select: all; }
.danger-zone { display: grid; gap: 12px; margin-top: 18px; padding: 16px; border: 1px solid #fecaca; border-radius: 16px; background: #fff7f7; }
.danger-zone h3, .danger-zone p { margin: 0; }
.danger-zone p { color: #7f1d1d; font-size: .84rem; line-height: 1.45; }
.danger-button { padding: 13px 16px; border: 0; border-radius: 13px; color: #fff; background: #b91c1c; font-weight: 900; }
.danger-button:disabled { opacity: .55; cursor: wait; }
.confirmation-word { color: #991b1b; letter-spacing: .08em; }
.empty-state { padding: 28px 16px; border: 1px dashed #ccd5df; border-radius: 16px; color: var(--muted); text-align: center; }
.security-note { padding: 12px; border-radius: 13px; color: #475467; background: #f8fafc; font-size: .8rem; }
.taxonomy-fieldset { display: grid; gap: 12px; min-width: 0; margin: 2px 0; padding: 15px; border: 1px solid #d9e1e9; border-radius: 17px; background: #f8fafc; }
.taxonomy-fieldset legend { padding: 0 6px; color: var(--ink); font-size: .82rem; font-weight: 900; }
.taxonomy-select-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.taxonomy-fieldset label { min-width: 0; }
.taxonomy-search { background-image: linear-gradient(45deg, transparent 45%, #98a2b3 45%, #98a2b3 55%, transparent 55%); background-repeat: no-repeat; background-position: calc(100% - 17px) 50%; background-size: 7px 7px; }
.taxonomy-help, .taxonomy-legacy { margin: 0; font-size: .78rem; line-height: 1.45; }
.taxonomy-help { color: #667085; }
.taxonomy-help.is-error { color: #b42318; font-weight: 800; }
.taxonomy-status { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 7px 9px; border-radius: 11px; color: #1557d5; background: #eaf1ff; font-size: .74rem; font-weight: 800; line-height: 1.35; }
.taxonomy-status.is-warning { color: #854d0e; background: #fffbeb; }
.taxonomy-status.is-error { color: #b42318; background: #fff1f1; }
.taxonomy-mini-spinner { flex: 0 0 auto; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.taxonomy-retry { flex: 0 0 auto; min-width: 48px; min-height: 48px; margin-left: auto; padding: 9px 12px; border: 1px solid currentColor; border-radius: 11px; color: inherit; background: rgba(255,255,255,.72); font-size: .78rem; font-weight: 900; }
.taxonomy-retry:focus-visible { outline: 3px solid rgba(21,87,213,.28); outline-offset: 2px; }
.taxonomy-retry:disabled { opacity: .55; cursor: wait; }
.taxonomy-fieldset[aria-busy="true"] select { cursor: progress; }
.taxonomy-legacy { padding: 10px 12px; border: 1px solid #f5d08a; border-radius: 12px; color: #854d0e !important; background: #fffbeb; }
.taxonomy-inherited { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; align-items: center; padding: 12px; border: 1px solid #bbf7d0; border-radius: 14px; background: #f0fdf4; }
.taxonomy-inherited > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #047857; background: #dcfce7; font-size: 1.35rem; }
.taxonomy-inherited small, .taxonomy-inherited strong { display: block; }
.taxonomy-inherited small { color: #047857; font-size: .62rem; font-weight: 900; letter-spacing: .07em; }
.taxonomy-inherited strong { margin-top: 3px; font-size: .88rem; }
.taxonomy-inherited p { margin: 3px 0 0; color: #667085; font-size: .74rem; }

.onboarding-view { padding: 28px 18px 110px; }
.onboarding-card { width: min(100%, 680px); margin: 0 auto; padding: 24px; border-radius: 26px; background: #fff; box-shadow: var(--shadow); }
.onboarding-card h1 { margin: 4px 0 8px; font-size: 2rem; letter-spacing: -.04em; }
.onboarding-card > p:not(.eyebrow):not(.security-note) { color: var(--muted); line-height: 1.55; }
.hero-icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; background: var(--orange-soft); font-size: 2rem; }
.password-change-card .stack-form { margin-top: 20px; }
.password-change-card .security-note { margin-bottom: 0; }

.bottom-nav { position: fixed; inset: auto max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); z-index: 60; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: min(calc(100% - 20px), 760px); margin-inline: auto; padding: 7px; border-radius: 22px; color: #d8dee8; background: #101827; box-shadow: 0 20px 45px rgba(16,24,39,.28); }
.bottom-nav button { min-width: 0; padding: 9px 5px; border: 0; border-radius: 15px; color: inherit; background: transparent; font-size: .68rem; font-weight: 850; }
.bottom-nav button span { display: block; margin-bottom: 3px; font-size: 1.08rem; }
.bottom-nav button.is-active { color: #fff; background: var(--orange); }

.action-dialog { width: min(92vw, 520px); max-height: 88vh; padding: 0; border: 0; border-radius: 24px; box-shadow: 0 28px 70px rgba(16,24,39,.28); }
.action-dialog::backdrop { background: rgba(16,24,39,.64); backdrop-filter: blur(4px); }
.dialog-card { position: relative; padding: 24px; }
.dialog-card h2 { margin: 0 36px 18px 0; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f1f4f7; font-size: 1.35rem; }
.toast-region { position: fixed; z-index: 2000; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); width: min(calc(100% - 28px), 520px); transform: translateX(-50%); }
.toast { margin-top: 8px; padding: 14px 16px; border-radius: 15px; color: #fff; background: #101827; box-shadow: var(--shadow); font-weight: 800; animation: reveal .18s ease-out; }
.toast.is-error { background: #991b1b; }

@media (max-width: 760px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-bar { align-items: end; }
  .workspace-selectors { width: min(62%, 390px); }
  .workspace-bar label { min-width: 0; flex: 1; }
  .app-content { padding-inline: 13px; }
  .bottom-nav { overflow-x: auto; grid-auto-columns: minmax(72px, 1fr); }
}

@media (max-width: 430px) {
  .auth-card { padding: 23px 18px; }
  .topbar { padding-inline: 12px; }
  .connection-chip { display: inline-flex; }
  .workspace-bar { align-items: stretch; flex-direction: column; padding-inline: 13px; }
  .workspace-selectors { width: 100%; }
  .metric { min-height: 98px; padding: 13px; }
  .metric strong { font-size: 1.5rem; }
  .taxonomy-select-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; }
}

/* Mobile application shell */
:root {
  --service-blue: #1557d5;
  --service-blue-dark: #0a2f78;
  --service-blue-ink: #09265d;
  --service-blue-soft: #eaf1ff;
  --service-canvas: #f2f6fc;
  --service-line: #dce5f2;
  --service-shadow: 0 18px 48px rgba(8, 42, 104, .14);
}

html { background: var(--service-canvas); }
body { background: var(--service-canvas); color: #12213b; }
svg { display: block; }

:where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid #72a7ff;
  outline-offset: 3px;
}

input, select, textarea {
  min-height: 50px;
  border-color: #ccd8e8;
  border-radius: 15px;
  padding: 13px 14px;
  color: #14213a;
  background: #fdfefe;
  font-size: 1rem;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--service-blue);
  box-shadow: 0 0 0 4px rgba(21, 87, 213, .12);
}
textarea { min-height: 104px; }
label { color: #2c3a52; font-size: .83rem; }

.primary-button, .small-button {
  min-height: 48px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--service-blue), #0d45b5);
  box-shadow: 0 12px 26px rgba(21, 87, 213, .23);
}
.small-button { padding-inline: 16px; }
.primary-button:not(:disabled):active, .small-button:not(:disabled):active { transform: translateY(1px); }
.eyebrow { color: var(--service-blue); }

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: block;
  padding: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 13% 12%, rgba(83, 146, 255, .42), transparent 31%),
    linear-gradient(145deg, #08265e 0%, #1557d5 58%, #0e79d3 100%);
}
.auth-stage {
  width: min(100%, 1120px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding: clamp(24px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(370px, .78fr);
  align-items: center;
  gap: clamp(30px, 6vw, 80px);
}
.auth-hero { min-width: 0; color: #fff; }
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand-wordmark,
.topbar-wordmark {
  display: block;
  height: auto;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 8px 18px rgba(2, 19, 61, .24));
}
.auth-brand-wordmark { width: clamp(142px, 18vw, 170px); max-height: 72px; }
.auth-product-name {
  padding-left: 13px;
  border-left: 1px solid rgba(255,255,255,.38);
  color: #dbeafe;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .19em;
}
.auth-hero-copy { max-width: 590px; margin-top: clamp(42px, 8vh, 86px); }
.auth-kicker { margin: 0 0 12px; color: #bcd5ff; font-size: .72rem; font-weight: 950; letter-spacing: .16em; }
.auth-hero h1 { margin: 0; font-size: clamp(2.55rem, 6vw, 4.8rem); line-height: .98; letter-spacing: -.062em; }
.auth-hero-copy > p:last-child { max-width: 520px; margin: 20px 0 0; color: #e3ecff; font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.55; }
.auth-feature-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.auth-feature-row span { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #f8fbff; background: rgba(255,255,255,.1); font-size: .78rem; font-weight: 850; backdrop-filter: blur(10px); }
.auth-feature-row svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-card {
  width: 100%;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 30px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 30px 74px rgba(2, 18, 58, .28);
  scrollbar-width: thin;
}
.auth-sheet-heading h2 { margin: 3px 0 4px; font-size: 1.7rem; letter-spacing: -.035em; }
.auth-sheet-heading p { margin: 0; color: #6a7890; line-height: 1.45; }
.auth-sheet-heading .eyebrow { margin: 0 0 4px; font-size: .66rem; }
.auth-tabs { margin: 22px 0 18px; padding: 5px; border-radius: 16px; background: #eaf0f8; }
.auth-tabs button { min-height: 48px; border-radius: 12px; font-size: .9rem; }
.auth-tabs button.is-active { color: var(--service-blue-ink); box-shadow: 0 6px 18px rgba(13, 56, 130, .1); }
.auth-form { gap: 15px; }
.auth-form .primary-button { margin-top: 2px; }
.consent input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--service-blue); }
.consent a { color: var(--service-blue); }
.secondary-link { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; margin-top: 8px; color: var(--service-blue); border-radius: 14px; }
.secondary-link svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.services-shell { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(94px + env(safe-area-inset-bottom)); background: var(--service-canvas); }
.topbar {
  min-height: calc(66px + env(safe-area-inset-top));
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  color: #fff;
  background: linear-gradient(115deg, var(--service-blue-dark), var(--service-blue));
  box-shadow: 0 9px 28px rgba(10,47,120,.25);
}
.topbar-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.topbar-wordmark { width: 90px; max-height: 38px; flex: 0 1 90px; }
.app-label { display: grid; min-width: 0; line-height: 1; }
.app-label small { padding-left: 9px; border-left: 1px solid rgba(255,255,255,.34); color: #dbeafe; font-size: .69rem; font-weight: 850; }
.topbar-actions { flex: 0 0 auto; }
.connection-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; color: #eafff7; background: rgba(255,255,255,.13); }
.connection-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5ee6aa; box-shadow: 0 0 0 3px rgba(94,230,170,.16); }
.connection-chip.is-offline::before { background: #fdba74; box-shadow: 0 0 0 3px rgba(253,186,116,.17); }
.icon-button { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 15px; }
.icon-button svg, .hero-icon svg, .sheet-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.workspace-bar { margin-top: 14px; padding: 15px 18px; border: 1px solid var(--service-line); border-radius: 20px; background: #fff; box-shadow: 0 8px 24px rgba(12,45,100,.06); }
.workspace-bar small { color: var(--service-blue); }
.workspace-bar select { min-height: 48px; padding-block: 8px; font-size: .85rem; }
.app-content { padding-top: 15px; padding-bottom: 34px; }
.page-heading { align-items: center; margin: 8px 0 17px; }
.page-heading h1 { color: #10203b; }
.page-heading .eyebrow { margin-top: 0; }
.status-chip { color: #895300; background: #fff3cd; }
.metric-grid { gap: 11px; }
.metric { position: relative; overflow: hidden; min-height: 106px; border-color: var(--service-line); box-shadow: 0 8px 24px rgba(12,45,100,.055); }
.metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--service-blue); }
.metric small { color: #65758c; }
.metric strong { color: #102d68; }
.panel, .service-card { border-color: var(--service-line); box-shadow: 0 8px 25px rgba(12,45,100,.055); }
.panel-heading small { color: var(--service-blue); }
.service-card { border-radius: 20px; }
.service-card h3 { color: #13223d; }
.service-card footer { gap: 10px; }
.card-action { min-height: 48px; padding: 10px 13px; border-radius: 13px; }
.card-action.is-primary { border-color: var(--service-blue); background: var(--service-blue); }
.offering-list { display: grid; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.offering-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--service-line); border-radius: 14px; background: #f8fbff; }
.offering-item div { min-width: 0; }
.offering-item strong, .offering-item small { display: block; overflow-wrap: anywhere; }
.offering-item small { margin-top: 3px; color: #66758c; font-size: .72rem; }
.offering-item .card-action { min-width: 82px; }
.offering-item { grid-template-columns: 52px minmax(0, 1fr) auto; }
.offering-image {
  position: relative;
  display: grid;
  width: 52px;
  height: 52px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #c9daf3;
  border-radius: 14px;
  color: #1557d5;
  background: #eaf2ff;
}
.offering-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.offering-image img.is-loading { opacity: .45; }
.offering-image img.is-error { display: none; }
.offering-image-fallback { font-size: 1.25rem; font-weight: 900; }
.offering-image.has-image .offering-image-fallback { opacity: 0; }
.offering-image.has-image img.is-error + .offering-image-fallback { opacity: 1; }
.offering-image-editor {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #c9daf3;
  border-radius: 18px;
  background: #f7faff;
}
.offering-image-heading { display: grid; gap: 3px; }
.offering-image-heading > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.offering-image-heading strong { color: #14233d; }
.offering-image-heading span { padding: 3px 7px; border-radius: 999px; color: #174a99; background: #e4efff; font-size: .66rem; font-weight: 900; text-transform: uppercase; }
.offering-image-heading small,
.offering-image-selection-message { margin: 0; color: #617189; font-size: .72rem; line-height: 1.35; }
.offering-current-image { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border-radius: 14px; background: #fff; }
.offering-current-image .offering-image { flex: 0 0 64px; width: 64px; height: 54px; }
.offering-current-image > span:last-child { color: #52647d; font-size: .76rem; font-weight: 800; }
.offering-image-source-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.offering-image-source {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px;
  overflow: hidden;
  border: 2px solid var(--service-action);
  border-radius: 13px;
  color: var(--service-action-dark);
  background: var(--service-action-soft);
  text-align: center;
  cursor: pointer;
}
.offering-image-source.is-library { border-color: #aac2e6; color: #123a79; background: #fff; }
.offering-image-source > span { font-size: 1.15rem; }
.offering-image-source > strong { overflow-wrap: anywhere; font-size: .76rem; }
.offering-image-source input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.offering-image-source:focus-within { outline: 3px solid var(--service-action-focus); outline-offset: 2px; }
.offering-image-preview:empty { display: none; }
.offering-image-preview { overflow: hidden; border-radius: 14px; background: #eaf0f8; }
.offering-image-preview img { display: block; width: 100%; max-height: 150px; object-fit: cover; }
.offering-image-remove { display: grid !important; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 9px; min-height: 44px; margin: 0 !important; color: #9b2c2c; font-weight: 800; }
.offering-image-remove input { width: 20px; height: 20px; margin: 0; accent-color: #dc2626; }
.offering-empty { color: #66758c; }
.hero-icon { color: var(--service-blue); background: var(--service-blue-soft); }
.empty-state { border-color: #cbd8ea; color: #6a7890; background: #f9fbfe; }

.bottom-nav {
  inset: auto max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: min(calc(100% - 20px), 560px);
  min-height: 70px;
  padding: 6px;
  overflow: visible;
  border: 1px solid rgba(12, 48, 112, .1);
  border-radius: 24px;
  color: #64748b;
  background: rgba(255,255,255,.97);
  box-shadow: 0 18px 46px rgba(6,35,92,.22);
  backdrop-filter: blur(18px);
}
.bottom-nav button { min-width: 0; min-height: 58px; padding: 7px 4px; border-radius: 18px; color: inherit; font-size: .68rem; }
.bottom-nav button .nav-icon { display: block; width: 23px; height: 23px; margin: 0 auto 5px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav button.is-active { color: var(--service-blue); background: var(--service-blue-soft); }

.more-dialog {
  width: 100%;
  max-width: none;
  max-height: min(82dvh, 680px);
  margin: auto 0 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 28px 28px 0 0;
  color: #14213a;
  background: transparent;
}
.more-dialog::backdrop { background: rgba(5,20,49,.58); backdrop-filter: blur(3px); }
.more-sheet { width: min(100%, 620px); margin-inline: auto; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #fff; box-shadow: 0 -22px 60px rgba(4,24,66,.2); animation: sheet-in .2s ease-out; }
@keyframes sheet-in { from { opacity: .7; transform: translateY(28px); } }
.sheet-handle { display: block; width: 44px; height: 5px; margin: 0 auto 15px; border-radius: 999px; background: #d7dfeb; }
.more-sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.more-sheet-heading small { color: var(--service-blue); font-size: .65rem; font-weight: 900; letter-spacing: .13em; }
.more-sheet-heading h2 { margin: 3px 0 0; font-size: 1.45rem; letter-spacing: -.035em; }
.sheet-close { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; border: 0; border-radius: 15px; color: #334155; background: #eef3f9; }
.more-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.more-option { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 11px; min-height: 74px; padding: 11px; border: 1px solid var(--service-line); border-radius: 18px; color: #17243d; background: #f9fbfe; text-align: left; }
.more-option-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: var(--service-blue); background: var(--service-blue-soft); }
.more-option svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.more-option strong, .more-option small { display: block; min-width: 0; }
.more-option strong { font-size: .9rem; }
.more-option small { margin-top: 4px; overflow: hidden; color: #6b7890; font-size: .7rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.more-option.is-active { border-color: #a9c5ff; background: var(--service-blue-soft); }

.action-dialog { overflow: hidden; border-radius: 26px; }
.dialog-close { display: grid; place-items: center; width: 48px; height: 48px; }
.dialog-card { max-height: min(86dvh, var(--services-dialog-viewport-height, 86dvh)); overflow-y: auto; -webkit-overflow-scrolling: touch; scroll-padding-block: 72px calc(110px + env(safe-area-inset-bottom)); }
.dialog-form-message { min-height: 1.25em; margin: 0; color: #a71919; font-size: .82rem; font-weight: 800; line-height: 1.4; }
.dialog-card .stack-form > .primary-button[type="submit"]:last-child { position: sticky; z-index: 3; bottom: 0; margin-top: 8px; margin-bottom: env(safe-area-inset-bottom); box-shadow: 0 -12px 22px rgba(242,246,252,.94), 0 12px 26px rgba(21,87,213,.23); }

@media (hover: hover) {
  .more-option:hover, .card-action:hover { border-color: #9ebcf2; background-color: #f0f5ff; }
  .icon-button:hover { background: rgba(255,255,255,.17); }
}

@media (max-width: 760px) {
  .auth-stage { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-items: stretch; gap: 0; padding: 0; }
  .auth-hero { min-height: clamp(260px, 37dvh, 350px); padding: max(26px, env(safe-area-inset-top)) 23px 28px; }
  .auth-brand-wordmark { width: 142px; max-height: 60px; }
  .auth-hero-copy { margin-top: clamp(30px, 5.5vh, 55px); }
  .auth-hero h1 { max-width: 520px; font-size: clamp(2.1rem, 10.5vw, 3.35rem); }
  .auth-hero-copy > p:last-child { margin-top: 14px; font-size: .96rem; }
  .auth-feature-row { margin-top: 22px; }
  .auth-feature-row span { min-height: 38px; padding: 7px 11px; }
  .auth-card { min-height: calc(63dvh + 2px); max-height: none; margin: -2px 0 0; padding: 24px 20px calc(22px + env(safe-area-inset-bottom)); overflow: visible; border: 0; border-radius: 30px 30px 0 0; box-shadow: 0 -16px 42px rgba(3,24,68,.16); }
  .auth-sheet-heading h2 { font-size: 1.55rem; }
  .workspace-bar { margin: 12px 12px 0; }
  .app-content { padding-inline: 13px; }
  .bottom-nav { overflow: visible; grid-auto-columns: minmax(0, 1fr); }
  .action-dialog { width: 100%; max-width: none; max-height: 86dvh; margin: auto 0 0; border-radius: 28px 28px 0 0; }
  .action-dialog::backdrop { background: rgba(5,20,49,.58); }
  .dialog-card { max-height: 86dvh; padding: 20px 20px calc(18px + env(safe-area-inset-bottom)); }
  .service-card footer .card-action { flex: 1 1 145px; }
  .action-dialog[open] { position: fixed; top: auto; right: 0; bottom: var(--services-dialog-viewport-bottom, 0px); left: 0; max-height: min(86dvh, var(--services-dialog-viewport-height, 86dvh)); }
  .action-dialog[open] .dialog-card { max-height: min(86dvh, var(--services-dialog-viewport-height, 86dvh)); }
}

@media (max-width: 430px) {
  .topbar { padding-inline: 10px; }
  .topbar-actions { gap: 5px !important; }
  .icon-button { width: 48px; height: 48px; flex-basis: 48px; }
  .workspace-bar { padding-inline: 14px; }
  .workspace-selectors { gap: 8px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-options { grid-template-columns: 1fr; }
  .more-option { min-height: 68px; }
}

@media (max-height: 700px) and (max-width: 760px) {
  .auth-hero { min-height: 224px; padding-bottom: 22px; }
  .auth-hero-copy { margin-top: 24px; }
  .auth-hero-copy > p:last-child, .auth-feature-row { display: none; }
  .auth-card { min-height: calc(100dvh - 222px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
.dialog-close svg, .taxonomy-inherited .nav-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.taxonomy-inherited .nav-icon { margin: auto; }
/* Responsive workspace polish: compact chrome, readable actions and safe mobile sheets. */
:root {
  --services-touch-target: 48px;
  --services-page-gutter: clamp(13px, 3vw, 24px);
  --services-card-gap: clamp(12px, 2.4vw, 18px);
}

body {
  overflow-x: hidden;
  overflow-x: clip;
}

.services-shell {
  padding-bottom: calc(92px + max(8px, env(safe-area-inset-bottom)));
}

.topbar {
  gap: 8px;
  min-height: calc(60px + env(safe-area-inset-top));
  padding-top: max(6px, env(safe-area-inset-top));
  padding-right: max(10px, env(safe-area-inset-right));
  padding-bottom: 6px;
  padding-left: max(10px, env(safe-area-inset-left));
}
.topbar > div { min-width: 0; }
.topbar-brand { flex: 1 1 auto; gap: 9px; }
.topbar-actions { flex: 0 0 auto; gap: 4px !important; margin-left: auto; }
.topbar-wordmark { width: 86px; max-height: 36px; flex-basis: 86px; }
.app-label small { font-size: .66rem; }
.connection-chip { flex: 0 0 auto; white-space: nowrap; }

.app-content {
  padding-right: max(var(--services-page-gutter), env(safe-area-inset-right));
  padding-bottom: 42px;
  padding-left: max(var(--services-page-gutter), env(safe-area-inset-left));
}
.onboarding-view {
  padding-top: clamp(20px, 5vw, 34px);
  padding-right: max(var(--services-page-gutter), env(safe-area-inset-right));
  padding-bottom: calc(108px + max(12px, env(safe-area-inset-bottom)));
  padding-left: max(var(--services-page-gutter), env(safe-area-inset-left));
}
.onboarding-card { padding: clamp(18px, 4vw, 28px); }
.onboarding-card h1 { font-size: clamp(1.62rem, 7vw, 2rem); line-height: 1.08; }

.workspace-bar {
  width: min(calc(100% - max(var(--services-page-gutter), env(safe-area-inset-left)) - max(var(--services-page-gutter), env(safe-area-inset-right))), 1120px);
  margin-right: auto;
  margin-left: auto;
}
.workspace-bar > div,
.workspace-selectors,
.workspace-selectors label { min-width: 0; }
#workspace-name { overflow-wrap: anywhere; }

.page-heading { min-width: 0; }
.page-heading > div { min-width: 0; }
.page-heading h1 { overflow-wrap: anywhere; line-height: 1.05; }
.panel-heading { align-items: flex-start; }
.panel-heading > div { min-width: 0; }
.panel-heading h2 { overflow-wrap: anywhere; line-height: 1.2; }

.metric-grid,
.card-list { gap: var(--services-card-gap); }
 .metric strong {
  min-width: 0;
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.panel { padding: clamp(15px, 3vw, 21px); }
.service-card {
  min-width: 0;
  padding: clamp(14px, 3vw, 18px);
}
.service-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}
.service-card header > * { min-width: 0; }
.service-card :where(h3, p, strong, small) { overflow-wrap: anywhere; }
.service-card footer { align-items: stretch; gap: 9px; }

.stack-form,
.auth-form { gap: clamp(15px, 3vw, 19px); }
label { min-width: 0; gap: 8px; line-height: 1.3; }
input,
select,
textarea { min-width: 0; font-size: max(16px, 1rem); line-height: 1.35; }
.taxonomy-fieldset { gap: 14px; padding: clamp(13px, 3vw, 17px); }
.taxonomy-status { flex-wrap: wrap; min-width: 0; }
.taxonomy-status [data-taxonomy-status-text] { min-width: 0; flex: 1 1 180px; overflow-wrap: anywhere; }

:where(
  .primary-button,
  .small-button,
  .card-action,
  .danger-button,
  .icon-button,
  .bottom-nav button,
  .sheet-close,
  .dialog-close,
  .taxonomy-retry,
  .auth-tabs button,
  .secondary-link
) {
  min-height: var(--services-touch-target);
  line-height: 1.2;
  touch-action: manipulation;
}
.primary-button,
.small-button,
.card-action,
.danger-button { padding: 12px 15px; font-size: .87rem; text-align: center; white-space: normal; }
.primary-button { width: 100%; }
.small-button { flex: 0 0 auto; }
.card-action { display: inline-flex; align-items: center; justify-content: center; }

.bottom-nav {
  right: max(8px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  left: max(8px, env(safe-area-inset-left));
  width: auto;
  max-width: 600px;
  min-height: 72px;
  margin-inline: auto;
  gap: 2px;
  padding: 5px;
}
.bottom-nav button {
  display: grid;
  grid-template-rows: 24px minmax(12px, auto);
  place-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 60px;
  padding: 5px 2px;
  overflow: visible;
}
.bottom-nav button .nav-icon {
  width: 22px;
  height: 22px;
  margin: 0;
}
.bottom-nav button span.nav-label {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  margin-bottom: 0;
  overflow: visible;
  font-size: clamp(.625rem, 2.75vw, .72rem);
  line-height: 1.12;
  letter-spacing: -.015em;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}
.bottom-nav button:focus-visible { outline-offset: -2px; }

.action-dialog {
  max-width: min(540px, 100%);
  max-height: min(calc(100dvh - max(16px, env(safe-area-inset-top))), var(--services-dialog-viewport-height, 100dvh));
}
.dialog-card {
  overscroll-behavior: contain;
  padding: clamp(20px, 4vw, 28px);
  padding-right: max(clamp(20px, 4vw, 28px), env(safe-area-inset-right));
  padding-bottom: max(clamp(20px, 4vw, 28px), env(safe-area-inset-bottom));
  padding-left: max(clamp(20px, 4vw, 28px), env(safe-area-inset-left));
  scrollbar-gutter: stable;
}
.dialog-card h2 { max-width: calc(100% - 58px); margin-right: 0; overflow-wrap: anywhere; line-height: 1.12; }
.dialog-card .stack-form { min-width: 0; }
.dialog-close { top: 12px; right: max(12px, env(safe-area-inset-right)); }
.more-dialog {
  max-height: min(82dvh, 680px);
  overflow: hidden;
}
.more-sheet {
  max-height: min(82dvh, 680px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: max(18px, env(safe-area-inset-right));
  padding-left: max(18px, env(safe-area-inset-left));
}
.toast-region {
  bottom: calc(88px + max(12px, env(safe-area-inset-bottom)));
  max-width: calc(100% - max(24px, env(safe-area-inset-left)) - max(24px, env(safe-area-inset-right)));
}

@media (min-width: 761px) {
  .app-content { padding-top: 22px; padding-bottom: 58px; }
  .workspace-bar { margin-top: 20px; }
  .panel { margin-bottom: 20px; }
  .service-card footer .card-action { flex: 0 1 auto; min-width: 132px; }
  .bottom-nav { bottom: max(14px, env(safe-area-inset-bottom)); }
}

/* 430 px phones */
@media (max-width: 430px) {
  .topbar { gap: 5px; padding-right: max(7px, env(safe-area-inset-right)); padding-left: max(7px, env(safe-area-inset-left)); }
  .topbar-brand { gap: 7px; }
  .topbar-wordmark { width: 78px; max-height: 34px; flex-basis: 78px; }
  .topbar-actions { gap: 2px !important; }
  .connection-chip {
    display: inline-flex;
    min-width: 0;
    min-height: 32px;
    padding: 5px 7px;
    gap: 5px;
    justify-content: center;
    font-size: .64rem;
  }
  .workspace-bar { width: min(calc(100% - max(var(--services-page-gutter), env(safe-area-inset-left)) - max(var(--services-page-gutter), env(safe-area-inset-right))), 1120px); gap: 13px; }
  .workspace-selectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: clamp(1.55rem, 8vw, 1.9rem); }
  .metric { min-height: 94px; padding: 14px; }
  .metric strong { margin-top: 9px; }
  .service-card footer .card-action { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .more-sheet { padding-right: max(15px, env(safe-area-inset-right)); padding-left: max(15px, env(safe-area-inset-left)); }
}

/* 390 px phones */
@media (max-width: 390px) {
  .app-label small { margin-top: 3px; font-size: .62rem; }
  .icon-button { width: 48px; height: 48px; flex-basis: 48px; border-radius: 14px; }
  .workspace-selectors { grid-template-columns: 1fr; }
  .page-heading { flex-wrap: wrap; gap: 11px; }
  .page-heading .small-button { min-width: 112px; }
  .panel-heading { flex-wrap: wrap; }
  .taxonomy-select-grid { grid-template-columns: 1fr; }
  .action-dialog { max-height: min(calc(100dvh - max(8px, env(safe-area-inset-top))), var(--services-dialog-viewport-height, 100dvh)); }
  .dialog-card { max-height: min(calc(100dvh - max(8px, env(safe-area-inset-top))), var(--services-dialog-viewport-height, 100dvh)); padding-right: max(16px, env(safe-area-inset-right)); padding-left: max(16px, env(safe-area-inset-left)); }
}

/* 360 px phones */
@media (max-width: 360px) {
  .topbar-brand { gap: 6px; }
  .app-label small { display: none; }
  .topbar-wordmark { width: 72px; flex-basis: 72px; }
  .page-heading .small-button { width: 100%; }
  .service-card header { grid-template-columns: 1fr; gap: 9px; }
  .service-card header .tag,
  .service-card header .status-chip { justify-self: start; }
  .service-card footer .card-action { flex-basis: 100%; width: 100%; }
  .account-id-row { align-items: stretch; flex-direction: column; }
  .account-id-row .card-action { width: 100%; }
  .offering-item { grid-template-columns: 46px minmax(0, 1fr); }
  .offering-item .offering-image { width: 46px; height: 46px; }
  .offering-item .card-action { grid-column: 1 / -1; width: 100%; }
  .more-option { grid-template-columns: 44px minmax(0, 1fr); }
  .more-option-icon { width: 44px; height: 44px; }
}

/* 320 px phones */
@media (max-width: 330px) {
  :root { --services-page-gutter: 10px; }
  .topbar { padding-right: max(4px, env(safe-area-inset-right)); padding-left: max(4px, env(safe-area-inset-left)); }
  .topbar-icon { width: 36px; height: 36px; }
  .app-label strong { font-size: .84rem; }
  .connection-chip {
    width: 18px;
    min-width: 18px;
    min-height: 32px;
    height: 32px;
    padding: 0;
    gap: 0;
    justify-content: center;
    overflow: hidden;
    color: transparent;
    background: transparent;
    font-size: 0;
  }
  .connection-chip::before { width: 9px; height: 9px; }
  .metric-grid { gap: 8px; }
  .metric { min-height: 88px; padding: 12px 11px; }
  .metric small { font-size: .62rem; letter-spacing: .06em; }
  .bottom-nav { right: max(4px, env(safe-area-inset-right)); left: max(4px, env(safe-area-inset-left)); }
  .bottom-nav button span.nav-label { font-size: .625rem; }
  .onboarding-card { padding: 17px 14px; border-radius: 22px; }
}

.auth-stage {
  padding-right: max(clamp(24px, 5vw, 64px), env(safe-area-inset-right));
  padding-left: max(clamp(24px, 5vw, 64px), env(safe-area-inset-left));
}

:where(button, a, input, select, textarea):focus-visible,
.taxonomy-retry:focus-visible,
.bottom-nav button:focus-visible {
  outline: 3px solid #123d8c;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #fff;
}
.topbar :where(button, a):focus-visible,
.primary-button:focus-visible,
.small-button:focus-visible,
.card-action.is-primary:focus-visible,
.danger-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #08265e;
}

@media (max-width: 760px) {
  .auth-stage { padding-right: 0; padding-left: 0; }
  .auth-hero { padding-right: max(23px, env(safe-area-inset-right)); padding-left: max(23px, env(safe-area-inset-left)); }
  .auth-card { padding-right: max(20px, env(safe-area-inset-right)); padding-left: max(20px, env(safe-area-inset-left)); }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* Solicitudes de servicio: punto fijo, evidencia, chat y avisos. */
.metric-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rating-chip { color: #7a4b00; background: #fff4cf; }
.request-evidence { display: grid; gap: 12px; margin-top: 14px; }
.service-location,
.service-evidence {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #cbd9ec;
  border-radius: 17px;
  background: #f7faff;
}
.service-location.is-missing { border-style: dashed; background: #fbfcfe; }
.service-location-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.service-location-heading > div { min-width: 0; }
.service-location-heading strong,
.service-evidence > strong { display: block; color: #102d68; font-size: .86rem; }
.service-location :where(p),
.service-evidence > p { margin: 3px 0 0; color: #5f6f86; font-size: .78rem; line-height: 1.4; overflow-wrap: anywhere; }
.service-location-heading .card-action { flex: 0 0 auto; min-width: 100px; text-decoration: none; }
.service-map {
  display: block;
  width: 100%;
  height: clamp(210px, 39vw, 330px);
  border: 0;
  border-radius: 14px;
  background: #dfe8f5;
}
.service-location.is-compact { padding-block: 11px; }
.location-privacy-note { color: #66758c !important; font-size: .68rem !important; }
.service-photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.service-photo-button {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 104px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #b9cbe5;
  border-radius: 13px;
  background: #eaf1fb;
}
.service-photo { display: block; width: 100%; height: 100%; min-height: 104px; object-fit: cover; }
.service-photo.is-loading { color: transparent; background: linear-gradient(105deg, #e5edf8 32%, #f8fbff 45%, #e5edf8 58%); background-size: 220% 100%; animation: media-loading 1.15s linear infinite; }
.service-photo.is-error { opacity: .45; }
@keyframes media-loading { to { background-position-x: -220%; } }
.service-photo-preview { display: grid; gap: 10px; margin: 0; }
.service-photo-preview .service-photo { max-height: min(68dvh, 680px); border-radius: 16px; object-fit: contain; background: #eaf0f8; }
.service-photo-preview figcaption { color: #66758c; font-size: .76rem; line-height: 1.4; text-align: center; }
.request-detail-summary { margin-bottom: 13px; }
.request-detail-summary p { color: #475569; line-height: 1.5; }
.dialog-action-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.dialog-action-row .card-action { flex: 1 1 160px; }
.quote-form { margin-top: 16px; }
.quote-date-field {
  display: grid;
  gap: 7px;
  padding: 13px 14px;
  border: 2px solid #9bbcff;
  border-radius: 15px;
  color: #153c78;
  background: #f2f6ff;
}
.quote-date-field small {
  margin: 0;
  color: #526987;
  font-size: .74rem;
  font-weight: 650;
  line-height: 1.4;
}
.quote-client-offer {
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #efc98e;
  border-radius: 15px;
  color: #704416;
  background: #fff8eb;
  font-size: .84rem;
  line-height: 1.45;
}
.quote-client-offer strong { color: #a14808; }
#quote-dialog-form .primary-button { min-height: 52px; }
#quote-dialog-form textarea[name="scope"] { min-height: 74px; }

.live-chat-heading { margin: -4px 0 10px; padding: 10px 12px; border-radius: 14px; color: #17325f; background: #eef4ff; }
.live-chat-heading strong { display: block; overflow-wrap: anywhere; }
.live-chat-heading p { margin: 4px 0 0; color: #168253; font-size: .72rem; font-weight: 850; }
.chat-message-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 220px;
  max-height: min(420px, calc(var(--services-dialog-viewport-height, 100dvh) * .43));
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #d5e0ef;
  border-radius: 17px;
  background: #f3f6fb;
  scroll-behavior: smooth;
}
.chat-bubble { align-self: flex-start; width: min(86%, 410px); padding: 10px 12px; border: 1px solid #d4deeb; border-radius: 7px 16px 16px; color: #1b2b47; background: #fff; box-shadow: 0 5px 14px rgba(20,45,90,.06); }
.chat-bubble.is-provider { align-self: flex-end; border-color: #a9c4ff; border-radius: 16px 7px 16px 16px; color: #08265e; background: #e6efff; }
.chat-bubble strong,
.chat-bubble time { display: block; font-size: .66rem; }
.chat-bubble strong { color: #1557d5; }
.chat-bubble p { margin: 5px 0; line-height: 1.42; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-bubble time { color: #748196; text-align: right; }
.chat-composer { position: relative; margin-top: 12px; padding-bottom: 1px; }
.chat-composer textarea { min-height: 82px; max-height: 170px; }

.toast.is-communication { display: grid; gap: 3px; border: 1px solid #8db2ff; color: #fff; background: linear-gradient(135deg, #092d73, #1557d5); }
.toast.is-communication strong { font-size: .88rem; }
.toast.is-communication span { color: #e8f0ff; font-size: .79rem; line-height: 1.35; }
.dialog-toast-stack {
  position: fixed;
  z-index: 2200;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  width: min(calc(100% - 28px), 500px);
  pointer-events: none;
  transform: translateX(-50%);
}
.dialog-toast-stack .toast { pointer-events: auto; }

@media (max-width: 430px) {
  .service-location-heading { align-items: stretch; flex-direction: column; }
  .service-location-heading .card-action { width: 100%; }
  .service-map { height: 240px; }
  .service-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-photo-button,
  .service-photo { min-height: 118px; }
  .chat-message-list { min-height: 190px; max-height: calc(var(--services-dialog-viewport-height, 100dvh) * .38); }
  .dialog-action-row .card-action { flex-basis: 100%; }
}

@media (max-width: 330px) {
  .service-photo-grid { grid-template-columns: 1fr; }
  .service-photo-button,
  .service-photo { min-height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .service-photo.is-loading { animation: none; }
  .chat-message-list { scroll-behavior: auto; }
}
/* Comunicación prioritaria y ciclo visible del trabajo de Servicios. */
.live-chat-action {
  position: relative;
  isolation: isolate;
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  overflow: hidden;
  border: 0;
  color: #fff !important;
  background: linear-gradient(135deg, #082f85 0%, #1557d5 56%, #0786c9 100%);
  box-shadow: 0 10px 24px rgba(21,87,213,.26);
  text-align: left;
}
.live-chat-action::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -80% auto -80% -45%;
  width: 36%;
  background: rgba(255,255,255,.24);
  transform: rotate(18deg);
  animation: services-chat-shine 3.6s ease-in-out infinite;
}
.live-chat-action:hover { color: #fff !important; background: linear-gradient(135deg, #06296f, #0f49bc 56%, #0678b5) !important; }
.live-chat-action.has-unread { animation: services-chat-attention 1.8s ease-in-out infinite; }
.live-chat-signal {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.17);
}
.live-chat-signal::before,
.live-chat-signal::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 8px;
}
.live-chat-signal::after { width: 4px; height: 4px; border-width: 0 0 2px 2px; border-radius: 0; transform: translate(-4px, 6px) rotate(-35deg); }
.live-chat-signal > span { position: absolute; inset: -3px; border: 2px solid rgba(255,255,255,.54); border-radius: 50%; animation: services-chat-ring 1.7s ease-out infinite; }
.live-chat-label { min-width: 0; }
.live-chat-label strong,
.live-chat-label small { display: block; color: inherit; overflow-wrap: normal; }
.live-chat-label strong { font-size: .84rem; line-height: 1.08; }
.live-chat-label small { margin-top: 3px; color: #d8e9ff; font-size: .64rem; font-weight: 750; line-height: 1.08; }
.live-chat-unread {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #ef3d22;
  box-shadow: 0 4px 11px rgba(105,20,10,.32);
  font-size: .68rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}
.live-chat-unread[hidden] { display: none; }

.service-work-card { position: relative; overflow: hidden; }
.service-work-card.is-active-work { border-color: #9dbbf0; box-shadow: 0 12px 30px rgba(21,87,213,.1); }
.booking-commercial-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding: 13px 14px;
  border: 1px solid #b9cff2;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f9ff, #eaf2ff);
}
.booking-commercial-summary > div { min-width: 0; }
.booking-commercial-summary small,
.booking-commercial-summary strong { display: block; }
.booking-commercial-summary small { color: #526783; font-size: .62rem; font-weight: 950; letter-spacing: .09em; }
.booking-commercial-summary strong { margin-top: 4px; color: #0b3b8f; font-size: 1.22rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.payment-state { flex: 0 1 auto; padding: 7px 9px; border-radius: 999px; color: #8a5200; background: #fff4cf; font-size: .68rem; font-weight: 900; text-align: center; }
.payment-state.is-confirmed { color: #08603f; background: #dff8ea; }
.payment-action { border-color: #0b7a50; color: #fff; background: #0b7a50; }
.payment-action:hover { border-color: #075d3d !important; color: #fff !important; background: #075d3d !important; }
.is-work-action[aria-busy="true"] { cursor: wait; opacity: .72; }
.service-work-card[aria-busy="true"] { pointer-events: none; }
.professional-payment-handoff {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 2px solid #14a66c;
  border-radius: 18px;
  color: #073f2b;
  background: #e8fff5;
}
.professional-payment-handoff > span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: #fff;
  background: #0b7a50;
  font-size: 1.45rem;
  font-weight: 950;
}
.professional-payment-handoff small,
.professional-payment-handoff strong { display: block; }
.professional-payment-handoff small { font-size: .62rem; font-weight: 950; letter-spacing: .1em; }
.professional-payment-handoff strong { margin-top: 2px; font-size: 1rem; }
.professional-payment-handoff p { margin: 4px 0 0 !important; color: #285b49; font-size: .76rem !important; line-height: 1.4; }
.service-work-card.is-payment-next :is(.booking-commercial-summary, .professional-payment-handoff) { outline: 4px solid rgba(20,166,108,.22); outline-offset: 4px; animation: services-payment-focus .72s ease-out both; }
.payment-agreed-total {
  display: grid;
  gap: 6px;
  padding: 17px;
  border: 2px solid #9bbcf2;
  border-radius: 19px;
  color: #102d68;
  background: linear-gradient(145deg, #f7faff, #e7f0ff);
}
.payment-agreed-total small { font-size: .65rem; font-weight: 950; letter-spacing: .1em; }
.payment-agreed-total output { font-size: clamp(1.8rem, 8vw, 2.4rem); font-weight: 950; line-height: 1.05; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.payment-agreed-total p { margin: 2px 0 0; color: #52647e; font-size: .78rem; line-height: 1.4; }
#payment-dialog-form[aria-busy="true"] :is(select, input) { opacity: .68; pointer-events: none; }
#payment-dialog-form .primary-button[aria-busy="true"] { cursor: wait; }
@media (max-width: 430px) {
  .booking-commercial-summary { align-items: stretch; flex-direction: column; }
  .payment-state { align-self: flex-start; }
  .payment-agreed-total { padding: 15px; }
}
@media (max-width: 330px) {
  .payment-agreed-total output { font-size: 1.65rem; }
}
.service-work-card.is-priority { border: 2px solid #f28a16; box-shadow: 0 0 0 5px rgba(242,138,22,.13), 0 16px 34px rgba(21,87,213,.15); animation: services-priority-card .7s ease-out both; }
.service-work-card.is-priority::before { content: "NUEVO TRABAJO"; display: inline-flex; margin: -2px 0 12px; padding: 6px 9px; border-radius: 999px; color: #8a3f00; background: #fff0d5; font-size: .65rem; font-weight: 950; letter-spacing: .08em; }
.service-workflow { display: grid; gap: 12px; margin-top: 14px; padding: 13px; border: 1px solid #cbdaf1; border-radius: 17px; background: #f7faff; }
.service-workflow ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.service-workflow li { position: relative; display: grid; justify-items: center; gap: 6px; min-width: 0; color: #8290a4; text-align: center; }
.service-workflow li:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 14px; left: calc(50% + 18px); width: calc(100% - 30px); height: 3px; border-radius: 999px; background: #d8e1ee; }
.service-workflow li > span { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #c7d2e2; border-radius: 50%; color: #61728b; background: #fff; font-size: .7rem; font-weight: 950; }
.service-workflow li > strong { color: inherit; font-size: .67rem; line-height: 1.15; }
.service-workflow li.is-complete,
.service-workflow li.is-current { color: #0a4cb8; }
.service-workflow li.is-complete > span { border-color: #16a36a; color: #fff; background: #16a36a; }
.service-workflow li.is-complete::after { background: #65c997; }
.service-workflow li.is-current > span { border-color: #1557d5; color: #1557d5; box-shadow: 0 0 0 5px rgba(21,87,213,.11); }
.work-rating { display: grid; gap: 5px; padding: 12px; border-radius: 14px; }
.work-rating small { font-size: .62rem; font-weight: 950; letter-spacing: .09em; }
.work-rating strong { font-size: 1rem; }
.work-rating strong span { color: #3e4d63; font-size: .75rem; }
.work-rating p { margin: 0 !important; font-size: .76rem !important; }
.work-rating.is-rated { color: #8a5200; background: #fff5d7; }
.work-rating.is-pending { color: #16523a; background: #eaf9f1; }
.is-work-action[data-status="in_progress"] { border-color: #128254 !important; background: #128254 !important; }
.is-work-action[data-status="completed"] { border-color: #e65916 !important; background: #e65916 !important; }

.chat-bubble.is-sending { opacity: .72; }
.chat-bubble.is-failed { border-color: #ef9b9b; color: #7f1d1d; background: #fff1f1; }
.chat-bubble.is-failed time { color: #b42318; font-weight: 900; }

.quote-accepted-celebration { position: fixed; z-index: 2900; inset: 0; display: grid; align-items: start; justify-items: center; padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); overflow: hidden; pointer-events: none; }
.quote-accepted-card { position: relative; z-index: 2; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 13px; width: min(100%, 720px); padding: 17px 56px 17px 17px; border: 2px solid rgba(255,255,255,.74); border-radius: 24px; color: #fff; background: linear-gradient(135deg, #064f36, #0b9963 53%, #1557d5); box-shadow: 0 24px 62px rgba(4,32,72,.38); pointer-events: auto; animation: services-accepted-in .46s cubic-bezier(.2,.9,.25,1.15) both; }
.quote-accepted-icon { display: grid; place-items: center; width: 54px; height: 54px; border: 2px solid rgba(255,255,255,.68); border-radius: 18px; color: #0b6f4a; background: #fff; font-size: 1.9rem; font-weight: 950; }
.quote-accepted-card small,
.quote-accepted-card strong { display: block; color: inherit; }
.quote-accepted-card small { font-size: .65rem; font-weight: 950; letter-spacing: .1em; }
.quote-accepted-card strong { margin-top: 3px; font-size: clamp(1.2rem, 4.5vw, 1.65rem); line-height: 1.08; }
.quote-accepted-card p { margin: 5px 0 0; color: #e5fff5; font-size: .79rem; line-height: 1.35; }
.quote-accepted-action { min-height: 50px; padding: 12px 15px; border: 0; border-radius: 14px; color: #08482f; background: #fff; font-size: .78rem; font-weight: 950; }
.quote-accepted-action[aria-busy="true"] { cursor: wait; opacity: .76; }
.quote-accepted-close { position: absolute; top: 8px; right: 8px; width: 42px; height: 42px; border: 0; border-radius: 13px; color: #fff; background: rgba(0,0,0,.17); font-size: 1.45rem; }
.quote-accepted-action:focus-visible,
.quote-accepted-close:focus-visible { outline: 3px solid #ffe36e; outline-offset: 3px; }
.quote-confetti { position: absolute; z-index: 1; top: -24px; left: var(--confetti-x); width: 9px; height: 18px; border-radius: 3px; background: var(--confetti-color); animation: services-confetti-fall 2.9s var(--confetti-delay) cubic-bezier(.18,.72,.31,1) both; }

@keyframes services-chat-shine { 0%, 60% { transform: translateX(0) rotate(18deg); opacity: 0; } 72% { opacity: 1; } 100% { transform: translateX(520%) rotate(18deg); opacity: 0; } }
@keyframes services-chat-ring { 0% { opacity: .7; transform: scale(.72); } 72%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes services-chat-attention { 0%, 72%, 100% { transform: translateY(0); } 80% { transform: translateY(-2px); } 88% { transform: translateY(1px); } }
@keyframes services-priority-card { from { opacity: .55; transform: translateY(-8px) scale(.985); } }
@keyframes services-payment-focus { from { transform: scale(.96); opacity: .62; } }
@keyframes services-accepted-in { from { opacity: 0; transform: translateY(-26px) scale(.94); } }
@keyframes services-confetti-fall { 0% { opacity: 0; transform: translate3d(0,-10vh,0) rotate(0); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate3d(25px,105vh,0) rotate(680deg); } }

@media (max-width: 560px) {
  .quote-accepted-card { grid-template-columns: 48px minmax(0, 1fr); padding: 15px 48px 15px 15px; }
  .quote-accepted-icon { width: 48px; height: 48px; }
  .quote-accepted-action { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 360px) {
  .service-workflow { padding-inline: 9px; }
  .service-workflow li > strong { font-size: .61rem; }
  .live-chat-action { grid-template-columns: 30px minmax(0, 1fr) auto; }
}
@media (prefers-reduced-motion: reduce) {
  .live-chat-action,
  .live-chat-action::before,
  .live-chat-signal > span,
  .service-work-card.is-priority,
  .quote-accepted-card,
  .service-work-card.is-payment-next :is(.booking-commercial-summary, .professional-payment-handoff) { animation: none !important; }
  .quote-confetti { display: none; }
}
@media (forced-colors: active) {
  .live-chat-action,
  .quote-accepted-card,
  .quote-accepted-action,
  .is-work-action,
  .professional-payment-handoff,
  .booking-commercial-summary,
  .payment-state,
  .payment-action,
  .payment-agreed-total { border: 2px solid ButtonText !important; color: ButtonText !important; background: ButtonFace !important; box-shadow: none; }
  .live-chat-unread { border-color: ButtonText; color: HighlightText; background: Highlight; }
}
/* Provider workspace refinement: plans, active work and evidence. */
.dashboard-priority {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}
.dashboard-priority > * { min-width: 0; margin-bottom: 0; }
.dashboard-priority #dashboard-advertising { order: 0; }
.dashboard-priority #dashboard-active-work { order: 1; }
.dashboard-priority.has-active #dashboard-active-work { order: 0; }
.dashboard-priority.has-active #dashboard-advertising { order: 1; }

.advertising-plans-banner {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 0;
  overflow: hidden;
  padding: 22px;
  border: 1px solid #0b46b5;
  border-radius: 22px;
  color: #fff;
  background: #0b46b5;
  box-shadow: none;
}
.advertising-hero-art { display: none; }
.advertising-plan-content { display: grid; justify-items: start; gap: 9px; width: 100%; }
.advertising-plan-content :where(h2, p) { margin: 0; }
.advertising-plan-content h2 { max-width: 18ch; color: #fff; font-size: clamp(1.65rem, 4vw, 2.35rem); line-height: 1.03; letter-spacing: -.045em; }
.advertising-plan-content > p:not(.advertising-kicker) { max-width: 48ch; color: #e7f0ff; font-size: clamp(.82rem, 1.7vw, .96rem); line-height: 1.4; }
.advertising-kicker { color: #cfe1ff; font-size: .68rem; font-weight: 950; letter-spacing: .14em; }
.advertising-actions { display: flex; flex-wrap: wrap; gap: 9px; width: 100%; margin-top: 4px; }
.advertising-actions .card-action { min-height: 46px; margin: 0; padding: 10px 14px; border-radius: 13px; box-shadow: none; font-size: .8rem; font-weight: 950; }
.advertising-response-cta { border-color: #fff; color: #0b46b5; background: #fff; }
.advertising-growth-cta { border-color: #fff; color: #fff; background: #08398f; }
.advertising-response-cta:hover { border-color: #dbeafe !important; color: #08398f !important; background: #dbeafe !important; }
.advertising-growth-cta:hover { border-color: #fff !important; color: #fff !important; background: #062f79 !important; }
.advertising-plan-loading { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; color: #fff; font-size: .76rem; font-weight: 850; }
.advertising-plan-loading::before { content: ""; width: 15px; height: 15px; border: 2px solid #8db7ff; border-right-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.advertising-plan-error { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid #f0c97c; border-radius: 14px; color: #704500; background: #fff9e9; font-size: .78rem; line-height: 1.4; }
.advertising-plan-error button { justify-self: start; }

.dashboard-active-work {
  border: 2px solid #1762d2;
  background: linear-gradient(150deg, #fff 48%, #eef5ff);
  box-shadow: 0 18px 42px rgba(21, 87, 213, .15);
}
.dashboard-active-work .panel-heading { align-items: center; }
.dashboard-active-work .panel-heading small { color: #1557d5; }
.live-work-indicator { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: #08603f; background: #def8e9; font-size: .65rem; font-weight: 950; letter-spacing: .07em; }
.live-work-indicator i { width: 9px; height: 9px; border-radius: 50%; background: #12a66a; box-shadow: 0 0 0 5px rgba(18, 166, 106, .13); }
.dashboard-active-work .service-work-card { border: 0; padding: 0; background: transparent; box-shadow: none; }

.service-work-card.is-completed-work { border: 2px solid #0d855a; background: linear-gradient(155deg, #fff 58%, #e9fbf2); box-shadow: 0 14px 34px rgba(13, 133, 90, .13); }
.tag.is-status-completed { padding: 8px 11px; border: 2px solid #08764e; color: #fff; background: #08764e; box-shadow: 0 7px 18px rgba(8, 118, 78, .2); font-size: .72rem; letter-spacing: .08em; }
.completed-work-banner { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 12px; margin: 13px 0; padding: 14px; border: 2px solid #0d855a; border-radius: 17px; color: #07583b; background: #e9fbf2; }
.completed-work-banner > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: #fff; background: #0d855a; font-size: 1.45rem; font-weight: 950; }
.completed-work-banner strong, .completed-work-banner small { display: block; }
.completed-work-banner strong { font-size: 1.02rem; }
.completed-work-banner small { margin-top: 3px; color: #276851; line-height: 1.35; }

.service-workflow { padding: 15px; background: #f8fbff; }
.service-workflow li.is-current { color: #073e9e; }
.service-workflow li.is-current > span { color: #fff; background: #1557d5; box-shadow: 0 0 0 6px rgba(21, 87, 213, .12); }
.service-workflow.is-completed { border: 2px solid #8bd9b7; background: #f3fdf8; }
.service-workflow.is-completed li { color: #08764e; }
.service-workflow.is-completed li > span { border-color: #0d855a; color: #fff; background: #0d855a; }
.service-workflow.is-completed li:not(:last-child)::after { background: #5bc493; }
.work-rating { gap: 8px; margin-top: 3px; padding: 17px; border: 1px solid transparent; border-radius: 17px; }
.work-rating small { letter-spacing: .12em; }
.work-rating strong { font-size: clamp(1.25rem, 5vw, 1.7rem); letter-spacing: .03em; }
.work-rating.is-rated { border-color: #f0cb70; color: #7d4b00; background: linear-gradient(145deg, #fffaf0, #fff1c6); box-shadow: 0 9px 22px rgba(149, 95, 0, .1); }
.work-rating.is-pending { grid-template-columns: 46px minmax(0, 1fr); border-color: #9ddabc; color: #07583b; background: linear-gradient(145deg, #f4fff9, #e1f8ec); }
.work-rating.is-pending::before { content: "★"; grid-row: 1 / span 3; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: #fff; background: #0d855a; font-size: 1.35rem; }

.work-photo-section { display: grid; gap: 10px; margin-top: 14px; padding: 14px; border: 1px solid #bfd2ee; border-radius: 17px; background: #f7faff; }
.work-photo-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.work-photo-heading strong, .work-photo-heading small { display: block; }
.work-photo-heading small { margin-top: 3px; color: #62738b; font-size: .7rem; line-height: 1.35; }
.work-photo-count { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #0b4b9f; background: #e5efff; font-size: .66rem; font-weight: 900; }
.work-photo-empty { margin: 0 !important; color: #64748b !important; font-size: .78rem !important; }
.work-photo-action { border-color: #1557d5; color: #1557d5; background: #eff5ff; }
.work-photo-action::before { content: "＋ "; font-weight: 950; }
.work-photo-picker { display: grid; gap: 11px; padding: 15px; border: 2px dashed #9bb9e8; border-radius: 17px; color: #17355f; background: #f5f9ff; }
.work-photo-picker input[type="file"] { min-height: 52px; padding: 8px; border-style: solid; background: #fff; }
.work-photo-picker input[type="file"]::file-selector-button { min-height: 38px; margin-right: 10px; padding: 8px 11px; border: 0; border-radius: 10px; color: #fff; background: #1557d5; font-weight: 850; }
.work-photo-help { margin: 0; color: #5e6f87; font-size: .75rem; line-height: 1.45; }
.work-photo-preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.work-photo-preview-grid:empty { display: none; }
.work-photo-preview-grid figure { position: relative; aspect-ratio: 1; overflow: hidden; margin: 0; border: 1px solid #cbd8ea; border-radius: 13px; background: #e8eff9; }
.work-photo-preview-grid img { width: 100%; height: 100%; object-fit: cover; }
.work-photo-preview-grid figcaption { position: absolute; inset: auto 4px 4px; overflow: hidden; padding: 3px 5px; border-radius: 7px; color: #fff; background: rgba(8, 29, 64, .78); font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }

.advertising-plans-dialog { display: grid; gap: 12px; }
.advertising-plan-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.advertising-plan-card { display: grid; gap: 10px; padding: 16px; border: 1px solid #c9d9ef; border-radius: 18px; background: #f8fbff; }
.advertising-plan-card header { display: flex; justify-content: space-between; gap: 12px; }
.advertising-plan-card h3, .advertising-plan-card p { margin: 0; }
.advertising-plan-card h3 { color: #11284b; }
.advertising-plan-price { color: #0b4ca8; font-size: 1.25rem; font-weight: 950; white-space: nowrap; }
.advertising-plan-features { display: flex; flex-wrap: wrap; gap: 6px; }
.advertising-plan-features span { padding: 6px 8px; border-radius: 999px; color: #31506f; background: #e9f1fc; font-size: .68rem; font-weight: 800; }
.advertising-plan-card ul { display: grid; gap: 5px; margin: 0; padding-left: 20px; color: #52647d; font-size: .77rem; line-height: 1.4; }
.advertising-contract-button { display: inline-flex; width: 100%; min-height: 50px; align-items: center; justify-content: center; margin-top: 3px; padding: 12px 15px; border: 1px solid #08764e; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #18aa6b, #08764e); box-shadow: 0 10px 22px rgba(8, 118, 78, .2); font-weight: 950; text-decoration: none; }
.advertising-contract-button:hover { color: #fff; background: linear-gradient(135deg, #15965f, #065f3f); }
.advertising-contract-button:focus-visible { outline: 3px solid rgba(22, 163, 105, .3); outline-offset: 3px; }

.stack-form > label, .dialog-card .stack-form > label { padding: 12px; border: 1px solid #dce5f1; border-radius: 16px; background: #f8fbff; }
.stack-form > label :is(input, select, textarea), .dialog-card .stack-form > label :is(input, select, textarea) { margin-top: 2px; background-color: #fff; }
.dialog-card > h2 { color: #10264a; font-size: clamp(1.45rem, 6vw, 2rem); letter-spacing: -.035em; }
.dialog-card .security-note { border: 1px solid #d7e3f4; color: #40536e; background: #f4f8fe; }
.toast.is-communication { border: 2px solid #b9d0ff; box-shadow: 0 14px 34px rgba(5, 36, 101, .34); }
.toast.is-communication strong { font-size: 1rem; }
.toast.is-communication span { font-size: .85rem; }

@media (max-width: 760px) {
  .advertising-plans-banner { min-height: 0; align-items: start; padding: 16px; border-radius: 18px; }
  .advertising-plan-content { width: 100%; }
  .advertising-plan-content h2 { max-width: 19ch; font-size: clamp(1.5rem, 7vw, 1.9rem); }
  .advertising-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .advertising-actions .card-action { min-width: 0; padding-inline: 8px; }
  .work-photo-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 430px) {
  .dashboard-priority { gap: 12px; }
  .advertising-plan-content { gap: 8px; }
  .live-work-indicator { font-size: .6rem; }
  .work-rating.is-pending { grid-template-columns: 40px minmax(0, 1fr); }
  .work-rating.is-pending::before { width: 40px; height: 40px; }
  .work-photo-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .advertising-plan-card header { align-items: start; flex-direction: column; }
}
@media (max-width: 360px) {
  .advertising-plans-banner { padding: 14px; }
  .completed-work-banner { grid-template-columns: 40px minmax(0, 1fr); }
  .completed-work-banner > span { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .advertising-plan-loading::before { animation: none; }
}
@media (forced-colors: active) {
  .advertising-plans-banner, .dashboard-active-work, .completed-work-banner, .service-workflow, .work-rating, .work-photo-section, .work-photo-picker, .advertising-plan-card { border: 2px solid CanvasText; color: CanvasText; background: Canvas; box-shadow: none; }
  .advertising-hero-art { display: none; }
  .live-work-indicator, .tag.is-status-completed, .advertising-summary span { border: 1px solid CanvasText; color: CanvasText; background: Canvas; }
}
/* Provider professional avatar projection. */
.professional-avatar {
  position: relative;
  display: inline-grid;
  overflow: hidden;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 2px solid #d4e2f8;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #1557d5, #082b6e);
  box-shadow: 0 7px 17px rgba(10, 47, 120, .18);
  font-size: .75rem;
  font-weight: 950;
  letter-spacing: .04em;
  isolation: isolate;
}

.professional-avatar.is-topbar {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-color: rgba(255,255,255,.72);
  box-shadow: none;
  font-size: .68rem;
}

.professional-avatar.is-card {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
}

.professional-avatar.is-account {
  width: 66px;
  height: 66px;
  flex-basis: 66px;
  border-width: 3px;
  font-size: .95rem;
}

.account-profile-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.account-profile-heading > div { min-width: 0; }
.account-profile-heading p { margin: 3px 0 0; overflow-wrap: anywhere; }

.profile-workspace-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  width: 100%;
  max-width: none;
  gap: 20px;
  margin: 0 0 18px;
  padding: 20px;
  overflow: hidden;
  border-color: #b8cff5;
  background: linear-gradient(135deg, #f8fbff 0%, #edf5ff 58%, #e4efff 100%);
  box-shadow: 0 14px 34px rgba(12, 63, 145, .1);
}

.profile-workspace-card::after {
  content: "";
  position: absolute;
  top: -82px;
  right: -58px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 111, 231, .18), rgba(35, 111, 231, 0) 68%);
  pointer-events: none;
}

.workspace-profile-heading {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  gap: 13px;
  align-items: center;
}

.workspace-profile-icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #236fe7, #1047af);
  box-shadow: 0 10px 22px rgba(20, 82, 185, .24);
}

.workspace-profile-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-profile-copy { min-width: 0; }
.profile-workspace-card #workspace-name { color: #102d68; font-size: 1.16rem; }
.workspace-profile-copy p { margin: 5px 0 0; color: #526783; font-size: .82rem; line-height: 1.4; }

.profile-workspace-card .workspace-selectors {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 10px;
}

.profile-workspace-card .workspace-selectors label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #29466f;
  font-size: .75rem;
  font-weight: 850;
}

.profile-workspace-card .workspace-selectors select {
  width: 100%;
  min-height: 50px;
  border-color: #abc5ee;
  color: #102d68;
  background-color: rgba(255, 255, 255, .92);
  font-weight: 750;
}

.profile-access-note {
  border-color: #bfd3f3;
  color: #173865;
  background: #f4f8ff;
}

.profile-access-note p { margin: 5px 0 0; color: #526783; line-height: 1.45; }
.profile-settings-heading { margin-bottom: 2px; }

@media (max-width: 760px) {
  .profile-workspace-card { grid-template-columns: 1fr; gap: 16px; margin: 0 0 16px; padding: 18px; }
}

@media (max-width: 390px) {
  .profile-workspace-card .workspace-selectors { grid-template-columns: 1fr; }
  .profile-workspace-card { padding: 16px; }
}

.professional-photo-editor {
  display: grid;
  gap: 14px;
  margin: 16px 0;
  padding: 18px;
  border: 1px solid #c9daf3;
  border-radius: 20px;
  color: #14233d;
  background: linear-gradient(145deg, #f8fbff, #edf5ff);
  box-shadow: 0 10px 26px rgba(15, 67, 146, .08);
}

.professional-photo-editor h3 { margin: 2px 0 4px; font-size: 1.12rem; }
.professional-photo-editor > div > p { margin: 0; color: #52627a; line-height: 1.45; }

.professional-photo-picker {
  display: grid;
  min-height: 48px;
  gap: 7px;
  padding: 13px;
  border: 2px dashed #80a8e8;
  border-radius: 15px;
  color: #123a79;
  background: #fff;
  font-weight: 850;
  cursor: pointer;
}

.professional-photo-picker:focus-within {
  outline: 3px solid rgba(30, 101, 221, .28);
  outline-offset: 2px;
  border-color: #1e65dd;
}

.professional-photo-picker input {
  width: 100%;
  min-height: 44px;
  color: #263b5b;
  font: inherit;
  font-weight: 650;
}

.professional-photo-picker span,
.professional-photo-selection-message {
  margin: 0;
  color: #5c6b80;
  font-size: .78rem;
  font-weight: 650;
}

.professional-photo-selection-message { min-height: 1.1em; }

.professional-photo-preview:not(:empty) {
  display: grid;
  min-height: 150px;
  place-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #dfeafa;
}

.professional-photo-preview img {
  display: block;
  width: 144px;
  height: 144px;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(11, 54, 122, .22);
}

.professional-photo-consent {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  color: #35465f;
  background: #fff;
  font-size: .78rem;
  line-height: 1.45;
}

.professional-photo-consent input { width: 22px; height: 22px; margin: 0; accent-color: #145cd5; }

.professional-avatar img {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #e7eef8;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  transition: opacity .16s ease;
}

.professional-avatar img.is-loading { opacity: 0; }
.professional-avatar img.is-error { display: none; }
.professional-avatar-fallback { position: relative; z-index: 1; }

.service-card-identity {
  display: flex;
  min-width: 0;
  gap: 11px;
  align-items: center;
}

.service-card-identity > div {
  min-width: 0;
}

#account-button:has(.professional-avatar) {
  padding: 3px;
  overflow: hidden;
}

@media (max-width: 390px) {
  .professional-avatar.is-card {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .service-card-identity { gap: 9px; }
  .professional-photo-editor { padding: 14px; }
  .professional-photo-preview img { width: 124px; height: 124px; }
}

@media (prefers-reduced-motion: reduce) {
  .professional-avatar img { transition: none; }
}

@media (forced-colors: active) {
  .professional-avatar {
    border: 2px solid ButtonText;
    color: ButtonText;
    background: ButtonFace;
    box-shadow: none;
  }

  .professional-photo-editor, .professional-photo-picker, .professional-photo-consent {
    border: 2px solid ButtonText;
    color: ButtonText;
    background: Canvas;
  }
}
/* Cola prioritaria, comunicación visible y captura directa de evidencia. */
.dashboard-pending-quotes {
  position: relative;
  margin-bottom: 18px;
  overflow: hidden;
  border: 3px solid #f97316;
  background: #fff8ed;
  box-shadow: 0 16px 38px rgba(194,78,5,.18);
}
.dashboard-pending-quotes.has-pending-quotes { animation: services-pending-arrival .52s cubic-bezier(.2,.9,.25,1.12) both; }
.pending-quote-heading { align-items: center; }
.pending-quote-heading small { color: #c2410c; }
.pending-quote-heading h2 { font-size: clamp(1.35rem, 5vw, 1.8rem); }
.pending-quote-heading p { max-width: 52ch; margin: 6px 0 0; color: #6f3517; line-height: 1.42; }
.pending-quote-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: #e65300;
  font-size: .78rem;
  font-weight: 950;
  white-space: nowrap;
  animation: services-pending-pulse 1.6s ease-in-out infinite;
}
.dashboard-pending-quotes .service-card.is-pending-quote { border: 2px solid #f3a265; background: #fff; box-shadow: 0 8px 22px rgba(151,64,8,.1); }
.pending-quote-action { min-height: 54px !important; font-size: .85rem !important; }

.live-chat-action { flex: 1 0 100% !important; width: 100%; min-height: 76px; padding: 13px 15px !important; grid-template-columns: 38px minmax(0,1fr) auto; }
.live-chat-signal { width: 38px; height: 38px; }
.live-chat-label strong { font-size: .96rem; }
.live-chat-label small { font-size: .72rem; }
.toast.is-communication { min-height: 86px; padding: 18px 20px; border-width: 2px; border-radius: 20px; box-shadow: 0 18px 44px rgba(8,45,115,.34); }
.toast.is-communication strong { font-size: 1.05rem; line-height: 1.2; }
.toast.is-communication span { font-size: .9rem; line-height: 1.45; }
.toast.is-communication.is-urgent-request { border-color: #ffd08a; background: #0b46b5; animation: services-request-toast-attention 1.1s ease-in-out 7; }
@keyframes services-request-toast-attention { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.025); box-shadow: 0 20px 52px rgba(8,45,115,.48), 0 0 0 6px rgba(255,190,78,.18); } }

.work-photo-source-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.work-photo-source { position: relative; display: grid; justify-items: center; gap: 3px; min-height: 112px; padding: 14px 10px; overflow: hidden; border: 2px solid #1557d5; border-radius: 16px; color: #fff; background: #1557d5; text-align: center; cursor: pointer; }
.work-photo-source.is-library { border-color: #9bb9e8; color: #123a79; background: #fff; }
.work-photo-source > span { font-size: 1.65rem; line-height: 1; }
.work-photo-source > strong { font-size: .9rem; }
.work-photo-source > small { color: inherit; font-size: .67rem; }
.work-photo-source input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.work-photo-source:focus-within { outline: 3px solid #ffcb46; outline-offset: 3px; }

@keyframes services-pending-arrival { from { opacity: 0; transform: translateY(-18px) scale(.98); } }
@keyframes services-pending-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(230,83,0,.3); } 50% { box-shadow: 0 0 0 9px rgba(230,83,0,0); } }

@media (max-width: 430px) {
  .pending-quote-heading { align-items: stretch; flex-direction: column; }
  .pending-quote-count { align-self: flex-start; }
  .work-photo-source-actions { grid-template-columns: 1fr; }
  .work-photo-source { min-height: 94px; }
  .toast.is-communication { min-height: 96px; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-pending-quotes.has-pending-quotes, .pending-quote-count { animation: none !important; }
  .toast.is-communication.is-urgent-request { animation: none !important; }
}
@media (forced-colors: active) {
  .dashboard-pending-quotes, .pending-quote-count, .work-photo-source { border: 2px solid ButtonText; color: ButtonText; background: Canvas; box-shadow: none; }
}

/* Activación explícita de alertas nativas: una sola acción y estado autoritativo de Android. */
.services-alerts-required {
  position: fixed;
  z-index: 30000;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(22px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  color: #0b2046;
  background: #0b3fa6;
  overscroll-behavior: contain;
  touch-action: manipulation;
}
.services-alerts-required.is-hidden { display: none !important; }
body.services-alerts-gated { overflow: hidden !important; touch-action: none; }
.services-alerts-required-card {
  width: min(100%, 520px);
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: clamp(30px, 8vw, 48px) clamp(22px, 7vw, 42px);
  border: 3px solid #85b6ff;
  border-radius: 30px;
  text-align: center;
  background: #fff;
  box-shadow: 0 26px 70px rgba(3, 25, 69, .42);
}
.services-alerts-required-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 28px;
  color: #fff;
  background: #1557d5;
  box-shadow: 0 15px 32px rgba(21, 87, 213, .3);
}
.services-alerts-required-icon svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.services-alerts-required-copy small {
  display: block;
  margin-bottom: 8px;
  color: #1557d5;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .14em;
}
.services-alerts-required-copy h1 {
  margin: 0;
  color: #071b3d;
  font-size: clamp(1.8rem, 7vw, 2.45rem);
  font-weight: 950;
  line-height: 1.03;
  text-wrap: balance;
}
.services-alerts-required-copy p {
  max-width: 390px;
  margin: 12px auto 0;
  color: #405577;
  font-size: clamp(.96rem, 3.8vw, 1.08rem);
  font-weight: 720;
  line-height: 1.45;
}
#services-alerts-required-action { width: 100%; min-height: 62px; margin: 0; font-size: 1rem; }
#services-alerts-required-action[data-mode="settings"] { background: #ef5b22; }
#services-alerts-required-status {
  min-height: 2.8em;
  margin: 0;
  color: #60708c;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.4;
}
.services-alerts-required.is-working .services-alerts-required-icon { animation: services-alerts-ready-pulse .85s ease-in-out infinite alternate; }
@keyframes services-alerts-ready-pulse { to { transform: scale(1.06); box-shadow: 0 18px 38px rgba(21, 87, 213, .4); } }
@media (max-height: 620px) {
  .services-alerts-required-card { gap: 13px; padding-top: 24px; padding-bottom: 24px; }
  .services-alerts-required-icon { width: 68px; height: 68px; border-radius: 21px; }
  .services-alerts-required-icon svg { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .services-alerts-required.is-working .services-alerts-required-icon { animation: none; }
}
@media (forced-colors: active) {
  .services-alerts-required, .services-alerts-required-card, .services-alerts-required-icon, #services-alerts-required-action { border: 2px solid ButtonText; color: ButtonText; background: Canvas; box-shadow: none; }
}

/* Avisos operativos que requieren una única decisión consciente. */
html.services-fullscreen-notice-open,
html.services-fullscreen-notice-open body { overflow: hidden; }
.services-fullscreen-notice {
  position: fixed;
  z-index: 4100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  overflow: auto;
  pointer-events: auto;
  background: #071d45;
}
.services-fullscreen-notice.quote-accepted-celebration { background: #073b2d; }
.services-fullscreen-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: stretch;
  gap: 0;
  width: min(100%, 620px);
  min-height: 0;
  max-height: min(640px, calc(100dvh - 36px));
  padding: 0;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 30px;
  color: #10213e;
  background: #fff;
  box-shadow: none;
  pointer-events: auto;
  animation: services-fullscreen-notice-in .26s ease-out both;
}
.services-fullscreen-visual {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 185px;
  padding: 24px;
  color: #fff;
  text-align: center;
}
.services-fullscreen-visual.is-request { background: #0b4fcc; }
.services-fullscreen-visual.is-accepted { background: #08704c; }
.services-fullscreen-visual > span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 3px solid currentColor;
  border-radius: 27px;
  color: #0b4fcc;
  background: #fff;
  font-size: 2.3rem;
  font-weight: 950;
}
.services-fullscreen-visual.is-request > span { color: #e65300; }
.services-fullscreen-visual.is-accepted > span { color: #08704c; }
.services-fullscreen-visual > small {
  color: inherit;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .15em;
}
.services-fullscreen-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  overflow-y: auto;
  padding: clamp(24px, 6vw, 42px);
  text-align: center;
}
.services-fullscreen-copy > small {
  color: #1557d5;
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .13em;
}
.services-fullscreen-copy h2,
.services-fullscreen-copy > strong {
  margin: 0;
  color: #0a1a36;
  font-size: clamp(1.7rem, 7vw, 2.45rem);
  font-weight: 950;
  line-height: 1.04;
  text-wrap: balance;
}
.services-fullscreen-copy > p {
  margin: 0;
  color: #405272;
  font-size: clamp(.96rem, 3.8vw, 1.08rem);
  line-height: 1.5;
}
.services-fullscreen-copy > .services-fullscreen-hint {
  margin-top: 5px;
  padding: 12px 14px;
  border: 1px solid #b9cef1;
  border-radius: 14px;
  color: #123b7c;
  background: #edf4ff;
  font-size: .84rem;
  font-weight: 820;
}
.services-fullscreen-action,
.services-fullscreen-card .quote-accepted-action {
  min-height: 58px;
  margin: 0 clamp(20px, 5vw, 36px) clamp(20px, 5vw, 36px);
  padding: 14px 18px;
  border: 2px solid #0b4fcc;
  border-radius: 16px;
  color: #fff;
  background: #0b4fcc;
  font-size: .96rem;
  font-weight: 950;
}
.services-fullscreen-card .quote-accepted-action { border-color: #08704c; background: #08704c; }
.services-fullscreen-action:focus-visible,
.services-fullscreen-card .quote-accepted-action:focus-visible { outline: 4px solid #ffb547; outline-offset: 3px; }
.services-fullscreen-card .quote-accepted-action[aria-busy="true"] { cursor: wait; opacity: .72; }
.services-fullscreen-notice .quote-confetti { display: none; }
@keyframes services-fullscreen-notice-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@media (max-width: 640px) {
  .services-fullscreen-notice { padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .services-fullscreen-card { width: min(100%, 520px); max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))); border-radius: 22px; }
  .services-fullscreen-visual { min-height: 128px; padding: 16px; }
  .services-fullscreen-visual > span { width: 62px; height: 62px; border-radius: 20px; font-size: 1.8rem; }
  .services-fullscreen-copy { align-content: start; padding: 18px; }
  .services-fullscreen-action,
  .services-fullscreen-card .quote-accepted-action { margin: 0 18px max(18px, env(safe-area-inset-bottom)); }
}
@media (max-height: 620px) and (max-width: 640px) {
  .services-fullscreen-visual { min-height: 96px; grid-template-columns: auto auto; gap: 10px; }
  .services-fullscreen-visual > span { width: 52px; height: 52px; border-radius: 17px; font-size: 1.5rem; }
  .services-fullscreen-copy { gap: 7px; padding: 14px 18px; }
  .services-fullscreen-action,
  .services-fullscreen-card .quote-accepted-action { min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .services-fullscreen-card { animation: none !important; }
}
@media (forced-colors: active) {
  .services-fullscreen-notice,
  .services-fullscreen-card,
  .services-fullscreen-visual,
  .services-fullscreen-action,
  .services-fullscreen-card .quote-accepted-action,
  .services-fullscreen-copy > .services-fullscreen-hint { border: 2px solid ButtonText; color: ButtonText; background: Canvas; }
}

/* Calificación recibida: aviso real, alegre y con un solo destino. */
.services-fullscreen-notice.rating-received-celebration { background: #31156f; }
.services-fullscreen-notice.rating-received-celebration.is-rating-mid { background: #083d78; }
.services-fullscreen-notice.rating-received-celebration.is-rating-care { background: #67310f; }

.rating-received-card {
  border-color: #fff;
  background: #fffaf0;
}

.services-fullscreen-visual.is-rating {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #7c3aed;
}

.is-rating-mid .services-fullscreen-visual.is-rating { background: #0b65bd; }
.is-rating-care .services-fullscreen-visual.is-rating { background: #db651b; }

.services-fullscreen-visual.is-rating::before,
.services-fullscreen-visual.is-rating::after {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  content: "";
}

.services-fullscreen-visual.is-rating::before { width: 130px; height: 130px; top: -72px; right: -42px; }
.services-fullscreen-visual.is-rating::after { width: 70px; height: 70px; bottom: -28px; left: -20px; }

.services-fullscreen-visual.is-rating > .rating-received-icon {
  z-index: 1;
  width: auto;
  min-width: 88px;
  max-width: calc(100% - 30px);
  height: auto;
  min-height: 76px;
  padding: 12px 16px;
  border: 3px solid #fff;
  border-radius: 24px;
  color: #ff9d00;
  background: #fff;
  font-size: clamp(1.65rem, 8vw, 2.25rem);
  letter-spacing: .08em;
  line-height: 1;
  box-shadow: 0 10px 0 rgba(29, 7, 75, .22);
  transform: rotate(-2deg);
}

.services-fullscreen-visual.is-rating > small { z-index: 1; }

.rating-received-copy { align-content: start; }

.rating-received-comment {
  margin: 5px 0 0;
  padding: 13px 15px;
  border: 2px solid #e5d3ff;
  border-radius: 16px;
  color: #48207e;
  background: #f5edff;
  font-size: .9rem;
  font-weight: 820;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.rating-received-action {
  min-height: 58px;
  margin: 0 clamp(20px, 5vw, 36px) clamp(20px, 5vw, 36px);
  padding: 14px 18px;
  border: 2px solid #6c31d7;
  border-radius: 16px;
  color: #fff;
  background: #6c31d7;
  font-size: .96rem;
  font-weight: 950;
}

.rating-received-action:focus-visible { outline: 4px solid #ffba32; outline-offset: 3px; }
.rating-received-action[aria-busy="true"] { cursor: wait; opacity: .72; }

.rating-sparkle {
  position: fixed;
  z-index: 1;
  top: -28px;
  left: var(--sparkle-x);
  color: #ffd24a;
  font-size: 19px;
  font-style: normal;
  pointer-events: none;
  animation: rating-sparkle-fall 2.8s var(--sparkle-delay) ease-in infinite;
}

@keyframes rating-sparkle-fall {
  to { transform: translateY(calc(100dvh + 60px)) rotate(360deg); }
}

@media (max-width: 640px) {
  .rating-received-copy { align-content: center; }
  .rating-received-action { margin-bottom: max(22px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .rating-sparkle { display: none; animation: none; }
}

@media (forced-colors: active) {
  .services-fullscreen-notice.rating-received-celebration,
  .services-fullscreen-visual.is-rating,
  .rating-received-comment,
  .rating-received-action { border: 2px solid ButtonText; color: ButtonText; background: Canvas; box-shadow: none; }
}

/* Fecha/hora de la propuesta: elección móvil clara, separada y resumida. */
.quote-schedule {
  min-width: 0;
  margin: 0;
  padding: 15px;
  border: 2px solid #ffc2a8;
  border-radius: 20px;
  background: #fffaf7;
}
.quote-schedule legend {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 0 3px 11px;
  color: #172033;
  font-size: .94rem;
  font-weight: 950;
}
.quote-schedule legend > span:last-child { display: grid; gap: 3px; min-width: 0; }
.quote-schedule legend small { color: #647087; font-size: .7rem; font-weight: 700; line-height: 1.35; }
.quote-schedule-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #172033; background: #ffdfd2; font-size: 1.25rem; }
.quote-schedule-client { margin: 0 0 11px; padding: 11px 12px; border-left: 4px solid #ff5a1f; border-radius: 0 12px 12px 0; color: #5c3426; background: #fff0e9; font-size: .78rem; line-height: 1.45; }
.quote-schedule-client strong { color: #8e2c09; }
.quote-day-shortcuts,
.quote-time-shortcuts { display: flex; flex-wrap: wrap; gap: 7px; }
.quote-day-shortcuts { margin-bottom: 11px; }
.quote-time-shortcuts { align-items: center; margin-top: 10px; }
.quote-time-shortcuts > span { flex: 1 0 100%; color: #56647a; font-size: .7rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.quote-day-shortcuts button,
.quote-time-shortcuts button {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #e9b59f;
  border-radius: 12px;
  color: #572b1d;
  background: #fff;
  font-size: .75rem;
  font-weight: 900;
}
.quote-day-shortcuts button.is-selected,
.quote-time-shortcuts button.is-selected { border-color: #ff5a1f; color: #111827; background: #ff5a1f; }
.quote-day-shortcuts button:focus-visible,
.quote-time-shortcuts button:focus-visible { outline: 3px solid #ffbea5; outline-offset: 2px; }
.quote-day-shortcuts button:disabled,
.quote-time-shortcuts button:disabled { border-color: #e2e6ec; color: #8a94a4; background: #f2f4f7; cursor: not-allowed; }
.quote-schedule-fields { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 9px; }
.quote-schedule-fields label { gap: 7px; padding: 11px; border: 1px solid #e6d6cf; border-radius: 14px; color: #344054; background: #fff; }
.quote-schedule-fields label > span { font-size: .75rem; font-weight: 900; }
.quote-schedule-fields input { min-height: 48px; margin: 0; border-color: #d7b8aa; background: #fff; font-weight: 850; }
.quote-schedule-fields input:focus { border-color: #ff5a1f; box-shadow: 0 0 0 3px rgba(255, 90, 31, .18); }
.quote-schedule-timezone { margin: 10px 0 0; color: #647087; font-size: .7rem; font-weight: 800; text-align: right; }
.quote-schedule-summary { display: grid; gap: 3px; margin: 6px 0 0; padding: 12px 13px; border-radius: 14px; color: #172033; background: #ffe4d8; }
.quote-schedule-summary span { color: #8e2c09; font-size: .65rem; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.quote-schedule-summary strong { font-size: .9rem; line-height: 1.35; }
.quote-schedule.has-error { border-color: #dc2626; background: #fff7f7; }
.quote-schedule.has-error .quote-schedule-summary { color: #991b1b; background: #fee2e2; }

/* Acciones de Servicios: naranja vivo YOVOY; azul reservado para identidad. */
:root {
  --service-action: #ff5a1f;
  --service-action-ink: #111827;
  --service-action-dark: #9d2f08;
  --service-action-hover: #e94b12;
  --service-action-soft: #fff0e9;
  --service-action-focus: #ffbda3;
  --service-action-disabled: #ffd0bd;
  --service-chat: #08764e;
  --service-chat-hover: #065f3f;
}

.primary-button,
.small-button {
  color: var(--service-action-ink);
  background: var(--service-action);
  box-shadow: 0 10px 20px rgba(255, 90, 31, .2);
}
.primary-button:not(:disabled):hover,
.small-button:not(:disabled):hover { color: var(--service-action-ink); background: var(--service-action-hover); box-shadow: 0 12px 22px rgba(233, 75, 18, .24); transform: translateY(-1px); }
.primary-button:disabled,
.small-button:disabled { color: #6b3a28; background: var(--service-action-disabled); box-shadow: none; opacity: .78; cursor: wait; }
.primary-button:focus-visible,
.small-button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--service-action-focus); }

.card-action.is-primary { border-color: var(--service-action); color: var(--service-action-ink); background: var(--service-action); box-shadow: 0 8px 18px rgba(255, 90, 31, .18); }
.card-action.is-primary:not(:disabled):hover { border-color: var(--service-action-hover); color: var(--service-action-ink); background: var(--service-action-hover); }
.card-action.is-primary:focus-visible { outline: 3px solid var(--service-action-focus); outline-offset: 2px; }
.dialog-card .stack-form > .primary-button[type="submit"]:last-child { box-shadow: 0 -12px 22px rgba(242,246,252,.94), 0 10px 20px rgba(255,90,31,.2); }

.live-chat-action { border-color: var(--service-chat) !important; color: #fff !important; background: var(--service-chat) !important; box-shadow: 0 10px 20px rgba(8,118,78,.22); }
.live-chat-action:hover { border-color: var(--service-chat-hover) !important; color: #fff !important; background: var(--service-chat-hover) !important; }
.live-chat-action:focus-visible { outline: 3px solid #86efc4; outline-offset: 2px; }
.work-photo-action { border-color: var(--service-action); color: var(--service-action-dark); background: var(--service-action-soft); }
.work-photo-picker input[type="file"]::file-selector-button { color: var(--service-action-ink); background: var(--service-action); }
.work-photo-source { border-color: var(--service-action); color: var(--service-action-ink); background: var(--service-action); }

.advertising-response-cta { border-color: #fff; color: var(--service-action-dark); background: #fff; }
.advertising-growth-cta { border-color: var(--service-action); color: var(--service-action-ink); background: var(--service-action); }
.advertising-response-cta:hover { border-color: var(--service-action-soft) !important; color: var(--service-action-dark) !important; background: var(--service-action-soft) !important; }
.advertising-growth-cta:hover { border-color: var(--service-action-hover) !important; color: var(--service-action-ink) !important; background: var(--service-action-hover) !important; }

.services-fullscreen-action,
.services-fullscreen-card .quote-accepted-action {
  margin: 0 clamp(20px, 5vw, 36px) max(clamp(20px, 5vw, 36px), env(safe-area-inset-bottom));
  border: 2px solid var(--service-action);
  color: var(--service-action-ink);
  background: var(--service-action);
}
.services-fullscreen-card .quote-accepted-action { border-color: var(--service-chat); color: #fff; background: var(--service-chat); }
.services-fullscreen-action:not(:disabled):hover { border-color: var(--service-action-hover); color: var(--service-action-ink); background: var(--service-action-hover); }
.services-fullscreen-action:disabled { cursor: wait; opacity: .72; }
.services-fullscreen-action:focus-visible { outline: 4px solid var(--service-action-focus); outline-offset: 3px; }

@media (max-width: 430px) {
  .quote-schedule { padding: 13px; }
  .quote-schedule-fields { grid-template-columns: 1fr; }
  .quote-day-shortcuts button,
  .quote-time-shortcuts button { flex: 1 1 auto; }
}
@media (forced-colors: active) {
  .quote-schedule,
  .quote-schedule-client,
  .quote-day-shortcuts button,
  .quote-time-shortcuts button,
  .quote-schedule-fields label,
  .quote-schedule-summary,
  .primary-button,
  .small-button,
  .card-action.is-primary,
  .live-chat-action,
  .work-photo-action,
  .work-photo-source,
  .services-fullscreen-action { border: 2px solid ButtonText; color: ButtonText; background: ButtonFace; box-shadow: none; }
}

/* Agenda: el trabajo en curso domina; los terminados quedan compactos. */
.service-work-card.is-active-work {
  border: 3px solid var(--service-action);
  background: #fff;
  box-shadow: 0 16px 34px rgba(255, 90, 31, .18);
}
.service-work-card.is-active-work::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--service-action);
  content: "";
}
.service-work-card.is-compact-completed {
  border-color: #d6dbe3;
  background: #f7f8fa;
  box-shadow: 0 5px 14px rgba(26, 36, 52, .06);
}
.service-work-card.is-compact-completed > header { margin-bottom: 9px; }
.service-work-card.is-compact-completed > header h3 { font-size: .96rem; }
.completed-work-compact-summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 11px;
  padding: 11px 12px;
  border: 1px solid #d9dee6;
  border-radius: 15px;
  color: #354052;
  background: #fff;
}
.completed-work-check {
  display: grid;
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #16845c;
  font-size: 1.1rem;
  font-weight: 950;
}
.completed-work-compact-summary small,
.completed-work-compact-summary strong { display: block; }
.completed-work-compact-summary small { color: #667085; font-size: .6rem; font-weight: 950; letter-spacing: .08em; }
.completed-work-compact-summary strong { margin-top: 2px; color: #283345; font-size: .78rem; overflow-wrap: anywhere; }
.completed-work-total { grid-column: 2; }
.completed-work-compact-summary > .payment-state { grid-column: 3; grid-row: 1 / 3; }
.completed-work-next { grid-column: 3; grid-row: 1 / 3; align-self: center; text-align: right; }
.completed-work-next:focus-visible { outline: 3px solid var(--service-action-focus); outline-offset: 3px; border-radius: 8px; }
.completed-work-primary-action { display: flex; justify-content: flex-end; margin-top: 9px; }
.completed-work-primary-action .payment-action { min-height: 42px; }
.completed-work-details { margin-top: 8px; border-top: 1px solid #d9dee6; }
.completed-work-details > summary {
  min-height: 44px;
  padding: 11px 3px 4px;
  color: #536075;
  font-size: .76rem;
  font-weight: 900;
  cursor: pointer;
}
.completed-work-details > summary:focus-visible { outline: 3px solid var(--service-action-focus); outline-offset: 3px; border-radius: 8px; }
.completed-work-expanded { display: grid; gap: 11px; padding-top: 10px; }
.completed-work-expanded > footer { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 390px) {
  .completed-work-compact-summary { grid-template-columns: 40px minmax(0, 1fr); }
  .completed-work-compact-summary > .payment-state { grid-column: 2; grid-row: auto; justify-self: start; }
  .completed-work-next { grid-column: 2; grid-row: auto; text-align: left; }
}
@media (forced-colors: active) {
  .service-work-card.is-active-work,
  .service-work-card.is-compact-completed,
  .completed-work-compact-summary,
  .completed-work-check,
  .completed-work-details { border: 2px solid ButtonText; color: ButtonText; background: Canvas; box-shadow: none; }
}

/* Ventanas operativas: ninguna acción queda fuera del viewport o bajo el teclado. */
.action-dialog[open] {
  max-width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
.dialog-card {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.dialog-card :is(.stack-form, fieldset, label, input, select, textarea, .dialog-action-row, .quote-schedule-fields) {
  min-width: 0;
  max-width: 100%;
}
.dialog-card :is(.primary-button, .danger-button, .card-action) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
.dialog-card :is(input, select, textarea, button):focus {
  scroll-margin-block: 64px calc(92px + env(safe-area-inset-bottom));
}
.dialog-card .stack-form > .danger-button[type="submit"]:last-child {
  position: sticky;
  z-index: 3;
  bottom: 0;
  width: 100%;
  margin-top: 8px;
  margin-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -12px 22px rgba(242,246,252,.94);
}
.services-fullscreen-notice { overscroll-behavior: contain; }
.services-fullscreen-card,
.services-fullscreen-copy { min-width: 0; }
.services-fullscreen-copy { overscroll-behavior: contain; }
.services-fullscreen-action,
.services-fullscreen-card .quote-accepted-action,
.rating-received-action {
  min-width: 0;
  max-width: calc(100% - 24px);
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 390px) {
  .action-dialog[open] {
    width: 100%;
    max-height: min(calc(100dvh - max(8px, env(safe-area-inset-top))), var(--services-dialog-viewport-height, 100dvh));
    margin: auto 0 0;
  }
  .dialog-card {
    max-height: min(calc(100dvh - max(8px, env(safe-area-inset-top))), var(--services-dialog-viewport-height, 100dvh));
    padding: 16px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    scroll-padding-block: 58px calc(92px + env(safe-area-inset-bottom));
  }
  .dialog-card h2 {
    max-width: calc(100% - 52px);
    margin-bottom: 14px;
    font-size: clamp(1.3rem, 7vw, 1.65rem);
  }
  .dialog-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .dialog-action-row .card-action { width: 100%; }
  .quote-schedule {
    padding: 11px;
    border-radius: 16px;
  }
  .quote-schedule legend { gap: 8px; padding-bottom: 8px; }
  .quote-schedule-icon { width: 38px; height: 38px; flex-basis: 38px; }
  .quote-day-shortcuts,
  .quote-time-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-time-shortcuts > span { grid-column: 1 / -1; }
  .quote-day-shortcuts button,
  .quote-time-shortcuts button {
    width: 100%;
    min-width: 0;
    padding-inline: 7px;
  }
  .quote-schedule-fields input { min-width: 0; max-width: 100%; }
  .services-fullscreen-notice {
    align-items: stretch;
    padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  }
  .services-fullscreen-card {
    align-self: center;
    max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
    border-radius: 20px;
  }
  .services-fullscreen-copy { padding: 14px; }
  .services-fullscreen-copy h2,
  .services-fullscreen-copy > strong { font-size: clamp(1.42rem, 8vw, 1.85rem); }
  .services-fullscreen-action,
  .services-fullscreen-card .quote-accepted-action,
  .rating-received-action {
    width: auto;
    max-width: none;
    min-height: 52px;
    margin-right: 12px;
    margin-bottom: max(12px, env(safe-area-inset-bottom));
    margin-left: 12px;
  }
}

@media (max-height: 540px) and (max-width: 760px) {
  .dialog-card {
    padding-top: 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    scroll-padding-block: 52px calc(82px + env(safe-area-inset-bottom));
  }
  .dialog-card h2 { margin-bottom: 10px; }
  .quote-schedule { padding: 9px; }
  .quote-schedule-client { margin-bottom: 8px; padding: 8px 10px; }
  .quote-day-shortcuts { margin-bottom: 8px; }
  .quote-time-shortcuts { margin-top: 7px; }
  .services-fullscreen-card {
    max-height: calc(100dvh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)));
  }
  .services-fullscreen-visual { min-height: 72px; padding: 8px 12px; }
  .services-fullscreen-visual > span { width: 46px; height: 46px; border-radius: 14px; font-size: 1.35rem; }
  .services-fullscreen-copy { gap: 6px; padding: 10px 14px; }
  .services-fullscreen-action,
  .services-fullscreen-card .quote-accepted-action,
  .rating-received-action { min-height: 48px; margin-bottom: max(8px, env(safe-area-inset-bottom)); }
}

/* Pulido móvil 20260828: tarjetas de proceso con margen real y rating amable. */
.dialog-toast-stack {
  width: min(calc(100% - 40px), 460px);
}

@media (max-width: 350px) {
  .offering-image-source-actions { grid-template-columns: 1fr; }
}

.toast.is-communication {
  min-height: 72px;
  padding: 14px 16px;
  border-width: 1px;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(5, 37, 99, .26);
}

.services-fullscreen-notice {
  padding: max(22px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
}

.services-fullscreen-card {
  width: min(100%, 520px);
  max-height: min(620px, calc(100dvh - 44px));
  border-width: 1px;
  border-radius: 26px;
  box-shadow: 0 20px 54px rgba(2, 18, 48, .3);
}

.services-fullscreen-visual {
  min-height: 132px;
  padding: 18px;
}

.services-fullscreen-visual > span {
  width: 66px;
  height: 66px;
  border-width: 2px;
  border-radius: 20px;
  font-size: 1.9rem;
}

.services-fullscreen-copy {
  gap: 8px;
  padding: 22px;
}

.services-fullscreen-copy h2,
.services-fullscreen-copy > strong {
  font-size: clamp(1.5rem, 6vw, 2rem);
  line-height: 1.08;
}

.services-fullscreen-copy > p {
  font-size: clamp(.9rem, 3.5vw, 1rem);
  line-height: 1.42;
}

.services-fullscreen-copy > .services-fullscreen-hint {
  padding: 10px 12px;
  border-radius: 13px;
  font-size: .78rem;
}

.services-fullscreen-action,
.services-fullscreen-card .quote-accepted-action,
.rating-received-action {
  min-height: 50px;
  margin: 0 20px max(20px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 14px;
  box-shadow: 0 7px 18px rgba(7, 47, 111, .2);
}

.rating-received-card {
  width: min(100%, 460px);
  border-color: #eadffc;
  background: #fffdf9;
}

.services-fullscreen-visual.is-rating {
  min-height: 112px;
  padding: 16px;
}

.services-fullscreen-visual.is-rating > .rating-received-icon {
  min-width: 68px;
  min-height: 58px;
  padding: 9px 12px;
  border-width: 2px;
  border-radius: 19px;
  box-shadow: 0 7px 18px rgba(29, 7, 75, .18);
  font-size: clamp(1.4rem, 7vw, 1.9rem);
  transform: none;
}

.rating-received-copy {
  gap: 8px;
  padding: 19px;
}

.rating-received-comment {
  margin-top: 2px;
  padding: 10px 12px;
  border-width: 1px;
  border-radius: 14px;
  font-size: .82rem;
}

.rating-received-action {
  background: #7040cf;
  box-shadow: 0 7px 18px rgba(78, 35, 163, .22);
}

@media (max-width: 640px) {
  .services-fullscreen-notice {
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }

  .services-fullscreen-card {
    width: min(100%, 500px);
    max-height: calc(100dvh - max(36px, env(safe-area-inset-top)) - max(36px, env(safe-area-inset-bottom)));
    border-radius: 24px;
  }

  .services-fullscreen-visual { min-height: 104px; padding: 14px; }
  .services-fullscreen-visual > span { width: 54px; height: 54px; border-radius: 17px; font-size: 1.55rem; }
  .services-fullscreen-copy { align-content: start; padding: 17px; }
  .services-fullscreen-copy h2,
  .services-fullscreen-copy > strong { font-size: clamp(1.38rem, 6.5vw, 1.72rem); }
  .services-fullscreen-action,
  .services-fullscreen-card .quote-accepted-action,
  .rating-received-action { margin: 0 17px max(17px, env(safe-area-inset-bottom)); }
  .services-fullscreen-visual.is-rating { min-height: 100px; }
  .rating-received-copy { padding: 16px 17px; }
}

@media (max-width: 390px) {
  .dialog-toast-stack { width: min(calc(100% - 28px), 460px); }

  .services-fullscreen-notice {
    align-items: center;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  .services-fullscreen-card {
    max-height: calc(100dvh - max(28px, env(safe-area-inset-top)) - max(28px, env(safe-area-inset-bottom)));
    border-radius: 22px;
  }

  .services-fullscreen-copy { padding: 14px; }
  .services-fullscreen-action,
  .services-fullscreen-card .quote-accepted-action,
  .rating-received-action {
    margin-right: 14px;
    margin-bottom: max(14px, env(safe-area-inset-bottom));
    margin-left: 14px;
  }
}

@media (max-height: 540px) and (max-width: 760px) {
  .services-fullscreen-notice {
    padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  .services-fullscreen-card {
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom)));
  }

  .services-fullscreen-visual { min-height: 66px; }
}

@media (prefers-reduced-motion: reduce) {
  .services-fullscreen-card,
  .services-fullscreen-visual.is-rating > .rating-received-icon {
    transition: none;
    animation: none;
    transform: none;
  }
}

@media (forced-colors: active) {
  .toast.is-communication,
  .services-fullscreen-notice,
  .services-fullscreen-card,
  .services-fullscreen-visual,
  .services-fullscreen-copy > .services-fullscreen-hint,
  .services-fullscreen-action,
  .services-fullscreen-card .quote-accepted-action,
  .rating-received-card,
  .services-fullscreen-visual.is-rating,
  .rating-received-comment,
  .rating-received-action {
    border: 2px solid ButtonText;
    color: ButtonText;
    background: Canvas;
    box-shadow: none;
  }
}

/* Herramientas owner-only de Perfil: audiencia agregada y sitio público. */
.profile-owner-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.owner-tool-panel {
  min-width: 0;
  margin: 0;
  padding: 20px;
  overflow: hidden;
  border-color: #c9d9ef;
  box-shadow: 0 14px 36px rgba(12, 55, 122, .08);
}

.owner-tool-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 15px;
}

.owner-tool-heading > div { min-width: 0; }
.owner-tool-heading small { color: #1557d5; font-size: .62rem; font-weight: 950; letter-spacing: .1em; }
.owner-tool-heading h2 { margin: 3px 0 4px; color: #10264a; font-size: 1.2rem; letter-spacing: -.025em; }
.owner-tool-heading p { margin: 0; color: #5b6d86; font-size: .8rem; line-height: 1.42; }

.owner-tool-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  box-shadow: 0 10px 23px rgba(17, 75, 164, .2);
}
.owner-tool-icon.is-marketing { background: #5b3db8; }
.owner-tool-icon.is-site { background: #08764e; }
.owner-tool-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.owner-tool-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  color: #53647d;
  background: #eef2f7;
  font-size: .62rem;
  font-weight: 950;
  white-space: nowrap;
}
.owner-tool-status.is-ready { color: #08764e; background: #dcfce7; }
.owner-tool-status.is-draft { color: #855400; background: #fff3cd; }
.owner-tool-status.is-error { color: #a12920; background: #fee2e2; }
.owner-tool-status.is-loading { color: #1557d5; background: #eaf1ff; }

.marketing-audience-summary { min-height: 112px; }
.marketing-audience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.marketing-audience-grid article {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid #d5e1f3;
  border-radius: 15px;
  background: #f4f8fe;
}
.marketing-audience-grid small { display: block; min-height: 2.4em; color: #57708f; font-size: .55rem; font-weight: 950; letter-spacing: .07em; line-height: 1.2; }
.marketing-audience-grid strong { display: block; margin: 5px 0 3px; color: #123f86; font-size: 1.55rem; line-height: 1; }
.marketing-audience-grid span { display: block; color: #6b7b91; font-size: .64rem; line-height: 1.3; }
.marketing-privacy-note { margin: 9px 0 0; padding: 9px 11px; border-radius: 12px; color: #3d5572; background: #eef6ff; font-size: .7rem; line-height: 1.4; }

.owner-tool-form { display: grid; gap: 11px; margin-top: 14px; }
.owner-tool-fieldset { display: grid; min-width: 0; gap: 11px; margin: 0; padding: 14px; border: 1px solid #d8e3f1; border-radius: 17px; background: #f8fbff; }
.owner-tool-fieldset legend { padding: 0 6px; color: #263f62; font-size: .74rem; font-weight: 950; }
.owner-tool-fieldset label { min-width: 0; }
.owner-tool-fieldset :is(input, select, textarea) { min-width: 0; background: #fff; }
.owner-tool-fieldset:disabled { opacity: .62; }
.owner-tool-fieldset:disabled :is(input, select, textarea) { cursor: wait; }
.owner-tool-form-meta { display: flex; justify-content: space-between; gap: 10px; color: #718096; font-size: .67rem; line-height: 1.35; }
.owner-tool-form-meta output { flex: 0 0 auto; color: #315780; font-weight: 900; }
.owner-tool-confirm, .public-site-toggle { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 11px; border: 1px solid #caddf5; border-radius: 13px; background: #fff; }
.owner-tool-confirm input, .public-site-toggle input { width: 20px; height: 20px; margin: 0; accent-color: #1557d5; }
.owner-tool-confirm span { color: #425775; font-size: .73rem; line-height: 1.4; }
.owner-tool-submit { width: 100%; min-height: 50px; }

.owner-tool-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 9px; }
.owner-tool-history-heading h3 { margin: 0; color: #263b59; font-size: .87rem; }
.owner-tool-history-heading span { color: #77869a; font-size: .62rem; font-weight: 850; }
.owner-tool-list { display: grid; gap: 8px; }
.owner-tool-list-item { display: flex; min-width: 0; align-items: start; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid #e0e7f0; border-radius: 14px; background: #fff; }
.owner-tool-list-item > div { min-width: 0; }
.owner-tool-list-item strong { display: block; color: #223956; font-size: .8rem; overflow-wrap: anywhere; }
.owner-tool-list-item p { display: -webkit-box; margin: 4px 0; overflow: hidden; color: #66768d; font-size: .72rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.owner-tool-list-item small { color: #8190a3; font-size: .63rem; }
.owner-tool-empty, .owner-tool-loading { margin: 0; padding: 17px 12px; border: 1px dashed #cdd9e8; border-radius: 14px; color: #6b7c91; background: #fbfdff; font-size: .76rem; text-align: center; }
.owner-tool-loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -2px; border: 2px solid #9bb8e6; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.owner-tool-error { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid #fecaca; border-radius: 14px; color: #8c2d26; background: #fff7f7; }
.owner-tool-error p { margin: 0; font-size: .74rem; line-height: 1.35; }
.owner-tool-error .card-action { flex: 0 0 auto; min-height: 44px; }

.public-site-link { min-width: 0; margin-bottom: 12px; }
.public-site-link > div { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid #bde5d2; border-radius: 14px; background: #f0fdf7; }
.public-site-link > div > div { min-width: 0; }
.public-site-link small { display: block; color: #08764e; font-size: .58rem; font-weight: 950; letter-spacing: .08em; }
.public-site-link strong { display: block; margin-top: 3px; overflow: hidden; color: #275544; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.public-site-link > p { margin: 0; padding: 10px 12px; border-radius: 12px; color: #64748b; background: #f3f6fa; font-size: .72rem; }
.public-site-link .card-action { flex: 0 0 auto; min-height: 44px; text-decoration: none; }

.public-site-preview { position: relative; min-height: 170px; padding: 22px; overflow: hidden; border-radius: 20px; color: #fff; background: #0d4ea5; box-shadow: 0 14px 28px rgba(9, 54, 126, .2); isolation: isolate; }
.public-site-preview::after { content: ""; position: absolute; z-index: -1; top: -58px; right: -42px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.12); }
.public-site-preview small { color: #dcecff; font-size: .59rem; font-weight: 950; letter-spacing: .12em; }
.public-site-preview h3 { max-width: 19ch; margin: 9px 0 6px; color: #fff; font-size: 1.32rem; line-height: 1.08; letter-spacing: -.025em; overflow-wrap: anywhere; }
.public-site-preview p { max-width: 46ch; margin: 0 0 14px; color: #e5efff; font-size: .75rem; line-height: 1.42; }
.public-site-preview > span { display: inline-flex; min-height: 38px; align-items: center; padding: 8px 12px; border-radius: 11px; color: #10233d; background: #fff; font-size: .72rem; font-weight: 950; }
.public-site-toggle span { display: grid; gap: 3px; }
.public-site-toggle strong { color: #24415f; font-size: .78rem; }
.public-site-toggle small { color: #718197; font-size: .66rem; font-weight: 650; line-height: 1.35; }

@media (max-width: 900px) {
  .profile-owner-tools { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .owner-tool-panel { padding: 15px; border-radius: 18px; }
  .owner-tool-heading { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; }
  .owner-tool-icon { width: 42px; height: 42px; border-radius: 13px; }
  .owner-tool-icon svg { width: 22px; height: 22px; }
  .owner-tool-status { grid-column: 2; justify-self: start; }
  .marketing-audience-grid { gap: 5px; }
  .marketing-audience-grid article { padding: 10px 7px; }
  .marketing-audience-grid strong { font-size: 1.3rem; }
  .marketing-audience-grid span { font-size: .58rem; }
  .owner-tool-fieldset { padding: 12px; }
  .owner-tool-history-heading { align-items: start; flex-direction: column; gap: 3px; }
  .owner-tool-list-item { align-items: stretch; flex-direction: column; }
  .owner-tool-list-item .tag { align-self: start; }
  .public-site-link > div { align-items: stretch; flex-direction: column; }
  .public-site-link strong { white-space: normal; overflow-wrap: anywhere; }
  .public-site-link .card-action { display: inline-flex; align-items: center; justify-content: center; }
  .public-site-preview { min-height: 158px; padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .owner-tool-loading::before { animation: none; }
}

@media (forced-colors: active) {
  .owner-tool-panel,
  .owner-tool-icon,
  .owner-tool-status,
  .marketing-audience-grid article,
  .marketing-privacy-note,
  .owner-tool-fieldset,
  .owner-tool-confirm,
  .public-site-toggle,
  .owner-tool-list-item,
  .owner-tool-error,
  .public-site-link > div,
  .public-site-preview,
  .public-site-preview > span {
    border: 2px solid ButtonText;
    color: ButtonText;
    background: Canvas;
    box-shadow: none;
  }
}

/* Accesos owner-only en Inicio y métricas compactas. */
.dashboard-owner-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: -5px 0 11px;
}

.dashboard-owner-shortcut {
  display: grid;
  min-width: 0;
  min-height: 56px;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid #cddbf0;
  border-radius: 16px;
  color: #17325d;
  background: #fff;
  box-shadow: 0 6px 18px rgba(12, 45, 100, .055);
  text-align: left;
}

.dashboard-owner-shortcut-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
}
.dashboard-owner-shortcut.is-marketing .dashboard-owner-shortcut-icon { background: #5b3db8; }
.dashboard-owner-shortcut.is-site .dashboard-owner-shortcut-icon { background: #08764e; }
.dashboard-owner-shortcut-icon svg,
.dashboard-owner-shortcut-arrow {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dashboard-owner-shortcut strong { min-width: 0; font-size: .76rem; line-height: 1.18; overflow-wrap: anywhere; }
.dashboard-owner-shortcut-arrow { width: 16px; height: 16px; color: #7890b0; }
.dashboard-owner-shortcut:focus-visible { outline: 3px solid #87adf5; outline-offset: 2px; }

#dashboard-metrics.metric-grid { gap: 8px; margin-bottom: 12px; }
#dashboard-metrics .metric {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px 9px 14px;
  border-radius: 16px;
}
#dashboard-metrics .metric small { font-size: .6rem; line-height: 1.18; }
#dashboard-metrics .metric strong { margin-top: 5px; font-size: clamp(1.12rem, 4.2vw, 1.48rem); line-height: 1; }
.owner-tool-panel { scroll-margin-top: calc(72px + env(safe-area-inset-top)); }

@media (hover: hover) {
  .dashboard-owner-shortcut:hover { border-color: #9ebcf2; background: #f7faff; }
}

@media (max-width: 430px) {
  .dashboard-owner-shortcuts { gap: 7px; }
  .dashboard-owner-shortcut { min-height: 52px; grid-template-columns: 32px minmax(0, 1fr) 14px; gap: 6px; padding: 7px; border-radius: 14px; }
  .dashboard-owner-shortcut-icon { width: 32px; height: 32px; border-radius: 10px; }
  .dashboard-owner-shortcut-icon svg { width: 17px; height: 17px; }
  .dashboard-owner-shortcut strong { font-size: .7rem; }
  #dashboard-metrics .metric { min-height: 68px; padding: 8px 10px 8px 12px; }
  #dashboard-metrics .metric strong { margin-top: 4px; font-size: clamp(1.05rem, 5.2vw, 1.34rem); }
}

@media (forced-colors: active) {
  .dashboard-owner-shortcut,
  .dashboard-owner-shortcut-icon {
    border: 2px solid ButtonText;
    color: ButtonText;
    background: ButtonFace;
    box-shadow: none;
  }

  .offering-image,
  .offering-image-editor,
  .offering-image-source,
  .offering-current-image {
    border: 2px solid ButtonText;
    color: ButtonText;
    background: Canvas;
    box-shadow: none;
  }
}
