:root {
  color-scheme: dark light;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --gradient-start: #485bf6;
  --gradient-end: #aed796;
  --card-bg: rgba(15, 23, 42, 0.78);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --danger: #f87171;
  --table-bg: #ffffff;
  --table-header-bg: #2d2838;
  --table-header-text: #f5f5ff;
  --table-row-odd: #ffffff;
  --table-row-even: #f6f7fb;
  --table-border: #e4e7f2;
  --root-font-scale: 1;
  --productivity-page-gutter: 1rem;
  --dashboard-zoom: 1;
}

html {
  font-size: calc(16px * var(--root-font-scale));
}

:root:has(body.productivity-page) {
  --root-font-scale: 0.78;
  --productivity-page-gutter: clamp(0.35rem, 1vw, 0.85rem);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(0.5rem, 2vw, 1.25rem);
  gap: 1rem;
  box-sizing: border-box;
}

body.dashboard-page {
  align-items: center;
  justify-content: flex-start;
  padding: 0.5rem 0 1rem;
  width: 100%;
  box-sizing: border-box;
  gap: 0;
  min-height: 100vh;
  --dashboard-zoom: 0.8;
  zoom: var(--dashboard-zoom);
  transform-origin: top center;
}

body.productivity-page {
  justify-content: flex-start;
  align-items: center;
  padding: clamp(0.35rem, 1.25vw, 0.85rem) clamp(0.15rem, 0.75vw, 0.5rem) clamp(0.25rem, 1vw, 0.65rem);
  width: 100%;
  min-height: 100vh;
}

@supports not (zoom: 1) {
  body.dashboard-page {
    zoom: 1;
  }

  body.dashboard-page main.dashboard-layout {
    transform: scale(var(--dashboard-zoom));
    transform-origin: top center;
  }
}


.login-card {
  border: 1px solid var(--card-border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  background: var(--card-bg);
  color: var(--text);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.8);
}

.dashboard {
  width: min(2600px, 99vw);
  max-width: none;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: #ffffff;
  font-size: 0.92rem;
}

.productivity-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: #fff;
  padding: 0 clamp(0.25rem, 1vw, 0.9rem);
  box-sizing: border-box;
}

.productivity-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.productivity-user {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.productivity-card {
  width: 100%;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.5rem;
  padding: clamp(0.8rem, 1vw, 1rem) clamp(0.08rem, 0.45vw, 0.4rem) clamp(0.95rem, 1.3vw, 1.2rem);
  color: #fff;
  box-shadow: 0 35px 100px rgba(15, 23, 42, 0.6);
  box-sizing: border-box;
}

.productivity-card__header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.productivity-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
}

.productivity-card__header h1 {
  margin: 0.25rem 0;
  font-size: 1.8rem;
}

.productivity-subtitle {
  margin: 0;
  color: rgba(226, 232, 240, 0.92);
}

.productivity-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #cbd5f5;
  min-width: 220px;
}

.productivity-summary span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.productivity-status {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.productivity-status.error {
  color: #fda4af;
}

.productivity-status.success {
  color: #bbf7d0;
}

.productivity-card__header,
.productivity-status {
  box-sizing: border-box;
}

.productivity-table-wrapper {
  width: 100%;
  box-sizing: border-box;
  max-height: 360px;
  overflow: auto;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.15);
}


.productivity-table {
  width: 100%;
  max-width: none;
  border-collapse: collapse;
  background: rgba(13, 20, 38, 0.85);
  color: #ffffff;
  table-layout: fixed;
}

body.productivity-page table {
  min-width: 100%;
  width: 100%;
}

.productivity-table thead {
  background: rgba(59, 130, 246, 0.25);
}

.productivity-table th,
.productivity-table td {
  padding: 6px 8px;
  text-align: left;
  font-size: 0.92rem;
}

.productivity-table th {
  white-space: normal;
  overflow-wrap: anywhere;
}

.productivity-table td {
  white-space: nowrap;
}

.productivity-table th:nth-child(1),
.productivity-table td:nth-child(1) {
  width: 23px;
}

.productivity-table th:nth-child(2),
.productivity-table td:nth-child(2) {
  width: 40px;
}

.productivity-table th:nth-child(3),
.productivity-table td:nth-child(3) {
  width: 40px;
}

.productivity-table th:nth-child(4),
.productivity-table td:nth-child(4) {
  width: 40px;
}

.productivity-table th:nth-child(5),
.productivity-table td:nth-child(5) {
  width: 60px;
}

.productivity-table th:nth-child(6),
.productivity-table td:nth-child(6) {
  width: 40px;
}

.productivity-table th:nth-child(7),
.productivity-table td:nth-child(7) {
  width: 100px;
}

.productivity-table th:not(:first-child),
.productivity-table td:not(:first-child) {
  text-align: center;
  word-break: break-word;
}

.productivity-table th:first-child,
.productivity-table td:first-child {
  padding: 0.35rem 0.15rem;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.1;
  font-size: inherit;
}

.productivity-table th {
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.85);
  line-height: 1.2;
}


.productivity-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

.productivity-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

.productivity-row--alert {
  background: rgba(248, 113, 113, 0.18) !important;
}

.productivity-row--alert td:last-child {
  font-weight: 600;
  color: #fecaca;
}


.productivity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.productivity-badge--ok {
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.productivity-badge--alert {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.productivity-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.productivity-table tbody tr:last-child td {
  border-bottom: none;
}

.site-footer {
  margin: 0 auto;
  width: min(90vw, 1100px);
  text-align: center;
  font-size: 0.9rem;
  color: #e2e8ff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  transition: color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}

body.productivity-page .site-footer {
  width: 100%;
  max-width: none;
  padding: 0 var(--productivity-page-gutter);
  box-sizing: border-box;
}

.site-footer:hover {
  color: #ffffff;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  transform: translateY(-1px);
}

.dashboard .site-footer {
  width: auto;
  margin-top: 0.15rem;
  align-self: center;
}

.dashboard__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard__branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

.brand-logo {
  height: 42px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.brand-logo--hn {
  height: 55px;
}

.brand-logo--cf {
  height: 48px;
}

.branding-separator {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1;
}

.dashboard__header h1 {
  margin: 0 0 0.15rem;
  font-size: 1.55rem;
}

.dashboard__header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.dashboard__info {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard__welcome {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#user-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  font-size: 0.85rem;
}

#row-counter {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.25rem;
  color: #ffffff;
}

.export-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0;
  color: #f8fafc;
}

.export-controls--bottom {
  justify-content: flex-end;
  margin: 0;
}

.export-controls--bottom .export-controls__label {
  text-align: right;
}

.export-controls__label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.export-controls__actions {
  display: flex;
  gap: 0.5rem;
}

.export-controls__actions button {
  min-width: 140px;
}

.filters__estoque {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filters__estoque label {
  flex: 1;
}

.filters__global input,
.filters__column input,
.filters__column select,
.filters__estoque select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.18);
}

.excel-filter {
  position: relative;
  width: 100%;
}

.excel-filter__trigger {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.excel-filter__caret {
  font-size: 0.85rem;
  opacity: 0.8;
}

.excel-filter__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  width: min(320px, 90vw);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 30px 65px rgba(6, 11, 25, 0.65);
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 10;
}

.excel-filter__panel[data-open="true"] {
  display: flex;
}

.excel-filter__section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.excel-filter__label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

#estoque-filter-search {
  border-radius: 0.85rem;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

#estoque-filter-search::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#estoque-cf-column {
  border-radius: 0.85rem;
  padding: 0.5rem 0.85rem;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #0f172a;
}

#estoque-cf-column option {
  color: #0f172a;
}

.excel-filter__list {
  max-height: 180px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.85rem;
  padding: 0.5rem;
  background: rgba(17, 24, 39, 0.75);
}

.excel-filter__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.45rem;
  color: #e2e8f0;
  border-radius: 0.65rem;
  cursor: pointer;
}

.excel-filter__option:hover {
  background: rgba(59, 130, 246, 0.18);
}

.excel-filter__option input {
  accent-color: #60a5fa;
}

.excel-filter__empty {
  margin: 0;
  padding: 0.5rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.excel-filter__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.excel-filter__button {
  border: none;
  border-radius: 0.75rem;
  padding: 0.45rem 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #fff;
}

.excel-filter__button--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
}

.filters__global input::placeholder,
.filters__column input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.table-wrapper {
  width: 100%;
  margin: 0;
  background: var(--table-bg);
  border-radius: 24px;
  box-shadow: 0 45px 120px rgba(23, 16, 45, 0.4);
  overflow: hidden;
}

.table-inner {
  max-height: 720px;
  overflow: auto;
  position: relative;
}

.table-inner::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-inner::before {
  content: '';
  position: sticky;
  top: 0;
  display: block;
  height: 3.5rem;
  background: var(--table-header-bg);
  z-index: 1;
  pointer-events: none;
}

.table-inner::-webkit-scrollbar-thumb {
  background: rgba(97, 43, 255, 0.65);
  border-radius: 999px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: min(2000px, 100%);
  font-size: 0.95rem;
  color: #1f2433;
}

@media (min-width: 1400px) {
  .dashboard-page .dashboard {
    transform: scale(0.88);
    transform-origin: top center;
  }

  .dashboard-page main.dashboard-layout {
    padding-bottom: 4rem;
  }
}

#base-table th:nth-child(2),
#base-table td:nth-child(2) {
  width: 20%;
}

th,
td {
  text-align: center;
  padding: 1rem 1.25rem;
  word-break: break-word;
  white-space: normal;
}

#base-table th:first-child,
#base-table td:first-child {
  white-space: nowrap;
  word-break: normal;
}

thead th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}

.group-row th {
  background: rgba(45, 40, 56, 0.9);
  color: #dbeafe;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-top: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: none;
  top: 0;
  z-index: 3;
}

thead .group-row + tr th {
  top: 2.85rem;
}

.group-heading {
  border-radius: 1rem 1rem 0 0;
  white-space: nowrap;
}

.group-row .group-spacer {
  background: rgba(45, 40, 56, 0.9);
  padding: 0;
  border-bottom: none;
}

tbody tr:nth-child(odd) {
  background: var(--table-row-odd);
}

tbody tr:nth-child(even) {
  background: var(--table-row-even);
}

tbody td {
  border-bottom: 1px solid var(--table-border);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: #eef2ff;
}

.obs-cell,
.delivery-cell {
  min-width: 160px;
}

th.delivery-header {
  width: 150px;
}

.obs-display {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.obs-text {
  flex: 1;
  color: #1f2433;
  line-height: 1.35;
  word-break: break-word;
}

.obs-empty {
  color: #94a3b8;
  font-style: italic;
}

.obs-edit {
  border: none;
  background: rgba(99, 102, 241, 0.12);
  color: #4c1d95;
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.obs-edit:hover {
  background: rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.obs-cell.editing {
  background: #eef2ff;
}

.obs-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.obs-input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid var(--table-border);
  font-family: inherit;
  font-size: 0.95rem;
}

textarea.obs-input {
  min-height: 100px;
  resize: vertical;
}

input.obs-input {
  min-height: 0;
  height: 42px;
}

.obs-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.obs-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.obs-save,
.obs-cancel {
  border: none;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.obs-save {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.obs-cancel {
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.2);
  color: #374151;
}

.obs-cell.saving .obs-save {
  opacity: 0.6;
  pointer-events: none;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
}

header p {
  margin-top: 0.75rem;
  color: var(--muted);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

label {
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

input,
select {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  transition: border-color 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  appearance: none;
  border: none;
  border-radius: 0.85rem;
  padding: 0.95rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  color: #0f172a;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

button:disabled {
  cursor: wait;
  filter: grayscale(0.6);
}

button:not(:disabled):hover {
  transform: translateY(-1px);
}

.ghost {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--text);
}

.ghost--secondary {
  border-color: rgba(59, 130, 246, 0.5);
  color: #bfdbfe;
}

.ghost:not(:disabled):hover {
  filter: none;
  transform: translateY(-1px);
}

.primary {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #062826;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 20;
  transition: opacity 0.2s ease;
}

.modal[aria-hidden='true'] {
  opacity: 0;
  pointer-events: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
}

.modal__dialog {
  position: relative;
  width: min(420px, 95vw);
  background: #0f172a;
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal__header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.modal__close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.password-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.password-form input {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  color: #f8fafc;
}

.password-form input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.password-form__status {
  min-height: 1.25rem;
  font-size: 0.9rem;
}

.password-form__status.error {
  color: var(--danger);
}

.password-form__status.success {
  color: #34d399;
}

.password-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.status {
  min-height: 1.25rem;
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--accent);
}

.protected-note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.protected-note.secured {
  color: var(--accent);
}

.admin-modal__dialog {
  width: min(800px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
}

.admin-section {
  margin-bottom: 2rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 1.25rem;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.admin-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.admin-section h3 {
  margin: 0;
  font-size: 1.1rem;
}

.admin-users-table {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-select-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

#admin-user-select {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: rgba(15, 23, 42, 0.6);
  color: #f8fafc;
}

#admin-user-select:disabled {
  opacity: 0.6;
}

.admin-user-actions--inline {
  display: flex;
  gap: 0.5rem;
}

.admin-user-actions--inline button {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
}

.admin-user-actions--inline .danger {
  background: linear-gradient(135deg, #fb7185, #ef4444);
  color: #fff;
}

.admin-empty {
  margin: 0;
  color: #94a3b8;
  font-style: italic;
}

.admin-status {
  min-height: 1.1rem;
  font-size: 0.9rem;
  color: #f97316;
}

.admin-status.success {
  color: #34d399;
}

.admin-selection-hint {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.admin-form input,
.admin-form select {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: rgba(15, 23, 42, 0.6);
  color: #f1f5f9;
}

.admin-hint {
  color: #94a3b8;
  font-size: 0.78rem;
}

.admin-password-target {
  margin: 0;
  color: #cbd5f5;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

@media (min-width: 1024px) {
  main.layout {
    max-width: 1200px;
  }

  .layout.dashboard-layout {
    width: min(2800px, 99vw);
    max-width: none;
  }

  .dashboard {
    padding: 1rem 0;
  }

  .filters {
    flex-direction: row;
    align-items: flex-end;
    gap: 1rem;
  }

  .filters__global {
    flex: 0 1 65%;
  }

  .filters__column {
    flex: 1;
    align-items: flex-end;
  }

  .filters__estoque {
    flex: 0 1 35%;
    justify-content: flex-end;
  }

  .excel-filter {
    max-width: 320px;
    margin-left: auto;
  }
}

body.dashboard-page main.layout {
  max-width: none;
  width: 100%;
}

body.dashboard-page .layout.dashboard-layout {
  width: min(2800px, 99vw);
  max-width: none;
}
