
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(124, 92, 255, 0.10), transparent 32%),
    linear-gradient(225deg, rgba(34, 199, 242, 0.08), transparent 34%),
    var(--bg);
}

button,
.settings-section .setting-toggle {
  min-height: 45px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 7px;
  background: #0a1726;
}

.settings-section .setting-toggle input[type="checkbox"] {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  margin: 0;
  padding: 0;
  accent-color: var(--cyan);
  box-shadow: none;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 12px 34px;
  background: rgba(7, 20, 34, 0.92);
  border-bottom: 1px solid rgba(124, 92, 255, 0.42);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(14px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  color: #ffffff;
  text-decoration: none;
  justify-self: center;
}

.brand-logo {
  display: block;
  width: 154px;
  height: 50px;
  object-fit: contain;
  object-position: center;
}

.brand-mark span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.brand-mark strong {
  display: none;
}

.brand-mark.logo-only {
  grid-column: 2;
}

.brand-mark.large {
  width: 100%;
  justify-content: center;
}

.page-title {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  min-width: 0;
  color: var(--ink);
  font-weight: 900;
  text-align: center;
}

.page-title span {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.page-title small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.top-actions {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 20px 34px 34px;
}

.workspace,
.summary-panel,
.login-box,
.settings-section {
  background: rgba(7, 20, 34, 0.90);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.20);
}

.workspace {
  min-width: 0;
  overflow: hidden;
}

.workspace-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  color: #ffffff;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.workspace-title span {
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.workspace-title small {
  display: none;
}

.new-quote-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.ai-builder {
  display: grid;
  gap: 11px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.ai-builder label {
  color: #c8d6e5;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 154px;
  gap: 10px;
  align-items: stretch;
}

.ai-input-row textarea {
  min-height: 74px;
  line-height: 1.4;
  resize: vertical;
}

.ai-input-row button {
  min-height: 74px;
}

.ai-message {
  min-height: 17px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-message.is-loading,
.row-status.is-pending,
.row-status.is-loading {
  color: var(--cyan);
}

.ai-message.is-loading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ai-message.is-loading::before {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  content: "";
  border: 2px solid rgba(56, 189, 248, 0.24);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: ai-loading-spin 0.8s linear infinite;
}

.ai-message.is-loading.is-changing {
  animation: ai-message-change 0.42s ease both;
}

@keyframes ai-loading-spin {
  to { transform: rotate(360deg); }
}

@keyframes ai-message-change {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-message.is-success,
.row-status.is-success {
  color: var(--green);
}

.ai-message.is-error,
.row-status.is-error {
  color: var(--danger);
}

.quote-toolbar {
  display: grid;
  grid-template-columns: 90px minmax(190px, 1fr) 170px 150px 120px;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.field,
.stack-form label,
.settings-section label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #c8d6e5;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 7px;
  padding: 10px 11px;
  background: #0a1726;
  color: var(--ink);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #7589a3;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.20);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--surface);
}

.parts-table {
  width: 100%;
  min-width: 660px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.parts-table th {
  height: 40px;
  padding: 11px 16px;
  color: #aec2d8;
  background: #091827;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-align: left;
  text-transform: uppercase;
}

.parts-table th:last-child {
  text-align: right;
}

.parts-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding: 12px 16px;
  vertical-align: top;
  background: var(--surface);
}

.parts-table tr:nth-child(even) td {
  background: #0a1828;
}

.parts-table tr.is-open td {
  background: #102034;
}

.parts-table tr.is-service td {
  background: rgba(25, 174, 232, 0.055);
}

.parts-table tr.is-service td:first-child {
  box-shadow: inset 3px 0 0 var(--cyan);
}

.services-divider td {
  padding: 10px 16px;
  background: #071525 !important;
  border-top: 1px solid rgba(56, 189, 248, 0.42);
  border-bottom: 1px solid rgba(56, 189, 248, 0.24);
}

.services-divider td,
.services-divider strong,
.services-divider small {
  cursor: default;
}

.services-divider-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.services-divider strong {
  color: var(--cyan);
  font-size: 12px;
  text-transform: uppercase;
}

.services-divider small {
  color: #8ea5bb;
  font-size: 10px;
  font-weight: 800;
}

.parts-table input {
  min-height: 42px;
  border-color: rgba(148, 163, 184, 0.25);
  background: #0d1b2c;
}

.description-cell {
  width: auto;
}

.money-col,
.price-cell {
  width: 190px;
}

.price-cell {
  text-align: right;
}

.part-input-wrap {
  display: grid;
  gap: 8px;
}

.row-status {
  min-height: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.description-entry {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.description-entry > input {
  min-width: 0;
}

.manual-register-slot {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.inline-search-button,
.inline-register-button {
  min-height: 42px;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
}

.inline-search-button {
  color: #e9e4ff;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.42);
}

.inline-search-button:hover,
.inline-search-button:focus-visible {
  color: #ffffff;
  background: rgba(124, 92, 255, 0.24);
  outline: none;
}

.inline-search-button:disabled {
  color: #9b90d0;
  cursor: wait;
}

.inline-register-button {
  min-height: 42px;
  padding: 4px 9px;
  color: #dff7ff;
  background: rgba(56, 189, 248, 0.11);
  border: 1px solid rgba(56, 189, 248, 0.38);
}

.inline-register-button:hover,
.inline-register-button:focus-visible {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.22);
  outline: none;
}

.inline-register-button:disabled {
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.32);
  background: rgba(16, 185, 129, 0.09);
  cursor: default;
}

.row-status.is-warning {
  color: var(--warning);
}

.options-slot {
  display: grid;
  gap: 8px;
}

.product-link {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(124, 92, 255, 0.20);
  border: 1px solid rgba(124, 92, 255, 0.55);
  border-radius: 7px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
}

.product-link:hover,
.product-link:focus-visible {
  background: rgba(124, 92, 255, 0.34);
  outline: none;
}

.suggestion-list {
  display: grid;
  gap: 8px;
  margin-top: 1px;
}

.suggestion-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 0;
  color: var(--ink);
  background: #091827;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 7px;
  overflow: hidden;
}

.suggestion-option:hover,
.suggestion-option:focus-within,
.suggestion-option.is-selected {
  border-color: var(--purple);
  background: #111f34;
}

.suggestion-option.is-selected {
  box-shadow: inset 3px 0 0 var(--purple);
}

.suggestion-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.suggestion-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.suggestion-main strong,
.suggestion-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-main strong {
  color: #f4f9ff;
  font-size: 13px;
  font-weight: 900;
}

.suggestion-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.suggestion-price {
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.suggestion-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 10px;
}

.catalog-result-button {
  min-height: 28px;
  padding: 5px 9px;
  color: #dff7ff;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.catalog-result-button:hover,
.catalog-result-button:focus-visible {
  background: rgba(56, 189, 248, 0.24);
  outline: none;
}

.catalog-result-button:disabled {
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.10);
  cursor: default;
}

.money-input {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 7px;
  background: #0d1b2c;
  overflow: hidden;
}

.money-input span {
  display: grid;
  place-items: center;
  align-self: stretch;
  color: #ffffff;
  background: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

.money-input input {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  text-align: right;
  font-weight: 800;
}

.money-input:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.20);
}

.money-input input:focus {
  box-shadow: none;
}

.primary-button,
.secondary-button,
.icon-button,
.danger-button,
.ghost-link {
  min-height: 40px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--purple), #5d7cff);
  border: 1px solid rgba(124, 92, 255, 0.65);
}

.secondary-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #f8fbff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 0 14px;
}

.primary-button[hidden],
.secondary-button[hidden],
.danger-button[hidden],
.ghost-link[hidden],
.icon-button[hidden] {
  display: none !important;
}

.icon-button,
.danger-button {
  color: #ffffff;
  background: #334155;
  border: 0;
}

.danger-button {
  background: rgba(239, 68, 68, 0.88);
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.danger-button:hover,
.ghost-link:hover {
  filter: brightness(1.08);
}

.primary-button:disabled,
.secondary-button:disabled,
.icon-button:disabled,
.danger-button:disabled {
  cursor: wait;
  opacity: 0.68;
  filter: none;
}

.login-box .ghost-link,
.result-row .ghost-link,
.settings-section .ghost-link {
  color: #ffffff;
}

.component-add-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.component-picker {
  position: relative;
  max-width: 100%;
}

.component-picker-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.component-picker-toggle::after {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.component-picker-toggle[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}

.component-picker-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 90;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(560px, calc(100vw - 68px));
  padding: 8px;
  background: #071525;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 7px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.component-picker-menu[hidden] {
  display: none;
}

.component-picker-option {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 52px;
  padding: 9px 10px;
  color: #f8fbff;
  background: #0b1b2d;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.component-picker-option:hover,
.component-picker-option:focus-visible {
  background: #0d263d;
  border-color: var(--cyan);
  outline: none;
}

.component-picker-option span {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 900;
}

.component-picker-option small {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
}

.component-picker-option.is-present small {
  color: #8ea5bb;
}

.under-table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 16px 16px;
  background: var(--surface);
}

.summary-panel {
  align-self: start;
  position: sticky;
  top: 96px;
  padding: 16px;
}

.summary-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  color: #ffffff;
  background: #0b1b2d;
  border: 1px solid rgba(124, 92, 255, 0.26);
  border-radius: 7px;
  font-weight: 900;
}

.summary-percent-input {
  display: grid;
  grid-template-columns: minmax(44px, 64px) auto;
  align-items: center;
  overflow: hidden;
  min-height: 34px;
  color: var(--cyan);
  background: rgba(32, 175, 224, 0.07);
  border: 1px solid rgba(32, 175, 224, 0.24);
  border-radius: 6px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.summary-percent-input:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(32, 175, 224, 0.12);
}

.summary-percent-input input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 4px 0 8px;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.summary-percent-input span {
  padding-right: 8px;
  color: var(--cyan);
  font-size: 11px;
  white-space: nowrap;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: text;
}

.summary-row > span:first-child {
  flex: 1;
  color: var(--muted);
  font-weight: 800;
}

.summary-services {
  cursor: default;
}

.summary-services > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--cyan);
}

.summary-services small {
  color: #7f96ae;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-services strong {
  color: #ffffff;
  font-size: 15px;
  white-space: nowrap;
}

.summary-services[hidden] {
  display: none;
}

.summary-money-input {
  display: grid;
  grid-template-columns: auto minmax(78px, 120px);
  align-items: center;
  min-width: 0;
  color: #ffffff;
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid transparent;
  border-radius: 6px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.summary-money-input:focus-within {
  background: rgba(32, 175, 224, 0.07);
  border-color: rgba(32, 175, 224, 0.72);
  box-shadow: 0 0 0 3px rgba(32, 175, 224, 0.10);
}

.summary-money-input > span {
  padding-left: 8px;
  color: #9eb1c8;
  font-size: 11px;
  font-weight: 900;
}

.summary-money-input input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 8px 0 4px;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  text-align: right;
}

.summary-row.big {
  font-size: 18px;
}

.summary-row.total {
  border-bottom: 0;
}

.summary-row.total > span:first-child {
  font-size: 20px;
}

.summary-row.total .summary-money-input {
  grid-template-columns: auto minmax(104px, 142px);
}

.summary-row.total .summary-money-input input {
  font-size: 21px;
}

.cash-payment-copy {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 3px;
}

.cash-payment-copy > label,
.cash-payment-copy > .notebook-payment-label {
  color: #9eb1c8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.cash-payment-note {
  display: block;
  overflow: hidden;
  max-width: 100%;
  color: #7f96ae;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-payment-note[hidden] {
  display: none !important;
}

.payment-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.payment-strip .payment-option {
  min-width: 0;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  padding: 10px;
  text-align: center;
  background: #0b1b2d;
}

.payment-strip .payment-option + .payment-option {
  border-left: 1px solid var(--line);
}

.payment-option > label,
.installment-count-input {
  color: #9eb1c8;
  font-weight: 900;
  font-size: 12px;
}

.installment-count-input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0 auto;
}

.installment-count-input input {
  width: 34px;
  padding: 0;
  color: #9eb1c8;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(32, 175, 224, 0.28);
  outline: 0;
  font: inherit;
  font-weight: 900;
  text-align: right;
}

.installment-count-input:focus-within input {
  color: #ffffff;
  border-bottom-color: var(--cyan);
}

.payment-money-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: border-color 160ms ease, background 160ms ease;
}

.payment-money-input:focus-within {
  background: rgba(255, 255, 255, 0.035);
  border-color: currentColor;
}

.payment-money-input > span {
  padding-left: 5px;
  color: currentColor;
  font-size: 10px;
  font-weight: 900;
}

.payment-money-input input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 5px 0 3px;
  color: currentColor;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  text-align: right;
}

.payment-money-input.is-cash {
  color: #fb7185;
}

.payment-money-input.is-installment {
  color: var(--cyan);
}

.summary-reset-button {
  width: 100%;
  min-height: 34px;
  margin-top: 10px;
  color: #9eb1c8;
  background: transparent;
  border: 1px dashed rgba(148, 163, 184, 0.26);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.summary-reset-button:hover,
.summary-reset-button:focus-visible {
  color: #ffffff;
  background: rgba(32, 175, 224, 0.07);
  border-color: rgba(32, 175, 224, 0.54);
  outline: none;
}

.muted-note,
.form-message {
  color: var(--muted);
  font-size: 13px;
}

.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--bg);
}

.login-box {
  width: min(420px, 100%);
  padding: 22px;
}

.login-brand {
  margin: 2px auto 20px;
}

.login-brand .brand-logo {
  width: min(190px, 62vw);
  height: 82px;
}

.stack-form {
  display: grid;
  gap: 14px;
  margin: 0;
}

.auth-sso {
  display: grid;
  gap: 12px;
  margin: 0;
}

.auth-sso[hidden],
.auth-divider[hidden] {
  display: none;
}

.auth-sso-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.auth-sso-button {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.auth-local-heading {
  display: grid;
  gap: 6px;
  text-align: center;
}

.auth-local-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.login-box .stack-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-box .stack-form input {
  width: 100%;
  min-height: 44px;
}

.login-box .form-message {
  min-height: 20px;
  margin: 14px 0 0;
  text-align: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.admin-shell {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 20px 34px 34px;
}

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

.settings-section[data-admin-category="geral"],
.settings-section[data-admin-category="documentacao"],
.settings-section[data-admin-category="agenda"] {
  grid-column: 1 / -1;
}

.settings-section {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
}

.settings-section h2 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #ffffff;
}

.backup-section {
  grid-column: 1 / -1;
}

.backup-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.backup-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.backup-status-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  color: #a8c2d8;
  background: #0b1d2e;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}

.backup-status-badge[data-status="working"] {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.55);
}

.backup-status-badge[data-status="success"] {
  color: #55e5b5;
  border-color: rgba(85, 229, 181, 0.48);
}

.backup-status-badge[data-status="error"] {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.48);
}

.backup-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.backup-security-note {
  margin: 0;
  padding-left: 11px;
  color: #9fb2c8;
  border-left: 3px solid rgba(32, 175, 224, 0.58);
  font-size: 12px;
  line-height: 1.5;
}

.backup-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 0;
  color: #dceaf6;
  background: #081827;
  border: 1px solid rgba(32, 175, 224, 0.42);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.backup-dialog::backdrop {
  background: rgba(1, 10, 20, 0.76);
  backdrop-filter: blur(3px);
}

.backup-dialog-content {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
}

.backup-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  color: #a9bdd1;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 17px;
  cursor: pointer;
}

.backup-dialog-close:hover,
.backup-dialog-close:focus-visible {
  color: #ffffff;
  border-color: var(--cyan);
  outline: none;
}

.backup-dialog-eyebrow {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.backup-dialog h2,
.backup-dialog p {
  margin: 0;
}

.backup-dialog h2 {
  padding-right: 42px;
  color: #ffffff;
  font-size: 21px;
}

.backup-dialog p {
  color: #b7c9d9;
  font-size: 13px;
  line-height: 1.55;
}

.backup-dialog strong {
  color: #ffffff;
  overflow-wrap: anywhere;
}

.backup-dialog-warning {
  padding: 11px 12px;
  background: rgba(251, 113, 133, 0.08);
  border-left: 3px solid #fb7185;
}

.backup-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 4px;
}

@media (max-width: 620px) {
  .backup-heading,
  .backup-actions,
  .backup-dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-status-badge,
  .backup-actions button,
  .backup-dialog-actions button {
    width: 100%;
  }

  .backup-dialog-content {
    padding: 20px;
  }
}
.password-section {
  grid-column: span 1;
}

.admin-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  padding: 2px 0;
}

.admin-settings-top-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 2px 0 0;
}

.admin-settings-top-actions .form-message {
  margin: 0;
  text-align: right;
}

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

.section-head h2,
.section-head p {
  margin-top: 0;
}

.catalog-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-head-actions [hidden] {
  display: none !important;
}

.catalog-shell {
  width: min(1180px, 100%);
}

.ghost-link.is-active {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.52);
}

.catalog-search-panel {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
  padding: 16px;
  background: #071525;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 7px;
}

.catalog-search-panel > label {
  color: #d9e8f7;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-search-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.catalog-search-row input,
.catalog-search-row select {
  width: 100%;
  min-height: 44px;
}

.catalog-result-count {
  min-width: 76px;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.catalog-category-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 7px;
}

.catalog-category-card {
  min-height: 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  color: #cad8e7;
  background: #0b1b2d;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.category-card-label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.category-card-label > span {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.category-card-label > i,
.category-card-label > svg {
  flex: 0 0 auto;
  color: #5fbde8;
}

.catalog-category-card:hover .category-card-label > i,
.catalog-category-card:hover .category-card-label > svg,
.catalog-category-card:focus-visible .category-card-label > i,
.catalog-category-card:focus-visible .category-card-label > svg,
.catalog-category-card.is-active .category-card-label > i,
.catalog-category-card.is-active .category-card-label > svg {
  color: #ffffff;
}

.catalog-category-card strong {
  min-width: 27px;
  min-height: 27px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  color: #9eb1c8;
  background: rgba(148, 163, 184, 0.10);
  border-radius: 6px;
  font-size: 11px;
}

.catalog-category-card:hover,
.catalog-category-card:focus-visible {
  color: #ffffff;
  background: #10243a;
  border-color: rgba(56, 189, 248, 0.45);
  outline: none;
}

.catalog-category-card.is-active {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.13);
  border-color: #38bdf8;
}

.catalog-category-card.is-active strong {
  color: #04111f;
  background: #38bdf8;
}

.catalog-category {
  display: grid;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.catalog-category:first-child {
  padding-top: 0;
  border-top: 0;
}

.catalog-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.catalog-category-head h3 {
  margin: 0;
  color: #f8fbff;
  font-size: 14px;
}

.catalog-category-head span {
  color: #8fa7bf;
  font-size: 12px;
  font-weight: 800;
}

.catalog-category-list {
  display: grid;
  gap: 8px;
}

.catalog-panel {
  gap: 18px;
}

.catalog-quick-panel {
  gap: 10px;
}

.quick-product-head,
.quick-product-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.6fr) minmax(150px, 0.55fr);
  gap: 10px;
}

.quick-product-head {
  padding: 0 12px;
  color: #8fa7bf;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-product-list {
  display: grid;
  gap: 8px;
}

.quick-product-row {
  align-items: end;
  padding: 10px 12px;
  background: #0b1b2d;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
}

.quick-product-row > label > span {
  display: none;
}

.quick-product-row input,
.quick-product-row select {
  width: 100%;
  min-height: 42px;
}

.quick-money-input {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
}

.quick-money-input > span {
  display: grid;
  place-items: center;
  min-height: 42px;
  color: #ffffff;
  background: #6d5dfc;
  border: 1px solid rgba(124, 92, 255, 0.65);
  border-right: 0;
  border-radius: 7px 0 0 7px;
  font-size: 12px;
  font-weight: 900;
}

.quick-money-input input {
  border-radius: 0 7px 7px 0;
}

.quick-entry-actions {
  justify-content: flex-start;
  padding-top: 4px;
}

.catalog-list {
  display: grid;
  gap: 10px;
}

.catalog-row {
  display: grid;
  grid-template-columns: 104px minmax(180px, 1fr) 140px 110px 92px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  background: #0b1b2d;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.product-row {
  grid-template-columns: 170px minmax(260px, 1fr) 140px 92px;
}

.catalog-empty {
  margin: 0;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 7px;
}

.default-choice {
  min-height: 42px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.default-choice input {
  width: 16px;
  min-height: auto;
  accent-color: var(--purple);
}

.catalog-price {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--green);
  font-size: 14px;
}

.catalog-actions {
  justify-content: flex-end;
}

.models-shell {
  width: min(1320px, 100%);
}

.models-panel {
  gap: 18px;
}

.models-search {
  width: min(340px, 100%);
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
  gap: 12px;
}

.computer-model-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  color: #edf6ff;
  background: #081827;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 7px;
}

.computer-model-card:not(.is-editing) {
  min-height: 360px;
  grid-template-rows: auto 1fr auto auto;
  border-top: 2px solid #38bdf8;
}

.computer-model-card:not(.is-editing):hover {
  background: #0a1c2d;
  border-color: rgba(56, 189, 248, 0.48);
}

.computer-model-card.is-editing {
  grid-column: 1 / -1;
}

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

.computer-model-head h3 {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.computer-model-head span {
  color: #8fa7bf;
  font-size: 11px;
}

.computer-model-config {
  display: grid;
  align-content: start;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.computer-model-config-row {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 31px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.computer-model-config-row span {
  color: #38bdf8;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.computer-model-config-row strong {
  color: #edf6ff;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.model-card-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.model-card-summary span {
  color: #8fa7bf;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.model-card-summary strong {
  color: #38bdf8;
  font-size: 19px;
  line-height: 1.1;
  white-space: nowrap;
}

.computer-model-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.computer-model-card:not(.is-editing) .computer-model-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.computer-model-card:not(.is-editing) .computer-model-actions .primary-button {
  grid-column: 1 / -1;
}

.computer-model-actions button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

.model-name-field {
  max-width: 620px;
}

.model-edit-head,
.model-edit-row {
  display: grid;
  grid-template-columns: 180px minmax(260px, 1fr) 150px 42px;
  gap: 9px;
}

.model-edit-head {
  padding: 0 2px;
  color: #8fa7bf;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.model-edit-items {
  display: grid;
  gap: 8px;
}

.model-edit-row {
  align-items: center;
}

.model-edit-row input,
.model-edit-row select {
  width: 100%;
  min-height: 40px;
}

.model-remove-item {
  width: 40px;
  min-height: 40px;
  padding: 0;
}

.model-edit-add {
  display: flex;
  justify-content: flex-start;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(380px, calc(100vw - 36px));
  padding: 12px 14px;
  color: #ffffff;
  background: #071322;
  border: 1px solid rgba(124, 92, 255, 0.48);
  border-radius: 7px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .catalog-category-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
  }

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

  .catalog-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .catalog-category-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-category-card {
    min-height: 78px;
    padding: 12px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .brand-mark,
  .brand-mark.logo-only,
  .page-title,
  .top-actions {
    grid-column: 1;
    justify-self: center;
    text-align: center;
  }

  .brand-logo {
    width: 144px;
  }

  .top-actions {
    justify-content: center;
  }

  .workspace-title {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-title .new-quote-button {
    width: 100%;
  }

  .ai-input-row,
  .quote-toolbar,
  .settings-grid,
  .catalog-row,
  .catalog-search-row,
  .quick-product-row {
    grid-template-columns: 1fr;
  }

  .quick-product-head {
    display: none;
  }

  .quick-product-row > label > span {
    display: block;
  }

  .models-grid,
  .model-edit-row {
    grid-template-columns: 1fr;
  }

  .model-edit-head {
    display: none;
  }

  .models-search {
    width: 100%;
  }

  .computer-model-part {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .computer-model-part b {
    margin-top: 2px;
  }

  .computer-model-actions,
  .model-edit-add {
    justify-content: stretch;
  }

  .computer-model-actions button,
  .model-edit-add button {
    width: 100%;
  }

  .model-remove-item {
    width: 100%;
  }

  .catalog-result-count {
    text-align: left;
  }

  .ai-input-row button {
    min-height: 44px;
  }

  .parts-table {
    min-width: 560px;
  }

  .money-col,
  .price-cell {
    width: 160px;
  }

  .suggestion-option,
  .suggestion-select {
    grid-template-columns: 1fr;
  }

  .suggestion-price {
    text-align: left;
  }

  .suggestion-actions {
    padding: 0 10px 10px;
    flex-wrap: wrap;
  }

  .component-add-actions,
  .under-table-actions,
  .admin-actions,
  .section-head {
    justify-content: stretch;
    flex-direction: column;
  }

  .catalog-head-actions {
    width: 100%;
  }

  .component-picker {
    width: 100%;
  }

  .component-picker-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(440px, calc(100vw - 48px));
  }

  .component-add-actions button,
  .under-table-actions button,
  .admin-actions button,
  .section-head button,
  .catalog-head-actions button {
    width: 100%;
  }

  .admin-shell,
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 430px) {
  .catalog-category-cards {
    grid-template-columns: 1fr;
  }
}


/* Upgrades opcionais do orcamento */
.upgrades-panel {
  margin: 12px 16px 4px;
  padding: 16px;
  background: #081827;
  border: 1px solid rgba(56, 189, 248, 0.30);
  border-radius: 7px;
}

.upgrades-panel[hidden] {
  display: none;
}

.upgrades-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.upgrades-header span {
  color: #38bdf8;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.upgrades-header h3 {
  margin: 3px 0 0;
  color: #ffffff;
  font-size: 18px;
}

.upgrades-header small {
  max-width: 360px;
  color: #8fa7bf;
  font-size: 11px;
  text-align: right;
}

.upgrades-list {
  display: grid;
  gap: 9px;
}

.upgrade-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(220px, 1.3fr) minmax(170px, 0.7fr) minmax(180px, 0.8fr) 40px;
  align-items: end;
  gap: 9px;
  padding: 12px;
  background: #0b1b2d;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 7px;
}

.upgrade-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.upgrade-field > span,
.upgrade-difference > span {
  color: #8fa7bf;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.upgrade-field input,
.upgrade-field select {
  width: 100%;
  min-height: 42px;
}

.upgrade-price-field .money-input {
  min-height: 42px;
}

.upgrade-difference {
  min-height: 42px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 4px 0;
}

.upgrade-difference strong {
  color: #38d9a9;
  font-size: 15px;
}

.upgrade-difference small {
  color: #8fa7bf;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upgrade-remove {
  width: 40px;
  height: 42px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.38);
  border-radius: 7px;
  cursor: pointer;
  font-weight: 900;
}

.upgrade-remove:hover,
.upgrade-remove:focus-visible {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.82);
  outline: none;
}

@media (max-width: 1100px) {
  .upgrade-row {
    grid-template-columns: 1fr 1.4fr 1fr;
  }

  .upgrade-difference {
    grid-column: 1 / 3;
  }

  .upgrade-remove {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 760px) {
  .upgrades-panel {
    margin: 10px 12px 2px;
    padding: 12px;
  }

  .upgrades-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .upgrades-header small {
    text-align: left;
  }

  .upgrade-row {
    grid-template-columns: 1fr;
  }

  .upgrade-difference,
  .upgrade-remove {
    grid-column: 1;
    grid-row: auto;
  }

  .upgrade-remove {
    width: 100%;
  }
}


/* Version and changelog */
.app-version {
  position: fixed;
  right: 14px;
  bottom: 10px;
  z-index: 80;
  border: 0;
  padding: 4px 7px;
  background: rgba(6, 29, 59, 0.72);
  color: #8eb4cc;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  opacity: 0.72;
  transition: color 160ms ease, opacity 160ms ease, background 160ms ease;
}

.app-version:hover,
.app-version:focus-visible {
  background: #061d3b;
  color: #22b8ee;
  opacity: 1;
  outline: 1px solid #22b8ee;
  outline-offset: 2px;
}

.changelog-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #26435f;
  border-radius: 8px;
  background: #071a2d;
  color: #f5f9fc;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.changelog-dialog::backdrop {
  background: rgba(2, 10, 20, 0.72);
  backdrop-filter: blur(3px);
}

.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid #203a53;
}

.changelog-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #22b8ee;
  font-size: 10px;
  font-weight: 800;
}

.changelog-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.changelog-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid #2c4964;
  border-radius: 6px;
  background: #0d263d;
  color: #dcebf5;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.changelog-close:hover,
.changelog-close:focus-visible {
  border-color: #22b8ee;
  color: #22b8ee;
  outline: 0;
}

.changelog-content {
  max-height: calc(100vh - 150px);
  padding: 20px 22px 24px;
  overflow-y: auto;
}

.release-entry + .release-entry {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #203a53;
}

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

.release-heading strong {
  color: #22b8ee;
  font-size: 14px;
}

.release-heading time {
  color: #88a5b9;
  font-size: 12px;
}

.release-entry h3 {
  margin: 8px 0 12px;
  font-size: 16px;
  letter-spacing: 0;
}

.release-entry ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: #b9cedd;
  font-size: 13px;
  line-height: 1.45;
}

.release-entry li::marker {
  color: #22b8ee;
}

@media (max-width: 600px) {
  .app-version {
    right: 8px;
    bottom: 8px;
  }

  .changelog-header,
  .changelog-content {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* GestaoTech backup por e-mail */
.backup-email-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #28415a;
  border-radius: 8px;
  background: #091a2a;
}

.backup-email-heading,
.backup-history-heading,
.backup-email-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.backup-email-heading h3,
.backup-history-heading h3 {
  margin: 3px 0 4px;
  color: #f7fbff;
  font-size: 17px;
}

.backup-email-heading p,
.backup-history-heading span {
  margin: 0;
  color: #93abc0;
  font-size: 13px;
}

.backup-email-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #2e536f;
  border-radius: 6px;
  background: #10283c;
  color: #dcecff;
  font-weight: 700;
  white-space: nowrap;
}

.backup-email-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #19afe1;
}

.backup-email-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(110px, .7fr) minmax(180px, 1fr);
  gap: 13px;
  margin-top: 18px;
}

.backup-email-wide {
  grid-column: 1 / -1;
}

.backup-schedule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: end;
  gap: 13px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #20394e;
}

.backup-time-zone {
  min-height: 42px;
  display: flex;
  align-items: center;
  color: #8ea8be;
  font-size: 12px;
}

.backup-email-actions {
  justify-content: flex-start;
  margin-top: 16px;
}

.backup-history {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #20394e;
}

.backup-history-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.backup-history-item {
  display: grid;
  grid-template-columns: 10px minmax(180px, .8fr) minmax(220px, 1.4fr);
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid #29445b;
  border-radius: 6px;
  background: #0c2133;
}

.backup-history-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e84155;
}

.backup-history-item[data-status="success"] .backup-history-indicator {
  background: #20c87a;
}

.backup-history-item strong,
.backup-history-item span {
  display: block;
}

.backup-history-item strong {
  color: #f2f8ff;
  font-size: 13px;
}

.backup-history-item span,
.backup-history-item p,
.backup-history-empty {
  margin: 2px 0 0;
  color: #8ea8be;
  font-size: 12px;
}

@media (max-width: 760px) {
  .backup-email-heading,
  .backup-history-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .backup-email-grid,
  .backup-schedule-grid {
    grid-template-columns: 1fr;
  }

  .backup-email-wide {
    grid-column: auto;
  }

  .backup-email-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-history-item {
    grid-template-columns: 10px 1fr;
  }

  .backup-history-item p {
    grid-column: 2;
  }
}


.postgres-connection-panel {
  grid-column: 1 / -1;
}

.postgres-connection-heading span {
  color: var(--cyan);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

.postgres-connection-heading h2 { margin: 4px 0 0; }

.postgres-connection-heading p {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.postgres-connection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  max-width: 720px;
}

.postgres-connection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.postgres-fresh-database {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 15px;
  background: rgba(8, 145, 178, .07);
  border: 1px solid rgba(34, 211, 238, .28);
  border-radius: 8px;
}

.postgres-fresh-database span {
  color: var(--cyan);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

.postgres-fresh-database h3 { margin: 4px 0 0; color: var(--ink); font-size: 14px; }
.postgres-fresh-database p { max-width: 520px; margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.postgres-fresh-database-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
  gap: 8px;
  min-width: min(100%, 420px);
}

.postgres-fresh-database-actions label { margin: 0; }

.postgres-use-new-toggle {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

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

/* Interruptor da integracao com o Authentik.
   Precisa de dois nomes de classe para vencer `.settings-section label`, que
   empilha em coluna e transformaria o trilho num circulo. */
.auth-mode-switch {
  max-width: 720px;
}

.settings-section .switch-control {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 0;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 10px;
  background: rgba(15, 32, 51, .55);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.settings-section .switch-control:hover {
  border-color: rgba(34, 211, 238, .4);
  background: rgba(15, 32, 51, .8);
}

.settings-section .switch-control:has(input:focus-visible) {
  border-color: var(--cyan);
  outline: 2px solid rgba(34, 211, 238, .35);
  outline-offset: 2px;
}

/* O checkbox real fica invisivel mas continua sendo o alvo do teclado. */
.settings-section .switch-control input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.settings-section .switch-track {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .3);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .22);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.settings-section .switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(2, 6, 23, .5);
  transition: transform 180ms cubic-bezier(.32, .72, .35, 1.04);
}

.settings-section .switch-control input:checked ~ .switch-track {
  background: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .55);
}

.settings-section .switch-control input:checked ~ .switch-track .switch-thumb {
  transform: translateX(18px);
}

.settings-section .switch-control:has(input:disabled) {
  cursor: not-allowed;
  opacity: .55;
}

/* Herda de `.settings-section label`, entao precisa reafirmar o texto. */
.settings-section .switch-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-section .switch-text strong {
  color: #eaf2fb;
  font-size: 13px;
  font-weight: 800;
}

.settings-section .switch-text small {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
}

/* Campos do Authentik perdem a cor quando a integracao esta desligada. */
.postgres-connection-grid.is-disabled {
  opacity: .4;
  pointer-events: none;
}

.auth-mode-warning {
  max-width: 720px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(251, 191, 36, .4);
  border-radius: 8px;
  background: rgba(251, 191, 36, .1);
  color: #fcd34d;
  font-size: 12px;
  line-height: 1.45;
}

.auth-mode-warning[hidden] {
  display: none;
}

@media (max-width: 620px) {
  .postgres-connection-grid { grid-template-columns: 1fr; }
  .postgres-connection-actions { flex-direction: column; }
  .postgres-connection-actions button { width: 100%; }
  .postgres-fresh-database { align-items: stretch; flex-direction: column; }
  .postgres-fresh-database-actions { grid-template-columns: 1fr; min-width: 0; }
  .postgres-fresh-database-actions button { width: 100%; }
}
#backupWeekDayField[hidden],
#backupMonthDayField[hidden] {
  display: none !important;
}

/* Admin organization */
.admin-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px 34px 42px;
}

.admin-category-nav {
  position: sticky;
  z-index: 4;
  top: 12px;
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 9px;
  overflow-x: auto;
  background: rgba(7, 20, 34, .88);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
  backdrop-filter: blur(12px);
}

.admin-category-nav button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.admin-category-nav button:hover,
.admin-category-nav button:focus-visible,
.admin-category-nav button[aria-pressed="true"] {
  color: var(--ink);
  background: rgba(34, 211, 238, .09);
  border-color: rgba(34, 211, 238, .38);
}

.admin-category-heading {
  grid-column: 1 / -1;
  scroll-margin-top: 78px;
  padding: 16px 2px 0;
}

[data-admin-category][hidden] {
  display: none !important;
}

.admin-category-heading span,
.access-groups-heading span,
.app-users-heading span {
  color: var(--cyan);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

.admin-category-heading h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 19px;
}

.admin-category-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* Internal access management */
.user-access-section {
  grid-column: 1 / -1;
}

.user-access-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.user-access-heading span {
  color: var(--cyan);
  font-size: 9px;
  font-weight: 900;
}

.delivery-estimate {
  margin: 10px 0 2px;
  padding: 9px 10px;
  color: var(--ink);
  background: color-mix(in srgb, var(--cyan) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--cyan) 38%, var(--line));
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.user-access-heading h2 { margin: 4px 0 0; }

.user-access-heading p {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.access-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr);
  gap: 16px;
  margin-top: 18px;
}

.access-groups-panel,
.app-users-panel {
  min-width: 0;
  padding: 14px;
  background: rgba(5, 20, 34, .32);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.access-groups-heading,
.app-users-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.access-groups-heading h3,
.app-users-heading h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 15px;
}

.access-groups-heading .primary-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 11px;
  white-space: nowrap;
}

.admin-heading-actions,
.access-groups-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.access-groups-footer { margin-top: 14px; }

.access-groups-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.access-group-card {
  overflow: hidden;
  background: rgba(7, 20, 34, .54);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.access-group-title {
  padding: 11px 12px;
  background: rgba(8, 145, 178, .08);
  border-bottom: 1px solid var(--line);
}

.access-group-title strong,
.access-group-title small,
.access-module-copy strong,
.access-module-copy small {
  display: block;
}

.access-group-title strong,
.access-module-copy strong { color: var(--ink); font-size: 12px; }
.access-group-title small,
.access-module-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.access-module-list { display: grid; }

.access-module-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid rgba(148, 163, 184, .15);
}

.access-module-row:first-child { border-top: 0; }

.access-permission-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.access-permission-toggle {
  display: inline-flex !important;
  min-height: 29px;
  align-items: center;
  gap: 5px;
  margin: 0 !important;
  padding: 0 8px;
  color: var(--muted) !important;
  background: rgba(148, 163, 184, .07);
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 5px;
  cursor: pointer;
  font-size: 10px !important;
  font-weight: 800;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.access-permission-toggle:has(input:checked) {
  color: var(--ink) !important;
  background: rgba(34, 211, 238, .12);
  border-color: rgba(34, 211, 238, .52);
}

.access-permission-toggle:has(input:disabled) { cursor: not-allowed; opacity: .45; }
.access-permission-toggle input { width: 13px; height: 13px; accent-color: var(--cyan); }

.app-users-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.work-hours-admin {
  grid-column: 1 / -1;
}

.work-hours-heading > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.work-hours-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.work-hours-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.work-hours-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(130px, 170px) minmax(130px, 170px) 100px;
  align-items: end;
  gap: 14px;
  padding: 14px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.work-hours-row:first-child {
  grid-template-columns: minmax(190px, 1fr) minmax(130px, 170px) minmax(130px, 170px);
}

.work-hours-row + .work-hours-row {
  border-top: 1px solid var(--line);
}

.work-hours-row > div {
  display: grid;
  align-self: center;
  gap: 3px;
}

.work-hours-row strong {
  color: var(--text);
  font-size: 14px;
}

.work-hours-row small {
  color: var(--muted);
  font-size: 11px;
}

.work-hours-row label {
  gap: 5px;
}

.work-hours-row input[type="time"] {
  min-height: 38px;
}

.work-hours-closed {
  display: flex !important;
  min-height: 38px;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 7px !important;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.work-hours-closed input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.work-hours-row.is-closed input[type="time"] {
  opacity: 0.45;
}

@media (max-width: 760px) {
  .work-hours-row,
  .work-hours-row:first-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-hours-row > div {
    grid-column: 1 / -1;
  }

  .work-hours-closed {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.local-user-create {
  margin-top: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--cyan) 6%, transparent);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.local-user-create-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.local-user-create-heading span { color: var(--muted); font-size: 10px; font-weight: 800; }
.local-user-create-heading h3 { margin: 3px 0 0; color: var(--ink); font-size: 14px; }
.local-user-create-heading button { min-height: 34px; }
.local-user-create-note { margin: 8px 0 0; color: var(--muted); font-size: 10px; }

.local-user-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.local-user-fields[hidden] { display: none; }
.local-user-fields label { display: grid; gap: 5px; margin: 0; color: var(--muted); font-size: 10px; font-weight: 800; }
.local-user-fields input,
.local-user-fields select { width: 100%; min-height: 40px; }
.local-user-photo-field,
.local-user-create-actions { grid-column: 1 / -1; }
.local-user-photo-field small { color: var(--muted); font-size: 10px; font-weight: 500; }
.local-user-photo-field input { padding: 7px; }

.local-user-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.app-user-row {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  color: var(--ink);
  background: rgba(5, 20, 34, 0.52);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.app-user-indicator {
  width: 4px;
  height: 38px;
  border-radius: 4px;
  background: var(--cyan);
}

.app-user-indicator { grid-row: 1 / span 2; height: 100%; }
.app-user-identity,
.app-user-access { grid-column: 2; }

.app-user-identity strong,
.app-user-identity small,
.app-user-access small {
  display: block;
}

.app-user-identity strong {
  color: var(--ink);
  font-size: 13px;
}

.app-user-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.app-user-avatar {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
  background: color-mix(in srgb, var(--cyan) 18%, var(--surface));
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.app-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.app-user-identity > div { min-width: 0; }
.app-user-delete { width: fit-content; min-height: 32px; margin-top: 8px; padding: 0 10px; font-size: 10px; }

.app-user-identity small,
.app-user-access small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-user-access label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.app-user-access select { min-height: 36px; }

.app-user-master {
  display: inline-flex;
  width: fit-content;
  min-height: 36px;
  align-items: center;
  padding: 0 11px;
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.11);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: normal;
  text-transform: none;
}

.app-users-empty {
  margin: 0;
  padding: 25px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 7px;
  text-align: center;
}

html[data-theme="light"] .app-user-row {
  background: #f3f9fc;
  border-color: #aac9d9;
}

html[data-theme="light"] :is(.admin-category-nav, .access-groups-panel, .app-users-panel, .access-group-card) {
  background: #f7fbfd;
  border-color: #aac9d9;
}

html[data-theme="light"] .access-group-title { background: #eaf7fb; border-color: #c0dce8; }
html[data-theme="light"] :is(.admin-category-heading h2, .access-groups-heading h3, .app-users-heading h3, .access-group-title strong, .access-module-copy strong) { color: #082f49; }
html[data-theme="light"] :is(.admin-category-heading p, .access-group-title small, .access-module-copy small, .admin-category-nav button) { color: #41667d; }

html[data-theme="light"] .app-user-identity strong { color: #082f49; }
html[data-theme="light"] :is(.app-user-identity small, .app-user-access small, .app-user-access label, .user-access-heading p, .app-users-empty) { color: #41667d; }

/* Gestão compacta de usuários e permissões */
.access-management-modern { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr); gap: 14px; }
.app-user-toolbar { display: grid; grid-template-columns: minmax(190px, 1fr) repeat(3, minmax(120px, .55fr)); gap: 8px; margin: 12px 0 6px; }
.app-user-toolbar label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.app-user-toolbar :is(input, select) { min-height: 36px; padding: 0 10px; }
.app-users-summary { margin: 8px 0 12px; color: var(--muted); font-size: 11px; }
.app-user-row-compact { grid-template-columns: minmax(180px, 1.3fr) minmax(210px, 1fr) auto; gap: 12px; padding: 9px 10px; border-color: color-mix(in srgb, var(--line) 70%, transparent); }
.app-user-row-compact .app-user-identity { grid-column: auto; }
.app-user-row-compact [data-edit-user] { cursor: pointer; }
.app-user-row-compact .app-user-avatar { width: 32px; height: 32px; flex-basis: 32px; }
.app-user-summary { display: flex; min-width: 0; align-items: center; gap: 8px; color: var(--ink); font-size: 10px; }
.app-user-summary > span:first-child { font-weight: 800; }
.app-user-summary small { margin-left: auto; color: var(--muted); white-space: nowrap; }
.app-user-status { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.app-user-status i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.app-user-status[data-status="disabled"] i { background: #94a3b8; }
.app-user-status[data-status="blocked"] i { background: #ef4444; }
.app-user-actions { display: flex; align-items: center; gap: 5px; }
.app-user-actions > button { min-height: 32px; padding: 0 10px; }
.app-user-actions details { position: relative; }
.app-user-actions summary { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 7px; cursor: pointer; list-style: none; }
.app-user-actions summary::-webkit-details-marker { display: none; }
.app-user-actions details > div { position: absolute; right: 0; z-index: 10; display: grid; min-width: 130px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.app-user-actions details button { min-height: 32px; padding: 0 9px; color: var(--ink); background: transparent; border: 0; text-align: left; }
.user-password-dialog { width: min(420px, calc(100vw - 28px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 70px rgba(2, 10, 22, .36); }
.user-password-dialog::backdrop { background: rgba(2, 10, 22, .64); backdrop-filter: blur(4px); }
.user-password-card { display: grid; width: 100%; margin: 0; padding: 0; overflow: hidden; box-sizing: border-box; }
.user-password-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 18px; }
.user-password-heading > div { min-width: 0; }
.user-password-heading span { display: block; margin-bottom: 5px; color: var(--cyan); font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.user-password-heading h2 { margin: 0; color: var(--ink); font-size: 21px; line-height: 1.2; }
.user-password-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.user-password-heading > button { display: grid; width: 34px; min-width: 34px; height: 34px; min-height: 34px; place-items: center; padding: 0; color: var(--muted); background: color-mix(in srgb, var(--muted) 7%, transparent); border: 0; border-radius: 9px; font-size: 18px; cursor: pointer; }
.user-password-heading > button:hover,
.user-password-heading > button:focus-visible { color: var(--ink); background: color-mix(in srgb, var(--cyan) 12%, transparent); outline: 2px solid color-mix(in srgb, var(--cyan) 35%, transparent); }
.user-password-body { padding: 0 24px 22px; }
.user-password-field { display: grid; gap: 7px; color: var(--ink); font-size: 10px; font-weight: 800; }
.user-password-field input { display: block; width: 100%; min-width: 0; height: 44px; padding: 0 13px; box-sizing: border-box; color: var(--ink); background: color-mix(in srgb, var(--surface) 94%, var(--muted)); border: 1px solid var(--line); border-radius: 9px; }
.user-password-field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 15%, transparent); outline: none; }
.user-password-field input::-ms-reveal,
.user-password-field input::-ms-clear { display: none; }
.user-password-field small { color: var(--muted); font-size: 9px; font-weight: 500; }
.user-password-dialog .form-message:empty { display: none; }
.user-password-dialog .form-message { margin: 10px 0 0; }

.agenda-automations-admin { display: grid; gap: 18px; }
.agenda-automations-heading span, .agenda-automation-card header span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.agenda-automations-heading h2 { margin: 4px 0; }
.agenda-automations-heading p { margin: 0; color: var(--muted); }
.agenda-automations-list { display: grid; gap: 10px; }
.agenda-automation-row { display: grid; grid-template-columns: 10px minmax(220px, 1fr) auto; gap: 14px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.agenda-automation-state { align-self: stretch; display: grid; place-items: center; }
.agenda-automation-state span { width: 4px; height: 100%; min-height: 44px; border-radius: 999px; background: var(--line); transition: background .2s ease, transform .2s ease; }
.agenda-automation-row.is-enabled .agenda-automation-state span { background: var(--accent); transform: scaleY(.9); }
.agenda-automation-summary > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.agenda-automation-summary p, .agenda-automation-summary small { margin: 4px 0 0; color: var(--muted); }
.agenda-automation-badge { padding: 3px 8px; color: var(--muted); background: var(--soft-surface); border-radius: 999px; font-size: 11px; font-weight: 700; }
.is-enabled .agenda-automation-badge { color: var(--accent); }
.agenda-automation-actions { display: flex; gap: 7px; align-items: center; }
.agenda-automation-icon-button { min-height: 36px; padding: 0 10px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.agenda-automation-icon-button:hover { color: var(--ink); background: var(--soft-surface); }
.agenda-automation-dialog { width: min(780px, calc(100vw - 28px)); max-width: none; max-height: calc(100vh - 28px); margin: auto; padding: 0; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 70px rgba(2, 10, 22, .4); }
.agenda-automation-dialog::backdrop { background: rgba(2, 10, 22, .64); backdrop-filter: blur(4px); }
.agenda-automation-card { display: grid; max-height: calc(100vh - 28px); margin: 0; }
.agenda-automation-card > header, .agenda-automation-card > footer { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 18px 22px; }
.agenda-automation-card > header { border-bottom: 1px solid var(--line); }
.agenda-automation-card > footer { justify-content: flex-end; border-top: 1px solid var(--line); }
.agenda-automation-card header h2 { margin: 3px 0 0; font-size: 20px; }
.agenda-automation-card header button { width: 36px; height: 36px; color: var(--muted); background: var(--soft-surface); border: 0; border-radius: 9px; font-size: 20px; cursor: pointer; }
.agenda-automation-body, .agenda-automation-result-body { min-height: 0; padding: 22px; overflow: auto; }
.agenda-automation-name { display: grid; gap: 7px; font-weight: 700; }
.agenda-automation-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1.25fr; gap: 10px; align-items: center; margin: 18px 0; }
.agenda-automation-flow section { min-height: 86px; padding: 14px; background: var(--soft-surface); border-radius: 12px; }
.agenda-automation-flow small { display: block; margin-bottom: 8px; color: var(--accent); font-weight: 800; }
.agenda-automation-flow > span { color: var(--muted); }
.agenda-automation-scope { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.agenda-automation-scope legend { padding: 0 5px; font-weight: 800; }
.agenda-automation-scope label { display: flex; gap: 7px; align-items: center; }
.agenda-automation-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.agenda-automation-metrics span { padding: 14px; text-align: center; background: var(--soft-surface); border-radius: 12px; }
.agenda-automation-metrics strong { display: block; font-size: 22px; }
.agenda-automation-affected, .agenda-automation-history { display: grid; gap: 8px; margin-top: 16px; }
.agenda-automation-affected > div, .agenda-automation-history article { display: flex; justify-content: space-between; gap: 12px; padding: 12px; background: var(--soft-surface); border-radius: 10px; }
.agenda-automation-history article { display: block; }
.agenda-automation-history article > div { display: flex; justify-content: space-between; gap: 12px; }
.agenda-automation-history p { margin: 5px 0 0; color: var(--muted); }
.checklist-templates-admin { align-self: start; }
.checklist-templates-grid { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
.checklist-templates-list { display: grid; gap: 8px; }
.checklist-templates-empty { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 14px 16px; color: var(--muted); background: var(--soft-surface); border-radius: 12px; text-align: left; }
.checklist-templates-empty > span, .checklist-template-row-icon { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; color: var(--accent); background: var(--surface); border-radius: 10px; }
.checklist-templates-empty svg, .checklist-template-row-icon svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.checklist-templates-empty div { display: grid; gap: 3px; }
.checklist-templates-empty small { color: var(--muted); }
.checklist-template-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; background: var(--soft-surface); border-radius: 11px; }
.checklist-template-row-copy { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; min-width: 0; align-items: center; }
.checklist-template-row-copy small { color: var(--muted); }
.checklist-template-row-copy > span { grid-column: 1 / -1; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.checklist-template-row-actions { display: flex; gap: 7px; align-items: center; }
.checklist-template-more { position: relative; }
.checklist-template-more summary { display: grid; width: 36px; height: 36px; place-items: center; color: var(--muted); background: transparent; border-radius: 9px; list-style: none; cursor: pointer; }
.checklist-template-more summary::-webkit-details-marker { display: none; }
.checklist-template-more summary:hover, .checklist-template-more summary:focus-visible { color: var(--ink); background: var(--surface-2); outline: 2px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.checklist-template-more > div { position: absolute; z-index: 20; top: calc(100% + 5px); right: 0; display: grid; min-width: 130px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 36px rgba(2, 10, 22, .2); }
.checklist-template-more button { min-height: 34px; padding: 0 10px; color: var(--ink); background: transparent; border: 0; border-radius: 7px; text-align: left; cursor: pointer; }
.checklist-template-more button:hover { background: var(--surface-2); }

.checklist-template-dialog { width: min(620px, calc(100vw - 28px)); max-width: none; max-height: min(760px, calc(100dvh - 28px)); margin: auto; padding: 0; overflow: hidden; color: var(--ink); background: transparent; border: 0; border-radius: 18px; box-shadow: 0 26px 76px rgba(2, 10, 22, .34); }
.checklist-template-dialog::backdrop { background: rgba(2, 10, 22, .62); backdrop-filter: blur(4px); }
.checklist-template-dialog-card { display: grid; max-height: min(760px, calc(100dvh - 28px)); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.checklist-template-dialog-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 17px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 65%, var(--surface)); }
.checklist-template-dialog-card > header span { color: var(--cyan); font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.checklist-template-dialog-card > header h2 { margin: 4px 0 0; color: var(--ink); font-size: 20px; }
.checklist-template-dialog-card > header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.checklist-template-dialog-card > header button { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; padding: 0; color: var(--muted); background: var(--surface-2); border: 0; border-radius: 9px; font-size: 18px; cursor: pointer; }
.checklist-template-dialog-body { display: grid; align-content: start; gap: 18px; min-height: 0; padding: 20px 22px; overflow-y: auto; }
.checklist-template-name { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 800; }
.checklist-template-name input { width: 100%; min-height: 42px; }
.checklist-template-items-editor { display: grid; gap: 10px; }
.checklist-template-items-editor > div:first-child { display: grid; gap: 3px; }
.checklist-template-items-editor small { color: var(--muted); font-size: 11px; }
.checklist-template-editable-items { display: grid; gap: 6px; }
.checklist-template-editable-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 6px; background: var(--surface-2); border-radius: 10px; }
.checklist-template-item-handle { display: grid; width: 28px; height: 34px; place-items: center; color: var(--muted); }
.checklist-template-item-handle svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.checklist-template-editable-item input { width: 100%; min-width: 0; min-height: 36px; background: var(--surface); }
.checklist-template-editable-item > div { display: flex; gap: 2px; }
.checklist-template-editable-item button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 7px; cursor: pointer; }
.checklist-template-editable-item button:hover { color: var(--ink); background: var(--surface); }
.checklist-template-editable-item button:last-child:hover { color: #dc3545; }
.checklist-template-add-item { width: fit-content; min-height: 34px; padding: 0 8px; color: var(--accent); background: transparent; border: 0; border-radius: 8px; font-weight: 750; cursor: pointer; }
.checklist-template-add-item:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.checklist-template-dialog-card > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }

@media (max-width: 760px) {
  .checklist-template-row { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .checklist-template-row-actions { grid-column: 2; justify-content: flex-start; }
  .checklist-template-dialog-card > header, .checklist-template-dialog-body, .checklist-template-dialog-card > footer { padding-right: 16px; padding-left: 16px; }
  .checklist-template-editable-item { grid-template-columns: minmax(0, 1fr) auto; }
  .checklist-template-item-handle { display: none; }
  .checklist-template-editable-item > div { grid-column: 1 / -1; justify-content: flex-end; }
  .agenda-automation-row { grid-template-columns: 7px 1fr; }
  .agenda-automation-actions { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; }
  .agenda-automation-actions .primary-button { grid-column: 1 / -1; }
  .agenda-automation-flow { grid-template-columns: 1fr; }
  .agenda-automation-flow > span { transform: rotate(90deg); justify-self: center; }
  .agenda-automation-metrics { grid-template-columns: 1fr; }
  .agenda-automation-card > header, .agenda-automation-card > footer, .agenda-automation-body, .agenda-automation-result-body { padding: 16px; }
  .agenda-automation-affected > div { display: grid; }
}
.user-password-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; background: color-mix(in srgb, var(--muted) 4%, transparent); border-top: 1px solid var(--line); }
.user-password-actions button { width: auto; min-height: 38px; padding: 0 16px; }

@media (max-width: 520px) {
  .user-password-heading { padding: 20px 20px 16px; }
  .user-password-body { padding: 0 20px 20px; }
  .user-password-actions { padding: 13px 20px; }
  .user-password-actions button { flex: 1; }
}
.access-group-tabs { display: flex; gap: 3px; margin: 12px 0; padding: 3px; background: var(--surface-soft, rgba(148,163,184,.08)); border-radius: 9px; }
.access-group-tabs button { min-height: 34px; flex: 1; padding: 0 8px; color: var(--muted); background: transparent; border: 0; }
.access-group-tabs button[aria-selected="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 2px 8px rgba(2,12,27,.12); }
.access-group-matrix { padding: 0; overflow: hidden; }
.access-group-matrix .access-group-title { padding: 10px 12px; }
.access-matrix-header { display: grid; grid-template-columns: minmax(150px, .7fr) 1.3fr; padding: 7px 12px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.access-group-matrix .access-module-row { grid-template-columns: minmax(150px, .7fr) 1.3fr; padding: 9px 12px; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent); border-radius: 0; }
.access-group-matrix .access-permission-controls { justify-content: flex-start; gap: 5px; }
.access-group-matrix .access-permission-toggle { min-height: 28px; padding: 0 7px; border-color: transparent; background: color-mix(in srgb, var(--muted) 7%, transparent); }
.user-access-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(2, 10, 22, .56); backdrop-filter: blur(2px); }
.user-access-drawer { position: fixed; top: 0; right: 0; z-index: 91; display: grid; width: min(520px, 100vw); height: 100dvh; grid-template-rows: auto minmax(0, 1fr) auto; color: var(--ink); background: var(--surface); box-shadow: -18px 0 48px rgba(2, 10, 22, .3); transform: translateX(102%); transition: transform 190ms ease; }
.user-access-drawer[aria-hidden="false"] { transform: none; }
.user-access-drawer > header,
.user-access-drawer > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.user-access-drawer > footer { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.user-access-drawer > header span { color: var(--cyan); font-size: 9px; font-weight: 900; }
.user-access-drawer > header h2 { margin: 3px 0 0; font-size: 18px; }
.user-access-drawer > header button { width: 36px; min-height: 36px; padding: 0; }
.user-access-drawer-body { overflow-y: auto; padding: 18px; }
.user-access-drawer-body > section { padding: 15px 0; border-bottom: 1px solid var(--line); }
.user-access-profile { display: flex; align-items: center; gap: 11px; padding-top: 0 !important; }
.user-access-profile .app-user-avatar { width: 46px; height: 46px; flex-basis: 46px; }
.user-access-profile :is(strong, span, small) { display: block; }
.user-access-profile span,
.user-access-profile small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.user-access-fields h3,
.user-access-overrides h3,
.user-access-history h3 { margin: 0 0 10px; font-size: 13px; }
.user-access-fields > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.user-access-fields label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.user-access-fields [data-access-warning] { margin: 10px 0 0; padding: 9px 10px; color: var(--muted); background: color-mix(in srgb, var(--cyan) 8%, transparent); border-radius: 7px; font-size: 10px; line-height: 1.45; }
.user-access-overrides > div:first-child p { margin: -6px 0 12px; color: var(--muted); font-size: 10px; }
.user-permission-list { display: grid; gap: 3px; }
.user-permission-list label { display: grid; grid-template-columns: minmax(0, 1fr) 100px; align-items: center; gap: 8px; min-height: 38px; padding: 4px 7px; border-radius: 7px; font-size: 10px; }
.user-permission-list label:hover { background: color-mix(in srgb, var(--cyan) 6%, transparent); }
.user-permission-list select { min-height: 30px; padding: 0 7px; font-size: 10px; }
.user-access-history [data-user-history] { display: grid; gap: 6px; }
.user-access-history article { padding: 9px 10px; background: color-mix(in srgb, var(--muted) 6%, transparent); border-radius: 7px; }
.user-access-history article :is(strong, p, time) { display: block; margin: 0; }
.user-access-history article strong { font-size: 10px; }
.user-access-history article p,
.user-access-history article time { margin-top: 3px; color: var(--muted); font-size: 9px; }

@media (max-width: 1050px) { .access-management-modern { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .app-user-toolbar { grid-template-columns: 1fr 1fr; }
  .app-user-search { grid-column: 1 / -1; }
  .app-user-row-compact { grid-template-columns: minmax(0, 1fr) auto; }
  .app-user-summary { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; }
  .app-user-summary small { width: 100%; margin-left: 0; }
  .app-user-actions { grid-column: 2; grid-row: 1; }
  .access-matrix-header { display: none; }
  .access-group-matrix .access-module-row { grid-template-columns: 1fr; }
  .user-access-drawer { width: calc(100vw - 10px); }
  .user-access-fields > div { grid-template-columns: 1fr; }
}

/* Documentation audit panel */
.documentation-audit-section {
  grid-column: 1 / -1;
}

.documentation-audit-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.documentation-audit-heading span {
  color: var(--cyan);
  font-size: 9px;
  font-weight: 900;
}

.documentation-audit-heading h2 {
  margin: 4px 0 0;
}

.documentation-audit-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.documentation-audit-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(128px, 0.65fr));
  gap: 12px;
  margin-top: 18px;
}

.documentation-audit-list {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.documentation-audit-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 5px minmax(220px, 1fr) minmax(180px, 0.65fr) minmax(190px, 0.55fr);
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(5, 20, 34, 0.52);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.documentation-audit-indicator {
  width: 4px;
  height: 34px;
  background: var(--cyan);
  border-radius: 4px;
}

.documentation-audit-row[data-level="yellow"] .documentation-audit-indicator { background: #f4bd4f; }
.documentation-audit-row[data-level="red"] .documentation-audit-indicator { background: #ef6679; }

.documentation-audit-row :is(strong, span, small) {
  display: block;
  min-width: 0;
}

.documentation-audit-action strong,
.documentation-audit-user span,
.documentation-audit-date span {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.documentation-audit-action small,
.documentation-audit-user small,
.documentation-audit-date small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.documentation-audit-date {
  text-align: right;
}

.documentation-audit-level {
  color: #38bdf8 !important;
  font-size: 8px !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.documentation-audit-level[data-level="yellow"] { color: #eab54b !important; }
.documentation-audit-level[data-level="red"] { color: #ef6679 !important; }

.documentation-audit-empty {
  margin: 0;
  padding: 28px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
}

html[data-theme="light"] .documentation-audit-row {
  color: #082f49;
  background: #f3f9fc;
  border-color: #aac9d9;
}

html[data-theme="light"] :is(.documentation-audit-action strong, .documentation-audit-user span, .documentation-audit-date span) {
  color: #082f49;
}

html[data-theme="light"] :is(.documentation-audit-action small, .documentation-audit-user small, .documentation-audit-date small, .documentation-audit-heading p, .documentation-audit-empty) {
  color: #41667d;
}

html[data-theme="light"] .documentation-audit-level { color: #087cab !important; }
html[data-theme="light"] .documentation-audit-level[data-level="yellow"] { color: #9a6200 !important; }
html[data-theme="light"] .documentation-audit-level[data-level="red"] { color: #b4233b !important; }

@media (max-width: 1120px) {
  .documentation-audit-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .local-user-fields { grid-template-columns: minmax(0, 1fr); }
  .local-user-photo-field,
  .local-user-create-actions { grid-column: 1; }

  .documentation-audit-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .documentation-audit-row {
    grid-template-columns: 4px minmax(0, 1fr);
  }

  .documentation-audit-row > :not(.documentation-audit-indicator) {
    grid-column: 2;
  }

  .documentation-audit-indicator {
    grid-row: 1 / span 3;
    height: 100%;
  }

  .documentation-audit-date {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .admin-shell { padding: 16px 12px 30px; }
  .admin-category-nav { top: 7px; margin-bottom: 12px; }
  .admin-category-heading { padding-top: 12px; }
  .admin-settings-top-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-settings-top-actions .primary-button { width: 100%; }
  .admin-settings-top-actions .form-message { text-align: left; }
  .access-groups-heading { align-items: stretch; flex-direction: column; }
  .access-groups-heading .primary-button { width: 100%; }
  .admin-heading-actions { align-items: stretch; flex-direction: column; }
  .admin-heading-actions button,
  .access-groups-footer .primary-button { width: 100%; }
  .access-module-row { grid-template-columns: 1fr; }
  .access-permission-controls { justify-content: flex-start; }

  .user-access-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .user-access-heading button { width: 100%; }

  .documentation-audit-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .documentation-audit-heading button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .access-management-grid { grid-template-columns: 1fr; }
  .app-user-row {
    grid-template-columns: 4px minmax(0, 1fr);
  }

  .app-user-indicator { grid-row: 1 / span 2; height: 100%; }
  .app-user-identity, .app-user-access { grid-column: 2; }
}
