/* MAG Lubricants Admin Dashboard - self-contained application styles. */

:root {
  --admin-bg: #f4f6f8;
  --admin-surface: #ffffff;
  --admin-surface-soft: #f8fafb;
  --admin-ink: #17212b;
  --admin-ink-muted: #607080;
  --admin-rule: #dce2e7;
  --admin-rule-strong: #c8d0d8;
  --admin-navy: #101c2e;
  --admin-navy-light: #1b2b42;
  --admin-accent: #9da100;
  --admin-accent-dark: #747800;
  --admin-blue: #1f5c87;
  --admin-blue-soft: #eaf3f9;
  --admin-success: #19724b;
  --admin-success-soft: #e8f5ee;
  --admin-warning: #946200;
  --admin-warning-soft: #fff5dc;
  --admin-danger: #a22a2a;
  --admin-danger-soft: #fcecec;
  --admin-shadow: 0 10px 30px rgba(16, 28, 46, 0.07);
  --sidebar-width: 270px;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--admin-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--admin-bg);
  color: var(--admin-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(31, 92, 135, 0.28);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  padding: 9px 14px;
  border-radius: 6px;
  background: var(--admin-surface);
  color: var(--admin-navy);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.section-kicker {
  margin: 0 0 5px;
  color: var(--admin-accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button--primary {
  background: var(--admin-navy);
  color: #ffffff;
}

.button--primary:hover:not(:disabled) {
  background: var(--admin-navy-light);
}

.button--secondary {
  border-color: var(--admin-rule-strong);
  background: var(--admin-surface);
  color: var(--admin-ink);
}

.button--secondary:hover:not(:disabled) {
  border-color: var(--admin-blue);
  color: var(--admin-blue);
}

.button--text {
  padding-inline: 10px;
  background: transparent;
  color: var(--admin-blue);
}

.button--danger {
  border-color: var(--admin-danger);
  background: var(--admin-danger);
  color: #ffffff;
}

.button--danger:hover:not(:disabled) {
  border-color: #842020;
  background: #842020;
}

.button--danger-text {
  padding-inline: 8px;
  background: transparent;
  color: var(--admin-danger);
}

.button--danger-text:hover:not(:disabled) {
  background: var(--admin-danger-soft);
}

.button--compact {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 13px;
}

.button--full {
  width: 100%;
}

/* Sign-in */

.login-page {
  background: var(--admin-navy);
}

.login-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(340px, 1.08fr) minmax(440px, 0.92fr);
}

.login-brand {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(34px, 6vw, 76px);
  background:
    radial-gradient(circle at 78% 18%, rgba(157, 161, 0, 0.2), transparent 30%),
    linear-gradient(150deg, var(--admin-navy-light), var(--admin-navy) 60%);
  color: #ffffff;
}

.login-brand::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -130px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255, 255, 255, 0.025), 0 0 0 110px rgba(255, 255, 255, 0.018);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand-lockup small {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 3px;
  border-radius: 9px;
  background: #ffffff;
}

.brand-lockup--large {
  align-items: flex-start;
}

.brand-lockup--large .brand-mark {
  width: 150px;
  max-width: 100%;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.login-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 570px;
  padding-block: 80px;
}

.login-brand-copy .section-kicker {
  color: #c6ca42;
}

.login-brand-copy h1 {
  max-width: 12ch;
  margin: 0 0 22px;
  font-size: clamp(42px, 5.3vw, 72px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.login-brand-copy > p:last-child {
  max-width: 55ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
}

.login-classification {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.login-card {
  display: flex;
  width: min(100%, 480px);
  align-self: center;
  justify-self: center;
  flex-direction: column;
  gap: 24px;
  margin: 50px;
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px;
  background: var(--admin-surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

.login-card h2 {
  margin: 0 0 10px;
  font-size: 30px;
  letter-spacing: -0.025em;
}

.login-intro {
  margin: 0;
  color: var(--admin-ink-muted);
}

.login-status {
  margin: 0;
  padding: 11px 13px;
  border-left: 3px solid var(--admin-blue);
  background: var(--admin-blue-soft);
  color: #264b66;
  font-size: 13px;
}

.login-status--checking {
  color: var(--admin-ink-muted);
}

.login-status--error {
  border-color: var(--admin-danger);
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.microsoft-mark {
  display: grid;
  width: 18px;
  height: 18px;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.microsoft-mark i:nth-child(1) { background: #f25022; }
.microsoft-mark i:nth-child(2) { background: #7fba00; }
.microsoft-mark i:nth-child(3) { background: #00a4ef; }
.microsoft-mark i:nth-child(4) { background: #ffb900; }

.security-note {
  display: flex;
  gap: 11px;
  padding-top: 20px;
  border-top: 1px solid var(--admin-rule);
  color: var(--admin-ink-muted);
  font-size: 12px;
}

.security-note p {
  margin: 0;
}

.security-note__icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--admin-success-soft);
  color: var(--admin-success);
  font-weight: 900;
}

.login-help {
  margin: -8px 0 0;
  color: var(--admin-ink-muted);
  font-size: 12px;
  text-align: center;
}

/* Authenticated application shell */

.admin-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 28px 20px 20px;
  background: var(--admin-navy);
  color: #ffffff;
}

.admin-sidebar .brand-lockup {
  padding-inline: 7px;
}

.admin-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  margin-top: 42px;
}

.admin-nav__link {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.69);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease;
}

.admin-nav__link > span {
  width: 21px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  text-align: center;
}

.admin-nav__link:hover,
.admin-nav__link.is-active {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.admin-nav__link.is-active {
  box-shadow: inset 3px 0 0 var(--admin-accent);
}

.admin-nav__link.is-active > span {
  color: #c4c83a;
}

.sidebar-user {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 18px 7px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-user__avatar {
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(157, 161, 0, 0.2);
  color: #dadd72;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-user__identity {
  min-width: 0;
}

.sidebar-user__identity strong,
.sidebar-user__identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user__identity strong {
  font-size: 12px;
}

.sidebar-user__identity span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
}

.sidebar-logout {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 4px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-logout:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.admin-workspace {
  min-width: 0;
}

.admin-topbar {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(24px, 4vw, 52px);
  border-bottom: 1px solid var(--admin-rule);
  background: rgba(255, 255, 255, 0.92);
}

.admin-topbar h1 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.topbar-context {
  margin: 0;
  color: var(--admin-ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-main {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 50px);
}

.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.page-intro h2 {
  margin: 0 0 5px;
  font-size: clamp(23px, 2.5vw, 32px);
  letter-spacing: -0.035em;
}

.page-intro p:last-child {
  margin: 0;
  color: var(--admin-ink-muted);
}

.inline-notice {
  margin: 0 0 20px;
  padding: 11px 14px;
  border-radius: 7px;
  font-size: 13px;
}

.inline-notice--error {
  border: 1px solid #edc4c4;
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.system-state {
  display: flex;
  min-height: 360px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 45px;
  border: 1px solid var(--admin-rule);
  border-radius: var(--radius);
  background: var(--admin-surface);
  text-align: center;
}

.system-state h2 {
  margin: 16px 0 4px;
  font-size: 20px;
}

.system-state p {
  margin: 0 0 20px;
  color: var(--admin-ink-muted);
}

.system-state--error h2 {
  color: var(--admin-danger);
}

.spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid var(--admin-rule);
  border-top-color: var(--admin-blue);
  border-radius: 50%;
  animation: admin-spin 750ms linear infinite;
}

.spinner--small {
  width: 17px;
  height: 17px;
  margin-right: 7px;
  border-width: 2px;
  vertical-align: -3px;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Dashboard */

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

.metric-card {
  display: flex;
  min-height: 178px;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--admin-rule);
  border-radius: var(--radius);
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow);
}

.metric-card__icon {
  display: flex;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--admin-blue-soft);
  color: var(--admin-blue);
  font-size: 19px;
  font-weight: 800;
}

.metric-card--new .metric-card__icon,
.metric-card--open .metric-card__icon {
  background: var(--admin-warning-soft);
  color: var(--admin-warning);
}

.metric-card p {
  min-height: 40px;
  margin: 0;
  color: var(--admin-ink-muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin: 8px 0 3px;
  font-size: clamp(30px, 3vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.metric-card span:last-child {
  color: var(--admin-ink-muted);
  font-size: 11px;
}

.content-panel {
  border: 1px solid var(--admin-rule);
  border-radius: var(--radius);
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow);
}

.dashboard-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 22px;
  border-color: #edc4c4;
}

.dashboard-error h2,
.dashboard-error p {
  margin: 0;
}

.dashboard-error h2 {
  color: var(--admin-danger);
  font-size: 16px;
}

.dashboard-error p {
  margin-top: 3px;
  color: var(--admin-ink-muted);
  font-size: 13px;
}

/* Data lists */

.data-panel {
  overflow: hidden;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) minmax(155px, 0.7fr) auto auto;
  gap: 14px;
  align-items: end;
  padding: 22px 24px;
  border-bottom: 1px solid var(--admin-rule);
  background: var(--admin-surface-soft);
}

.filter-bar--wide {
  grid-template-columns: minmax(235px, 1.6fr) minmax(145px, 0.7fr) minmax(130px, 0.6fr) auto auto;
}

.inline-notice--success {
  border: 1px solid #b8dfca;
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.record-delete-notice {
  margin-bottom: 20px;
}

.filter-bar--operational {
  grid-template-columns: minmax(230px, 1.5fr) repeat(4, minmax(130px, 0.65fr)) auto auto;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: #445463;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--admin-rule-strong);
  border-radius: 7px;
  background: var(--admin-surface);
  color: var(--admin-ink);
}

.field input:hover,
.field select:hover {
  border-color: #9ba8b4;
}

.field input:focus,
.field select:focus {
  border-color: var(--admin-blue);
}

.search-control {
  position: relative;
}

.search-control span {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--admin-ink-muted);
  font-size: 18px;
  pointer-events: none;
}

.search-control input {
  padding-left: 37px;
}

.table-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 15px;
}

.table-summary h2,
.table-summary p {
  margin: 0;
}

.table-summary h2 {
  font-size: 17px;
}

.table-summary p {
  margin-top: 2px;
  color: var(--admin-ink-muted);
  font-size: 12px;
}

.table-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 24px 18px;
  padding: 15px;
  border: 1px solid #edc4c4;
  border-radius: 8px;
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.table-error p {
  margin: 2px 0 0;
  color: #774343;
  font-size: 12px;
}

.table-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--admin-rule);
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  padding: 15px 18px;
  border-bottom: 1px solid #e8ecef;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: #f7f9fa;
  color: #566573;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.data-table th:first-child,
.data-table td:first-child {
  width: 23%;
  padding-left: 24px;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
  width: 23%;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
  width: 23%;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
  width: 15%;
}

.data-table--careers {
  min-width: 1080px;
}

.data-table--careers th:first-child,
.data-table--careers td:first-child {
  width: 16%;
}

.data-table--careers th:nth-child(2),
.data-table--careers td:nth-child(2) {
  width: 15%;
}

.data-table--careers th:nth-child(3),
.data-table--careers td:nth-child(3) {
  width: 15%;
}

.data-table--careers th:nth-child(4),
.data-table--careers td:nth-child(4) {
  width: 10%;
}

.data-table--careers th:nth-child(5),
.data-table--careers td:nth-child(5) {
  width: 12%;
}

.data-table--careers th:nth-child(6),
.data-table--careers td:nth-child(6) {
  width: 15%;
}

.data-table--careers th:nth-child(7),
.data-table--careers td:nth-child(7) {
  width: 17%;
}

.data-table tbody tr:hover:not(.table-state-row) {
  background: #fbfcfd;
}

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

.cell-primary {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 750;
}

.cell-secondary {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: var(--admin-ink-muted);
  font-size: 10px;
}

.cell-text {
  overflow-wrap: anywhere;
  color: #40505f;
  font-size: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf0f3;
  color: #53616e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-badge--new,
.status-badge--open {
  background: var(--admin-blue-soft);
  color: var(--admin-blue);
}

.status-badge--screening,
.status-badge--interview {
  background: var(--admin-warning-soft);
  color: var(--admin-warning);
}

.status-badge--hired,
.status-badge--completed {
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.status-badge--rejected {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.status-badge--muted {
  background: #f0f2f4;
  color: #6c7882;
}

.cv-availability {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.cv-action {
  color: var(--admin-blue);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.cv-action:hover,
.cv-action:focus-visible {
  text-decoration: underline;
}

.table-state-row td {
  height: 150px;
  color: var(--admin-ink-muted);
  text-align: center;
}

.pagination {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 24px;
  border-top: 1px solid var(--admin-rule);
  background: var(--admin-surface-soft);
}

.pagination p {
  margin: 0;
  color: var(--admin-ink-muted);
  font-size: 12px;
}

.pagination > div {
  display: flex;
  gap: 8px;
}

.data-table--inquiries {
  min-width: 940px;
}

.data-table--inquiries th:first-child,
.data-table--inquiries td:first-child {
  width: 20%;
}

.data-table--inquiries th:nth-child(2),
.data-table--inquiries td:nth-child(2) {
  width: 18%;
}

.data-table--inquiries th:nth-child(3),
.data-table--inquiries td:nth-child(3) {
  width: 17%;
}

.data-table--inquiries th:nth-child(4),
.data-table--inquiries td:nth-child(4) {
  width: 12%;
}

.data-table--inquiries th:nth-child(5),
.data-table--inquiries td:nth-child(5) {
  width: 14%;
}

.data-table--inquiries th:nth-child(6),
.data-table--inquiries td:nth-child(6) {
  width: 19%;
}

.inquiry-detail-action {
  white-space: nowrap;
}

.career-detail-action {
  white-space: nowrap;
}

.record-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.record-delete-action {
  white-space: nowrap;
}

.career-detail-cv-action {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-rule);
  color: var(--admin-ink-muted);
  font-size: 12px;
}

.inquiry-detail-panel {
  margin-top: 22px;
  scroll-margin-top: 24px;
}

.inquiry-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-bottom: 1px solid var(--admin-rule);
}

.inquiry-detail-header h2,
.inquiry-detail-header p:last-child {
  margin: 0;
}

.inquiry-detail-header h2 {
  font-size: 21px;
  letter-spacing: -0.025em;
}

.inquiry-detail-header p:last-child {
  margin-top: 3px;
  color: var(--admin-ink-muted);
  font-size: 12px;
}

.inquiry-detail-loading {
  min-height: 150px;
  padding: 52px 24px;
  color: var(--admin-ink-muted);
  text-align: center;
}

.inquiry-detail-error {
  margin-top: 20px;
}

.inquiry-detail-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
}

.inquiry-detail-group {
  padding: 20px;
  border: 1px solid var(--admin-rule);
  border-radius: 9px;
  background: var(--admin-surface-soft);
}

.inquiry-detail-group h3 {
  margin: 0 0 16px;
  font-size: 15px;
}

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

.inquiry-detail-item {
  min-width: 0;
}

.inquiry-detail-item--wide {
  grid-column: 1 / -1;
}

.inquiry-detail-item dt {
  margin-bottom: 3px;
  color: var(--admin-ink-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.inquiry-detail-item dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--admin-ink);
  font-size: 13px;
  white-space: pre-wrap;
}

.record-status-control {
  display: grid;
  grid-template-columns: minmax(210px, 320px) auto minmax(220px, 1fr);
  align-items: end;
  gap: 14px;
  margin: 0 24px 24px;
  padding: 20px;
  border: 1px solid var(--admin-rule);
  border-radius: 9px;
  background: var(--admin-surface-soft);
}

.record-status-control[hidden] {
  display: none;
}

.record-status-feedback {
  min-height: 18px;
  margin: 0 0 6px;
  color: var(--admin-ink-muted);
  font-size: 12px;
}

.record-status-feedback--success {
  color: var(--admin-success);
}

.record-status-feedback--error {
  color: var(--admin-danger);
}

.confirmation-dialog {
  width: min(92vw, 460px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--admin-ink);
  box-shadow: 0 24px 70px rgba(16, 28, 46, 0.3);
}

.confirmation-dialog::backdrop {
  background: rgba(16, 28, 46, 0.58);
}

.confirmation-dialog__surface {
  padding: 26px;
  border: 1px solid var(--admin-rule);
  border-radius: 12px;
  background: var(--admin-surface);
}

.confirmation-dialog__surface h2 {
  margin: 0;
  font-size: 21px;
}

.confirmation-dialog__surface > p {
  margin: 9px 0 0;
  color: var(--admin-ink-muted);
}

.confirmation-dialog__error {
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--admin-danger-soft);
  color: var(--admin-danger) !important;
  font-size: 13px;
}

.confirmation-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-bar,
  .filter-bar--wide {
    grid-template-columns: minmax(220px, 1.5fr) minmax(145px, 0.7fr) minmax(130px, 0.6fr);
  }

  .filter-bar:not(.filter-bar--wide) .filter-submit {
    grid-column: 3;
  }

  .filter-submit {
    grid-row: 2;
    grid-column: 1;
    justify-self: start;
  }

  .filter-reset {
    grid-row: 2;
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 330px;
  }

  .login-brand-copy {
    padding-block: 55px 30px;
  }

  .login-brand-copy h1 {
    font-size: clamp(38px, 8vw, 58px);
  }

  .login-card {
    width: auto;
    margin: 40px 24px;
  }

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

  .admin-sidebar {
    position: relative;
    z-index: 2;
    display: grid;
    width: 100%;
    height: auto;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 17px 22px;
  }

  .admin-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: row;
    margin-top: 1px;
    overflow-x: auto;
  }

  .admin-nav__link {
    flex: 1 0 auto;
    justify-content: center;
  }

  .admin-nav__link.is-active {
    box-shadow: inset 0 -3px 0 var(--admin-accent);
  }

  .sidebar-user {
    grid-template-columns: 34px minmax(90px, auto) auto;
    justify-self: end;
    padding: 0;
    border: 0;
  }

  .sidebar-user__avatar {
    width: 34px;
    height: 34px;
  }

  .sidebar-logout {
    grid-column: auto;
    min-height: 44px;
    margin: 0;
    white-space: nowrap;
  }

  .admin-topbar {
    min-height: 82px;
  }
}

@media (max-width: 660px) {
  .brand-lockup--large .brand-mark {
    width: 135px;
  }

  .login-brand {
    min-height: 300px;
    padding: 28px 24px;
  }

  .login-classification {
    display: none;
  }

  .login-brand-copy {
    padding: 50px 0 15px;
  }

  .login-brand-copy > p:last-child {
    display: none;
  }

  .login-card {
    margin: 24px 16px;
    padding: 28px 22px;
  }

  .admin-sidebar {
    grid-template-columns: 1fr;
    row-gap: 10px;
    padding: 15px 16px 10px;
  }

  .admin-sidebar .brand-lockup {
    justify-self: center;
  }

  .sidebar-user {
    position: static;
    grid-row: 2;
    grid-column: 1;
    grid-template-columns: max-content;
    justify-self: end;
  }

  .sidebar-user__avatar,
  .sidebar-user__identity {
    display: none;
  }

  .sidebar-logout {
    width: auto;
    padding-inline: 14px;
  }

  .admin-nav {
    grid-row: 3;
    width: 100%;
  }

  .admin-nav__link {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .admin-nav__link > span {
    display: none;
  }

  .admin-topbar {
    min-height: 74px;
    padding: 15px 19px;
  }

  .admin-topbar h1 {
    font-size: 21px;
  }

  .topbar-context {
    display: none;
  }

  .admin-main {
    padding: 24px 15px 38px;
  }

  .page-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .page-intro .button {
    align-self: flex-start;
  }

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

  .metric-card {
    min-height: 138px;
  }

  .metric-card p {
    min-height: 0;
  }

  .filter-bar,
  .filter-bar--wide {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .filter-submit,
  .filter-reset,
  .filter-bar:not(.filter-bar--wide) .filter-submit {
    grid-row: auto;
    grid-column: 1;
    width: 100%;
  }

  .table-summary {
    padding-inline: 18px;
  }

  .table-error {
    align-items: stretch;
    flex-direction: column;
    margin-inline: 18px;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
    padding-inline: 18px;
  }

  .pagination > div,
  .pagination .button {
    flex: 1;
  }

  .dashboard-error {
    align-items: stretch;
    flex-direction: column;
  }

  .inquiry-detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .inquiry-detail-header .button {
    align-self: flex-start;
  }

  .inquiry-detail-groups,
  .inquiry-detail-list {
    grid-template-columns: 1fr;
  }

  .record-status-control {
    grid-template-columns: 1fr;
    margin-inline: 18px;
  }

  .inquiry-detail-item--wide {
    grid-column: auto;
  }
}
