/* System-wide finishing layer: restrained editorial cards with clear data rhythm. */
body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) {
  --finish-ink: #204b4e;
  --finish-muted: #71817e;
  --finish-accent: #2f8f87;
  --finish-brass: #b07b2d;
  position: relative;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 22%, transparent) !important;
  border-radius: 10px;
  background:
    radial-gradient(circle at 96% 4%, transparent 0 14px, rgb(176 123 45 / 10%) 15px 16px, transparent 17px 31px),
    linear-gradient(140deg, rgb(252 250 242 / 95%), rgb(245 249 246 / 92%));
  box-shadow: 0 9px 22px rgb(27 69 67 / 7%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck)::after {
  position: absolute;
  z-index: 0;
  inset: 10px 10px auto auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(176 123 45 / 16%);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) > :is(h2,h3,h4,.panel-title,[data-card-title]) {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 0 0 11px;
  padding: 8px 11px 8px 13px;
  border-bottom: 1px solid color-mix(in srgb, var(--finish-accent) 22%, transparent);
  color: var(--finish-ink) !important;
  font-size: 15px;
  font-weight: 780;
  letter-spacing: .01em;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) > :is(h2,h3,h4,.panel-title,[data-card-title])::before {
  width: 3px;
  height: 20px;
  margin-right: 9px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--finish-brass), var(--finish-accent));
  content: "";
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(label.field > small,.field-label,.eyebrow,.overview-eyebrow) {
  color: var(--finish-muted) !important;
  font-size: 10px;
  letter-spacing: .055em;
  line-height: 1.2;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.metric,.kpi,.stat,.summary-value) strong {
  color: var(--finish-brass) !important;
  font-size: clamp(17px, 1.8vw, 25px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.metric,.kpi,.stat,.summary-value) {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 17%, transparent);
  border-radius: 7px;
  background: rgb(247 250 246 / 78%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.progress,.progress-bar,.meter,.bar-track,[role="progressbar"]) {
  min-height: 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 20%, transparent);
  border-radius: 99px;
  background: rgb(47 143 135 / 10%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.progress,.progress-bar,.meter,.bar-track,[role="progressbar"]) > * {
  min-height: inherit;
  border-radius: inherit;
  background: linear-gradient(90deg, #3cc8d5 0%, #52caa2 72%, #d6ae59 100%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.visualization,.chart,.chart-card,.sparkline,.bar-chart) {
  position: relative;
  min-width: 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 16%, transparent);
  border-radius: 8px;
  background: linear-gradient(180deg, rgb(248 251 247 / 90%), rgb(239 247 244 / 72%));
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.workbench-actions,.actions,.button-row) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(button.mini-action,.mini-action,.icon-button) {
  min-height: 31px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 25%, transparent);
  border-radius: 6px;
  color: var(--finish-ink) !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 3px 8px rgb(27 69 67 / 6%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(button.mini-action,.mini-action,.icon-button):hover {
  border-color: color-mix(in srgb, var(--finish-brass) 64%, transparent);
  color: #8a6227 !important;
  transform: translateY(-1px);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) .lucide {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
  vertical-align: -3px;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) {
  --finish-ink: #f4f0e6;
  --finish-muted: #b6c7c0;
  --finish-accent: #72c7bc;
  --finish-brass: #e0b86b;
  background:
    radial-gradient(circle at 96% 4%, transparent 0 14px, rgb(220 176 97 / 12%) 15px 16px, transparent 17px 31px),
    linear-gradient(140deg, rgb(8 39 44 / 94%), rgb(7 28 35 / 92%));
  box-shadow: 0 11px 24px rgb(0 0 0 / 18%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.metric,.kpi,.stat,.summary-value) {
  background: rgb(12 54 58 / 68%);
}

/* Reminder rows have a three-column grid. Keep the copy column wide enough for
   real long titles instead of allowing the action column to squeeze it into
   one-character vertical text. */
body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row {
  grid-template-columns: 4px minmax(0, 1fr) !important;
  align-items: start;
  gap: 10px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-copy {
  min-width: 0;
  width: auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-title-line {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-edit-target {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-edit-target strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-actions {
  grid-column: 2;
  width: auto;
  min-width: 0;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 5px;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row {
    grid-template-columns: 4px minmax(0, 1fr) !important;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) {
    border-radius: 8px;
    box-shadow: 0 6px 16px rgb(27 69 67 / 6%);
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) > :is(h2,h3,h4,.panel-title,[data-card-title]) {
    min-height: 35px;
    margin-bottom: 9px;
    padding: 7px 9px 7px 10px;
    font-size: 14px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.workbench-actions,.actions,.button-row) {
    justify-content: stretch;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.workbench-actions,.actions,.button-row) > :is(button,.mini-action,.icon-button) {
    flex: 1 1 auto;
  }
}
