:root {
  --bg: oklch(0.972 0.006 230);
  --surface: oklch(0.995 0.004 230);
  --surface-muted: oklch(0.952 0.011 225);
  --surface-soft: oklch(0.985 0.012 178);
  --text: oklch(0.22 0.032 250);
  --muted: oklch(0.48 0.038 245);
  --line: oklch(0.885 0.016 232);
  --primary: oklch(0.43 0.103 225);
  --primary-dark: oklch(0.25 0.053 250);
  --primary-soft: oklch(0.94 0.035 220);
  --brand-green: oklch(0.68 0.143 145);
  --accent: oklch(0.47 0.154 27);
  --accent-soft: oklch(0.955 0.027 27);
  --warning: oklch(0.61 0.12 75);
  --warning-soft: oklch(0.955 0.052 82);
  --success: oklch(0.53 0.125 145);
  --success-soft: oklch(0.95 0.038 145);
  --info: oklch(0.49 0.13 255);
  --focus: oklch(0.62 0.16 210);
  --shadow: 0 12px 30px rgb(23 36 59 / 0.08);
  --shadow-soft: 0 4px 18px rgb(23 36 59 / 0.06);
}

* {
  box-sizing: border-box;
}

[hidden],
.hidden {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--primary-dark);
}

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

button {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.login-shell {
  width: min(100%, 930px);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 420px;
  align-items: center;
  gap: 92px;
}

.login-logo-area {
  display: grid;
  justify-items: center;
}

.login-logo-area img {
  width: min(340px, 72vw);
}

.login-panel,
.panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.login-panel {
  padding: 42px 36px;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgb(0 0 0 / 0.18);
}

.login-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
}

.login-panel h1 {
  margin: 18px 0 0;
  font-size: 40px;
  line-height: 1.2;
}

.login-copy {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.login-form,
.form-stack {
  display: grid;
  gap: 14px;
}

.login-form {
  margin-top: 30px;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--focus) 20%, transparent);
}

.primary-button,
.secondary-button,
.ghost-button,
.link-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: oklch(0.985 0.004 230);
}

.login-form .primary-button {
  margin-top: 10px;
  min-height: 58px;
  border-radius: 8px;
  background: var(--primary-dark);
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.ghost-button {
  border: 1px solid rgb(255 255 255 / 0.28);
  background: transparent;
  color: inherit;
}

.secondary-button:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

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

.is-loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: button-spin 700ms linear infinite;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  background: var(--primary-dark);
  color: oklch(0.985 0.004 230);
}

.sidebar-note {
  display: grid;
  gap: 6px;
  margin-top: auto;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 8px;
  padding: 12px;
  background: rgb(255 255 255 / 0.08);
}

.sidebar-note span {
  color: oklch(0.86 0.018 235);
  font-size: 13px;
  line-height: 1.45;
}

.sidebar .ghost-button {
  margin-top: 0;
}

.notification-controls {
  display: grid;
  gap: 8px;
}

.notification-control {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: oklch(0.95 0.008 235);
  font-size: 13px;
}

.notification-control:hover:not(:disabled) {
  background: rgb(255 255 255 / 0.1);
  border-color: rgb(255 255 255 / 0.45);
}

.notification-control:disabled {
  cursor: default;
  opacity: 0.72;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--primary);
  font-weight: 700;
}

.brand-logo-mark {
  overflow: hidden;
  background: transparent;
}

.brand-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: oklch(0.86 0.018 235);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: oklch(0.88 0.016 235);
  text-align: left;
}

.nav-link.active,
.nav-link:hover {
  background: rgb(255 255 255 / 0.12);
  color: oklch(0.995 0.004 230);
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h1,
.panel h2 {
  margin: 0;
}

.topbar h1 {
  font-size: 30px;
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.user-box {
  color: var(--muted);
  font-size: 14px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  border: 1px solid var(--line);
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.metric-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.metric-card:first-child {
  border-color: oklch(0.82 0.05 220);
  background: var(--primary-soft);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 20px;
}

.panel-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

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

.filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(130px, 0.8fr) minmax(160px, 0.8fr) minmax(150px, 0.8fr) auto;
  gap: 14px;
  margin-bottom: 14px;
}

.list-panel .filters {
  grid-template-columns: minmax(140px, 1.2fr) minmax(90px, 0.65fr) minmax(120px, 0.9fr) minmax(120px, 0.9fr) minmax(96px, auto);
  gap: 8px;
}

.filter-field {
  display: block;
}

.filter-clear-button {
  min-width: 96px;
  padding-inline: 10px;
  font-size: 12px;
  white-space: nowrap;
}

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

.request-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgb(15 23 42 / 0.02);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.request-card:hover {
  border-color: oklch(0.78 0.04 225);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.request-card.priority-urgente {
  border-left: 4px solid var(--accent);
}

.request-card.priority-alta {
  border-left: 4px solid var(--warning);
}

.request-card.priority-normal {
  border-left: 4px solid var(--primary);
}

.request-card.priority-baixa {
  border-left: 4px solid var(--brand-green);
}

.request-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.request-title {
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 2px;
}

.request-number {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.request-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.request-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-muted);
}

.request-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.request-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.request-actions {
  display: flex;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-solicitado,
.status-em_analise,
.status-aguardando_aprovacao,
.status-cotando {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-pedido_realizado,
.status-comprado {
  background: var(--primary-soft);
  color: var(--primary);
}

.status-entregue {
  background: var(--success-soft);
  color: var(--success);
}

.status-recusado,
.status-cancelado {
  background: var(--accent-soft);
  color: var(--accent);
}

.urgency-urgente {
  background: var(--accent-soft);
  color: var(--accent);
}

.urgency-alta {
  background: var(--warning-soft);
  color: var(--warning);
}

.urgency-normal {
  background: var(--primary-soft);
  color: var(--primary);
}

.urgency-baixa {
  background: var(--success-soft);
  color: var(--success);
}

.due-danger {
  background: var(--accent-soft);
  color: var(--accent);
}

.due-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.due-neutral {
  background: var(--surface-muted);
  color: var(--muted);
}

.empty {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

.error-text {
  min-height: 22px;
  margin: 0;
  color: var(--accent);
}

.success-text {
  min-height: 22px;
  margin: 0;
  color: var(--success);
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

dialog {
  width: min(920px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  max-height: calc(100vh - 28px);
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.dialog-card {
  padding: 20px;
  max-height: calc(100vh - 28px);
  overflow-y: auto;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.icon-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 23px;
  line-height: 1;
}

.icon-button:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

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

.detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.detail-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.request-items-fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.request-items-fieldset > legend {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.request-items,
.purchase-item-lines,
.detail-items-list {
  display: grid;
  gap: 10px;
}

.request-item-row,
.purchase-item-line,
.detail-item-line {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.request-item-header,
.purchase-item-heading,
.detail-item-line > div,
.purchase-totals {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.request-item-header {
  margin-bottom: 10px;
}

.request-item-header .icon-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.request-item-fields {
  display: grid;
  grid-template-columns: minmax(90px, 0.75fr) minmax(130px, 1.25fr);
  gap: 10px;
  margin-top: 10px;
}

.request-item-row > label + label,
.request-item-row > div + label {
  margin-top: 10px;
}

.optional-label {
  color: var(--muted);
  font-weight: 500;
}

.add-item-button {
  width: 100%;
  margin-top: 10px;
}

.purchase-item-heading {
  align-items: flex-start;
  margin-bottom: 10px;
}

.purchase-item-heading strong {
  overflow-wrap: anywhere;
}

.purchase-item-heading span,
.detail-item-line span,
.detail-item-line small {
  color: var(--muted);
  font-size: 12px;
}

.purchase-item-line .grid-two {
  margin-top: 10px;
}

.purchase-totals {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.purchase-totals span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
}

.purchase-totals strong {
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.detail-items-list {
  margin-bottom: 12px;
}

.detail-item-line p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.detail-item-line small {
  display: block;
  margin-top: 7px;
}

.money-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.money-input:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--focus) 20%, transparent);
}

.money-input > span {
  display: grid;
  place-items: center;
  min-width: 44px;
  border-right: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--text);
  font-weight: 700;
}

.money-input input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

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

.detail-form-actions {
  position: sticky;
  bottom: -14px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 2px -14px -14px;
  border-top: 1px solid var(--line);
  padding: 12px 14px 14px;
  background: color-mix(in oklch, var(--surface) 96%, transparent);
}

.detail-section-title {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}

.detail-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-section-title strong {
  color: var(--primary-dark);
  font-size: 17px;
}

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

.detail-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.detail-note {
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
  color: var(--text);
  line-height: 1.5;
}

.attachment-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

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

.history-item {
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 10px 10px 10px 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions,
.history-selection-bar,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.history-metrics {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.history-metric-card {
  cursor: default;
}

.history-metric-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
  transform: none;
}

.history-panel {
  min-width: 0;
}

.history-counter,
.export-selection-summary {
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.history-filters {
  grid-template-columns: minmax(160px, 1.15fr) repeat(5, minmax(118px, 0.72fr)) minmax(96px, auto);
  gap: 10px;
}

.history-filters label {
  align-content: end;
}

.history-selection-bar {
  justify-content: space-between;
  min-height: 44px;
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.history-selection-bar > div {
  display: flex;
  gap: 8px;
}

.compact-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.history-selection-bar .ghost-button {
  border-color: var(--line);
  color: var(--text);
}

.history-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  background: var(--surface);
}

.history-table th,
.history-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  vertical-align: middle;
}

.history-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-muted);
  color: var(--primary-dark);
  font-size: 11px;
  text-transform: uppercase;
}

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

.history-table tbody tr:hover {
  background: var(--surface-soft);
}

.history-table td strong {
  color: var(--primary-dark);
}

.history-cell-detail {
  display: block;
  max-width: 260px;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.history-check-column {
  width: 42px;
  text-align: center !important;
}

.history-check-column input,
.export-options input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
}

.history-action-column {
  width: 76px;
  text-align: right !important;
}

.export-dialog-card {
  width: min(100%, 720px);
}

.export-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.export-options legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.export-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-muted);
  color: var(--text);
}

.modal-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

.dialog-actions {
  margin-top: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.purchase-notifications {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
}

.purchase-notification {
  width: 100%;
  min-height: 72px;
  display: grid;
  gap: 5px;
  border: 1px solid color-mix(in oklch, var(--primary) 28%, var(--line));
  border-left: 5px solid var(--primary);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface);
  box-shadow: 0 18px 38px rgb(23 36 59 / 0.2);
  color: var(--text);
  text-align: left;
}

.purchase-notification.urgency-alta {
  border-left-color: var(--warning);
}

.purchase-notification.urgency-urgente {
  border-left-color: var(--accent);
  background: color-mix(in oklch, var(--accent-soft) 42%, var(--surface));
}

.purchase-notification strong {
  color: var(--primary-dark);
  font-size: 15px;
  line-height: 1.25;
}

.purchase-notification span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.purchase-notification:hover {
  border-color: color-mix(in oklch, var(--primary) 48%, var(--line));
  box-shadow: 0 20px 44px rgb(23 36 59 / 0.26);
}

.status-toast {
  min-height: 52px;
  align-content: center;
  font-weight: 700;
}

.status-toast.status-success {
  border-left-color: var(--success);
  background: color-mix(in oklch, var(--success-soft) 45%, var(--surface));
}

.status-toast.status-error {
  border-left-color: var(--accent);
  background: color-mix(in oklch, var(--accent-soft) 45%, var(--surface));
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  .login-shell {
    gap: 32px;
    width: min(100%, 480px);
  }

  .login-logo-area img {
    width: min(260px, 70vw);
  }

  .metrics-grid,
  .filters,
  .workspace {
    grid-template-columns: 1fr 1fr;
  }

  .list-panel .filters {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .main {
    padding: 18px;
  }

  .topbar,
  .request-top,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics-grid,
  .filters,
  .workspace,
  .grid-two,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .list-panel .filters {
    grid-template-columns: 1fr;
  }

  .request-item-fields,
  .purchase-item-line .grid-two {
    grid-template-columns: 1fr;
  }

  .purchase-item-heading,
  .purchase-totals {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .history-selection-bar {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .history-selection-bar > div,
  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .export-options {
    grid-template-columns: 1fr;
  }

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

  .purchase-notifications {
    right: 16px;
    bottom: 16px;
  }
}
