/* ==========================================================================
   Kineo — Design System
   ========================================================================== */

:root {
  /* Brand */
  --brand-900: #141414;
  --brand-800: #2a2a2a;
  --brand-700: #3a3a3a;
  --brand-600: #2a2a2a;
  --brand-100: #f0eeeb;
  --brand-050: #f7f6f4;

  /* Surfaces */
  --canvas: #f6f5f3;
  --surface: #ffffff;
  --surface-2: #f7f6f4;
  --border: #e6e4e1;
  --border-strong: #d4d1cc;

  /* Ink */
  --ink: #1c1c1c;
  --ink-soft: #3f3f3f;
  --muted: #5c5c5c;

  /* Semantic */
  --success: #1e8449;
  --success-bg: #e8f6ee;
  --success-border: #a9dfbf;
  --danger: #b03a2e;
  --danger-bg: #fdecea;
  --danger-border: #f5c6c2;
  --warning: #b9770e;
  --warning-bg: #fef6e0;
  --warning-border: #f5d78e;
  --info: #5c6570;
  --info-bg: #eef0f2;
  --info-border: #d5dbe0;
  --info-ink: #3e4650;
  --neutral: #5c5c5c;
  --neutral-bg: #f0eeeb;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-2: 0 12px 32px rgba(16, 24, 40, 0.18);

  /* Layout */
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --content-max: 1440px;
  --gutter: 24px;
  --control-h: 40px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; }
h1 { font-size: 24px; margin: 0; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }

p { margin: 0 0 10px; }

/* Focus management (WCAG 2.2 AA) */
:focus-visible {
  outline: 3px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  background: var(--brand-800);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* ==========================================================================
   Shell
   ========================================================================== */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--brand-900);
  color: #e7e7e7;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.2px;
}
.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--brand-600), var(--brand-800));
  display: grid;
  place-items: center;
  color: #fff;
  flex: 0 0 auto;
}
.sidebar-brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #a3a3a3;
  letter-spacing: 0.4px;
}

.sidebar-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #9a9a9a;
  padding: 14px 10px 6px;
}

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li { margin-bottom: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #e7e7e7;
  font-weight: 500;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.07); text-decoration: none; color: #fff; }
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-left-color: #f4f4f4;
}
.nav-item .icon { flex: 0 0 auto; opacity: 0.9; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  color: #e7e7e7;
  font-size: 13px;
}
.sidebar-user .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  flex: 0 0 auto;
}
.sidebar-user .who { min-width: 0; }
.sidebar-user .who strong { display: block; color: #fff; font-size: 13px; }
.sidebar-user .who span { color: #a3a3a3; font-size: 11px; }
.btn.btn-logout {
  width: 100%;
  margin-top: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e7e7e7;
  justify-content: center;
}
.btn.btn-logout:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.sidebar-footer .account-link {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e7e7e7;
}
.sidebar-footer .account-link:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.sidebar-footer .account-link.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.sidebar-brand-logo {
  display: block;
  background: var(--canvas);
  border-radius: 12px;
  padding: 10px 10px 8px;
  margin: 0 0 14px;
}
.sidebar-brand-logo:hover { text-decoration: none; }
.sidebar-brand-logo img {
  display: block;
  width: 82%;
  height: auto;
  max-height: 120px;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
}

.app-main { min-width: 0; display: flex; flex-direction: column; }

.sidebar-close { display: none; position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.12); border-color: transparent; color: #fff; }
.sidebar-close:hover { background: rgba(255,255,255,0.2); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.topbar-context { color: var(--muted); font-size: 13px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: var(--control-h);
  height: var(--control-h);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}

.content {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--gutter);
  padding-bottom: 56px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 40;
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }

@media (max-width: 1024px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    max-width: 84vw;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-2);
  }
  .sidebar.is-open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .sidebar-close { display: inline-flex; }
  .sidebar { padding-top: 56px; }
  .sidebar-brand-logo { padding: 8px; margin-bottom: 10px; }
  .sidebar-brand-logo img { width: 100%; max-height: 60px; }
}
@media (max-width: 480px) {
  .sidebar-brand-logo img { max-height: 52px; }
  .login-brand-logo img { max-height: 88px; }
}

/* ==========================================================================
   Page header
   ========================================================================== */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-head .page-title-block { min-width: 0; }
.page-head h1 { font-size: 24px; }
.page-head .page-subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-head .head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.breadcrumb { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb .sep { opacity: 0.6; }

/* ==========================================================================
   Cards and grids
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-1);
  margin-bottom: 18px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-title { font-size: 16px; font-weight: 700; margin: 0; }
.card > .card-title + .details,
.card > .card-title + .field { margin-top: 14px; }
.card-subtitle { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.card > .card-title + .card-subtitle { margin-top: 6px; }
.card > .card-subtitle + .row { margin-top: 14px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.charge-detail-panels { gap: 20px; }
.charge-detail-panels > .card { margin-bottom: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; margin-bottom: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-end { justify-content: flex-end; }

/* ==========================================================================
   KPI cards
   ========================================================================== */

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
}
.kpi .kpi-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 600;
}
.kpi .kpi-value { font-size: 30px; font-weight: 700; margin-top: 6px; color: var(--ink); line-height: 1; }
.kpi .kpi-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi.is-danger { border-left: 4px solid var(--danger); }
.kpi.is-warning { border-left: 4px solid var(--warning); }
.kpi.is-info { border-left: 4px solid var(--info); }
.kpi.is-success { border-left: 4px solid var(--success); }
.kpi.is-danger .kpi-value { color: var(--danger); }
.kpi.is-warning .kpi-value { color: var(--warning); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-h);
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--brand-800); border-color: var(--brand-800); color: #fff; }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }

.btn-danger { background: var(--surface); border-color: var(--danger-border); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--brand-600); }
.btn-ghost:hover { background: var(--brand-050); }

.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.section-follow { margin-top: 20px; }
.row-actions { display: inline-flex; align-items: center; gap: 4px; }
.btn-icon-danger { color: var(--danger, #7f2a21); }
.btn-icon-danger:hover { background: var(--danger-bg); }
.btn-block { width: 100%; }

.btn-icon {
  min-height: var(--control-h);
  width: var(--control-h);
  padding: 0;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand-600);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.link-btn:hover { text-decoration: underline; }

.actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline { display: inline; }

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  background: var(--neutral-bg);
  color: var(--neutral);
  white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.8; }

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral); }

.badge-link {
  text-decoration: none;
  cursor: pointer;
}
.badge-link:hover { filter: brightness(0.95); }

/* Status mapping */
.status-CLIENT { background: var(--brand-100); color: var(--brand-800); }
.status-WAITING_RETURN { background: var(--warning-bg); color: var(--warning); }
.status-NO_INTEREST { background: var(--danger-bg); color: var(--danger); }
.status-NO_ANSWER { background: #eceff1; color: #546e7a; }
.status-ACTIVE { background: var(--success-bg); color: var(--success); }
.status-INACTIVE { background: #f0f0f0; color: #6b7280; }
.status-SCHEDULED { background: var(--info-bg); color: var(--info); }
.status-ATTENDED { background: var(--success-bg); color: var(--success); }
.status-CANCELED { background: var(--danger-bg); color: var(--danger); }
.status-RESCHEDULED { background: var(--warning-bg); color: var(--warning); }
.status-REMOVED { background: #f0f0f0; color: #6b7280; }
.status-OPEN { background: var(--info-bg); color: var(--info); }
.status-OVERDUE { background: var(--danger-bg); color: var(--danger); }
.status-PAID { background: var(--success-bg); color: var(--success); }
.status-PENDING_SIGNATURE { background: var(--warning-bg); color: var(--warning); }
.status-SIGNED { background: var(--success-bg); color: var(--success); }
.status-CLOSED { background: #f0f0f0; color: #6b7280; }

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid transparent;
  margin-bottom: 16px;
}
.alert .icon { flex: 0 0 auto; margin-top: 1px; }
.alert-info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-ink); }
.alert-success { background: var(--success-bg); border-color: var(--success-border); color: #155f37; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); color: #7a4e08; }
.alert-error { background: var(--danger-bg); border-color: var(--danger-border); color: #7f2a21; }
.alert[hidden] { display: none; }

/* Notyf — toasts do sistema (ver app.js) */
.notyf { top: 16px !important; right: 16px !important; }
.notyf__toast { max-width: min(360px, calc(100vw - 32px)); box-shadow: var(--shadow-2); }
.notyf-kineo {
  border-radius: var(--radius-sm) !important;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 14px !important;
}
.notyf-kineo-success { border-color: var(--success-border); color: #155f37 !important; }
.notyf-kineo-error { border-color: var(--danger-border); color: #7f2a21 !important; }
.notyf-kineo-warning { border-color: var(--warning-border); color: #7a4e08 !important; }
.notyf-kineo-info { border-color: var(--info-border); color: var(--info-ink) !important; }
.notyf__dismiss-btn { color: inherit !important; opacity: 0.55; }
.notyf__dismiss-btn:hover { opacity: 1; }
.label-row { display: flex; align-items: center; gap: 6px; }
.help-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.help-toggle:hover,
.help-toggle:focus-visible {
  color: var(--brand-700);
  background: var(--brand-100);
  outline: none;
}
.modal-help-hint {
  width: min(480px, 92vw);
  max-height: min(88vh, 640px);
  margin: auto;
}
.modal-help-hint .modal-form {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 640px);
}
.help-hint-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-overflow-scrolling: touch;
}
.help-hint-body p { margin: 0 0 12px; }
.help-hint-body p:last-child { margin-bottom: 0; }
@media (max-width: 768px) {
  .help-toggle {
    width: 44px;
    height: 44px;
  }
  .modal-help-hint {
    width: min(480px, 100vw - 24px);
    max-height: 92vh;
  }
  .modal-help-hint::backdrop {
    background: rgba(20, 20, 20, 0.55);
  }
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.table-wrap > table { min-width: 560px; }

.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
#bulk-group-guide { margin-bottom: 12px; }
#bulk-group-panel { margin-bottom: 8px; }
#bulk-page-error span { white-space: pre-line; }
#bulk-page-success[hidden] { display: none; }
.bulk-history { margin-top: 16px; }
.bulk-history-entry {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.bulk-history-entry:first-child { border-top: 0; padding-top: 0; }
.bulk-history-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.bulk-history-meta strong { font-weight: 600; }
.bulk-history-names {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.bulk-history-names li { margin: 2px 0; }
.bulk-history-names a { color: inherit; text-decoration: underline; }
#bulk-group-panel[hidden] { display: none; }
#bulk-modal-contract[hidden] { display: none; }
.bulk-toolbar .checkbox { margin: 0; }
#bulk-group-hint { margin-top: 0; }
.modal-bulk { width: min(1080px, 96vw); max-height: 92vh; overflow: auto; }
.modal-bulk .modal-form { overflow: visible; max-height: none; }
.field-tip { position: relative; display: inline-flex; }
.field-tip-bubble {
  display: none;
  position: absolute;
  z-index: 4;
  left: 0;
  top: calc(100% + 6px);
  width: 280px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.45;
  color: var(--ink);
}
.field-tip:hover .field-tip-bubble,
.field-tip:focus-within .field-tip-bubble { display: block; }
.bulk-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 10px;
}
.bulk-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.bulk-field span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.bulk-field input { min-width: 0; }
.bulk-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
@media (max-width: 900px) {
  .bulk-toolbar { flex-direction: column; align-items: stretch; }
  .bulk-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}
.table thead th {
  background: var(--surface-2);
  color: var(--brand-800);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  position: sticky;
  top: 0;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--brand-050); }
.table.compact th, .table.compact td { padding: 9px 12px; font-size: 13px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.center { text-align: center; }

/* Mobile cards for lists */
.list-cards { display: none; }
@media (max-width: 768px) {
  .table-wrap.desktop-only { display: none; }
  .list-cards { display: grid; gap: 12px; }
}
.data-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-1);
}
.data-card .data-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.data-card .data-card-title { font-weight: 700; font-size: 15px; }
.data-card .data-card-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.data-card .data-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--ink-soft); }
.data-card .data-card-meta span { display: inline-flex; gap: 6px; align-items: center; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-section { margin-bottom: 22px; }
.form-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field .hint { font-size: 12px; color: var(--muted); }

input, select, textarea {
  width: 100%;
  min-height: var(--control-h);
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
}
textarea { min-height: 84px; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-600); outline: 3px solid var(--brand-100); outline-offset: 1px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { flex: 1 1 auto; }
}

.filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filters .field { margin-bottom: 0; min-width: 180px; }

.cep-lookup { display: flex; gap: 8px; align-items: center; }
.cep-lookup input { flex: 1; min-width: 0; }

.phone-field { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.phone-field input { flex: 1 1 180px; min-width: 0; }
.phone-field .checkbox { white-space: nowrap; }

.combobox { position: relative; }
.combobox-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(20, 24, 33, 0.12);
}
.combobox-list li {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.combobox-list li.is-active,
.combobox-list li:hover { background: var(--brand-100); }

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  min-height: var(--control-h);
}
.checkbox input { width: 20px; height: 20px; min-height: 0; flex: 0 0 auto; accent-color: var(--brand-800); }

/* ==========================================================================
   Details / definition lists
   ========================================================================== */

.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; }
.details .full { grid-column: 1 / -1; }
.details dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.details dd { margin: 3px 0 0; font-size: 14px; }
.details dd .client-name-list { margin-top: 4px; }
.client-name-list { list-style: none; margin: 0; padding: 0; }
.client-name-list li + li { margin-top: 6px; }
.client-name-list-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-title-block .client-name-list { margin-top: 6px; }
.page-title-block .client-name-list li { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
@media (max-width: 640px) { .details { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Empty / feedback
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted);
}
.empty-state .icon { color: var(--border-strong); margin-bottom: 8px; }
.empty-state strong { display: block; color: var(--ink-soft); margin-bottom: 2px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

/* ==========================================================================
   Dashboard (painel)
   ========================================================================== */

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.dashboard .page-head {
  margin-bottom: 0;
}
.dashboard-section {
  min-width: 0;
}
.dashboard .grid-4,
.dashboard .grid-2 {
  gap: 20px;
}
.dashboard .grid-4 > .kpi,
.dashboard .grid-2 > .card {
  margin-bottom: 0;
  height: 100%;
}
.dashboard .card-head > div:only-child {
  flex: 1 1 auto;
  min-width: 0;
}
.dashboard .card-head .card-title + .card-subtitle {
  margin-top: 4px;
}
.dashboard .card .empty-state {
  padding: 28px 16px;
}
.dashboard .card > .list-cards {
  margin-top: 4px;
}
@media (max-width: 768px) {
  .dashboard {
    gap: 22px;
  }
  .dashboard .grid-4,
  .dashboard .grid-2 {
    gap: 16px;
  }
}

/* ==========================================================================
   Dashboard chart
   ========================================================================== */

.chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chart-bar {
  height: 34px;
  width: 100%;
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.chart-seg { height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; min-width: 0; }
.chart-seg.open { background: var(--info); }
.chart-seg.overdue { background: var(--danger); }
.chart-seg.paid { background: var(--success); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-soft); }
.chart-legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.chart-legend .dot.open { background: var(--info); }
.chart-legend .dot.overdue { background: var(--danger); }
.chart-legend .dot.paid { background: var(--success); }

/* ==========================================================================
   Client detail section navigation
   ========================================================================== */

.section-nav {
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
  z-index: 10;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  margin-bottom: 18px;
}
.section-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
.section-nav a:hover { background: var(--brand-050); text-decoration: none; }
.section-nav a.is-active { background: var(--brand-800); color: #fff; }

.section-anchor { scroll-margin-top: calc(var(--topbar-h) + 72px); }

/* ==========================================================================
   Agenda
   ========================================================================== */

.agenda-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 18px;
}
.agenda-toolbar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.agenda-toolbar-filters {
  margin-left: auto;
  justify-content: flex-end;
}
.agenda-toolbar-filters .field {
  min-width: 0;
  margin-bottom: 0;
}
.agenda-filter-date {
  width: auto;
  min-width: 10.5rem;
  max-width: 11.5rem;
}
.agenda-filter-status {
  width: auto;
  min-width: 10rem;
  max-width: 13rem;
}
@media (max-width: 768px) {
  .agenda-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .agenda-toolbar-nav .btn { flex: 1 1 auto; }
  .agenda-toolbar-filters {
    margin-left: 0;
    justify-content: stretch;
  }
  .agenda-toolbar-filters .field {
    flex: 1 1 140px;
  }
  .agenda-filter-date,
  .agenda-filter-status {
    width: 100%;
    max-width: none;
  }
  .agenda-toolbar-filters > .btn {
    width: 100%;
  }
}
.agenda-toolbar .spacer { margin-left: auto; }

.admin-actions { margin-top: 14px; }
.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.admin-actions > .admin-action-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.admin-action-copy { flex: 1 1 220px; min-width: 0; }
.admin-action-copy strong { display: block; font-size: 14px; }
.admin-action-copy .small { margin-top: 4px; }

.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.segmented a { padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft); min-height: 38px; display: inline-flex; align-items: center; }
.segmented a:hover { background: var(--surface-2); text-decoration: none; }
.segmented a.is-active { background: var(--brand-800); color: #fff; }

.routine-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.reschedule-datetime-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.reschedule-datetime-input {
  width: auto;
  flex: 0 1 auto;
  max-width: 210px;
  min-width: 168px;
}
.reschedule-datetime-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
@media (max-width: 640px) {
  .reschedule-datetime-input { max-width: 100%; flex: 1 1 100%; min-width: 0; }
  .reschedule-datetime-actions { flex: 1 1 100%; }
}
.routine-feedback { display: grid; gap: 8px; margin-top: 14px; }
.routine-feedback-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
}
.routine-feedback-item.is-ok { background: var(--success-bg); }
.routine-feedback-item.is-full { background: var(--danger-bg); }
.routine-feedback-item .checkbox { margin: 0; }
.routine-week-wrap { overflow-x: auto; }
.routine-week-grid { width: 100%; border-collapse: separate; border-spacing: 0; }
.routine-week-grid th, .routine-week-grid td { border-bottom: 1px solid var(--border); padding: 4px; vertical-align: top; font-size: 12px; }
.routine-week-grid thead th { position: sticky; top: 0; background: var(--surface); color: var(--brand-800); font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; text-align: center; }
.routine-week-grid .hour { color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 8px; }
.routine-week-slot { min-width: 88px; min-height: 36px; border-radius: 6px; padding: 4px 6px; display: flex; flex-direction: column; gap: 2px; }
.routine-week-slot.is-empty { color: var(--muted); }
.routine-week-slot.is-busy { background: var(--info-bg); color: var(--info-ink); }
.routine-week-slot.is-full { background: var(--danger-bg); color: #7f2a21; }
.routine-week-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.routine-week-names { font-size: 11px; line-height: 1.3; }

.agenda { width: 100%; border-collapse: separate; border-spacing: 0; }
.agenda th, .agenda td { border-bottom: 1px solid var(--border); padding: 6px 8px; vertical-align: top; font-size: 12px; }
.agenda thead th {
  background: var(--surface-2);
  color: var(--brand-800);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
  position: sticky;
  top: 0;
  text-align: center;
}
.agenda thead th.today { background: var(--brand-100); color: var(--brand-900); }
.agenda .hour { color: var(--muted); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.agenda td.slot { min-width: 92px; height: 46px; }
.today-col { background: rgba(28, 28, 28, 0.04); }

.agenda-item {
  display: block;
  font-size: 11.5px;
  padding: 5px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  background: var(--info-bg);
  color: var(--info-ink);
  border-left: 3px solid var(--info);
  font-weight: 600;
}
.agenda-item.status-ATTENDED { background: var(--success-bg); color: #155f37; border-left-color: var(--success); }
.agenda-item.status-CANCELED { background: var(--danger-bg); color: #7f2a21; border-left-color: var(--danger); text-decoration: line-through; }
.agenda-item.status-RESCHEDULED { background: var(--warning-bg); color: #7a4e08; border-left-color: var(--warning); }

.agenda-mobile-list { display: none; }
@media (max-width: 768px) {
  .agenda-desktop { display: none; }
  .agenda-mobile-list { display: grid; gap: 10px; }
}

/* ==========================================================================
   Login
   ========================================================================== */

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #f0eeeb 0%, var(--canvas) 55%);
}
.powered-by {
  display: flex;
  justify-content: center;
  padding: 8px var(--gutter) 16px;
}
.login-wrap .powered-by { padding: 0; }
.powered-by a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  opacity: 0.78;
  transition: opacity 0.15s ease, filter 0.15s ease;
}
.powered-by a:hover { opacity: 0.92; text-decoration: none; }
.powered-by-label { line-height: 1; }
.powered-by img {
  display: block;
  height: 13px;
  width: auto;
  max-width: 88px;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.35);
}
.powered-by a:hover img { filter: grayscale(100%) brightness(0.5); }
.sidebar-footer .powered-by {
  padding: 14px 0 2px;
  margin-top: 2px;
}
.sidebar-footer .powered-by a {
  color: #a3a3a3;
  opacity: 0.72;
}
.sidebar-footer .powered-by a:hover { opacity: 0.9; }
.sidebar-footer .powered-by img {
  filter: grayscale(100%) brightness(0) invert(1);
  opacity: 0.55;
}
.sidebar-footer .powered-by a:hover img { filter: grayscale(100%) brightness(0) invert(1); opacity: 0.75; }
.login-remember {
  margin: 2px 0 4px;
  font-size: 14px;
  color: var(--muted);
  min-height: 44px;
  align-items: center;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-2);
}
.login-brand { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 6px; }
.login-brand.login-brand-logo { display: block; margin: 0 auto 8px; max-width: 220px; }
.login-brand-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: contain;
  object-position: center;
}
.login-brand .logo-mark { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(140deg, var(--brand-600), var(--brand-800)); display: grid; place-items: center; color: #fff; }
.login-title { font-size: 24px; text-align: center; margin: 8px 0 2px; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }

/* ==========================================================================
   Utilities
   ========================================================================== */

.icon { width: 18px; height: 18px; stroke-width: 2; display: inline-block; vertical-align: middle; }
.icon-lg { width: 22px; height: 22px; }
.icon-sm { width: 15px; height: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.section-title { font-size: 16px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }

/* ==========================================================================
   Responsive content
   ========================================================================== */

@media (max-width: 768px) {
  :root { --gutter: 16px; }
  .content { padding: 16px; padding-bottom: 48px; }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar-context { display: none; }
  .page-head h1 { font-size: 21px; }
  .page-head .head-actions { width: 100%; }
  .page-head .head-actions .btn { flex: 1 1 auto; }
  .card { padding: 15px; }
}

/* Links de evento na agenda e cards clicaveis */
a.agenda-item { text-decoration: none; }
a.agenda-item:hover { filter: brightness(0.96); text-decoration: none; }
a.data-card { text-decoration: none; color: inherit; }
a.data-card:hover { border-color: var(--brand-600); box-shadow: var(--shadow-2); text-decoration: none; }
a.data-card:hover .data-card-title { color: var(--brand-600); }

/* Abas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 18px 0; overflow-x: auto; }
.tab { background: none; border: none; border-bottom: 3px solid transparent; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand-800); border-bottom-color: var(--brand-800); }
.tab-panel { margin-top: 4px; }
.tab-panel[hidden] { display: none; }

/* Modal */
.modal { border: none; border-radius: var(--radius-lg); padding: 0; width: min(460px, 92vw); box-shadow: var(--shadow-2); color: var(--ink); }
.modal.modal-bulk { width: min(1080px, 96vw); max-height: 92vh; overflow: auto; }
.modal::backdrop { background: rgba(20, 20, 20, 0.5); }
.modal-form { padding: 20px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.modal-email-preview { width: min(720px, 94vw); }
.email-preview-frame {
  display: block;
  width: 100%;
  height: min(70vh, 520px);
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.branding-preview {
  display: block;
  max-width: 220px;
  max-height: 80px;
  object-fit: contain;
  margin-top: 8px;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.branding-preview-signature { max-width: 280px; max-height: 88px; }
.branding-upload-block { min-width: 0; }

.message-share-module {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.message-share-module-first {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.message-share-module-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}
.message-share-columns { margin-top: 12px; }
.message-share-channel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.message-share-channel .field { flex: 1; display: flex; flex-direction: column; margin: 0; }
.message-share-channel .message-template-textarea { flex: 1; min-height: 200px; }
.message-share-channel-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-700);
}
.message-template-textarea {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.message-template-legend {
  margin: 0;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.message-template-legend-title {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--text);
}
.message-template-legend-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.message-template-legend-list code {
  font-size: 11px;
}
.message-template-legend-sep {
  margin: 0 0.25em;
  color: var(--text-muted);
}
.message-template-legend-example {
  display: block;
  margin-top: 1px;
  padding-left: 0.15em;
  font-style: italic;
}
.message-share-channel .message-template-legend + .field {
  margin-top: 6px;
}
.message-share-email-preview {
  align-self: flex-start;
  margin-top: 4px;
}
.field.full .message-template-legend {
  margin-bottom: 8px;
}

/* Dropdown de acoes */
.dropdown { position: relative; display: inline-block; }
.dropdown > summary.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown[open] > summary { background: var(--surface-2); }
.dropdown-menu { position: absolute; right: 0; top: 100%; min-width: 220px; max-width: min(360px, 80vw); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-2); list-style: none; margin: 6px 0 0; padding: 6px; z-index: 30; }
.dropdown-menu .link-btn { white-space: normal; line-height: 1.35; }
.dropdown-menu li { margin: 0; }
.dropdown-menu a, .dropdown-menu .link-btn { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 500; }
.dropdown-menu a:hover, .dropdown-menu .link-btn:hover { background: var(--brand-050); text-decoration: none; }
.dropdown-menu button[disabled], .dropdown-menu button[disabled]:hover { opacity: 0.45; cursor: not-allowed; background: transparent; }
.dropdown-menu .link-btn.text-danger { color: var(--danger); font-weight: 500; }
.dropdown-menu .link-btn.text-danger:hover { background: var(--danger-050, #fef2f2); }
.table td .dropdown-row { vertical-align: middle; }
.person-check { width: 36px; text-align: center; }
.change-list { margin: 0; padding-left: 16px; }
.change-list li { margin: 0 0 2px; font-size: 13px; }

.help-daily { margin-bottom: 28px; }
.help-daily .card-subtitle { margin-bottom: 14px; }
.help-daily-path {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: help-daily-step;
}
.help-daily-path > li + li { border-top: 1px solid var(--border); }
.help-daily-path a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  color: inherit;
  text-decoration: none;
}
.help-daily-path a::before {
  counter-increment: help-daily-step;
  content: counter(help-daily-step);
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--brand-050);
  color: var(--ink-soft);
}
.help-daily-path-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
.help-daily-path-text span { color: var(--muted); font-size: 13px; }
.help-daily-path a:hover .help-daily-path-text strong { text-decoration: underline; }
.help-daily-chevron { flex: 0 0 auto; color: var(--muted); }
.help-section-head {
  margin: 0 0 16px;
}
.help-section-head .form-section-title { margin: 0 0 4px; }
.help-modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.help-module .card-subtitle { margin-bottom: 12px; }
.help-module .card-title { font-size: 16px; }
.help-links { list-style: none; margin: 0; padding: 0; }
.help-links li + li { border-top: 1px solid var(--border); }
.help-links a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 2px;
  color: inherit;
  text-decoration: none;
}
.help-links a:hover strong { text-decoration: underline; }
.help-links span { color: var(--muted); font-size: 13px; }
.help-kicker { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.help-kicker a { color: inherit; }
.help-steps-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.help-part-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.help-steps-block-title {
  font-size: 16px;
  margin: 0;
}
.help-block-label {
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.help-steps-block .help-steps,
.help-steps-block .help-details {
  margin: 0;
  padding: 4px 8px 4px 28px;
}
.help-steps {
  margin: 0;
  padding: 8px 22px 8px 42px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.help-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
}
.help-steps li,
.help-details li { padding-left: 4px; }
.help-ui {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  font-weight: 600;
  font-size: 0.95em;
  line-height: 1.5;
  white-space: nowrap;
}
.help-part-counter {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--muted);
}
.help-required {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
}
.help-required-label {
  margin-right: 4px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.help-topics { margin: 0; }
.help-topic {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
}
.help-topic + .help-topic { border-top: 1px solid var(--border); }
.help-topic dt { font-weight: 650; }
.help-topic dd { margin: 0; }
.help-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: inherit;
  text-decoration: none;
}
.help-next:hover strong { text-decoration: underline; }
.help-next-text { display: flex; flex-direction: column; gap: 2px; }
.help-next-label { font-size: 12px; color: var(--muted); }
.help-related { margin-top: 18px; }
@media (max-width: 640px) {
  .help-part-head { flex-direction: column; align-items: flex-start; }
  .help-topic { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 768px) {
  .help-modules { grid-template-columns: minmax(0, 1fr); }
}
