:root {
  --ink: #102033;
  --muted: #66768a;
  --line: #e5eaf0;
  --surface: #ffffff;
  --canvas: #f4f7fa;
  --navy: #12345b;
  --navy-2: #0b2747;
  --blue: #2f6fed;
  --teal: #0f9f8f;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --warning: #9a6700;
  --warning-bg: #fff8e6;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(16, 32, 51, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

.login-shell {
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(47, 111, 237, 0.18),
      transparent 30%
    ),
    linear-gradient(135deg, #0a213d, #12345b 55%, #0f5c67);
}

.login-layout {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 64px;
  padding: 48px 0;
}

.brand-panel {
  color: #fff;
  max-width: 620px;
}

.brand-mark {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  margin-bottom: 30px;
}

.brand-mark-image {
  display: block;
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.brand-panel h1,
.page-heading h1 {
  margin: 6px 0 12px;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.brand-copy {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--blue);
}

.brand-panel .eyebrow {
  color: #8fe0d4;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.login-card-inner {
  padding: clamp(28px, 6vw, 54px);
}

.login-card h2 {
  font-size: 2rem;
  margin: 8px 0 8px;
  letter-spacing: -0.035em;
}

.muted {
  color: var(--muted);
}

.form-stack {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.form-stack label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}

.form-stack input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid #ccd5df;
  border-radius: 12px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.form-stack input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.12);
}

.button {
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.button:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.button:not(:disabled):active {
  transform: translateY(0);
}

.button:focus-visible,
.menu-toggle:focus-visible,
.nav-item:focus-visible,
.nav-subitem:focus-visible {
  outline: 3px solid rgba(47, 111, 237, 0.32);
  outline-offset: 2px;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #2457bb);
  min-height: 52px;
  margin-top: 4px;
}

.button-ghost {
  color: var(--navy);
  background: #edf3f9;
}

.security-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 22px 0 0;
}

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 20px 0;
  font-size: 0.9rem;
}

.alert-error {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #fecdca;
}

.alert-warning {
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid #f6d78a;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace {
  display: grid;
}

.sidebar {
  display: flex;
  flex-direction: column;
}

.nav-item {
  text-decoration: none;
}

.content {
  overflow: hidden;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.page-heading h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.page-heading .muted {
  margin: 0;
}

.status-pill {
  background: #e9f8f5;
  color: #08786d;
  border: 1px solid #bde8df;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.status-success {
  color: #08786d;
  background: #e9f8f5;
  border-color: #bde8df;
}

.status-pill.status-danger {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

.status-pill.status-muted {
  color: #667085;
  background: #f2f4f7;
  border-color: #d0d5dd;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(16, 32, 51, 0.05);
}

.metric-card {
  padding: 22px;
  display: grid;
  gap: 8px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric-card strong {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
}

.metric-card small {
  color: #8896a6;
}

.metric-card.accent {
  color: #fff;
  background: linear-gradient(135deg, var(--navy), #155f69);
  border-color: transparent;
}

.metric-card.accent span,
.metric-card.accent small {
  color: rgba(255, 255, 255, 0.72);
}

.panel {
  overflow: hidden;
}

.panel-heading {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 5px 0 0;
  font-size: 1.15rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #fbfcfd;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  padding: 44px 24px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--ink);
}

@media (max-width: 980px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 640px;
  }

  .brand-panel {
    padding-top: 20px;
  }

  .brand-panel h1 {
    font-size: 3rem;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .login-layout {
    width: min(100% - 22px, 560px);
    padding: 24px 0;
  }

  .brand-panel {
    display: flex;
    gap: 18px;
    align-items: flex-start;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    flex: 0 0 auto;
    margin: 0;
  }

  .brand-panel h1 {
    font-size: 2.2rem;
  }

  .brand-copy {
    font-size: 0.92rem;
  }

  .page-heading {
    flex-direction: column;
    gap: 12px;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .metric-card {
    padding: 17px;
  }
}

/* Navegação interativa compartilhada */
.menu-toggle {
  border: 0;
  display: grid;
  place-content: center;
  gap: 4px;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease;
}

.menu-toggle span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition:
    transform 0.2s ease,
    opacity 0.16s ease;
}

body.sidebar-open .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.sidebar-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.sidebar-open .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.workspace {
  transition: grid-template-columns 0.22s ease;
}

.sidebar {
  transition:
    width 0.22s ease,
    transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-menu {
  display: flex;
  flex-direction: column;
}

.nav-item {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.nav-icon {
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.nav-svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-subicon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  color: #17a2b8;
}

.nav-subicon .nav-svg {
  width: 15px;
  height: 15px;
}

.nav-label {
  flex: 1 1 auto;
  text-align: left;
}

.nav-group {
  display: grid;
  gap: 3px;
}

.nav-chevron {
  margin-left: auto;
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.nav-group-open > .nav-group-toggle .nav-chevron {
  transform: rotate(180deg);
}

.nav-submenu {
  max-height: 0;
  overflow: hidden;
  display: grid;
  gap: 2px;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    max-height 0.24s ease,
    opacity 0.18s ease,
    transform 0.24s ease;
}

.nav-group-open > .nav-submenu {
  max-height: 300px;
  opacity: 1;
  transform: translateY(0);
}

.nav-subitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-footer-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
}

.sidebar-footer strong,
.sidebar-footer small {
  display: block;
}

.sidebar-footer strong {
  font-size: 0.76rem;
}

.sidebar-footer small {
  margin-top: 2px;
  font-size: 0.66rem;
}

.sidebar-overlay {
  display: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

body.sidebar-collapsed .sidebar .nav-label,
body.sidebar-collapsed .sidebar .nav-chevron,
body.sidebar-collapsed .sidebar .nav-submenu {
  display: none;
}

body.sidebar-collapsed .sidebar .nav-item {
  justify-content: center;
  padding-inline: 8px;
}

body.sidebar-collapsed .sidebar-footer {
  justify-content: center;
  padding-inline: 0;
}

.page-heading-actions,
.panel-heading-actions,
.clients-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.button-outline {
  color: #35506c;
  background: #fff;
  border: 1px solid #ccd7e2;
}

.button-outline:hover {
  color: var(--blue);
  border-color: #9db8e8;
  background: #f7faff;
}

.button-danger {
  color: #fff;
  background: #c5352b;
}

.button-whatsapp {
  color: #fff;
  background: #128c4a;
  border-color: #128c4a;
}

.button-whatsapp:hover:not(:disabled) {
  color: #fff;
  background: #0f7a40;
  border-color: #0f7a40;
}

.button-whatsapp:disabled {
  color: #8290a0;
  background: #edf1f5;
  border-color: #d5dde6;
  cursor: not-allowed;
  opacity: 0.85;
}

.button-small {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 0.76rem;
}

.text-link {
  color: var(--blue);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
}

.alert-success {
  color: #067647;
  background: #ecfdf3;
  border: 1px solid #abefc6;
}

.alert ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.form-panel {
  margin-bottom: 24px;
}

.client-form {
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.field span {
  color: #31475f;
  font-size: 0.8rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea,
.search-form input,
.search-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #ccd5df;
  border-radius: 11px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-form input:focus,
.search-form select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.11);
}

.field textarea {
  min-height: 120px;
  padding: 12px 13px;
  resize: vertical;
}

.search-form select {
  min-height: 46px;
  padding: 0 36px 0 13px;
  border: 1px solid #ccd5df;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.field-wide {
  grid-column: span 2;
}

.field-full {
  grid-column: 1 / -1;
}

.form-actions {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.clients-toolbar {
  align-items: center;
}

.clients-toolbar h2 {
  display: inline-block;
}

.result-count {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 520px);
}

.search-form input {
  flex: 1 1 auto;
}

/* Agenda: filtros legíveis mesmo em telas desktop com muitos controles. */
.agenda-toolbar {
  flex-wrap: wrap;
  gap: 12px;
}

.agenda-toolbar > div:first-child {
  flex: 0 0 auto;
}

.agenda-filter-form {
  width: auto;
  flex: 1 1 780px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.agenda-filter-form input,
.agenda-filter-form select {
  width: auto;
}

.agenda-filter-form #agenda-search {
  flex: 1 1 280px;
  min-width: 220px;
}

.agenda-filter-form select {
  flex: 0 1 180px;
  min-width: 145px;
}

.agenda-filter-form input[type="date"] {
  flex: 0 0 148px;
  min-width: 148px;
}

.agenda-table th,
.agenda-table td {
  padding-left: 10px;
  padding-right: 10px;
  vertical-align: middle;
}

.agenda-caliber {
  white-space: nowrap;
  font-weight: 800;
}

.agenda-table .row-actions {
  gap: 5px;
}

.clients-table td:first-child strong {
  color: var(--ink);
}

.table-actions-heading {
  text-align: right;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
}

.row-actions form {
  margin: 0;
}

.pagination {
  min-height: 62px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.8rem;
}

.pagination-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 800;
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pagination-page {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: #fff;
  text-decoration: none;
  font-weight: 800;
}

.pagination-page:hover {
  border-color: var(--blue);
}

.pagination-page.is-current {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.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;
}

@media (max-width: 980px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    z-index: 30;
    inset: 72px 0 0;
    border: 0;
    background: rgba(8, 25, 45, 0.42);
    cursor: pointer;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (max-width: 1200px) {
  .agenda-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .agenda-filter-form {
    width: 100%;
    flex: 0 0 auto;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .page-heading-actions,
  .panel-heading-actions,
  .clients-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .page-heading-actions .button-primary {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-wide,
  .field-full {
    grid-column: auto;
  }

  .search-form {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-form input {
    flex-basis: 100%;
  }

  .agenda-filter-form #agenda-search {
    flex-basis: 100%;
    min-width: 100%;
  }

  .agenda-filter-form select,
  .agenda-filter-form input[type="date"] {
    flex: 1 1 145px;
    min-width: 0;
  }

  .clients-table {
    min-width: 0;
  }

  .clients-table thead {
    display: none;
  }

  .clients-table,
  .clients-table tbody,
  .clients-table tr,
  .clients-table td {
    display: block;
    width: 100%;
  }

  .clients-table tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }

  .clients-table tr:last-child {
    border-bottom: 0;
  }

  .clients-table td {
    border: 0;
    padding: 7px 0;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
    font-size: 0.84rem;
  }

  .clients-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .clients-table td.row-actions {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 10px;
  }

  .clients-table td.row-actions::before {
    flex-basis: 100%;
  }
}

@media (max-width: 520px) {
  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .button {
    width: 100%;
  }
}

.readonly-info {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 13px;
  border: 1px dashed #c6d3df;
  border-radius: 11px;
  color: var(--muted);
  background: #f7f9fb;
  font-size: 0.8rem;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Indicadores */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

.stat-card span,
.stat-card small {
  color: var(--muted);
}

.stat-card span {
  font-size: 0.8rem;
  font-weight: 700;
}

.stat-card strong {
  font-size: 2rem;
  line-height: 1;
}

.report-chart {
  padding: 18px 20px;
}

.chart-row {
  display: grid;
  grid-template-columns: 44px 1fr 70px;
  gap: 12px;
  align-items: center;
  margin: 9px 0;
}

.chart-track {
  height: 22px;
  overflow: hidden;
  background: #eef1f4;
  border: 1px solid #dee2e6;
  border-radius: 3px;
}

.chart-bar {
  height: 100%;
  min-width: 0;
  background: #28a745;
  transition: width 0.35s ease;
}

.chart-value {
  text-align: right;
  font-weight: 700;
}

.indicator-note,
.report-hint {
  color: #6c757d;
  font-size: 0.8rem;
  line-height: 1.45;
}

/* Relatórios: consulta compacta, prévia paginada e foco em celular. */
.reports-page-heading {
  margin-bottom: 12px;
}

.reports-panel,
.report-preview-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.reports-toolbar {
  gap: 10px;
  flex-wrap: wrap;
}

.reports-toolbar-title {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.reports-filter-form {
  min-width: 0;
  flex: 1 1 900px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.reports-filter-form select,
.reports-filter-form input {
  height: 32px;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 3px;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.reports-filter-form select:focus,
.reports-filter-form input:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.reports-filter-form #report-weapon {
  flex: 1 1 260px;
  min-width: 210px;
}

.reports-filter-form #report-type-select {
  flex: 0 1 205px;
  min-width: 165px;
}

.reports-filter-form input[type="date"] {
  flex: 0 0 142px;
  min-width: 142px;
}

.reports-show-button,
.reports-clear-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 3px;
}

.report-compact-bar {
  min-height: 36px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px 18px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 0.74rem;
}

.report-weapon-context {
  color: var(--ink);
  font-weight: 800;
}

.report-rule-note {
  margin-left: auto;
  text-align: right;
}

.report-pdf-actions {
  min-height: 46px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  background: #fff;
}

.report-pdf-actions > span {
  margin-right: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-preview-heading {
  min-height: 54px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.report-preview-heading h2 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.report-preview-table th,
.report-preview-table td {
  padding-left: 12px;
  padding-right: 12px;
  vertical-align: middle;
}

.report-number {
  text-align: right;
  font-weight: 800;
}

.report-preview-summary {
  min-height: 38px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 0.74rem;
}

.report-preview-summary strong {
  margin-left: 4px;
  color: var(--ink);
}

@media (max-width: 1180px) {
  .reports-filter-form {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .reports-filter-form #report-weapon {
    flex-basis: 320px;
  }
}

@media (max-width: 760px) {
  .reports-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .reports-toolbar-title {
    width: 100%;
  }

  .reports-filter-form {
    width: 100%;
    flex: 0 0 auto;
  }

  .reports-filter-form #report-weapon,
  .reports-filter-form #report-type-select {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .reports-filter-form input[type="date"] {
    flex: 1 1 calc(50% - 4px);
    min-width: 135px;
  }

  .reports-show-button,
  .reports-clear-button {
    flex: 1 1 calc(50% - 4px);
  }

  .report-compact-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .report-rule-note {
    margin-left: 0;
    text-align: left;
  }

  .report-pdf-actions {
    justify-content: flex-start;
  }

  .report-pdf-actions > span {
    flex-basis: 100%;
  }

  .report-pdf-actions .button {
    flex: 1 1 calc(50% - 4px);
  }

  .report-preview-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .report-preview-summary {
    justify-content: flex-start;
  }
}

@media (max-width: 440px) {
  .reports-filter-form input[type="date"],
  .reports-show-button,
  .reports-clear-button,
  .report-pdf-actions .button {
    flex-basis: 100%;
    width: 100%;
  }
}

/* Shell visual alinhado ao Fast Despachante */
body.app-shell {
  background: #f4f6f9;
}

body.app-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  height: 52px;
  min-height: 52px;
  padding: 0;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  align-items: stretch;
  color: #495057;
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.app-shell .topbar-brand {
  height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f4f5f7;
  background: #343a40;
  text-decoration: none;
  overflow: hidden;
}

body.app-shell .topbar-brand .brand-mark-small {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin: 0;
  border-radius: 50%;
  font-size: 0.65rem;
}

body.app-shell .topbar-brand strong,
body.app-shell .topbar-brand span {
  display: block;
}

body.app-shell .topbar-brand strong {
  font-size: 0.98rem;
  font-weight: 500;
  white-space: nowrap;
}

body.app-shell .topbar-brand > div > span {
  margin-top: 1px;
  color: #adb5bd;
  font-size: 0.67rem;
}

.topbar-main {
  min-width: 0;
  height: 52px;
  padding-right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

.topbar-nav {
  height: 52px;
  display: flex;
  align-items: center;
}

body.app-shell .topbar .menu-toggle {
  width: 52px;
  height: 52px;
  border-radius: 0;
  color: #6c757d;
  background: transparent;
}

body.app-shell .topbar .menu-toggle:hover {
  color: #343a40;
  background: #f4f6f9;
}

body.app-shell .topbar .menu-toggle span {
  width: 16px;
  background: currentColor;
}

.topbar-home {
  padding: 0 10px;
  color: #6c757d;
  text-decoration: none;
  font-size: 0.9rem;
}

.topbar-home:hover {
  color: #343a40;
}

body.app-shell .user-area {
  color: #495057;
  gap: 10px;
}

body.app-shell .user-name {
  font-size: 0.78rem;
}

body.app-shell .button-ghost {
  min-height: 34px;
  padding: 0 14px;
  color: #343a40;
  background: #f4f6f9;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

body.app-shell .workspace {
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: calc(100vh - 52px);
}

body.app-shell .sidebar {
  position: sticky;
  top: 52px;
  align-self: start;
  height: calc(100vh - 52px);
  padding: 10px 0 14px;
  color: #c2c7d0;
  background: #343a40;
  border-right: 0;
  overflow-y: auto;
}

body.app-shell .nav-menu {
  gap: 0;
}

body.app-shell .nav-item {
  min-height: 43px;
  padding: 0 14px;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #c2c7d0;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 400;
}

body.app-shell .nav-item:hover {
  color: #fff;
  background: #3f474e;
}

body.app-shell .nav-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  color: #17a2b8;
  background: transparent;
  font-size: 0.61rem;
}

body.app-shell .nav-label {
  color: inherit;
  font-weight: 400;
}

body.app-shell .nav-chevron {
  color: #adb5bd;
}

body.app-shell .nav-item-active,
body.app-shell .nav-group-active > .nav-group-toggle {
  color: #fff;
  background: #454d55;
  box-shadow: inset 3px 0 #17a2b8;
}

body.app-shell .nav-item-active .nav-icon,
body.app-shell .nav-group-active > .nav-group-toggle .nav-icon {
  color: #17a2b8;
  background: transparent;
}

body.app-shell .nav-submenu {
  padding-left: 0;
  background: #2f353a;
}

body.app-shell .nav-group-open > .nav-submenu {
  max-height: 300px;
}

body.app-shell .nav-subitem {
  min-height: 35px;
  padding: 7px 14px 7px 44px;
  border-radius: 0;
  justify-content: flex-start;
  gap: 8px;
  color: #b8c2cc;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 400;
}

body.app-shell .nav-subitem:hover {
  color: #fff;
  background: #3a4248;
}

body.app-shell .nav-subitem.nav-item-active {
  color: #fff;
  background: #3f474e;
  box-shadow: inset 3px 0 #17a2b8;
}

body.app-shell .nav-disabled {
  color: #79838c;
}

body.app-shell .sidebar-footer {
  margin-top: auto;
  padding: 16px 14px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #adb5bd;
}

body.app-shell .sidebar-footer strong {
  color: #f4f5f7;
  font-weight: 500;
}

body.app-shell .sidebar-footer small {
  color: #8d98a3;
}

body.app-shell .sidebar-footer-mark {
  border-radius: 50%;
}

body.app-shell .content {
  width: 100%;
  max-width: none;
  padding: 18px 16px 42px;
}

body.app-shell .page-heading {
  margin-bottom: 18px;
}

body.app-shell .page-heading h1 {
  margin-top: 3px;
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  letter-spacing: -0.025em;
}

body.app-shell .page-heading .eyebrow {
  font-size: 0.64rem;
}

body.app-shell .panel,
body.app-shell .metric-card {
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

body.app-shell .metric-card {
  padding: 18px 20px;
}

body.app-shell .metrics {
  gap: 14px;
  margin-bottom: 18px;
}

body.app-shell .clients-toolbar {
  min-height: 46px;
  padding: 8px 12px 8px 18px;
  color: #fff;
  background: #28a745;
  border-bottom: 0;
}

body.app-shell .clients-toolbar .eyebrow {
  display: none;
}

body.app-shell .clients-toolbar h2 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
}

body.app-shell .clients-toolbar .result-count {
  color: rgba(255, 255, 255, 0.72);
}

body.app-shell .clients-toolbar .search-form input {
  min-height: 32px;
  border-radius: 3px;
  border-color: rgba(255, 255, 255, 0.6);
}

body.app-shell .clients-toolbar .agenda-filter-form input,
body.app-shell .clients-toolbar .agenda-filter-form select {
  height: 32px;
  min-height: 32px;
  border-radius: 3px;
}

body.app-shell .clients-toolbar .button-outline {
  min-height: 32px;
  padding-inline: 12px;
  color: #218838;
  background: #fff;
  border-color: #fff;
  border-radius: 3px;
}

body.app-shell .clients-toolbar .text-link {
  color: #fff;
}

body.app-shell .page-heading-actions > .button-primary {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 3px;
  background: #28a745;
}

body.app-shell table th,
body.app-shell table td {
  padding-top: 12px;
  padding-bottom: 12px;
}

body.app-shell .button-small {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 3px;
  font-size: 0.7rem;
}

body.sidebar-collapsed.app-shell .topbar {
  grid-template-columns: 64px minmax(0, 1fr);
}

body.sidebar-collapsed.app-shell .topbar-brand {
  justify-content: center;
  padding: 0;
}

body.sidebar-collapsed.app-shell .topbar-brand > div {
  display: none;
}

body.sidebar-collapsed.app-shell .workspace {
  grid-template-columns: 64px minmax(0, 1fr);
}

body.sidebar-collapsed.app-shell .sidebar {
  padding-inline: 0;
}

@media (max-width: 980px) {
  body.app-shell .topbar,
  body.sidebar-collapsed.app-shell .topbar {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  body.app-shell .topbar-brand,
  body.sidebar-collapsed.app-shell .topbar-brand {
    justify-content: center;
    padding: 0;
  }

  body.app-shell .topbar-brand > div {
    display: none;
  }

  body.app-shell .workspace,
  body.sidebar-collapsed.app-shell .workspace {
    grid-template-columns: 1fr;
  }

  body.app-shell .sidebar {
    position: fixed;
    z-index: 35;
    top: 52px;
    left: 0;
    width: min(86vw, 280px);
    height: calc(100vh - 52px);
    padding: 10px 0 14px;
    transform: translateX(-102%);
    border-right: 0;
    box-shadow: 14px 0 30px rgba(0, 0, 0, 0.25);
  }

  body.sidebar-open.app-shell .sidebar {
    transform: translateX(0);
  }

  body.app-shell .sidebar-overlay {
    inset: 52px 0 0;
  }

  body.app-shell .content {
    padding: 16px 12px 36px;
  }
}

@media (max-width: 640px) {
  body.app-shell .topbar-home,
  body.app-shell .user-name {
    display: none;
  }

  body.app-shell .topbar-main {
    padding-right: 8px;
  }

  body.app-shell .page-heading h1 {
    font-size: 1.65rem;
  }

  body.app-shell .clients-toolbar {
    padding: 12px;
  }
}

@media (max-width: 850px) {
  .report-weapon-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .chart-row {
    grid-template-columns: 38px 1fr 52px;
  }
}

@media (max-width: 520px) {
  .stats-grid,
  .report-weapon-summary {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

body.app-shell .nav-item:hover .nav-icon,
body.app-shell .nav-subitem:hover .nav-subicon,
body.app-shell .nav-item-active .nav-subicon {
  color: #22bdd3;
}

/* Financeiro: barra de filtros compacta no mesmo padrão da Agenda/Laudos. */
.finance-filter-form #finance-search {
  flex: 1 1 300px;
  min-width: 220px;
}

.finance-summary-line {
  min-height: 40px;
  padding: 9px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 0.74rem;
}

.finance-summary-line strong {
  color: var(--ink);
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  .finance-filter-form #finance-search {
    flex-basis: 100%;
    min-width: 100%;
  }

  .finance-summary-line {
    justify-content: flex-start;
  }
}

/* CPF e opções compactas do laudo. */
.cpf-validation-message,
.field-hint {
  display: block;
  margin-top: -2px;
  font-size: 0.7rem;
  line-height: 1.35;
}

.cpf-validation-message {
  min-height: 1em;
  color: var(--muted);
  font-weight: 700;
}

.cpf-validation-message.is-valid {
  color: #067647;
}

.cpf-validation-message.is-invalid {
  color: var(--danger);
}

.field-hint {
  color: var(--muted);
  font-weight: 400;
}

.field input.input-valid {
  border-color: #69c59d;
  box-shadow: 0 0 0 3px rgba(6, 118, 71, 0.08);
}

.field input.input-invalid {
  border-color: #ef8b84;
  box-shadow: 0 0 0 3px rgba(197, 53, 43, 0.08);
}

.laudo-options-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.15fr;
  gap: 10px;
  align-items: start;
}

.laudo-option-box {
  min-width: 0;
  margin: 0;
  padding: 8px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.laudo-option-box legend {
  padding: 0 5px;
  color: #31475f;
  font-size: 0.72rem;
  font-weight: 800;
}

.laudo-option-list {
  min-height: 30px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 16px;
}

.laudo-option-list .checkbox-field {
  min-height: 28px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.laudo-option-list .checkbox-field input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

@media (max-width: 980px) {
  .laudo-options-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .laudo-option-list {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .laudo-option-list .checkbox-field {
    width: 100%;
  }
}

/* Painel operacional */
.automation-panel,
.dashboard-section {
  margin-bottom: 18px;
}

.automation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.automation-items {
  padding: 14px 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  background: #fbfcfd;
}

.automation-items span {
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
}

.automation-items strong {
  color: var(--ink);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  margin-bottom: 24px;
}

.dashboard-grid .panel {
  min-width: 0;
}

.compact-table {
  min-width: 520px;
}

.compact-table th,
.compact-table td {
  padding: 11px 14px;
  font-size: 0.8rem;
}

.communication-table {
  min-width: 620px;
}

.compact-empty {
  padding: 28px 18px;
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .automation-items {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .automation-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .automation-items {
    padding: 10px;
  }

  .dashboard-section .panel-heading-actions {
    align-items: flex-start;
  }
}

/* Indicadores: dashboard filtrável por ano e calibre. */
.indicators-heading {
  margin-bottom: 12px;
}

.indicator-toolbar {
  min-height: 52px;
  margin-bottom: 18px;
  padding: 8px 12px 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  background: #28a745;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.indicator-toolbar-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.indicator-toolbar-title strong {
  font-size: 1rem;
}

.indicator-toolbar-title span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
}

.indicator-filter-form {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.indicator-filter-form label {
  display: grid;
  gap: 2px;
}

.indicator-filter-form label > span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.indicator-filter-form select {
  height: 34px;
  min-width: 118px;
  padding: 0 30px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 3px;
  color: var(--ink);
  background: #fff;
}

.indicator-filter-form label:nth-child(2) select {
  min-width: 190px;
}

.indicator-clear-button {
  height: 34px;
  min-height: 34px;
  color: #218838;
  background: #fff;
  border-color: #fff;
  text-decoration: none;
}

.indicator-metrics {
  margin-bottom: 18px;
}

.indicator-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
}

.indicator-chart-panel,
.indicator-conclusion-panel,
.indicator-caliber-panel {
  margin: 0;
}

.indicator-chart-legend {
  padding: 10px 20px 0;
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 0.7rem;
}

.indicator-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.indicator-chart-legend i {
  width: 16px;
  height: 5px;
  border-radius: 10px;
}

.legend-reports {
  background: var(--blue);
}

.legend-shots {
  background: var(--teal);
}

.indicator-month-chart {
  padding: 10px 20px 18px;
}

.indicator-month-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #f0f3f6;
}

.indicator-month-row:last-child {
  border-bottom: 0;
}

.indicator-month-row > strong {
  font-size: 0.72rem;
  color: var(--muted);
}

.indicator-bar-group {
  display: grid;
  gap: 4px;
}

.indicator-mini-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.indicator-mini-bar {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  transition: width 0.35s ease;
}

.indicator-mini-bar.reports {
  background: var(--blue);
}

.indicator-mini-bar.shots {
  background: var(--teal);
}

.indicator-month-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  text-align: right;
  font-size: 0.72rem;
}

.indicator-month-values b {
  color: var(--blue);
}

.indicator-month-values small {
  color: var(--teal);
  font-weight: 800;
}

.indicator-conclusions {
  padding: 18px 20px 22px;
  display: grid;
  gap: 22px;
}

.indicator-conclusion-item {
  display: grid;
  gap: 8px;
}

.indicator-conclusion-item > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.indicator-conclusion-item strong {
  font-size: 0.82rem;
}

.indicator-conclusion-item span {
  color: var(--muted);
  font-size: 0.76rem;
}

.indicator-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.indicator-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.35s ease;
}

.indicator-progress .success {
  background: var(--teal);
}

.indicator-progress .danger {
  background: #d92d20;
}

.indicator-progress .muted {
  background: #98a2b3;
}

.indicator-caliber-panel {
  margin-bottom: 18px;
}

.indicator-share {
  min-width: 170px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.indicator-share-track {
  width: 120px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.indicator-share-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #28a745;
}

.indicator-share > strong {
  min-width: 44px;
  color: var(--muted);
  font-size: 0.72rem;
}

@media (max-width: 1050px) {
  .indicator-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .indicator-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .indicator-toolbar-title {
    justify-content: space-between;
  }

  .indicator-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) auto;
    align-items: end;
  }

  .indicator-filter-form select,
  .indicator-filter-form label:nth-child(2) select {
    width: 100%;
    min-width: 0;
  }

  .indicator-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .indicator-metrics .metric-card {
    padding: 14px;
  }

  .indicator-metrics .metric-card strong {
    font-size: 1.7rem;
  }

  .indicator-month-chart {
    padding-inline: 12px;
  }

  .indicator-month-row {
    grid-template-columns: 34px minmax(0, 1fr) 72px;
    gap: 7px;
  }
}

@media (max-width: 480px) {
  .indicator-filter-form {
    grid-template-columns: 1fr 1fr;
  }

  .indicator-clear-button {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .indicator-metrics {
    gap: 8px;
  }

  .indicator-metrics .metric-card {
    min-width: 0;
  }

  .indicator-metrics .metric-card span,
  .indicator-metrics .metric-card small {
    font-size: 0.68rem;
  }

  .indicator-share {
    min-width: 130px;
  }

  .indicator-share-track {
    width: 82px;
  }
}

/* Avisos operacionais temporários da tela inicial */
.dashboard-notices {
  position: fixed;
  z-index: 1200;
  top: 82px;
  right: 22px;
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  filter: drop-shadow(0 18px 32px rgba(16, 32, 51, 0.22));
}

.dashboard-notices[hidden] {
  display: none;
}

.client-picker {
  position: relative;
}

.client-picker > label {
  display: block;
  margin-bottom: 7px;
  color: var(--text, #10233f);
  font-size: 0.78rem;
  font-weight: 700;
}

.client-picker-results {
  position: absolute;
  z-index: 40;
  top: calc(100% - 20px);
  right: 0;
  left: 0;
  overflow-y: auto;
  max-height: 280px;
  border: 1px solid #cbd7e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(16, 35, 63, 0.16);
}

.client-picker-results[hidden] {
  display: none;
}

.client-picker-option {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid #e5ebf2;
  background: #fff;
  color: #10233f;
  text-align: left;
  cursor: pointer;
}

.client-picker-option:last-child {
  border-bottom: 0;
}

.client-picker-option:hover,
.client-picker-option:focus-visible {
  outline: 0;
  background: #eef5ff;
}

.client-picker-option strong {
  font-size: 0.88rem;
}

.client-picker-option small,
.client-picker-help {
  color: #64748b;
  font-size: 0.72rem;
}

.client-picker-help {
  display: block;
  margin-top: 6px;
}

.client-picker-empty {
  margin: 0;
  padding: 13px 14px;
  color: #64748b;
  font-size: 0.8rem;
}

.dashboard-notice {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  color: #fff;
  animation: dashboard-notice-enter 0.28s ease both;
}

.dashboard-notice > a {
  display: grid;
  gap: 3px;
  padding: 15px 46px 17px 17px;
  color: inherit;
  text-decoration: none;
}

.dashboard-notice strong {
  font-size: 0.88rem;
}

.dashboard-notice span {
  font-size: 0.82rem;
  line-height: 1.4;
}

.dashboard-notice small {
  margin-top: 2px;
  color: inherit;
  opacity: 0.78;
  font-size: 0.68rem;
}

.dashboard-notice button {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.dashboard-notice > i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.72);
  transform-origin: left center;
  animation: dashboard-notice-progress 15s linear both;
}

.dashboard-notice-danger {
  background: #b42318;
}

.dashboard-notice-warning {
  color: #3d2b00;
  background: #f5b82e;
}

.dashboard-notice-success {
  background: #16875b;
}

.dashboard-notice.is-leaving {
  animation: dashboard-notice-leave 0.2s ease both;
}

.dashboard-heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@keyframes dashboard-notice-enter {
  from {
    opacity: 0;
    transform: translate3d(24px, -8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes dashboard-notice-leave {
  to {
    opacity: 0;
    transform: translate3d(28px, 0, 0);
  }
}

@keyframes dashboard-notice-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@media (max-width: 760px) {
  .dashboard-notices {
    top: 72px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .dashboard-heading-actions {
    width: 100%;
    justify-content: stretch;
  }

  .dashboard-heading-actions .button {
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-notice,
  .dashboard-notice.is-leaving,
  .dashboard-notice > i {
    animation: none;
  }
}
