:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --card: #ffffff;
  --line: #d9e0e6;
  --line-soft: #e9eef2;
  --line-strong: #93a2ae;
  --text: #1f2933;
  --muted: #66727f;
  --accent: #9a4d24;
  --accent-strong: #6f3010;
  --accent-soft: #f3e2d8;
  --header-band: #95a4af;
  --soft-band: #fcf7f4;
  --shadow: 0 14px 32px rgba(31, 41, 51, 0.06);
  --shadow-strong: 0 18px 42px rgba(31, 41, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 87.5%;
}

body {
  margin: 0;
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(154, 77, 36, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(149, 164, 175, 0.18), transparent 24%),
    linear-gradient(180deg, #eef2f5 0, #f7f9fb 220px, #f3f5f7 100%);
}

.layout {
  width: min(1880px, calc(100vw - 28px));
  margin: 0 auto 20px;
}

.auth-panel {
  display: grid;
  place-items: center;
  min-height: min(78vh, 760px);
}

.auth-card {
  width: min(520px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(147, 162, 174, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 251, 0.95)),
    linear-gradient(135deg, rgba(154, 77, 36, 0.05), rgba(149, 164, 175, 0.08));
  box-shadow: var(--shadow-strong);
}

.auth-copy {
  display: grid;
  gap: 10px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-result {
  min-height: 22px;
}

.app-header {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.eyebrow,
.status,
.muted,
.result,
.helper {
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 14px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(154, 77, 36, 0.16);
  background: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 0 4px rgba(154, 77, 36, 0.12);
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  max-width: 15ch;
  font-size: clamp(1.95rem, 3.2vw, 3rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  font-weight: 800;
}

h2 {
  font-size: 1.02rem;
}

h3 {
  font-size: 0.96rem;
}

p {
  margin: 0;
}

.page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 10px max(14px, calc((100vw - min(1880px, calc(100vw - 28px))) / 2 + 14px));
  border: 0;
  border-bottom: 1px solid rgba(31, 41, 51, 0.18);
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #263848, #172838);
  box-shadow: 0 12px 28px rgba(23, 40, 56, 0.22);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
}

.page-nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #d5e0ea;
  text-decoration: none;
  font-weight: 700;
  transition: all 160ms ease;
}

.page-nav-link:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  transform: translateY(-1px);
}

.page-nav-link.active {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.session-menu {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(180deg, #2ea6e6, #4eb8e8);
  color: #ffffff;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.7),
    0 6px 14px rgba(46, 166, 230, 0.24);
}

.profile-button:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.profile-avatar {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
}

.profile-avatar::before,
.profile-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
}

.profile-avatar::before {
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.profile-avatar::after {
  bottom: 5px;
  width: 22px;
  height: 11px;
  border-radius: 15px 15px 8px 8px;
}

.profile-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(147, 162, 174, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 251, 0.96));
  box-shadow: var(--shadow-strong);
  z-index: 20;
}

.profile-menu-current-name {
  padding: 2px 4px 8px;
  border-bottom: 1px solid rgba(147, 162, 174, 0.18);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

.profile-menu-action {
  width: 100%;
  justify-content: flex-start;
}

.plan-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.session-password-panel {
  width: 100%;
  display: grid;
  gap: 16px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  align-content: start;
  box-shadow: none;
}

.compact-actions {
  justify-content: flex-start;
}

.profile-page {
  display: grid;
  gap: 18px;
}

.profile-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 2px 0;
}

.profile-page-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.02;
}

.profile-card {
  display: grid;
  gap: 28px;
  padding: 26px 28px;
  border-radius: 26px;
  border: 1px solid rgba(147, 162, 174, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 251, 0.96)),
    linear-gradient(180deg, rgba(76, 161, 214, 0.04), rgba(255, 255, 255, 0));
  box-shadow: var(--shadow-strong);
}

.profile-page-current-name {
  margin: 6px 0 2px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.profile-card-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-large {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2ea6e6, #4eb8e8);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7);
}

.profile-avatar-large::before,
.profile-avatar-large::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
}

.profile-avatar-large::before {
  top: 13px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
}

.profile-avatar-large::after {
  bottom: 10px;
  width: 44px;
  height: 22px;
  border-radius: 22px 22px 12px 12px;
}

.profile-card-hero-copy {
  display: grid;
  gap: 4px;
}

.profile-card-hero-copy h3 {
  font-size: 1.18rem;
}

.profile-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(147, 162, 174, 0.22), rgba(147, 162, 174, 0.08));
}

.profile-section {
  display: grid;
  gap: 18px;
}

.profile-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-section-head h3 {
  font-size: 1.1rem;
}

.profile-form,
.profile-password-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px 20px;
}

.profile-password-form {
  align-items: end;
}

.profile-form .field,
.profile-password-form .field {
  margin: 0;
}

.profile-form .field span,
.profile-password-form .field span {
  display: inline-flex;
  margin-bottom: 8px;
  color: #77879b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.profile-form input,
.profile-password-form input {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid #d7e0ea;
  background: #edf3f8;
  color: #596979;
}

.profile-form input[readonly],
.profile-form input:disabled {
  color: #6b7c8f;
  background: #edf3f8;
  cursor: default;
}

.profile-form input:not([readonly]) {
  background: #ffffff;
  color: var(--text);
}

.password-field {
  min-width: 0;
}

.password-input-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}

.password-visibility {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid #d7e0ea;
  background: #ffffff;
  color: #708093;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: none;
}

.password-visibility:hover {
  border-color: #b9c6d3;
  color: var(--text);
}

.profile-password-form .form-actions {
  grid-column: 1 / -1;
  margin-top: 6px;
}

#change-password-result {
  min-height: 22px;
}

.profile-page-body .workspace {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5f8fa;
  border: 1px solid #dde5eb;
  font-size: 0.9rem;
  line-height: 1.4;
}

.status::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d39b62;
  box-shadow: 0 0 0 4px rgba(211, 155, 98, 0.16);
}

.workspace {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
}

.dashboard-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr) minmax(260px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(147, 162, 174, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  box-shadow: var(--shadow);
}

.dashboard-card-wide {
  min-width: 0;
}

.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.chart-area,
.dashboard-kpis {
  min-height: 250px;
}

.chart-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.line-chart {
  width: 100%;
  min-width: 560px;
  height: 220px;
}

.line-chart text {
  fill: #7b8794;
  font-size: 0.75rem;
}

.chart-axis {
  stroke: #cad5df;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-presencial {
  stroke: #9a4d24;
}

.chart-line-elearning {
  stroke: #3a7a57;
}

.chart-line-other {
  stroke: #b7791f;
}

.chart-line-total {
  stroke: #607180;
  stroke-dasharray: 7 7;
}

.bar-segment {
  stroke: none;
  stroke-width: 0;
}

.bar-segment-presencial {
  fill: #9a4d24;
}

.bar-segment-elearning {
  fill: #3a7a57;
}

.bar-segment-other {
  fill: #b7791f;
}

.chart-total-label {
  fill: #52606d;
  font-size: 0.76rem;
  font-weight: 700;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  color: #52606d;
  font-weight: 700;
}

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

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.legend-presencial {
  background: #9a4d24;
}

.legend-elearning {
  background: #3a7a57;
}

.legend-other {
  background: #b7791f;
}

.legend-total {
  background: #607180;
}

.bar-chart {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.25fr) minmax(120px, 2fr) 44px;
  align-items: start;
  gap: 12px;
}

.bar-label,
.bar-value {
  font-weight: 700;
  color: #52606d;
}

.bar-label {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bar-track {
  height: 14px;
  margin-top: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf2f6;
  border: 1px solid #d9e3ea;
}

.bar-value {
  text-align: right;
  min-width: 0;
  padding-top: 1px;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c77747, #9a4d24);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdfb, #f7f3ef);
  border: 1px solid rgba(154, 77, 36, 0.14);
}

.kpi-card strong,
.dashboard-insight strong {
  font-size: 1.45rem;
  line-height: 1;
}

.kpi-label,
.insight-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-insight {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(154, 77, 36, 0.1), rgba(149, 164, 175, 0.16));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.view-chip {
  border: 1px solid #d7dee5;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f7f9fb;
  color: #52606d;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.view-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(111, 48, 16, 0.18);
}

.block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}

.block + .block {
  margin-top: 12px;
}

.users-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
}

.users-stack {
  display: grid;
  gap: 18px;
}

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

.reports-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.reports-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.reports-summary {
  margin-top: 12px;
  font-size: 0.88rem;
}

.reports-section-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reports-section-tab {
  min-height: 34px;
}

.reports-section-tab.active {
  background: rgba(154, 77, 36, 0.1);
  color: var(--accent-strong);
  border-color: rgba(154, 77, 36, 0.22);
}

.reports-compare-check {
  align-self: end;
  margin-bottom: 2px;
}

.reports-quick-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  align-self: end;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.reports-quick-filter {
  min-height: 34px;
  background: #ffffff;
  color: #425466;
  border-color: #d7dee5;
}

.reports-quick-filter.active {
  background: rgba(154, 77, 36, 0.1);
  border-color: rgba(154, 77, 36, 0.26);
  color: var(--accent-strong);
}

.reports-ghost {
  background: #f6f8fa;
  color: #425466;
  border-color: #d7dee5;
}

.reports-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.reports-card:not(.hidden) {
  grid-column: 1 / -1;
}

.reports-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reports-card-head h3,
.reports-subsection h4 {
  margin: 0;
}

.export-report-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.reports-content {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-items: start;
}

.reports-context-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reports-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reports-subsection {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 252, 0.99) 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
}

.reports-table-shell {
  max-height: 420px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #ffffff;
}

.reports-content > .reports-kpi-grid,
.reports-content > .reports-subsection,
.reports-content > .reports-split,
.reports-content > .reports-table-shell,
.reports-content > .table-shell {
  grid-column: 1 / -1;
}

.reports-subsection > .reports-kpi-grid,
.reports-subsection > .reports-table-shell,
.reports-subsection > .table-shell {
  grid-column: 1 / -1;
}

.reports-growth-layout {
  grid-template-columns: minmax(0, 1fr);
}

.reports-growth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reports-growth-year-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(154, 77, 36, 0.16);
  border-radius: 999px;
  background: rgba(154, 77, 36, 0.08);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 600;
}

.reports-growth-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reports-growth-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.reports-growth-section {
  min-height: 100%;
}

.reports-growth-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reports-growth-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f6f9;
  color: #526171;
  font-size: 0.8rem;
  font-weight: 600;
}

.reports-analytics-kpis {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.reports-analytics-subsection {
  min-height: 100%;
}

.reports-section-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reports-meta-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(130, 145, 160, 0.2);
  border-radius: 999px;
  background: #f3f6f9;
  color: #526171;
  font-size: 0.8rem;
  font-weight: 600;
}

.reports-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #536273;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}

.reports-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.82);
}

.reports-table tbody tr:hover td {
  background: rgba(154, 77, 36, 0.05);
}

.users-section {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.users-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.users-page-head {
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.users-head-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.users-role-filter {
  width: min(280px, 100%);
}

.users-create-panel {
  max-width: 860px;
}

.users-detail-panel {
  max-width: 980px;
}

.users-detail-form {
  display: grid;
}

.users-password-form {
  grid-template-columns: minmax(240px, 360px);
}

.users-access-panel {
  display: grid;
  gap: 14px;
}

.users-access-toggle {
  align-self: start;
}

.users-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 16px;
}

.users-access-ranges {
  max-width: 360px;
}

.profile-check-field {
  align-self: end;
  min-height: 44px;
  margin-bottom: 1px;
}

.user-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.delete-user-button {
  background: #fff6f5;
  border-color: #efc7c0;
  color: #9e3828;
  box-shadow: none;
}

.delete-user-button:hover {
  background: #fdecea;
  border-color: #e5a69d;
}

.user-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2d5b89;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
  box-shadow: none;
}

.user-link-button:hover {
  color: #1f3f61;
}

.users-form {
  display: grid;
  gap: 14px;
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8fafb;
  color: var(--text);
  font-weight: 600;
}

.check-field input[type="checkbox"] {
  margin: 0;
  inline-size: 16px;
  block-size: 16px;
  flex: 0 0 auto;
}

.check-field span {
  line-height: 1.2;
}

.check-field.inline-check {
  padding: 0;
  border: 0;
  background: transparent;
  min-height: auto;
}

.block-head {
  background: var(--header-band);
  color: white;
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.block-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.block-head-badge {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
}

.block-body {
  padding: 16px;
}

.block-foot {
  padding: 10px 16px 16px;
}

.global-result {
  min-height: 22px;
  margin: 10px 2px 0;
  padding: 0;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1.4;
  transition: all 180ms ease;
}

.global-result:not(:empty) {
  padding: 12px 14px;
  border: 1px solid transparent;
  box-shadow: 0 8px 18px rgba(31, 41, 51, 0.06);
}

.global-result.is-progress {
  background: #fff1ea;
  border-color: #efc2b1;
  color: #8e3d1d;
}

.global-result.is-success {
  background: #ffe7de;
  border-color: #efb7a4;
  color: #8c2f13;
}

.global-result.is-warning {
  background: #fff4e4;
  border-color: #efd3a3;
  color: #8c5b12;
}

.global-result.is-error {
  background: #fde3df;
  border-color: #e8aea7;
  color: #972f20;
}

.global-result.is-info {
  background: #edf3f7;
  border-color: #c9d7e3;
  color: #36526b;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 16px 12px;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.field,
.compact-field {
  display: grid;
  gap: 7px;
}

.field-label-row,
.detail-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field span,
.compact-field span,
.radio-group > span {
  font-weight: 700;
  font-size: 0.8rem;
  color: #6b7785;
}

.utility-panel {
  background: var(--soft-band);
  border-color: #f0ddd3;
}

.utility-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 10px 14px;
}

.search-field {
  min-width: 0;
}

.radio-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
}

.radio-group input {
  width: auto;
  margin: 0;
}

.utility-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}

.utility-button {
  margin-right: 6px;
}

input,
select {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #d7dee5;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}

input:focus,
select:focus {
  outline: 3px solid rgba(111, 48, 16, 0.08);
  border-color: #aab7c4;
}

input:disabled {
  background: #f4f6f8;
  color: #8b96a3;
}

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

.form-section + .form-section {
  margin-top: 18px;
}

.form-section h3 {
  margin-bottom: 12px;
  color: #4e5d6c;
}

.actions,
.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.table-head-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  margin-left: auto;
}

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

.page-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.page-button {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
  font-size: 0.88rem;
  line-height: 1;
}

.page-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
}

.page-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.form-actions {
  margin-top: 18px;
  justify-content: flex-end;
}

button {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(111, 48, 16, 0.12);
}

button.secondary {
  background: #f6f8fa;
  color: #425466;
  border-color: #d7dee5;
  box-shadow: none;
}

button.danger {
  background: linear-gradient(135deg, #b0422b, #7d2311);
}

button.ghost {
  background: #ffffff;
  color: #425466;
  border: 1px solid #d7dee5;
  box-shadow: none;
}

button.ghost:hover {
  background: #f0f4f7;
  border-color: #b9c5cf;
  color: var(--text);
}

button:hover {
  filter: brightness(0.98);
}

.rows-shell {
  min-height: 420px;
  background: #fff;
}

.empty-state {
  padding: 24px 14px;
  color: var(--muted);
}

.table-shell {
  overflow: auto;
  max-height: calc(100vh - 340px);
  border-top: 1px solid var(--line-soft);
  overscroll-behavior: contain;
}

.column-groups-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #fbfcfd;
}

.column-groups-copy {
  display: grid;
  gap: 2px;
  flex: 0 0 auto;
}

.column-groups-copy strong {
  font-size: 0.84rem;
  color: var(--text);
}

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

.column-group-chip {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d7dee5;
  border-radius: 999px;
  background: #ffffff;
  color: #425466;
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 600;
}

.column-group-chip:hover {
  background: #f0f4f7;
  border-color: #b9c5cf;
}

.column-group-chip.active {
  background: rgba(154, 77, 36, 0.1);
  border-color: rgba(154, 77, 36, 0.26);
  color: var(--accent-strong);
}

.results-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

th,
td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  min-width: 92px;
  overflow-wrap: normal;
  word-break: normal;
  font-size: 0.83rem;
  line-height: 1.28;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--header-band);
  color: white;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  z-index: 5;
}

.sortable-head {
  padding: 0;
}

.sort-head-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.sort-head-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sort-head-label {
  display: block;
  max-width: 124px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.92;
}

.sort-head-letter {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.1;
}

.sort-head-button:hover {
  filter: none;
  background: rgba(255, 255, 255, 0.06);
}

.sort-indicator {
  flex: 0 0 auto;
  font-size: 0.82rem;
  opacity: 0.9;
}

tbody tr:nth-child(even) {
  background: #fafcfd;
}

tbody tr:hover {
  background: #f4f8fb;
}

.checkbox-col {
  width: 34px;
  min-width: 34px;
  text-align: center;
}

.checkbox-col input,
.select-all input {
  width: 16px;
  height: 16px;
}

.mini-select {
  width: 136px;
  min-width: 136px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.select-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

.profile-col,
.profile-col-cell {
  text-align: center;
}

.profile-col-cell select {
  width: min(160px, 100%);
  margin: 0 auto;
}

.actions-col,
.row-actions-cell {
  width: 168px;
  min-width: 168px;
  position: sticky;
  right: 0;
  box-shadow: -8px 0 12px rgba(15, 23, 42, 0.04);
}

.actions-col {
  background: var(--header-band);
  z-index: 6;
  text-align: center;
}

.row-actions-cell {
  background: inherit;
  z-index: 1;
  text-align: center;
}

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

.table-action {
  border: 1px solid #d6dde5;
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff;
  color: #445261;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
}

.table-action.view {
  background: #eef5fb;
  border-color: #c9dcee;
  color: #31506d;
}

.table-action.edit {
  background: #f8fafc;
}

.table-action.delete {
  background: #fff6f5;
  border-color: #efc7c0;
  color: #9e3828;
}

.label-rename {
  border: 0;
  padding: 0;
  background: transparent;
  color: #7c8b98;
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: none;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.detail-item {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfcfd;
  padding: 12px;
}

.detail-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #6b7785;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.detail-value {
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-empty {
  color: var(--muted);
  font-style: italic;
}

.col-tipo {
  width: 7%;
}

.col-no {
  width: 6%;
}

.col-no_acao {
  width: 8%;
}

.col-curso {
  width: 10%;
}

.col-data {
  width: 9%;
}

.col-localidade {
  width: 12%;
}

.col-participantes {
  width: 7%;
}

.col-op,
.col-admin {
  width: 6%;
}

.col-fechada,
.col-faltam_dados {
  width: 7%;
}

.col-data_envio {
  width: 8%;
}

.hidden {
  display: none;
}

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

  .filter-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  .utility-row,
  .form-grid,
  .details-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  .users-layout {
    grid-template-columns: 1fr;
  }

  .users-detail-form,
  .profile-form,
  .profile-password-form,
  .reports-layout,
  .reports-split,
  .reports-growth-sections {
    grid-template-columns: 1fr;
  }

  .reports-toolbar-actions {
    margin-left: 0;
  }
}

@media (max-width: 820px) {
  .layout {
    width: calc(100vw - 10px);
  }

  .page-nav {
    align-items: stretch;
    padding: 12px;
  }

  .page-nav-links {
    width: 100%;
  }

  .session-menu {
    width: 100%;
    justify-content: flex-end;
  }

  .dashboard-card {
    padding: 16px;
  }

  .profile-card {
    padding: 20px 18px;
    border-radius: 22px;
  }

  .profile-card-hero {
    align-items: flex-start;
  }

  .workspace-head,
  .block-head-row {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-actions {
    justify-content: stretch;
  }

  h1 {
    max-width: none;
    font-size: clamp(1.9rem, 10vw, 2.6rem);
  }

  .filter-grid,
  .utility-row,
  .form-grid,
  .details-grid,
  .reports-kpi-grid,
  .reports-growth-kpis {
    grid-template-columns: 1fr;
  }

  .reports-toolbar {
    align-items: stretch;
  }

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

  .bar-row {
    grid-template-columns: 56px minmax(0, 1fr) 30px;
  }

  .radio-group,
  .utility-actions,
  .filter-actions,
  .form-actions {
    justify-content: flex-start;
  }

  .table-head-side {
    width: 100%;
    justify-content: space-between;
  }
}
