/* Settings pages (ROLE-1, API-2, CAL-1). */
.settings-page { max-width: 960px; padding: var(--space-6); }
.settings-intro { font-size: 13px; line-height: 18px; color: var(--ink-muted); margin-top: var(--space-1); max-width: 640px; }
.settings-block + .settings-block { margin-top: var(--space-8); }
.settings-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
.settings-card { display: flex; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-raised); transition: background var(--duration-fast), border-color var(--duration-fast); }
.settings-card:hover { background: var(--surface-hover); border-color: var(--ink-faint); }
.settings-card .ico { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none;
  border-radius: var(--radius-sm); background: var(--surface-selected); color: var(--ink-secondary); }
.settings-card .t { display: block; font-weight: 500; color: var(--ink); }
.settings-card .d { display: block; font-size: 13px; line-height: 18px; color: var(--ink-muted); margin-top: 2px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); overflow: hidden; }
.panel .table th { position: static; }
.panel .table th:first-child, .panel .table td:first-child { padding-left: var(--space-4); }
.panel .table th:last-child, .panel .table td:last-child { padding-right: var(--space-4); }
.panel .table tbody tr:last-child td { border-bottom: 0; }
.panel-pad { padding: var(--space-4); }
.panel-foot { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border); background: var(--surface-sidebar); }
.panel-foot .field { flex: 1; min-width: 160px; }
.panel-foot .field > label { font-size: 12px; color: var(--ink-muted); }
.panel-foot .field-help { display: none; }
.inline-actions { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-1); }
.inline-actions form { display: inline-flex; margin: 0; }
.row-muted td { color: var(--ink-faint); }

/* Editable rows (stages, lost reasons): one form per row, laid out as a grid */
.erows { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); overflow: hidden; }
.erow { display: grid; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); margin: 0; }
.erow:last-child { border-bottom: 0; }
.erow.is-head { min-height: 36px; padding-top: 0; padding-bottom: 0; background: var(--surface-sidebar); font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.erow.is-new { background: var(--surface-sidebar); }
.erow.is-off .input { color: var(--ink-muted); }
.erow .input { min-height: 28px; font-size: 13px; }
.erow .num-input { text-align: right; }
.erow .meta { font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.erow .inline-actions { gap: 2px; }
.erows-stages .erow { grid-template-columns: 56px minmax(0, 1fr) 96px 120px 96px 132px; }
.erows-reasons .erow { grid-template-columns: 56px minmax(0, 1fr) 96px 212px; }
.updown { display: inline-flex; }
.updown .rl-iconbtn { width: 24px; height: 24px; }
.updown .rl-iconbtn:disabled { opacity: .3; cursor: default; }
.updown .rl-iconbtn:disabled:hover { background: transparent; color: var(--ink-muted); }
.copy-row { display: flex; gap: var(--space-2); align-items: stretch; margin-top: var(--space-3); }
.copy-row .secret { flex: 1; min-width: 0; }
.steps { margin: var(--space-2) 0 0; padding-left: 20px; font-size: 13px; line-height: 20px; color: var(--ink-secondary); }
@media (max-width: 760px) {
  .settings-page { padding: var(--space-4); }
  .erows-stages .erow, .erows-reasons .erow { grid-template-columns: minmax(0, 1fr); }
  .erow.is-head { display: none; }
}

/* Appointment booking (docs/appointment-booking.md): the editable-row grids */
.erows-offer .erow { grid-template-columns: 28px minmax(0, 1fr) 140px 120px; }
.erows-upcoming .erow { grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); }
.erows-mtypes .erow { grid-template-columns: minmax(0, 1fr) 120px 84px 96px 96px 150px; }
.erows-mail .erow { grid-template-columns: 150px 130px minmax(0, 1fr) 96px 72px; }
a.erow { text-decoration: none; color: inherit; }
a.erow:hover { background: var(--surface-hover); }
@media (max-width: 760px) {
  .erows-offer .erow, .erows-upcoming .erow, .erows-mtypes .erow, .erows-mail .erow {
    grid-template-columns: minmax(0, 1fr);
  }
}
