:root {
  --brand-navy: #0D263F;
  --brand-navy-2: #12304D;
  --brand-orange: #EF7C2F;
  --brand-ink: #122033;
  --brand-paper: #F7F9FC;
  --brand-surface: #FFFFFF;
  --brand-muted: #607086;
  --brand-line: #DFE6EE;
  --brand-blue: #2F6FCB;
  --brand-blue-soft: #EAF2FF;
  --brand-green: #2F8B57;
  --brand-green-soft: #EAF6EF;
  --brand-amber: #B7791F;
  --brand-amber-soft: #FFF7E5;
  --brand-red: #C8463A;
  --brand-red-soft: #FFF0EF;
  --brand-orange-soft: #FFF1E8;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: block;
  object-fit: cover;
  background: #10243E;
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(13, 38, 63, .14);
}

.brand-wordmark {
  min-width: 0;
  color: var(--brand-ink);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.brand-wordmark-base { color: inherit; }
.brand-wordmark-accent { color: var(--brand-orange); }
.brand-on-navy .brand-wordmark-base { color: #FFFFFF; }

.language-toggle {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(36px, 1fr));
  padding: 3px;
  overflow: hidden;
  background: var(--brand-paper);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(13, 38, 63, .06);
}

.language-toggle::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 2);
  background: var(--brand-navy);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(13, 38, 63, .2);
  transform: translateX(0);
  transition: transform 180ms ease;
}

.language-toggle[data-language="es"]::before { transform: translateX(100%); }

.language-toggle button {
  position: relative;
  min-width: 36px;
  min-height: 32px;
  padding: 4px 8px;
  color: var(--brand-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1;
}

.language-toggle button[aria-pressed="true"] { color: #FFFFFF; }
.language-toggle button:disabled { cursor: wait; opacity: .55; }
.language-toggle button:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 3px; }

.brand-on-navy .language-toggle {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .24);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .14);
}
.brand-on-navy .language-toggle::before { background: #FFFFFF; }
.brand-on-navy .language-toggle button { color: #C5D6E5; }
.brand-on-navy .language-toggle button[aria-pressed="true"] { color: var(--brand-navy); }
.brand-on-navy .language-toggle button:focus-visible { outline-color: #FFFFFF; }

@media (prefers-reduced-motion: reduce) {
  .language-toggle::before { transition: none; }
}
/* Shared customer outreach inside the unscheduled-work form. */
.scheduling-contact { margin: 16px 0; padding: 16px; border: 1px solid #cbd7e0; border-radius: 12px; background: #fff; color: #102b40; overflow-wrap: anywhere; }
.scheduling-contact h4 { margin: 0 0 10px; font-size: 1rem; }
.scheduling-contact p { margin: 8px 0; font-size: .9rem; line-height: 1.45; }
.scheduling-contact small { display: block; margin-top: 8px; text-transform: none; line-height: 1.45; }
.scheduling-contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.scheduling-contact a, .scheduling-contact button, .scheduling-contact-dialog button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 14px; border: 1px solid #bdccd8; border-radius: 9px; background: #f4f8fc; color: #143950; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.scheduling-contact a:focus-visible, .scheduling-contact button:focus-visible, .scheduling-contact-dialog button:focus-visible { outline: 3px solid #267bbe; outline-offset: 2px; }
.scheduling-contact-dialog { width: min(420px, calc(100% - 40px)); box-sizing: border-box; max-height: 85vh; overflow: auto; border: 1px solid #bdccd8; border-radius: 16px; padding: 24px; color: #102b40; overflow-wrap: anywhere; }
.scheduling-contact-dialog::backdrop { background: rgb(10 31 47 / 65%); }
/* Shared owner workflow surfaces: mobile and desktop. */
.dashboard-attention-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin: 0; padding: 10px 14px; border: 1px solid var(--brand-line); border-left: 4px solid var(--brand-orange); border-radius: 12px; background: var(--brand-surface); color: var(--brand-navy); font: inherit; font-weight: 750; text-align: left; cursor: pointer; }
.dashboard-attention-count { margin-left: auto; min-width: 26px; padding: 3px 7px; border-radius: 20px; background: var(--brand-orange-soft, #fff0e4); text-align: center; }
[data-surface="desktop"] .dashboard-attention-link { margin-top: 14px; }
[data-surface="desktop"] .weekly-summary-strip { grid-template-columns: 1fr; margin-top: 16px; }
.weekly-summary-strip { position: relative; }
.weekly-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.weekly-summary-heading .weekly-money-link { margin: 0; }
/* One meaningful progress meter with compact supporting financial totals. */
.weekly-summary-strip.weekly-summary-strip { background: #fff; padding: 7px 11px; gap: 2px; }
.weekly-summary-heading { gap: 6px 10px; }
.weekly-summary-heading .weekly-money-link { margin-left: auto; font-size: 11px; }
.weekly-summary-toggle { border: 0; background: transparent; color: #52685F; font-size: 11px; min-height: 32px; padding: 4px 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.weekly-summary-toggle:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.weekly-summary-strip .weekly-summary-items { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0; }
.weekly-summary-strip .weekly-summary-items[hidden], .weekly-summary-strip p[hidden] { display: none; }
.weekly-summary-strip .weekly-summary-item { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 4px 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; text-align: left; }
.weekly-summary-strip .weekly-summary-item:first-child { grid-row: 1 / 3; align-items: center; padding: 2px 10px 2px 0; text-align: center; }
.weekly-summary-strip .weekly-summary-item:not(:first-child) { border-left: 1px solid #E5EBE8; }
.weekly-summary-strip .weekly-summary-item:nth-child(3) { border-top: 1px solid #EDF1EE; }
.weekly-summary-strip .weekly-summary-item strong { font-size: 21px; line-height: 1.2; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.weekly-summary-strip .weekly-summary-item span { color: #607086; font-size: 11px; font-weight: 600; text-transform: none; line-height: 1.3; }
.weekly-summary-strip .weekly-summary-item:not(:first-child) span { order: -1; }
.weekly-summary-strip .weekly-summary-item b { display: none; }
.weekly-progress-ring { width: 68px; height: 68px; flex-shrink: 0; border-radius: 50%; padding: 5px; background: conic-gradient(#2F8B57 var(--weekly-progress), #E7EFEA 0); }
.weekly-summary-strip .weekly-progress-ring strong { height: 100%; width: 100%; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 23px; }
.weekly-progress-ring small { font-size: 15px; color: #718078; font-weight: 500; }
.weekly-summary-strip.is-minimized { gap: 0; }
@media (max-width: 360px) {
  .weekly-summary-strip .weekly-summary-items { grid-template-columns: 90px minmax(0, 1fr); }
  .weekly-summary-strip .weekly-summary-item { padding-inline: 10px; }
  .weekly-summary-heading .weekly-money-link { font-size: 10px; }
}

.weekly-money-link { min-height: 44px; padding: 6px 0; border: 0; border-radius: 4px; background: transparent; color: var(--brand-navy); font: inherit; font-size: .85rem; font-weight: 650; text-align: left; text-decoration: underline; cursor: pointer; }
.dashboard-attention-link:focus-visible, .weekly-money-link:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 3px; }
.owner-workflow-panel > h2 { margin-top: 0; font-size: 1.15rem; }
.owner-workflow-panel { margin: 16px 0; padding: 18px; border: 1px solid var(--brand-line); border-radius: 14px; background: var(--brand-surface); color: var(--brand-ink); overflow-wrap: anywhere; }
.owner-workflow-panel > summary { cursor: pointer; font-weight: 750; font-size: 1.1rem; min-height: 44px; }
.owner-workflow-panel p { font-size: .9rem; line-height: 1.5; }
.owner-workflow-panel label { display: grid; gap: 6px; }
.owner-workflow-panel select, .owner-workflow-panel input { min-height: 44px; min-width: 0; width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid var(--brand-line); border-radius: 8px; background: white; color: var(--brand-ink); font: inherit; }
.owner-workflow-panel button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--brand-line); border-radius: 9px; background: var(--brand-blue-soft); color: var(--brand-navy); font: inherit; font-weight: 700; cursor: pointer; }
.owner-workflow-panel button:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 2px; }
.owner-workflow-panel button:disabled { opacity: .6; cursor: default; }
.owner-workflow-list { display: grid; gap: 10px; margin-top: 14px; }
.owner-workflow-row { border: 1px solid var(--brand-line); border-radius: 10px; padding: 14px; background: var(--brand-surface); }
.owner-workflow-list > .owner-workflow-row:nth-of-type(even) { background: #F0F4F8; }
.owner-workflow-row small, .owner-workflow-row strong { display: block; text-transform: none; }
.owner-workflow-row small { color: var(--brand-muted); margin-bottom: 6px; }
.owner-workflow-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.owner-money-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.owner-money-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.owner-money-grid button { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }
.owner-money-grid button[aria-pressed="true"] { border: 2px solid var(--brand-blue); }
.owner-money-grid strong { font-size: 1.3rem; }
.owner-workflow-panel [role="status"]:empty { display: none; }
@media (min-width: 800px) { .owner-money-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.owner-workflow-panel.scheduling-contact-dialog { margin: auto; }
.owner-workflow-panel input[type="checkbox"] { width: 22px; min-height: 22px; }
.owner-workflow-panel.scheduling-contact-dialog > label { margin: 16px 0; line-height: 1.45; }
.estimate-entry-choices {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid #cedbe6;
  border-radius: 14px;
  background: #f3f8fc;
}
.estimate-entry-choices h3 { margin: 0 0 8px; }
.estimate-entry-choices p { margin: 0 0 12px; }
.estimate-entry-choices button { min-height: 44px; white-space: normal; }
.estimate-form-part {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  margin: 12px 0;
  padding: 18px 14px;
  border: 1px solid #cedbe6;
  border-radius: 14px;
  background: #fff;
  grid-column: 1 / -1;
}
.estimate-form-part legend { font-weight: 800; color: #12304a; padding: 0 6px; }
.estimate-form-part > label, .estimate-form-part > section { min-width: 0; }
.document-terms-help {
  color: #526779;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
}
textarea[name="defaultEstimateTerms"]::placeholder,
textarea[name="defaultInvoiceTerms"]::placeholder {
  color: #64748b;
  font-weight: 400;
  opacity: 1;
}

/* Optional, shared mobile/desktop business setup guidance. */
.setup-welcome-card { background: #fff; border: 1px solid #dce2e8; border-top: 4px solid #EF7C2F; border-radius: 18px; padding: 20px; margin-bottom: 18px; color: #0D263F; }
.setup-welcome-card h2 { margin: 0 0 10px; font-size: 1.3rem; }
.setup-welcome-card p, .setup-review-confirmation p { line-height: 1.5; }
.setup-welcome-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.setup-review-confirmation { border-top: 1px solid #dce2e8; margin-top: 18px; padding-top: 12px; }
.setup-welcome-card button, .setup-review-confirmation button { min-height: 44px; white-space: normal; }

.document-terms-example { display: block; margin-top: 8px; padding: 10px 12px; border-left: 3px solid #EF7C2F; background: #f6f8fb; color: #334155; line-height: 1.5; font-size: .875rem; }

.whatsapp-confirmation-dialog > label { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; line-height: 1.45; }
.whatsapp-confirmation-dialog input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; }
.whatsapp-confirmation-dialog button { margin: 6px 8px 6px 0; }
.whatsapp-confirmation-dialog button:disabled { opacity: .5; cursor: not-allowed; }

/* Shared billing notice; business records remain readable below it. */
#subscription-read-only { margin: 12px; padding: 16px; border: 1px solid #d69c50; border-left: 5px solid #d69c50; border-radius: 12px; background: #fff7e8; color: #102b40; font: 16px/1.5 system-ui, sans-serif; }
#subscription-read-only p { margin: 6px 0; }
#subscription-read-only a { display: inline-block; padding: 10px 14px; margin-top: 6px; border-radius: 8px; background: #102b40; color: #fff; font-weight: 700; text-decoration: none; }
