* {
  box-sizing: border-box;
}

:root {
  --milky-coffee: #7096d1;
  --milky-coffee-soft: rgba(112, 150, 209, 0.2);
  --bg-deep: #141b24;
  --bg-panel: #1b2432;
  --bg-panel-soft: #202c3d;
  --border-soft: rgba(255, 255, 255, 0.08);
  --text-main: #e9eef6;
  --text-muted: rgba(233, 238, 246, 0.6);
  --glow: 0 0 24px rgba(112, 150, 209, 0.35);
}

body.light {
  --bg-deep: #f5f7fb;
  --bg-panel: #ffffff;
  --bg-panel-soft: #e9eff8;
  --border-soft: rgba(16, 26, 41, 0.12);
  --text-main: #1f2a3a;
  --text-muted: rgba(31, 42, 58, 0.6);
  --glow: 0 0 24px rgba(112, 150, 209, 0.2);
  color-scheme: light;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at top, #1f2a3a 0%, #141b24 55%, #0f141b 100%);
  color: var(--text-main);
}

body.light {
  background: radial-gradient(circle at top, #ffffff 0%, #f3f6fb 60%, #e8eef8 100%);
}

.gov-header {
  background: #2c6fb7 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
}

body.light .gov-header {
  background: #2c6fb7 !important;
}

.gov-header .btn-secondary {
  color: #e9eef6;
  border-color: rgba(255, 255, 255, 0.25);
}

.gov-header-top {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  position: relative;
}

.gov-logo {
  width: 180px;
  height: auto;
}

.gov-links {
  display: none;
}

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

.gov-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gov-nav .top-nav-link {
  color: #e9eef6 !important;
  text-decoration: none !important;
  font-size: 14px;
  padding: 6px 8px;
  border-bottom: none !important;
  opacity: 1;
}

.gov-nav .top-nav-link:visited,
.gov-nav .top-nav-link:hover,
.gov-nav .top-nav-link:active,
.gov-nav .top-nav-link:focus {
  color: #e9eef6 !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-trigger {
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: #132744;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px;
  display: none;
  z-index: 50;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

body.light .nav-menu {
  background: #ffffff;
  border-color: rgba(31, 42, 58, 0.12);
  box-shadow: 0 16px 30px rgba(31, 42, 58, 0.16);
}

body.light .nav-menu-link {
  color: #1f2a3a;
}

body.light .nav-menu-link:hover {
  background: rgba(112, 150, 209, 0.12);
}

.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu {
  display: grid;
  gap: 3px;
}

.nav-menu-link {
  color: #e9eef6;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
}

.nav-menu-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.top-nav-link.active {
  opacity: 1;
  border-color: transparent;
}

.btn-login {
  text-decoration: none;
  line-height: 1;
}

.login-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #7ea0d8;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 14px rgba(12, 18, 28, 0.35);
}

.header-toggle {
  width: 32px;
  height: 32px;
  font-size: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e9eef6;
}

body.light .header-toggle {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(31, 42, 58, 0.2);
  color: #1f2a3a;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.hidden {
  display: none !important;
}

.filters-overlay[hidden] {
  display: none;
}

.filters-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 7, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.filters-panel {
  width: min(900px, 90vw);
  background: var(--bg-panel);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.filters-inline {
  width: 100%;
  grid-column: 1 / -1;
}

.filters-panel-inline {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.filters-inline .filters-header {
  margin-bottom: 8px;
}

.filters-inline .filters-header h3 {
  font-size: 16px;
}

.filters-inline .filter-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px 12px;
}

.filters-inline .filter-group {
  gap: 4px;
  font-size: 12px;
}

.filters-inline .filter-group input,
.filters-inline .filter-group select {
  padding: 8px 10px;
  border-radius: 8px;
}

.filters-inline .filter-actions .btn {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.filters-header h3 {
  margin: 0;
  font-size: 18px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-main);
  font-size: 20px;
  cursor: pointer;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 20px;
  align-items: start;
}

.no-sidebar .dashboard-shell {
  grid-template-columns: 1fr;
}

.dashboard-sidebar {
  background: #191614;
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

body.light .dashboard-sidebar {
  background: #e9eff8;
  box-shadow: 0 12px 28px rgba(16, 26, 41, 0.08);
}

body.light .nav-btn {
  background: #ffffff;
  color: #1f2a3a;
}

body.light .nav-btn.active {
  background: var(--milky-coffee);
  color: #1b1816;
  box-shadow: 0 6px 18px rgba(112, 150, 209, 0.35);
}

body.light .brand-title {
  color: rgba(31, 42, 58, 0.6);
}

body.light .sidebar-footer {
  color: rgba(31, 42, 58, 0.6);
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--milky-coffee);
  box-shadow: var(--glow);
}

.brand-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--bg-panel);
  color: var(--text-main);
  cursor: pointer;
}

.theme-toggle {
  border-radius: 999px;
  font-size: 18px;
}

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

.nav-btn.active {
  background: var(--milky-coffee);
  color: #1b1816;
  box-shadow: var(--glow);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #59c173;
}

.card {
  background: var(--bg-panel);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0 0 12px;
  font-size: 26px;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.year-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.year-filter select {
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid var(--border-soft);
  background: #201c1a;
  color: var(--text-main);
}

body.light .year-filter select {
  background: #ffffff !important;
  color: #1f2a3a !important;
  border: 1px solid rgba(31, 42, 58, 0.35);
  box-shadow: 0 6px 12px rgba(31, 42, 58, 0.08);
  color-scheme: light;
}

body.light .year-filter select option {
  background: #ffffff;
  color: #1f2a3a;
}

.dashboard {
  margin-bottom: 24px;
}

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

.panel {
  background: var(--bg-panel);
  border-radius: 22px;
  border: 1px solid var(--border-soft);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  grid-column: span 4;
}

.panel-wide {
  grid-column: span 12;
}

.panel-tall {
  grid-column: span 4;
}

.panel-table {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title {
  font-size: 14px;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--milky-coffee-soft);
  color: var(--text-main);
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.resumo-group {
  background: var(--bg-panel-soft);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resumo-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.resumo-bars {
  display: grid;
  gap: 8px;
}

.resumo-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-main);
}

.resumo-label {
  width: 64px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resumo-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.resumo-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(86, 140, 255, 0.95),
    rgba(86, 140, 255, 0.45)
  );
}

.resumo-value {
  width: 32px;
  text-align: right;
  color: var(--text-muted);
}

.assuntos-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.assunto-chip {
  padding: 6px 10px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--bg-panel-soft);
  color: var(--text-main);
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.assunto-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow);
}

.assunto-chip.active {
  background: var(--milky-coffee);
  color: #1b1816;
  box-shadow: var(--glow);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.panel-chart canvas {
  width: 100% !important;
  height: 360px !important;
}

.stats-summary {
  margin: 8px 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.stats-card {
  background: linear-gradient(135deg, #315ea6 0%, #2c6fb7 60%, #3b82f6 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 10px 20px rgba(44, 111, 183, 0.25);
}

.stats-card-value {
  font-size: 26px;
  font-weight: 700;
}

.stats-card-label {
  font-size: 12px;
  opacity: 0.9;
}

.stats-summary-note {
  margin-top: 10px;
}

@media (min-width: 1100px) {
  .panel-chart canvas {
    height: 420px !important;
  }
}

.orgaos-list {
  display: grid;
  gap: 12px;
}

.orgao-folder {
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--bg-panel-soft);
  padding: 12px 16px;
}

.orgao-folder summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.orgao-folder summary::-webkit-details-marker {
  display: none;
}

.orgao-folder summary::before {
  content: "📁";
}

.orgao-years {
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orgao-year {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--text-main);
}

.orgao-tree {
  display: grid;
  gap: 10px;
}

.orgao-primary {
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--bg-panel-soft);
  padding: 12px 16px;
}

.orgao-secondary {
  margin-top: 8px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  padding: 10px 12px;
}

.orgao-files {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.orgao-files a {
  color: var(--text-main);
  text-decoration: none;
}

.orgao-files a:hover {
  text-decoration: underline;
}

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

.stat {
  background: var(--bg-panel-soft);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border-soft);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-value {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  color: var(--milky-coffee);
}

.chart-placeholder {
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(155, 125, 97, 0.15),
    rgba(0, 0, 0, 0.2)
  );
  border: 1px dashed rgba(155, 125, 97, 0.4);
  min-height: 160px;
  position: relative;
  overflow: hidden;
}

.chart-bars {
  min-height: 180px;
  background-image:
    linear-gradient(to top, rgba(155, 125, 97, 0.35) 30%, transparent 30%),
    linear-gradient(to top, rgba(155, 125, 97, 0.25) 50%, transparent 50%),
    linear-gradient(to top, rgba(155, 125, 97, 0.4) 70%, transparent 70%);
  background-size: 20% 100%, 20% 100%, 20% 100%;
  background-repeat: no-repeat;
  background-position: 10% 100%, 50% 100%, 80% 100%;
}

.chart-line {
  min-height: 220px;
  background-image: radial-gradient(circle at 20% 60%, rgba(155, 125, 97, 0.35), transparent 40%),
    radial-gradient(circle at 60% 40%, rgba(155, 125, 97, 0.25), transparent 45%),
    linear-gradient(120deg, rgba(155, 125, 97, 0.4) 0%, transparent 60%);
}

.chart-donut {
  min-height: 220px;
  background-image:
    conic-gradient(
      from 180deg,
      rgba(155, 125, 97, 0.9),
      rgba(155, 125, 97, 0.2),
      rgba(155, 125, 97, 0.6),
      rgba(155, 125, 97, 0.3)
    );
  mask: radial-gradient(circle, transparent 48%, #000 50%);
}

.chart-map {
  min-height: 360px;
  background-image:
    radial-gradient(circle at 30% 40%, rgba(155, 125, 97, 0.45), transparent 50%),
    radial-gradient(circle at 60% 60%, rgba(155, 125, 97, 0.3), transparent 55%),
    linear-gradient(120deg, rgba(0, 0, 0, 0.4), transparent 60%);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.filter-group input,
.filter-group select {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  background: #201c1a;
  color: var(--text-main);
}

.range-field {
  display: grid;
  gap: 8px;
  overflow: visible;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.range-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.range-inputs input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #201c1a;
  color: var(--text-main);
}

body.light .range-inputs input {
  background: #ffffff;
}

.range-sep {
  font-size: 12px;
  color: var(--text-muted);
}

.range-slider {
  --range-pad: 12px;
  position: relative;
  height: 32px;
  padding: 0 var(--range-pad);
  overflow: visible;
  z-index: 2;
}

.range-handle {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 7;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.range-handle.min {
  background: #ffffff;
  border: 2px solid #2c6fb7;
}

.range-handle.max {
  background: var(--bg-panel);
  border: 2px solid var(--milky-coffee);
}

.range-thumb-labels {
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 14px;
  pointer-events: none;
  z-index: 5;
}

.range-thumb-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.range-track {
  position: absolute;
  left: var(--range-pad);
  right: var(--range-pad);
  top: 50%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-50%);
  z-index: 1;
}

.range-fill {
  position: absolute;
  height: 100%;
  left: 0;
  right: 0;
  border-radius: inherit;
  background: var(--milky-coffee);
}

.range-input {
  position: absolute;
  left: var(--range-pad);
  right: var(--range-pad);
  top: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  z-index: 2;
}

#fAnoMax.range-input {
  z-index: 4;
}

#fAnoMin.range-input {
  z-index: 3;
}

.range-input:focus {
  outline: none;
}

.range-input::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0;
  cursor: pointer;
  margin-top: -6px;
  pointer-events: auto;
}

.range-input::-moz-range-track {
  height: 6px;
  background: transparent;
}

.range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0;
  cursor: pointer;
  pointer-events: auto;
}

body.light .filter-group input,
body.light .filter-group select {
  background: #ffffff;
}

.filter-group.search input {
  border-radius: 999px;
}

.filter-actions {
  display: flex;
  gap: 10px;
  align-self: end;
}

.btn {
  background: var(--milky-coffee);
  color: #1b1816;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

.table-card {
  padding: 0;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.panel-table .table-wrapper {
  overflow: visible;
}

.panel-table thead th {
  position: sticky;
  top: 0;
}

.panel-table .pagination {
  padding: 16px 0 0;
  border-top: 1px solid var(--border-soft);
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border-soft);
}

thead th {
  background: rgba(112, 150, 209, 0.25);
  color: var(--text-main);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.table-link {
  color: var(--milky-coffee);
  text-decoration: none;
  font-weight: 600;
}

.table-link:hover {
  text-decoration: underline;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border-soft);
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
}

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

  .dashboard-sidebar {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 16px;
  }

  .sidebar-nav {
    flex-direction: row;
  }

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

  .panel,
  .panel-wide,
  .panel-tall,
  .panel-table {
    grid-column: span 1;
  }
}

.admin-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-deep);
  color: var(--text-main);
}

.auth-card {
  width: min(520px, 100%);
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.auth-header h1 {
  margin: 12px 0 6px;
  font-size: 22px;
}

.auth-header p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.auth-logo {
  width: 150px;
  display: block;
}

.auth-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-back-link {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  text-decoration: none;
  font-size: 16px;
  background: var(--bg-panel-soft);
}

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

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-form input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-panel-soft);
  color: var(--text-main);
}

.auth-button {
  margin-top: 6px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: var(--milky-coffee);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.auth-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
}


.auth-footer a {
  color: var(--milky-coffee);
  text-decoration: none;
}

.auth-message {
  margin-top: 12px;
  font-size: 14px;
}

.auth-message.error {
  color: #ff7a7a;
}

.auth-message.success {
  color: #76d1a8;
}

.mfa-box {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border-soft);
  background: var(--bg-panel-soft);
  font-size: 13px;
  color: var(--text-muted);
  display: grid;
  gap: 6px;
}

.mfa-qr {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border-soft);
  background: var(--bg-panel-soft);
  display: grid;
  gap: 8px;
  align-items: center;
  justify-items: center;
  color: var(--text-muted);
  font-size: 12px;
}

.mfa-qr canvas {
  background: #ffffff;
  border-radius: 8px;
  padding: 6px;
}

.password-rules {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-panel-soft);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 12px;
}

.password-rules ul {
  margin: 6px 0 0;
  padding-left: 16px;
}

.password-strength {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.strength-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-panel-soft);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.strength-bar span {
  display: block;
  height: 100%;
  width: 20%;
  transition: width 0.2s ease;
  background: #6c7a90;
}

.strength-bar span.weak {
  width: 33%;
  background: #e67a7a;
}

.strength-bar span.medium {
  width: 66%;
  background: #f1c470;
}

.strength-bar span.strong {
  width: 100%;
  background: #7cd1a8;
}

.admin-dashboard .admin-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
