:root {
  --blue: #5d82ed;
  --blue-dark: #466bd4;
  --blue-soft: #edf2ff;
  --ink: #182032;
  --muted: #7c8599;
  --line: #e8ebf2;
  --surface: #ffffff;
  --background: #f7f8fa;
  --green: #2ab98b;
  --amber: #efaa43;
  --violet: #846ee8;
  --sidebar-width: 238px;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
}

svg {
  display: block;
  fill: currentColor;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  display: flex;
  height: 83px;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 7px 6px;
  border-radius: 9px;
  background: var(--blue);
}

.brand-mark span {
  width: 4px;
  border-radius: 4px;
  background: white;
}

.brand-mark span:nth-child(1) { height: 8px; opacity: 0.72; }
.brand-mark span:nth-child(2) { height: 13px; }
.brand-mark span:nth-child(3) { height: 10px; opacity: 0.85; }

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1;
}

.brand-product {
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.8px;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 34px;
  font-weight: 850;
  letter-spacing: 0.4px;
}

.brand-copy small {
  margin-top: 5px;
  color: #8b94a8;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: -0.05px;
  white-space: nowrap;
}

.main-nav {
  flex: 1;
  padding: 25px 15px;
}

.nav-label {
  margin: 0 12px 10px;
  color: #aab1bf;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

.nav-label--spaced {
  margin-top: 29px;
}

.nav-item {
  position: relative;
  display: flex;
  height: 43px;
  align-items: center;
  gap: 13px;
  margin-bottom: 3px;
  padding: 0 13px;
  border-radius: 8px;
  color: #697287;
  font-size: 13px;
  font-weight: 570;
  transition: color 120ms ease, background 120ms ease;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  color: #9da5b5;
}

.nav-item:hover {
  color: var(--blue);
  background: #f7f9ff;
}

.nav-item.is-active {
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 700;
}

.nav-item.is-active::before {
  position: absolute;
  left: -15px;
  width: 3px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--blue);
  content: "";
}

.nav-item.is-active svg {
  color: var(--blue);
}

.nav-badge {
  display: grid;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  place-items: center;
  border-radius: 20px;
  color: #d38525;
  background: #fff1d9;
  font-size: 9px;
  font-weight: 800;
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 16px;
  padding: 14px;
  border: 1px solid #e5f1ec;
  border-radius: 9px;
  background: #f8fcfa;
}

.sidebar-status.is-current {
  border-color: #d9f4cf;
  background: #f8fcf6;
}

.sidebar-status.is-current .status-dot {
  border-color: #d9f4cf;
  background: var(--green);
}

.sidebar-status.is-warning {
  border-color: #f7e7b8;
  background: #fffaf0;
}

.sidebar-status.is-warning .status-dot {
  border-color: #f7e7b8;
  background: var(--amber);
}

.sidebar-status.is-danger {
  border-color: #ffd7d7;
  background: #fff7f7;
}

.sidebar-status.is-danger .status-dot {
  border-color: #ffd7d7;
  background: #d83d3d;
}

.status-dot,
.sync-status i,
footer i {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border: 2px solid #c9f0e4;
  border-radius: 50%;
  background: var(--green);
  box-sizing: content-box;
}

.sidebar-status div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-status strong {
  font-size: 10px;
}

.sidebar-status small {
  color: #959eae;
  font-size: 9px;
}

.sidebar-status.is-current small {
  color: #268566;
}

.sidebar-status.is-warning small {
  color: #b17624;
}

.sidebar-status.is-danger small {
  color: #c73333;
}

.sidebar-logout {
  display: flex;
  height: 43px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px;
  cursor: pointer;
  border: 1px solid #f2d5d5;
  border-radius: 9px;
  color: #b93838;
  background: #fff7f7;
  font-size: 12px;
  font-weight: 800;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.sidebar-logout:hover {
  border-color: #f0bcbc;
  color: #9f2b2b;
  background: #fff0f0;
}

.sidebar-logout svg {
  width: 17px;
  height: 17px;
}

.page {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  height: 83px;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.3vw;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.topbar-context {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-context span {
  color: #a2a9b7;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.5px;
}

.topbar-context strong {
  padding: 6px 10px;
  border-radius: 5px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 10px;
  letter-spacing: 0.7px;
}

.topbar-actions,
.user {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 18px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  cursor: pointer;
  place-items: center;
  border-radius: 8px;
  color: #737d91;
  background: transparent;
  transition: background 120ms ease, color 120ms ease;
}

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

.icon-button svg {
  width: 19px;
  height: 19px;
}

.menu-button {
  display: none;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border: 1px solid white;
  border-radius: 50%;
  background: #eb6565;
}

.user {
  gap: 10px;
  padding-left: 17px;
  border-left: 1px solid var(--line);
}

.user.is-clickable {
  cursor: pointer;
}

.avatar {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 9px;
  color: white;
  background: linear-gradient(145deg, #6c91f3, #506fd0);
  font-size: 10px;
  font-weight: 800;
}

.user div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user strong {
  font-size: 11px;
}

.user small {
  color: #99a1b0;
  font-size: 9px;
}

.user > svg {
  width: 16px;
  height: 16px;
  margin-left: 7px;
  color: #aeb5c2;
}

main {
  width: min(1320px, calc(100% - 8.6vw));
  margin: 0 auto;
  padding: 40px 0 24px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 29px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(24px, 2.3vw, 31px);
  font-weight: 730;
  letter-spacing: -1px;
}

.page-heading p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.primary-button {
  display: flex;
  height: 41px;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  cursor: pointer;
  border-radius: 8px;
  color: white;
  background: var(--blue);
  font-size: 11px;
  font-weight: 700;
  transition: background 120ms ease;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.secondary-button {
  display: flex;
  height: 41px;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #687287;
  background: white;
  font-size: 11px;
  font-weight: 700;
  transition: color 120ms ease, border 120ms ease, background 120ms ease;
}

.secondary-button:hover {
  color: var(--blue);
  border-color: #dce5ff;
  background: #f7f9ff;
}

.secondary-button svg {
  width: 16px;
  height: 16px;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.primary-button:active {
  background: var(--blue-dark);
}

.primary-button svg {
  width: 16px;
  height: 16px;
}

.primary-button.is-loading svg {
  animation: spin 700ms linear infinite;
}

.primary-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 17px;
}

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

.metric-card {
  position: relative;
  display: flex;
  min-height: 137px;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 22px 20px;
  border-radius: 11px;
}

.metric-card:hover {
  border-color: #dce5ff;
}

.metric-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
}

.metric-icon svg {
  width: 19px;
  height: 19px;
}

.metric-icon--blue { color: var(--blue); background: var(--blue-soft); }
.metric-icon--violet { color: var(--violet); background: #f1edff; }
.metric-icon--amber { color: var(--amber); background: #fff4e5; }
.metric-icon--green { color: var(--green); background: #eaf9f4; }

.metric-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.metric-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-copy strong {
  margin: 4px 0 7px;
  font-size: 24px;
  font-weight: 730;
  letter-spacing: -0.8px;
}

.metric-copy small {
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.metric-copy small b {
  color: #a0a8b6;
  font-weight: 500;
}

.positive { color: var(--green); }
.warning { color: #df8f2a; }
.neutral { display: flex; align-items: center; gap: 5px; color: #8f98aa; }
.neutral i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

.metric-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  color: #bcc2cd;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 17px;
}

.content-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  overflow: hidden;
  border-radius: 11px;
}

.panel-heading {
  display: flex;
  min-height: 81px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0 0 5px;
  font-size: 13px;
}

.panel-heading p {
  margin: 0;
  color: #929aaa;
  font-size: 9px;
}

.panel-heading a {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.panel-heading a svg {
  width: 13px;
  height: 13px;
}

.panel-heading--compact {
  min-height: 0;
  padding-top: 16px;
  padding-bottom: 12px;
}

.account-row {
  display: grid;
  grid-template-columns: 34px minmax(120px, 1fr) minmax(150px, 1.3fr) 93px;
  min-height: 69px;
  align-items: center;
  gap: 14px;
  padding: 10px 22px;
  border-bottom: 1px solid #f0f2f6;
}

.account-row:last-child {
  border-bottom: 0;
}

.account-row--empty {
  grid-template-columns: 34px 1fr;
}

.account-id {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
}

.account-id--one { color: var(--blue); background: var(--blue-soft); }
.account-id--two { color: var(--violet); background: #f1edff; }
.account-id--three { color: #d88d2c; background: #fff4e5; }
.account-id--four { color: var(--green); background: #eaf9f4; }

.account-name,
.account-progress {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.account-name strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-name small,
.account-progress small {
  color: #9ba3b2;
  font-size: 8px;
}

.account-progress > span {
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #edf0f5;
}

.account-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #708075;
  font-size: 8px;
  font-weight: 600;
}

.sync-status i {
  width: 5px;
  height: 5px;
  border-width: 1px;
}

.sync-status--warning {
  color: #b17624;
}

.sync-status--warning i {
  border-color: #ffe2b8;
  background: var(--amber);
}

.quick-list {
  padding: 5px 0;
}

.quick-list a {
  display: grid;
  grid-template-columns: 37px 1fr 16px;
  min-height: 72px;
  align-items: center;
  gap: 13px;
  padding: 11px 20px;
  transition: background 120ms ease;
}

.quick-list a:hover {
  background: #fafbfe;
}

.quick-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
}

.quick-icon svg {
  width: 17px;
  height: 17px;
}

.quick-icon--amber { color: var(--amber); background: #fff4e5; }
.quick-icon--blue { color: var(--blue); background: var(--blue-soft); }
.quick-icon--violet { color: var(--violet); background: #f1edff; }

.quick-list a > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.quick-list strong {
  font-size: 10px;
}

.quick-list small {
  color: #99a1b0;
  font-size: 8px;
}

.chevron {
  width: 15px;
  height: 15px;
  color: #c2c7d0;
  transition: color 120ms ease;
}

.quick-list a:hover .chevron {
  color: var(--blue);
}

.server-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 17px;
  padding: 24px;
}

.server-hero h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.server-hero p:last-child {
  max-width: 760px;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-health {
  display: flex;
  min-width: 160px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e5f1ec;
  border-radius: 10px;
  background: #f8fcfa;
}

.server-health.is-current {
  border-color: #d9f4cf;
  background: #f8fcf6;
}

.server-health.is-current .status-dot {
  border-color: #d9f4cf;
  background: var(--green);
}

.server-health.is-current small {
  color: #268566;
}

.server-health.is-warning {
  border-color: #f7e7b8;
  background: #fffaf0;
}

.server-health.is-warning .status-dot {
  border-color: #f7e7b8;
  background: var(--amber);
}

.server-health.is-warning small {
  color: #b17624;
}

.server-health.is-danger {
  border-color: #f4dfdf;
  background: #fff8f8;
}

.server-health.is-danger .status-dot {
  border-color: #f7caca;
  background: #eb6565;
}

.server-health.is-danger small {
  color: #c73333;
}

.server-health strong,
.server-health small {
  display: block;
}

.server-health strong {
  font-size: 11px;
}

.server-health small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.check-metrics {
  margin-bottom: 17px;
}

.check-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.data-table th,
.data-table td {
  padding: 15px 18px;
  border-bottom: 1px solid #f0f2f6;
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  color: #9aa3b4;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.data-table td {
  color: #6d7689;
}

.data-table td strong {
  color: var(--ink);
  font-size: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  color: #268566;
  background: #eaf9f4;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.status-pill--warning {
  color: #c47d24;
  background: #fff4e5;
}

.status-pill--danger {
  color: #c73333;
  background: #fff0f0;
}

.status-pill--muted {
  color: #737d91;
  background: #f4f6fa;
}

.command-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.analysis-summary-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.analysis-summary-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  background: #fbfcff;
}

.analysis-summary-list strong {
  color: #687287;
  font-size: 10px;
}

.analysis-summary-list span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.analysis-panel {
  margin-top: 17px;
}

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

.inventory-items-grid > .panel {
  display: flex;
  height: 560px;
  min-width: 0;
  flex-direction: column;
}

.inventory-list-wrap {
  flex: 1;
  overflow: auto;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover,
.clickable-row:focus {
  background: #f8faff;
  outline: 0;
}

.inventory-detail-list,
.item-detail-fields {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 8px;
  width: 100%;
  overflow: auto;
  padding: 18px;
}

.inventory-detail-list div,
.item-detail-fields div {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #eef1f6;
  border-radius: 8px;
  background: #fbfcff;
}

.inventory-detail-list strong,
.item-detail-fields strong {
  color: #687287;
  font-size: 9px;
  text-transform: uppercase;
}

.inventory-detail-list span,
.item-detail-fields span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 10px;
  font-weight: 650;
}

.item-filter-bar {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(220px, 1fr) auto;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.item-filter-bar label {
  display: grid;
  gap: 6px;
}

.item-filter-bar label span {
  color: #8f98aa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.item-filter-bar input,
.item-filter-bar select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 11px;
}

.status-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 14px;
}

.status-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid #e4e9f4;
  border-radius: 999px;
  color: #667189;
  background: #fbfcff;
  font-size: 9px;
  font-weight: 750;
}

.status-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.status-color::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.status-color--ausente {
  color: #c73333;
  background: #fff0f0;
  border-color: #ffd7d7;
}

.status-color--encontrado {
  color: #36a313;
  background: #effbe9;
  border-color: #d9f4cf;
}

.status-color--auditado {
  color: #0ca978;
  background: #e9fbf5;
  border-color: #cff3e7;
}

.status-color--incorporado {
  color: #22aeca;
  background: #eaf9fd;
  border-color: #cceff7;
}

.status-color--outro-ambiente {
  color: #c28a13;
  background: #fff8e5;
  border-color: #f7e7b8;
}

.status-color--excedente {
  color: #9b40c7;
  background: #f8eefc;
  border-color: #efd8f8;
}

.status-color--sem-status {
  color: #7b8495;
  background: #f4f6fa;
  border-color: #e4e9f4;
}

.item-row--muted {
  color: #9aa3b4;
  background: #fcfcfd;
}

.item-detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  justify-content: flex-end;
  background: rgba(18, 25, 39, 0.42);
}

.item-detail-drawer.is-visible {
  display: flex;
}

.item-detail-card {
  width: min(520px, 100%);
  height: 100%;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: white;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-shell {
  width: min(420px, calc(100% - 32px));
  margin: 0;
  padding: 0;
}

.auth-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.auth-brand {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.auth-brand strong {
  display: block;
  color: var(--ink);
  font-size: 42px;
  line-height: 1;
}

.auth-brand span {
  display: block;
  margin-top: 4px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 2px;
}

.auth-brand small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.auth-form,
.profile-form {
  display: grid;
  gap: 14px;
  padding: 24px 28px 28px;
}

.auth-form label,
.profile-form label {
  display: grid;
  gap: 7px;
}

.auth-form label span,
.profile-form label span,
.password-rules strong {
  color: #8f98aa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.auth-form input,
.profile-form input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 12px;
}

.auth-message {
  min-height: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.auth-message.is-error {
  color: #c73333;
}

.profile-panel {
  max-width: 760px;
}

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

.profile-form .primary-button,
.profile-form .auth-message,
.password-rules {
  grid-column: 1 / -1;
}

.password-rules {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #eef1f6;
  border-radius: 8px;
  background: #fbfcff;
}

.password-rules span {
  color: var(--muted);
  font-size: 10px;
}

.schedule-form {
  display: grid;
  grid-template-columns: 200px minmax(260px, 320px) 150px minmax(220px, 1fr);
  column-gap: 28px;
  row-gap: 14px;
  align-items: center;
  padding: 22px 18px 18px;
}

.schedule-form label {
  display: grid;
  gap: 6px;
}

.schedule-field {
  display: grid;
  gap: 6px;
}

.schedule-form label span,
.schedule-field > span {
  color: #8f98aa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.schedule-form input[type="time"] {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 11px;
}

.schedule-state-button {
  display: inline-flex;
  width: 112px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

.schedule-state-button.is-active {
  color: #187a5f;
  border-color: #bcebdc;
  background: #e9fbf5;
}

.schedule-state-button.is-inactive {
  color: #b93030;
  border-color: #ffd1d1;
  background: #fff0f0;
}

.schedule-state-button:hover {
  filter: brightness(0.98);
}

.schedule-form > small {
  align-self: end;
  min-height: 38px;
  padding-top: 0;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.schedule-field .primary-button {
  width: 150px;
  justify-content: center;
  text-transform: uppercase;
}

.inventory-filters {
  margin-bottom: 17px;
}

.filters-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  gap: 12px;
  padding: 18px;
}

.filters-form label {
  display: grid;
  gap: 6px;
}

.filters-form label span {
  color: #8f98aa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.filters-form input,
.filters-form select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 11px;
}

.filters-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.pagination-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
}

.pagination-actions span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.source-list {
  display: grid;
  gap: 10px;
  padding: 18px 18px 0;
}

.source-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  background: #fbfcff;
}

.source-row.is-muted .status-dot {
  border-color: #f4dfdf;
  background: #eb6565;
}

.source-row div {
  min-width: 0;
}

.source-row strong,
.source-row small {
  display: block;
}

.source-row strong {
  font-size: 10px;
}

.source-row small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-list div {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #eef1f6;
  border-radius: 10px;
  background: #fbfcff;
}

.command-list strong {
  font-size: 10px;
}

.command-list code {
  overflow-x: auto;
  color: var(--blue-dark);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 9px;
  white-space: nowrap;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 3px 0;
  color: #a4abba;
  font-size: 8px;
}

footer span {
  display: flex;
  align-items: center;
  gap: 7px;
}

footer b {
  color: #d5d9e1;
}

footer i {
  width: 5px;
  height: 5px;
  border: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: none;
  background: rgba(18, 25, 39, 0.35);
  opacity: 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: flex;
  min-width: 250px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #dcefe8;
  border-radius: 10px;
  background: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.toast.is-visible {
  opacity: 1;
}

.toast > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-weight: 800;
}

.toast div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toast strong { font-size: 11px; }
.toast small { color: var(--muted); font-size: 9px; }

.sync-lock {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(18, 25, 39, 0.55);
}

.sync-lock.is-visible {
  display: flex;
}

.execution-key-confirm {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(18, 25, 39, 0.48);
  backdrop-filter: blur(5px);
}

.execution-key-confirm.is-visible {
  display: flex;
}

.execution-key-card {
  display: grid;
  width: min(420px, 100%);
  gap: 14px;
  padding: 24px;
  border: 1px solid #dfe5f2;
  border-radius: 16px;
  background: white;
  box-shadow: 0 28px 70px rgba(18, 25, 39, 0.22);
}

.execution-key-card h2,
.execution-key-card p {
  margin: 0;
}

.execution-key-card p {
  color: var(--muted);
  font-size: 11px;
}

.execution-key-card label {
  display: grid;
  gap: 6px;
}

.execution-key-card label span {
  color: #8f98aa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.execution-key-card input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
}

.execution-key-card small {
  min-height: 14px;
  color: #b93838;
  font-size: 10px;
  font-weight: 700;
}

.execution-key-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.sync-card {
  width: min(640px, 100%);
  padding: 24px;
  border: 1px solid #dfe5f2;
  border-radius: 16px;
  background: white;
}

.sync-card-heading {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sync-card h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.5px;
}

.sync-card p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.sync-spinner {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 4px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  margin-top: 22px;
  border-radius: 999px;
  background: #edf1f8;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #7b9af4);
  transition: width 120ms linear;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
}

.progress-meta strong {
  color: var(--blue);
  font-size: 13px;
}

.progress-meta small {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.sync-terminal {
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid #dfe5f2;
  border-radius: 12px;
  background: #101827;
}

.sync-terminal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #e9edf7;
}

.sync-terminal-heading strong {
  font-size: 10px;
}

.sync-terminal-heading small {
  color: #93a0b8;
  font-size: 8px;
}

.copy-error-button {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  cursor: pointer;
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 7px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.45);
  font-size: 9px;
  font-weight: 700;
}

.copy-error-button:hover {
  background: rgba(153, 27, 27, 0.62);
}

.copy-error-button[hidden] {
  display: none;
}

.sync-terminal-output {
  height: 170px;
  margin: 0;
  overflow: auto;
  padding: 12px 13px;
  color: #b7f7d0;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.terminal-line {
  color: #b7f7d0;
}

.terminal-line--error {
  color: #fecaca;
  font-weight: 700;
}

body.is-syncing {
  overflow: hidden;
}

@keyframes grow {
  to { transform: scaleX(1); }
}

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

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

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

  .schedule-form {
    grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.2fr) minmax(130px, auto);
  }

  .schedule-form > small {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .filters-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 120ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .overlay.is-visible {
    display: block;
    opacity: 1;
  }

  .page {
    margin-left: 0;
  }

  .menu-button {
    display: grid;
  }

  .topbar {
    padding: 0 22px;
  }

  .topbar-context {
    margin-right: auto;
    margin-left: 12px;
  }

  main {
    width: calc(100% - 44px);
  }

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

  .server-hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .inventory-items-grid,
  .item-filter-bar,
  .schedule-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 590px) {
  .topbar {
    height: 68px;
  }

  .user div,
  .user > svg,
  .topbar-context span {
    display: none;
  }

  .user {
    padding-left: 12px;
  }

  main {
    width: calc(100% - 30px);
    padding-top: 28px;
  }

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

  .primary-button {
    justify-content: center;
  }

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

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

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

  .account-row {
    grid-template-columns: 34px 1fr auto;
  }

  .account-progress {
    display: none;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

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