/* Owner edit mode: a task-first layer over the existing, proven business form. */
.owner-edit-home,
.owner-edit-toolbar,
.owner-card-intro {
  --owner-accent: #9f7b32;
  --owner-accent-strong: #735518;
  --owner-accent-soft: #fbf6e9;
}

.owner-edit-home {
  display: grid;
  gap: 1rem;
  padding: clamp(.2rem, 1vw, .65rem);
}

.owner-edit-home[hidden],
.owner-edit-toolbar[hidden] { display: none !important; }

.owner-edit-home__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem .25rem .65rem;
}

.owner-edit-kicker {
  margin: 0 0 .25rem;
  color: var(--owner-accent-strong);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.owner-edit-home h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.2; }
.owner-edit-home__head p:last-child { margin: .4rem 0 0; }

.owner-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.owner-edit-choice {
  appearance: none;
  width: 100%;
  min-height: 92px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .9rem;
  color: #111827;
  text-align: left;
  background: #fff;
  border: 1px solid #d8dadd;
  border-radius: 15px;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(17, 24, 39, .045);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.owner-edit-choice:hover {
  border-color: #b99a58;
  box-shadow: 0 9px 20px rgba(17, 24, 39, .09);
  transform: translateY(-1px);
}

.owner-edit-choice:focus-visible,
.owner-edit-more summary:focus-visible,
.owner-edit-more button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(159, 123, 50, .28);
}

.owner-edit-choice--featured {
  border-color: #c9ad70;
  background: linear-gradient(135deg, #fff, var(--owner-accent-soft));
}

.owner-edit-choice__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #171717;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.owner-edit-choice--featured .owner-edit-choice__icon { background: var(--owner-accent-strong); }
.owner-edit-choice__copy { min-width: 0; display: grid; gap: .18rem; }
.owner-edit-choice__copy strong { font-size: .98rem; line-height: 1.25; }
.owner-edit-choice__copy small { color: #667085; font-size: .78rem; line-height: 1.35; }
.owner-edit-choice__status {
  justify-self: end;
  padding: .28rem .55rem;
  color: #5f4a1c;
  background: #f7efd9;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  white-space: nowrap;
}

.owner-edit-choice__status[data-state="ready"] { color: #166534; background: #dcfce7; }

.owner-edit-more {
  overflow: hidden;
  border: 1px solid #d8dadd;
  border-radius: 15px;
  background: #fff;
}

.owner-edit-more > summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .8rem 1rem;
  cursor: pointer;
  list-style: none;
}

.owner-edit-more > summary::-webkit-details-marker { display: none; }
.owner-edit-more > summary span:first-child { display: grid; gap: .1rem; }
.owner-edit-more > summary small { color: #667085; font-weight: 400; }
.owner-edit-more__chevron { transition: transform .16s ease; }
.owner-edit-more[open] .owner-edit-more__chevron { transform: rotate(180deg); }
.owner-edit-more__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  padding: 0 .75rem .75rem;
}

.owner-edit-more__grid button {
  min-height: 66px;
  display: grid;
  gap: .12rem;
  padding: .75rem;
  color: #1f2937;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 11px;
  cursor: pointer;
}

.owner-edit-more__grid button:hover { border-color: #b99a58; background: #fff; }
.owner-edit-more__grid small { color: #667085; line-height: 1.35; }

.owner-edit-toolbar {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .75rem;
  padding: .55rem;
  border: 1px solid #d8dadd;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
}

.owner-edit-toolbar > :last-child { justify-self: end; }
.owner-edit-mode.owner-edit-task-open .hero { display: none; }
.owner-edit-mode.owner-edit-task-open .workspace {
  padding: 0;
  background: transparent !important;
  border: 0;
  box-shadow: none !important;
}
.owner-edit-mode.owner-edit-task-open #business-form { gap: .8rem; }
.owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active {
  overflow: hidden;
  background: #fff !important;
  border: 1px solid rgba(17, 24, 39, .14) !important;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, .14) !important;
}
.owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active > summary {
  padding: 1rem 1.15rem;
  cursor: default;
  background: #f8f5ee !important;
  color: #111827 !important;
}
.owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active > summary:hover {
  background: #f8f5ee !important;
}
.owner-edit-mode.owner-edit-task-open .accTitle strong,
.owner-edit-mode.owner-edit-task-open .field label { color: #111827 !important; }
.owner-edit-mode.owner-edit-task-open .accSub { color: #667085 !important; }
.owner-edit-mode.owner-edit-task-open .accChevron { display: none; }
.owner-edit-mode.owner-edit-task-open .accBody {
  gap: .85rem !important;
  padding: 1rem 1.15rem 1.25rem;
}
.owner-edit-mode.owner-edit-task-open .accRule { box-shadow: inset 0 1px 0 rgba(17, 24, 39, .10); }
.owner-edit-mode.owner-edit-task-open details.mini {
  background: #f8fafc !important;
  border: 1px solid #e1e5ea;
  border-radius: 12px;
  box-shadow: none !important;
}
.owner-edit-mode.owner-edit-task-open details.mini > summary { padding: .75rem .85rem; }
.owner-edit-mode.owner-edit-task-open .input,
.owner-edit-mode.owner-edit-task-open .textarea,
.owner-edit-mode.owner-edit-task-open .select {
  border-radius: 10px;
  box-shadow: none;
}
.owner-edit-mode .jumpbar { display: none; }
.owner-edit-mode #quickfill:not(.owner-edit-tool-active) { display: none; }
.owner-edit-mode #restaurant-settings:not(.hidden),
.owner-edit-mode #realtor-settings:not(.hidden) { display: none; }
.owner-edit-mode[data-owner-edit-target="sec-details"] #restaurant-settings:not(.hidden),
.owner-edit-mode[data-owner-edit-target="sec-details"] #realtor-settings:not(.hidden) { display: block; }
.owner-edit-mode .hero-pills { display: none; }
.owner-edit-mode .hero { padding: .9rem 1rem; }
.owner-edit-mode .hero-subtitle { margin-top: .4rem; }

.owner-card-intro {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem;
  border: 1px solid #dfd2b2;
  border-radius: 13px;
  background: var(--owner-accent-soft);
}

.owner-edit-mode .owner-card-intro { display: flex; }
.owner-card-advanced > summary { display: none; }
.owner-card-advanced > .miniBody { padding: 0; }
.owner-edit-mode .owner-card-advanced > summary { display: flex; }
.owner-edit-mode .owner-card-advanced > .miniBody { padding: .9rem 0 0; }

.owner-card-intro p { margin: .25rem 0 0; font-size: .84rem; }
.owner-card-advanced { margin-top: .25rem; }

@media (max-width: 720px) {
  .owner-edit-home__head { display: grid; }
  .owner-edit-home__head .btn { width: 100%; }
  .owner-edit-grid { grid-template-columns: 1fr; }
  .owner-edit-choice { min-height: 82px; grid-template-columns: 40px minmax(0, 1fr); }
  .owner-edit-choice__icon { width: 40px; height: 40px; }
  .owner-edit-choice__status { grid-column: 2; justify-self: start; }
  .owner-edit-more__grid { grid-template-columns: 1fr; }
  .owner-edit-toolbar {
    position: sticky;
    top: .35rem;
    z-index: 22;
    grid-template-columns: 1fr auto;
    min-height: 52px;
    padding: .35rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .12);
  }
  .owner-edit-toolbar strong { display: none; }
  .owner-edit-toolbar .btn { min-height: 44px; padding: .55rem .75rem; }
  .owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active > summary {
    padding: .9rem 1rem;
  }
  .owner-edit-mode.owner-edit-task-open .accBody { padding: .9rem 1rem 1.1rem; }
  .owner-edit-mode .owner-card-intro { display: grid; }
  .owner-card-intro .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .owner-edit-choice,
  .owner-edit-more__chevron { transition: none; }
  .owner-edit-choice:hover { transform: none; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-choice,
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-more,
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-toolbar { color: #f7f7f7; background: #171717; border-color: #3f3f46; }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-choice--featured,
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-card-intro { background: linear-gradient(135deg, #211f1a, #2b2416); border-color: #6f5a2f; }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-choice__copy small,
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-more > summary small,
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-more__grid small { color: #b7bcc6; }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-more__grid button { color: #f5f5f5; background: #222226; border-color: #3f3f46; }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-more__grid button:hover { background: #292929; border-color: #9f7b32; }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-choice__status { color: #f4dfad; background: #4a3a18; }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-choice__status[data-state="ready"] { color: #bbf7d0; background: #14532d; }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active { background: #30363d !important; }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active > summary,
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active > summary:hover { background: #252a30 !important; }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-mode.owner-edit-task-open .accTitle strong,
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-mode.owner-edit-task-open .field label { color: #f8fafc !important; }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-mode.owner-edit-task-open .accSub { color: #cbd5df !important; }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-mode.owner-edit-task-open .accRule { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-mode.owner-edit-task-open details.mini { background: #353c44 !important; border-color: rgba(255, 255, 255, .16); }
}

html[data-theme="dark"] .owner-edit-choice,
html[data-theme="dark"] .owner-edit-more,
html[data-theme="dark"] .owner-edit-toolbar,
body.dark .owner-edit-choice,
body.dark .owner-edit-more,
body.dark .owner-edit-toolbar { color: #f7f7f7; background: #171717; border-color: #3f3f46; }

html[data-theme="dark"] .owner-edit-choice--featured,
html[data-theme="dark"] .owner-card-intro,
body.dark .owner-edit-choice--featured,
body.dark .owner-card-intro { background: linear-gradient(135deg, #211f1a, #2b2416); border-color: #6f5a2f; }

html[data-theme="dark"] .owner-edit-choice__copy small,
html[data-theme="dark"] .owner-edit-more > summary small,
html[data-theme="dark"] .owner-edit-more__grid small,
body.dark .owner-edit-choice__copy small,
body.dark .owner-edit-more > summary small,
body.dark .owner-edit-more__grid small { color: #b7bcc6; }

html[data-theme="dark"] .owner-edit-more__grid button,
body.dark .owner-edit-more__grid button { color: #f5f5f5; background: #222226; border-color: #3f3f46; }

html[data-sl-theme="dark"] body.owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active,
html[data-theme="dark"] body.owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active,
body.theme-dark.owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active {
  background: #30363d !important;
  border-color: rgba(255, 255, 255, .16) !important;
}

html[data-sl-theme="dark"] body.owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active > summary,
html[data-theme="dark"] body.owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active > summary,
body.theme-dark.owner-edit-mode.owner-edit-task-open details.card.acc[data-panel].is-active > summary {
  background: #252a30 !important;
  color: #f8fafc !important;
}

html[data-sl-theme="dark"] body.owner-edit-mode.owner-edit-task-open :is(.accTitle strong, .field label),
html[data-theme="dark"] body.owner-edit-mode.owner-edit-task-open :is(.accTitle strong, .field label),
body.theme-dark.owner-edit-mode.owner-edit-task-open :is(.accTitle strong, .field label) { color: #f8fafc !important; }

html[data-sl-theme="dark"] body.owner-edit-mode.owner-edit-task-open .accSub,
html[data-theme="dark"] body.owner-edit-mode.owner-edit-task-open .accSub,
body.theme-dark.owner-edit-mode.owner-edit-task-open .accSub { color: #cbd5df !important; }

html[data-sl-theme="dark"] body.owner-edit-mode.owner-edit-task-open details.mini,
html[data-theme="dark"] body.owner-edit-mode.owner-edit-task-open details.mini,
body.theme-dark.owner-edit-mode.owner-edit-task-open details.mini {
  background: #353c44 !important;
  border-color: rgba(255, 255, 255, .16) !important;
  box-shadow: none !important;
}

@media (forced-colors: active) {
  .owner-edit-choice,
  .owner-edit-more,
  .owner-edit-toolbar,
  .owner-card-intro { border: 1px solid CanvasText; box-shadow: none; }
}


/* Validation recovery is scoped to owner editing, not Create or Admin. */
.owner-edit-mode {
  --owner-error-ink: #9f1239;
  --owner-error-paper: #fff1f2;
  --owner-error-rule: #be123c;
}
.owner-edit-mode .owner-field-error,
.owner-edit-mode #result .owner-validation-link {
  color: var(--owner-error-ink) !important;
  background: var(--owner-error-paper) !important;
  border: 1px solid var(--owner-error-rule);
  border-radius: 8px;
  padding: .55rem .7rem;
  font-size: .9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.owner-edit-mode .owner-field-error { margin: .4rem 0 0; }
.owner-edit-mode #result .owner-validation-link { display: inline-block; text-decoration: underline; }
.owner-edit-mode [aria-invalid="true"] { border-color: var(--owner-error-rule) !important; }
.owner-edit-mode #result .owner-validation-link:focus-visible {
  outline: 2px solid var(--owner-error-ink);
  outline-offset: 2px;
}
html[data-sl-theme="dark"] .owner-edit-mode,
html[data-theme="dark"] .owner-edit-mode,
.owner-edit-mode.theme-dark {
  --owner-error-ink: #fecdd3;
  --owner-error-paper: #401d27;
  --owner-error-rule: #fda4af;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-sl-theme="light"]):not([data-theme="light"]):not(.theme-light) .owner-edit-mode {
    --owner-error-ink: #fecdd3;
    --owner-error-paper: #401d27;
    --owner-error-rule: #fda4af;
  }
}
@media (forced-colors: active) {
  .owner-edit-mode .owner-field-error,
  .owner-edit-mode #result .owner-validation-link {
    color: CanvasText !important;
    background: Canvas !important;
    border-color: Highlight !important;
  }
  .owner-edit-mode [aria-invalid="true"] { border-color: Highlight !important; }
}
