/* Visual-only polish for product stabilization additions. */

/* Keep the topbar date visually identical to the old text while preserving click affordance. */
.topbar-date-link {
  padding: 2px 3px;
  margin: -2px -3px;
  border-radius: 6px;
}

/* Sidebar: one stable affordance on the rail edge in both states. */
.sidebar {
  overflow: visible;
}
.sidebar-brand-row .sidebar-collapse-toggle,
.app.sidebar-collapsed .sidebar-brand-row .sidebar-collapse-toggle {
  position: absolute;
  z-index: 6;
  top: 24px;
  right: -16px;
  left: auto;
  width: 32px;
  height: 32px;
  min-height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-solid);
  color: var(--muted);
  box-shadow: 0 2px 10px rgb(0 0 0 / 8%);
}
.sidebar-brand-row .sidebar-collapse-toggle:hover,
.sidebar-brand-row .sidebar-collapse-toggle:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border-strong));
  background: var(--surface-solid);
  color: var(--accent);
  outline: none;
}
.app.sidebar-collapsed .navigation {
  margin-top: 0;
}

/* Calendar: preserve the symmetric month header and move quick dates to a secondary row. */
.calendar-toolbar {
  margin-bottom: 8px;
}
.calendar-quick-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  margin: 0 0 14px;
}
.calendar-quick-nav .button {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}

/* Finance: the inline category action must not change the closed form geometry. */
.finance-entry-form-v5 .finance-field-category_id {
  position: relative;
}
.finance-entry-form-v5 .finance-field-category_id > span {
  padding-right: 132px;
}
.button.finance-new-category-toggle {
  position: absolute;
  top: 0;
  right: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}
.button.finance-new-category-toggle:hover,
.button.finance-new-category-toggle:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  text-decoration: underline;
  outline: none;
}
.finance-inline-category {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

/* Starter Pack: one container layer, quiet actions inside. */
.starter-pack {
  margin-bottom: 0;
}
.starter-pack .card-header {
  min-height: 46px;
  padding: 10px 16px 6px;
  border-bottom: 0;
}
.starter-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 4px 12px 12px;
}
.starter-row {
  grid-template-columns: 22px minmax(0, 1fr) 16px;
  gap: 7px;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  line-height: 1.3;
}
.starter-row + .starter-row {
  border-left: 1px solid var(--border);
  border-radius: 0;
}
.starter-row:hover,
.starter-row:focus-visible {
  border-color: transparent;
  background: var(--surface-2);
  outline: none;
}
.starter-check {
  font-size: 17px;
}
.starter-arrow {
  font-size: 18px;
}
.starter-pack-compact .card-header {
  min-height: 42px;
  border-bottom: 0;
  padding-block: 8px;
}
.starter-pack-compact .card-header h2 {
  font-size: 13px;
}

/* Dashboard empty states: compact, quiet, and action-oriented. */
.dashboard-grid .agenda-list {
  min-height: 0;
}
.dashboard-empty-state-compact {
  min-height: 0 !important;
  padding: 26px 18px 24px;
  gap: 4px;
  align-content: center;
}
.dashboard-empty-state-compact .dashboard-calendar-empty-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  border-radius: 9px;
  font-size: 15px;
}
.dashboard-empty-state-compact strong {
  font-size: 14px;
  font-weight: 650;
}
.dashboard-empty-state-compact > span:not(.empty-icon) {
  max-width: 280px;
  font-size: 11px;
  line-height: 1.4;
}
.dashboard-empty-state-compact .dashboard-plan-day {
  min-height: 32px;
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
}

/* Daily goal: avoid a card-inside-a-card empty state. */
.dashboard-goal-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.dashboard-goal-empty > div {
  min-width: 0;
  order: 1;
}
.dashboard-goal-empty .dashboard-add-goal {
  order: 2;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 12px;
}
.dashboard-goal-empty strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.dashboard-goal-empty .muted {
  display: none;
}

/* Kaizen / Development: daily action first, progress second, reflection last. */
.kaizen-polished .kaizen-polished-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 18px;
  align-items: start;
}
.kaizen-polished .kaizen-primary-stack,
.kaizen-polished .kaizen-insights {
  gap: 14px;
}
.kaizen-polished .kaizen-goal-card .card-header,
.kaizen-polished .kaizen-habit-card .card-header,
.kaizen-polished .kaizen-reflection-card .card-header {
  min-height: 50px;
  padding: 12px 18px;
}
.kaizen-polished .kaizen-goal-card .card-body,
.kaizen-polished .kaizen-habit-card .card-body {
  padding: 15px 18px 17px;
}
.kaizen-polished .kaizen-goal-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.kaizen-polished .kaizen-goal-input {
  min-width: 0;
}
.kaizen-polished .kaizen-goal-input > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.kaizen-polished .kaizen-goal-save {
  width: auto;
  min-width: 116px;
  min-height: 40px;
  padding-inline: 18px;
}
.kaizen-polished .kaizen-current-goal {
  margin-top: 12px !important;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
}
.kaizen-polished .kaizen-habit-card .habit-lead {
  max-width: 680px;
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
}
.kaizen-polished .kaizen-habit-start {
  gap: 10px;
}
.kaizen-polished .kaizen-habit-start-action {
  width: auto;
  min-width: 148px;
  align-self: flex-start;
  padding-inline: 18px;
}
.kaizen-polished .kaizen-habit-card .habit-progress {
  margin-bottom: 12px;
}
.kaizen-polished .kaizen-habit-card .habit-progress-bar {
  height: 8px;
}
.kaizen-polished .kaizen-habit-checkin {
  width: auto;
  min-width: 150px;
}
.kaizen-polished .kaizen-habit-card .habit-finish {
  margin-top: 10px;
  padding-inline: 0;
  border-color: transparent;
  color: var(--muted);
}
.kaizen-polished .kaizen-habit-card .habit-finish:hover {
  background: transparent;
  color: var(--danger);
  text-decoration: underline;
  transform: none;
}
.kaizen-polished .kaizen-insights .kaizen-streak-card {
  padding: 18px 20px;
  border-color: color-mix(in srgb, var(--accent) 18%, var(--border));
  box-shadow: none;
}
.kaizen-polished .kaizen-insights .kaizen-streak-card .metric-value {
  margin-top: 2px;
  font-size: 28px;
}
.kaizen-polished .kaizen-week-card .card-body {
  padding: 14px 16px 16px;
}
.kaizen-polished .kaizen-week-card .week-strip {
  gap: 6px;
}
.kaizen-polished .kaizen-week-card .week-day {
  min-width: 0;
  padding-inline: 5px;
}
.kaizen-polished .kaizen-reflection-wide {
  grid-column: 1 / -1;
}
.kaizen-polished .kaizen-reflection-card .card-header {
  border-bottom: 0;
  padding-bottom: 6px;
}
.kaizen-polished .kaizen-reflection-card .card-body {
  padding: 6px 18px 18px;
}
.kaizen-polished .kaizen-reflection-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.kaizen-polished .kaizen-reflection-form > label.span-2 {
  grid-column: auto;
}
.kaizen-polished .kaizen-reflection-form textarea {
  min-height: 104px;
  max-height: 220px;
}
.kaizen-polished .kaizen-reflection-form .kaizen-reflection-save.span-2 {
  grid-column: 2;
  justify-self: end;
  width: auto;
  min-width: 158px;
  padding-inline: 18px;
}

@media (max-width: 1050px) {
  .sidebar-brand-row .sidebar-collapse-toggle,
  .app.sidebar-collapsed .sidebar-brand-row .sidebar-collapse-toggle {
    display: none;
  }
  .kaizen-polished .kaizen-polished-layout {
    grid-template-columns: minmax(0, 1fr) minmax(270px, .58fr);
  }
}

@media (max-width: 900px) {
  .calendar-quick-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .calendar-quick-nav .button {
    min-width: 0;
    padding-inline: 8px;
  }
  .starter-list {
    grid-template-columns: 1fr;
  }
  .starter-row + .starter-row {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .dashboard-goal-empty {
    grid-template-columns: 1fr;
  }
  .dashboard-goal-empty .dashboard-add-goal {
    justify-self: start;
  }
  .kaizen-polished .kaizen-polished-layout {
    grid-template-columns: 1fr;
  }
  .kaizen-polished .kaizen-reflection-wide {
    grid-column: 1;
  }
}

@media (max-width: 700px) {
  .kaizen-polished .kaizen-goal-form,
  .kaizen-polished .kaizen-reflection-form {
    grid-template-columns: 1fr;
  }
  .kaizen-polished .kaizen-goal-save,
  .kaizen-polished .kaizen-reflection-form .kaizen-reflection-save.span-2 {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
  }
  .kaizen-polished .kaizen-habit-start-action,
  .kaizen-polished .kaizen-habit-checkin {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .finance-entry-form-v5 .finance-field-category_id > span {
    padding-right: 116px;
  }
  .button.finance-new-category-toggle {
    font-size: 10px;
  }
}
