:root {
  color-scheme: light;
  background: #f3f6fa;
  color: #172c40;
  font:
    15px/1.5 system-ui,
    sans-serif;
  --surface: #fff;
  --border: #dbe4ed;
  --accent: #075e6b;
  --accent-wash: #eaf4f5;
  --muted: #495e73;
  --danger: #ab2637;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 10px clamp(14px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.brand,
.owner-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand strong {
  font-size: 19px;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: white;
  background: #074775;
  font-weight: 750;
}
.owner-id {
  color: var(--muted);
  font-size: 13px;
}
.owner-controls button {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--border);
  white-space: nowrap;
}
main {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: 20px clamp(12px, 3vw, 32px) 32px;
}
h1 {
  margin: 0 0 18px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
section {
  padding: clamp(14px, 3vw, 26px);
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.sign-in {
  max-width: 420px;
  margin: clamp(30px, 10vh, 92px) auto 12px;
}
.sign-in form {
  display: grid;
  gap: 16px;
}
.sign-in button {
  width: 100%;
  margin-top: 4px;
}
.workspace-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.workspace-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
  padding: 7px 12px;
  border-radius: 8px;
}
.workspace-nav a[aria-current='page'] {
  color: var(--accent);
  background: var(--accent-wash);
}
#assign {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr) auto;
  align-items: end;
  gap: 12px;
}
label {
  display: grid;
  gap: 5px;
  font-weight: 650;
  min-width: 0;
}
input,
select,
button {
  font: inherit;
  min-height: 42px;
  padding: 7px 10px;
  border-radius: 7px;
}
input,
select {
  min-width: 0;
  width: 100%;
  border: 1px solid #9bafc1;
  background: var(--surface);
  color: inherit;
}
button {
  border: 1px solid transparent;
  color: white;
  background: var(--accent);
  font-weight: 650;
  cursor: pointer;
}
button:disabled {
  opacity: 0.56;
  cursor: default;
}
:focus-visible {
  outline: 2px solid #117c89;
  outline-offset: 2px;
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
table {
  border-collapse: collapse;
  width: 100%;
  color: inherit;
}
th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  overflow-wrap: anywhere;
}
th {
  font-size: 13px;
  background: #eef4fa;
  color: #34516b;
}
tr:last-child td {
  border-bottom: 0;
}
[role='status'] {
  margin: 10px 0;
  color: var(--muted);
}
[role='status']:empty {
  margin: 0;
}
[role='status'].error {
  color: var(--danger);
}
#status:not(:empty) {
  padding: 8px 12px;
  border-radius: 7px;
  background: var(--surface);
}
#assign + .table-scroll,
#assignment-status:empty + .table-scroll {
  margin-top: 14px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  #assign {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 500px) {
  .owner-id {
    display: none;
  }
  #assign {
    grid-template-columns: 1fr;
  }
  .workspace-nav {
    gap: 2px;
  }
  .workspace-nav a {
    padding-inline: 8px;
    font-size: 13px;
  }
}

#add-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
  align-items: end;
  gap: 12px;
}

#product-status:empty + .table-scroll {
  margin-top: 14px;
}

@media (max-width: 570px) {
  #add-product {
    grid-template-columns: 1fr;
  }
}

.table-action,
#cancel-product-edit {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--border);
}

@media (min-width: 571px) {
  #add-product:has(#cancel-product-edit:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto auto;
  }
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
