:root {
  --bg: #f3f6fc;
  --surface: #ffffff;
  --surface-2: #f5f8fd;
  --ink: #12203a;
  --muted: #5f6f88;
  --border: #d7e0ef;
  --primary: #1f6fff;
  --primary-dark: #0d4fd6;
  --primary-soft: #e8f1ff;
  --accent: #18a999;
  --nav: #001a6d;
  --nav-2: #002788;
  --success: #15803d;
  --success-bg: #e9f8ee;
  --warning: #b45309;
  --warning-bg: #fff4df;
  --danger: #c93636;
  --danger-bg: #fdecec;
  --info: #1f6fff;
  --info-bg: #e8f1ff;
  --shadow: 0 10px 30px rgba(0, 26, 109, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); transition: grid-template-columns .2s ease; }
.app-shell.sidebar-collapsed { grid-template-columns: 84px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  background: linear-gradient(180deg, var(--nav), #001040 100%);
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow-y: auto;
  overflow-x: visible;
  transition: width .2s ease, padding .2s ease;
}
.app-shell.sidebar-collapsed .sidebar {
  width: 84px;
  padding: 18px 10px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; position: relative; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 800; letter-spacing: .04em;
  background: linear-gradient(145deg, #7eb6ff 0%, #1f6fff 48%, #0d4fd6 100%);
  box-shadow: 0 9px 24px rgba(31,111,255,.38);
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-text { min-width: 0; flex: 1; }
.brand strong { display: block; font-size: 16px; }
.brand span { display: block; color: #adb4d3; font-size: 11px; margin-top: 3px; }
.sidebar-toggle {
  border: 0;
  background: rgba(255,255,255,.08);
  color: #c9cfe8;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.16); color: #fff; }
.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .sidebar-footer p,
.app-shell.sidebar-collapsed .storage-indicator div,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .area-switch {
  display: none;
}
.app-shell.sidebar-collapsed .brand { justify-content: center; padding: 0 0 16px; gap: 0; }
.app-shell.sidebar-collapsed .brand-mark { width: 42px; height: 42px; }
.app-shell.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  right: -6px;
  top: 8px;
  width: 22px;
  height: 22px;
  font-size: 12px;
}

.area-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; background: rgba(255,255,255,.06); border-radius: 12px; margin: 0 4px 18px; }
.area-button { border: 0; border-radius: 9px; color: #afb6d4; background: transparent; padding: 9px 6px; font-size: 12px; font-weight: 700; }
.area-button.active { color: #fff; background: var(--primary); box-shadow: 0 5px 14px rgba(31,111,255,.35); }

.nav-list { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  border: 0; background: transparent; color: #b7bdd7; text-align: left;
  padding: 11px 12px; border-radius: 10px; display: flex; gap: 11px; align-items: center;
  font-size: 14px; transition: .15s ease;
  text-decoration: none; cursor: pointer; width: 100%; box-sizing: border-box;
  position: relative;
}
.nav-icon { width: 18px; text-align: center; opacity: .9; flex: 0 0 auto; }
.nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active, .nav-item[aria-current="page"] { color: #fff; background: var(--nav-2); box-shadow: inset 3px 0 0 #7eb6ff; }
.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
  gap: 0;
}
.app-shell.sidebar-collapsed .nav-item:hover::after,
.app-shell.sidebar-collapsed .nav-item:focus-visible::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--nav);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
  z-index: 60;
  pointer-events: none;
}

.sidebar-footer { margin-top: auto; padding: 16px 8px 0; color: #a8afca; font-size: 11px; }
.storage-indicator { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.04); }
.app-shell.sidebar-collapsed .storage-indicator { justify-content: center; padding: 10px; }
.storage-indicator strong, .storage-indicator small { display: block; }
.storage-indicator strong { color: #fff; font-size: 12px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #33d17a; box-shadow: 0 0 0 4px rgba(51,209,122,.14); }
.sidebar-footer p { line-height: 1.45; margin: 10px 2px 0; }

.main-content { grid-column: 2; min-width: 0; }
.topbar {
  min-height: 94px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--border);
  padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px);
}
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.eyebrow { margin: 0 0 4px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .11em; }
h1 { font-size: 24px; margin: 0; letter-spacing: -.02em; }
.subtitle { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.month-control, .period-type-control { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.month-control input { height: 40px; min-width: 142px; }
.period-type-control select { height: 40px; min-width: 92px; }
.inactive-filter { position: relative; }
.filter-button { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--muted); font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: .15s ease; }
.filter-button:hover, .filter-button:focus-visible, .filter-button.is-filtered { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); outline: none; }
.filter-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.filter-chevron { margin-left: 1px; font-size: 16px; line-height: 1; transform: translateY(-1px); }
.filter-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; width: 360px; padding: 0; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.98); box-shadow: 0 16px 36px rgba(0, 26, 109,.16); overflow: hidden; }
.filter-menu-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.filter-menu-header strong { font-size: 15px; color: var(--ink); }
.filter-menu-close { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.filter-menu-close:hover { background: var(--surface-2); color: var(--ink); }
.filter-menu-title { margin: 12px 16px 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.filter-period-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 4px;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.filter-field span { letter-spacing: .02em; }
.filter-field select,
.filter-field input {
  height: 38px;
  width: 100%;
  min-width: 0;
}
.filter-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 2px 16px 4px;
}
.filter-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  user-select: none;
}
.filter-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.filter-chip:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: var(--primary-soft);
}
.filter-chip:has(input:checked),
.filter-chip:has(input:focus-visible) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent);
}
.filter-chip:has(input:focus-visible) {
  outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent);
  outline-offset: 1px;
}
.filter-menu-note { margin: 10px 16px 0; padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; line-height: 1.4; }
.filter-menu-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 16px; margin-top: 8px; border-top: 1px solid var(--border); background: var(--surface-2); }
.filter-clear-btn { border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 0; }
.filter-clear-btn:hover { text-decoration: underline; }
.toggle-control { height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 10px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.toggle-control input { accent-color: var(--primary); }

.page-content { padding: 24px 28px 72px; max-width: 1600px; margin: 0 auto; }
.page-stack { display: flex; flex-direction: column; gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.card-header h2, .section-heading h2 { margin: 0; font-size: 17px; }
.card-header p, .section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.section-heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(145px, 1fr)); gap: 14px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 17px; box-shadow: var(--shadow); min-width: 0; }
.kpi-card .kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 13px; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.kpi-label { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { display: block; font-size: 27px; margin: 6px 0 2px; line-height: 1; }
.kpi-note { color: var(--muted); font-size: 11px; }
button.kpi-card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  position: relative;
}
button.kpi-card:hover,
button.kpi-card:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: 0 8px 22px rgba(37, 43, 92, .08);
  outline: none;
}
button.kpi-card:active { transform: translateY(1px); }
button.kpi-card.is-empty { cursor: default; opacity: .85; }
button.kpi-card.is-empty:hover { border-color: var(--border); box-shadow: var(--shadow); transform: none; }
button.kpi-card:not(.is-clickable) { cursor: default; }
button.kpi-card:not(.is-clickable):hover { border-color: var(--border); box-shadow: var(--shadow); transform: none; }
.kpi-report-hint {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
  background: var(--primary-soft);
  text-transform: lowercase;
}
.card-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chart-sort-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  min-width: 150px;
}
.chart-sort-control select { height: 34px; min-width: 150px; }

.chart-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.chart-card { grid-column: span 6; min-height: 350px; }
.chart-card.wide { grid-column: span 8; }
.chart-card.narrow { grid-column: span 4; }
.chart-wrap { position: relative; min-height: 270px; width: 100%; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; max-height: none; }
.chart-wrap.is-person-chart { min-height: 320px; }
.topbar-actions .metrics-sort-control { min-width: 180px; }
.topbar-actions .metrics-sort-control select { width: 100%; }

.table-card { padding: 0; overflow: hidden; }
.table-card .card-header { padding: 20px 20px 0; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: var(--muted); background: var(--surface-2); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; padding: 12px 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid #edf0f5; vertical-align: top; }
tbody tr:hover { background: #fafbff; }
tbody tr:last-child td { border-bottom: 0; }
.table-actions { display: flex; gap: 5px; white-space: nowrap; }
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.table-tools input, .table-tools select { min-width: 170px; }

.button {
  min-height: 40px; border-radius: 10px; border: 1px solid transparent; padding: 9px 14px;
  font-size: 12px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: .15s ease;
}
.button.primary { color: #fff; background: var(--primary); }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { color: var(--ink); background: #fff; border-color: var(--border); }
.button.secondary:hover { border-color: #b8bfcc; background: var(--surface-2); }
.button.ghost { color: var(--muted); background: transparent; border-color: transparent; }
.button.danger { color: var(--danger); background: var(--danger-bg); border-color: #f6caca; }
.button.small { min-height: 30px; padding: 5px 9px; font-size: 11px; border-radius: 8px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }

input, select, textarea {
  width: 100%; border: 1px solid #ccd3df; background: #fff; color: var(--ink); border-radius: 9px;
  padding: 10px 11px; outline: none; transition: .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,111,255,.12); }
textarea { resize: vertical; min-height: 85px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: #3b4558; }
.field small { color: var(--muted); font-weight: 400; line-height: 1.4; }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.field-compact { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 88px; }
.field-compact .input-compact { width: 72px; min-width: 72px; text-align: center; padding: 8px 6px; }
.routine-ad-row { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.routine-ad-row .field-grow { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.routine-ad-row .field-grow input { width: 100%; }
.span-12 { grid-column: span 12; }.span-8 { grid-column: span 8; }.span-6 { grid-column: span 6; }.span-4 { grid-column: span 4; }.span-3 { grid-column: span 3; }.span-2 { grid-column: span 2; }
.form-section { grid-column: span 12; padding-top: 6px; }
.form-section h3 { margin: 0 0 4px; font-size: 14px; }
.form-section p { margin: 0; color: var(--muted); font-size: 11px; }
.form-divider { grid-column: span 12; height: 1px; background: var(--border); margin: 4px 0; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 99px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge.success { color: var(--success); background: var(--success-bg); }
.badge.warning { color: var(--warning); background: var(--warning-bg); }
.badge.danger { color: var(--danger); background: var(--danger-bg); }
.badge.info { color: var(--primary-dark); background: var(--primary-soft); }
.badge.neutral { color: #566174; background: #eef1f5; }
.badge.purple { color: var(--primary-dark); background: var(--primary-soft); }

.empty-state { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-state .empty-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); font-size: 24px; }
.empty-state h3 { color: var(--ink); margin: 0 0 6px; }
.empty-state p { margin: 0 auto 16px; max-width: 480px; line-height: 1.5; }

.filters-bar { display: grid; grid-template-columns: minmax(180px, 1.4fr) repeat(2, minmax(140px, .8fr)) auto; gap: 10px; align-items: end; }
.filters-bar label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--muted); font-weight: 700; }

.rank-period-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: end;
  padding: 0 0 14px;
  margin: 0 0 4px;
  border-bottom: 1px solid var(--border);
}
.rank-period-bar label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  min-width: 140px;
}
.rank-period-bar select,
.rank-period-bar input {
  height: 36px;
  min-width: 150px;
}
.rank-period-bar .rank-period-note {
  flex: 1 1 220px;
  align-self: center;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.collaborator-grid { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 14px; }
.pending-collaborator-grid { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; }
.person-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.person-card.is-pending { border-style: dashed; background: color-mix(in srgb, var(--warning, #e59a22) 6%, #fff); }
.person-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.person-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-identity > div:last-child { min-width: 0; }
.avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-weight: 850; overflow: hidden; flex: 0 0 auto; }
.avatar.is-lg { width: 52px; height: 52px; border-radius: 16px; }
.avatar.has-photo { padding: 0; background: var(--surface-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-name { margin: 0 0 2px; font-size: 14px; line-height: 1.25; }
.person-identity .person-name { margin-top: 0; }
.person-role { color: var(--muted); font-size: 11px; }
.person-sector-field { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.person-sector-field select { height: 36px; width: 100%; }
.person-sector-missing { margin: 0; font-size: 12px; }
.person-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 0; padding-top: 12px; border-top: 1px solid var(--border); }
.person-metrics div { text-align: center; }
.person-metrics strong { display: block; font-size: 15px; }
.person-metrics span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.25; }
.person-actions { margin-top: auto; display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.profile-heading-identity { display: flex; align-items: center; gap: 12px; }
.profile-heading-identity h2 { margin: 0; }
.collaborator-photo-field { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; }
.collaborator-photo-preview { width: 88px; height: 88px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-weight: 850; border: 1px solid var(--border); }
.collaborator-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.collaborator-photo-controls { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.collaborator-photo-controls .muted { margin: 0; font-size: 12px; }

button.sort-th {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-align: left;
  white-space: nowrap;
}
button.sort-th:hover { color: var(--primary); }
button.sort-th.active { color: var(--primary-dark); }
button.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  padding: 0;
  text-align: left;
}
button.link-button:hover { text-decoration: underline; }

.routine-day-bar { grid-template-columns: minmax(220px, 280px) minmax(160px, 200px) 1fr auto; }
.routine-day-table.routine-day-nonbusiness tr.routine-row-soft td {
  opacity: 0.62;
}
.routine-day-table.routine-day-nonbusiness tr.routine-row-soft:focus-within td,
.routine-day-table.routine-day-nonbusiness tr.routine-row-soft:hover td {
  opacity: 1;
}
.routine-day-controls { display: flex; align-items: center; gap: 6px; }
.routine-day-controls input[type="date"] { min-width: 150px; }
.routine-day-table { table-layout: fixed; min-width: 1280px; }
.routine-day-table th:nth-child(1),
.routine-day-table td:nth-child(1) { width: 150px; }
.routine-day-table th.col-login,
.routine-day-table td.col-login { width: 96px; }
.routine-day-table th.col-login-unico,
.routine-day-table td.col-login-unico { width: 88px; text-align: center; }
.routine-day-table th.col-access,
.routine-day-table td.col-access { width: 170px; }
.routine-day-table .routine-access-select { width: 100%; min-width: 150px; }
.routine-day-table .routine-login-unico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.routine-day-table .routine-login-unico input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.routine-day-table th.col-ad,
.routine-day-table td.col-ad { width: 72px; }
.routine-day-table th.col-crm,
.routine-day-table td.col-crm { width: 128px; }
.routine-day-table th.col-comment,
.routine-day-table td.col-comment { width: 280px; }
.routine-day-table .routine-inline-input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff;
}
.routine-day-table .routine-ad-input {
  max-width: 64px;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}
.routine-day-table .routine-comment-input {
  min-width: 0;
  min-height: 58px;
  resize: vertical;
  line-height: 1.35;
}
.routine-day-table .routine-crm-select { font-size: 12px; font-weight: 700; }
.routine-day-table .routine-crm-select.crm-organizado {
  border-color: #86efac;
  background: var(--success-bg);
  color: var(--success);
}
.routine-day-table .routine-crm-select.crm-parcial {
  border-color: #fcd34d;
  background: var(--warning-bg);
  color: var(--warning);
}
.routine-day-table .routine-crm-select.crm-desorganizado {
  border-color: #fca5a5;
  background: var(--danger-bg);
  color: var(--danger);
}
.routine-save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(23, 32, 51, 0.12);
  backdrop-filter: blur(10px);
}
.routine-save-bar strong { display: block; font-size: 13px; }
.routine-save-bar .muted { font-size: 12px; }
.routine-save-bar .button { min-width: 180px; }

.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.insight-card { border: 1px solid var(--border); border-radius: 13px; padding: 16px; background: var(--surface); }
.insight-card h3 { margin: 0 0 8px; font-size: 13px; }
.insight-card p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0; }

.report-cover { padding: 26px; border-radius: 16px; background: linear-gradient(135deg, #191c3a, #4b46c7); color: #fff; }
.report-cover p { color: #d6d8f4; margin: 7px 0 0; }
.report-section h3 { margin: 0 0 10px; }
.report-list { margin: 0; padding-left: 20px; color: #3b4558; line-height: 1.65; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-panel { border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.settings-panel h3 { margin: 0 0 5px; font-size: 15px; }
.settings-panel > p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0 0 15px; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.notice { border-radius: 12px; padding: 13px 14px; font-size: 12px; line-height: 1.5; }
.notice.info { background: var(--info-bg); color: #1e4fb7; }
.notice.warning { background: var(--warning-bg); color: #8a4307; }
.notice.success { background: var(--success-bg); color: #126b35; }
.notice.danger { background: var(--danger-bg); color: #9b1c1c; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(12,15,32,.62); display: grid; place-items: center; padding: 18px; backdrop-filter: blur(4px); }
.modal { width: min(760px, 100%); max-height: calc(100vh - 36px); display: flex; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.25); overflow: hidden; }
.modal.large { width: min(1060px, 100%); }
.modal > form { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-close { border: 0; background: #f0f2f6; width: 34px; height: 34px; border-radius: 9px; font-size: 18px; }
.modal-body { min-height: 0; flex: 1 1 auto; padding: 20px; overflow-y: scroll; scrollbar-gutter: stable; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: #fafbfc; }
.score-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 13px; background: var(--surface-2); border-radius: 12px; }
.score-preview div { text-align: center; }
.score-preview strong { display: block; font-size: 21px; }
.score-preview span { color: var(--muted); font-size: 10px; text-transform: uppercase; }

.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { width: min(360px, calc(100vw - 40px)); padding: 13px 15px; border-radius: 12px; background: var(--nav); color: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.24); font-size: 12px; animation: toast-in .2s ease; }
.toast.success { background: #166534; }.toast.error { background: #991b1b; }.toast.warning { background: #92400e; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.mobile-only { display: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); }.text-success { color: var(--success); }.text-warning { color: var(--warning); }
.truncate { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1250px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .collaborator-grid, .pending-collaborator-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .app-shell { display: block; }
  .app-shell.sidebar-collapsed { grid-template-columns: none; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: 18px 0 50px rgba(0,0,0,.25); width: 270px; }
  .app-shell.sidebar-collapsed .sidebar { width: 270px; padding: 24px 18px; }
  .app-shell.sidebar-collapsed .brand-text,
  .app-shell.sidebar-collapsed .sidebar-footer p,
  .app-shell.sidebar-collapsed .storage-indicator div,
  .app-shell.sidebar-collapsed .nav-label,
  .app-shell.sidebar-collapsed .area-switch { display: revert; }
  .app-shell.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 11px 12px; gap: 11px; }
  .app-shell.sidebar-collapsed .nav-item:hover::after { content: none; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: none; }
  .main-content { grid-column: auto; }
  .mobile-only { display: inline-grid; place-items: center; }
  .topbar { align-items: flex-start; padding: 15px 18px; }
  .topbar-actions { max-width: 55%; }
  .page-content { padding: 18px; }
  .chart-card, .chart-card.wide, .chart-card.narrow { grid-column: span 12; }
  .collaborator-grid, .pending-collaborator-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid, .insight-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .topbar { position: relative; flex-direction: column; }
  .topbar-actions { max-width: none; width: 100%; justify-content: flex-start; }
  .month-control { flex: 1; }
  .month-control input { min-width: 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .collaborator-grid, .pending-collaborator-grid { grid-template-columns: 1fr; }
  .collaborator-photo-field { grid-template-columns: 72px 1fr; }
  .filters-bar { grid-template-columns: 1fr; }
  .rank-period-bar label { min-width: 100%; }
  .rank-period-bar select,
  .rank-period-bar input { width: 100%; min-width: 0; }
  .span-8, .span-6, .span-4, .span-3, .span-2 { grid-column: span 12; }
  .score-preview { grid-template-columns: 1fr; }
  .toggle-control { width: 100%; }
  .inactive-filter { width: 100%; }
  .filter-button { width: 100%; justify-content: flex-start; }
  .filter-menu { left: 0; right: auto; width: min(292px, calc(100vw - 36px)); }
}
@media print {
  .sidebar, .topbar, .no-print, .button { display: none !important; }
  .main-content { grid-column: auto; }
  .page-content { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}

/* Camada de sessão e autenticação. */
[hidden] { display: none !important; }
.area-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.area-switch:has(.area-button:nth-child(3)) { grid-template-columns: 1fr; max-height: 190px; overflow-y: auto; }
.sector-empty { color: #afb6d4; font-size: 11px; padding: 8px; text-align: center; }

.auth-root {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, rgba(125,119,255,.24), transparent 34%),
    radial-gradient(circle at 85% 80%, rgba(24,169,153,.16), transparent 32%),
    linear-gradient(135deg, #111426, #1c2042);
}
.auth-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 28px 90px rgba(0,0,0,.34);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.auth-card-wide { width: min(650px, 100%); }
.auth-card h1 { font-size: 25px; }
.auth-card p { color: var(--muted); line-height: 1.55; margin: 6px 0 0; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-actions { display: flex; justify-content: flex-end; }
.auth-error { padding: 11px 12px; background: var(--danger-bg); color: var(--danger); border-radius: 10px; font-size: 12px; }
.auth-link { align-self: center; }
.auth-card code { background: #eef0f6; border-radius: 5px; padding: 2px 5px; }

.user-chip { min-height: 40px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 11px; padding: 4px 5px 4px 7px; background: #fff; }
.user-chip.is-view-as { border-color: #c9852a; background: #fff8ef; }
.user-chip-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary-dark); font-size: 10px; font-weight: 850; }
.user-chip strong, .user-chip span { display: block; max-width: 155px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip strong { font-size: 11px; }
.user-chip span { color: var(--muted); font-size: 9px; margin-top: 1px; }
.user-chip-button { width: 30px; height: 30px; border: 0; background: transparent; }
.view-as-banner { margin: 0 0 12px; padding: 0 18px; }
.view-as-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid #e0b56a; background: #fff7e8; color: #6a4a12; border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.view-as-panel { border-color: #e0b56a; background: #fffaf0; }

.settings-grid-subcontents { display: contents; }
.card-header.compact { margin-bottom: 12px; }
.admin-list { display: flex; flex-direction: column; gap: 7px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf0f5; }
.admin-row:last-child { border-bottom: 0; }
.admin-row strong, .admin-row span { display: block; }
.admin-row strong { font-size: 12px; }
.admin-row > div > span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.admin-row-actions { display: flex; align-items: center; gap: 7px; }

.profile-summary { display: flex; align-items: center; gap: 14px; }
.profile-summary .avatar { width: 52px; height: 52px; }
.profile-summary strong, .profile-summary span { display: block; }
.profile-summary span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.kpi-detail-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.sector-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.check-card { display: flex; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--border); border-radius: 10px; }
.check-card input { width: auto; }
.check-card strong, .check-card small { display: block; }
.check-card strong { font-size: 12px; }
.check-card small { color: var(--muted); margin-top: 2px; }

@media (max-width: 980px) {
  .user-chip strong, .user-chip span { max-width: 115px; }
}
@media (max-width: 700px) {
  #userAccessHost { width: 100%; }
  .user-chip { width: 100%; }
  .user-chip strong, .user-chip span { max-width: calc(100vw - 145px); }
  .sector-check-grid { grid-template-columns: 1fr; }
  .admin-row { align-items: flex-start; flex-direction: column; }
}

/* V3 - campos estruturados de auditoria e liderança, preservando o layout original. */
.criterion-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface-2);
  display: grid;
  gap: 10px;
}
.criterion-box textarea { min-height: 48px; }
.textarea-expandable {
  min-height: 48px;
  max-height: none;
  resize: vertical;
  field-sizing: content;
}
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: 8px;
}
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}
.evidence-preview-wrap {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-2);
}
.evidence-links-preview {
  margin-bottom: 10px;
  line-height: 1.6;
}
.evidence-links-preview a { color: var(--primary); word-break: break-all; }
.evidence-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 10px 6px 0;
  vertical-align: top;
}
.evidence-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.action-recipients-wrap .field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
}
.audit-evidence-row {
  display: grid;
  grid-template-columns: minmax(108px, 132px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.audit-ident-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.audit-ident-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.audit-ident-row .field-inline {
  min-width: 132px;
  flex: 0 1 140px;
  margin: 0;
}
.audit-ident-collab {
  max-width: 320px;
  margin: 0;
}
.audit-ident-type {
  display: flex;
  align-items: flex-end;
  padding-bottom: 10px;
}
.audit-meta-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 16px;
  align-items: start;
  width: 100%;
}
.audit-suggestions .notice {
  margin: 0;
}
.audit-suggest-list {
  margin: 10px 0 12px;
  padding-left: 18px;
  line-height: 1.45;
}
.audit-type-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.audit-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.audit-type-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2, #f6f7fb);
  color: inherit;
  cursor: pointer;
  transition: .15s ease;
}
.audit-type-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 26, 109, .08);
  background: #fff;
}
.audit-type-card strong {
  font-size: 14px;
}
.audit-type-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.audit-back-row {
  margin-bottom: 4px;
}
.audit-back-row .button.ghost {
  padding-left: 0;
  color: var(--muted);
}
.audit-back-row .button.ghost:hover {
  color: var(--text, #1c2240);
}
@media (max-width: 720px) {
  .audit-type-grid { grid-template-columns: 1fr; }
}
.audit-account-block {
  display: flex;
  align-items: end;
  gap: 8px;
}
.field-account-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.field-account-inline span { white-space: nowrap; }
.field-account-inline input {
  width: 88px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}
.audit-clip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  margin-bottom: 1px;
}
.audit-clip-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--surface);
}
.audit-observations-field {
  min-width: 0;
}
.audit-penalty-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.field-penalty-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.penalty-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-penalty-compact .audit-score-input {
  width: 100%;
  min-width: 0;
  padding: 8px 6px;
  text-align: center;
}
.penalty-live {
  font-size: 11px;
  font-weight: 700;
  color: #c93636;
  white-space: nowrap;
  min-width: 28px;
}
.score-preview.audit-calculator {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .audit-meta-row {
    grid-template-columns: 1fr;
  }
  .audit-penalty-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .score-preview.audit-calculator {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .audit-evidence-row {
    grid-template-columns: 1fr;
  }
}
.audit-period-toggle-wrap {
  display: flex;
  align-items: end;
  padding-bottom: 2px;
}
.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;
}
.audit-period-block {
  display: grid;
  gap: 10px;
}
.audit-period-line {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.audit-period-line .field-inline {
  min-width: 132px;
  flex: 0 1 140px;
}
.audit-period-end {
  padding-left: 0;
}
.score-preview.audit-calculator {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.evidence-preview-wrap.compact {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  min-height: 0;
}
.evidence-preview-wrap.compact .evidence-thumb {
  width: 56px;
  height: 56px;
}
@media (max-width: 900px) {
  .score-preview.audit-calculator {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.alert-list { display: grid; gap: 10px; }
td .muted { font-size: 10px; }
@media (max-width: 760px) {
  .criterion-box { grid-column: span 12 !important; }
}

/* Página /config — onboarding ADVBOX */
body.config-page { background: linear-gradient(180deg, #e8f1ff 0%, var(--bg) 240px); }
.config-shell { min-height: 100vh; }
.config-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  background: linear-gradient(180deg, var(--nav), #001040 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.config-topbar .brand { padding: 0; }
.config-topbar .button.secondary { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.config-topbar .button.secondary:hover { background: rgba(255,255,255,.14); }
.config-main { padding: 24px 28px 40px; display: grid; gap: 18px; max-width: 1280px; margin: 0 auto; }
.config-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.config-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.config-stat strong { display: block; font-size: 28px; color: var(--primary); line-height: 1.1; }
.config-stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.config-search { margin-bottom: 12px; }
.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(62vh, 640px);
  overflow: auto;
  padding-right: 4px;
}
.checklist-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
}
.checklist-item:hover { border-color: #c9d0dc; background: #fff; }
.checklist-item input { width: auto; margin-top: 3px; }
.checklist-item strong, .checklist-item small { display: block; }
.checklist-item strong { font-size: 13px; }
.checklist-item small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.muted { color: var(--muted); font-size: 12px; }
@media (max-width: 980px) {
  .config-topbar { flex-direction: column; align-items: stretch; }
  .config-summary, .config-grid { grid-template-columns: 1fr; }
  .config-main { padding: 18px 16px 32px; }
}
tr.row-warning td { background: #fff8ef; }
tr.row-muted td { opacity: .72; }
.equipe-sector-select {
  min-width: 170px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
