@font-face {
  font-family: "Inter Local";
  src: url("/assets/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Local";
  src: url("/assets/Inter-Bold.ttf") format("truetype");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --background: #f6f6f6;
  --panel: #ffffff;
  --text: #161616;
  --muted: #747474;
  --line: #e6e6e6;
  --accent: #ef7f1a;
  font-family: "Inter Local", "Segoe UI", Arial, sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.auth-card {
  width: min(100%, 440px);
  padding: 36px;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 20px 70px rgba(22, 22, 22, 0.08);
}

.auth-card h1 {
  margin: 0 0 12px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.auth-card p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-size: 15px;
}

.auth-form input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(239, 127, 26, 0.12);
}

.auth-form button {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.auth-form button:hover,
.auth-form button:focus-visible {
  background: #d86f12;
}

.auth-message {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff4e9;
  color: #9f4b00;
  font-size: 14px;
  line-height: 1.45;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 80px);
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
}

.admin-navigation {
  display: flex;
  align-items: center;
  gap: 32px;
}

.admin-navigation a {
  color: var(--text);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  transition: color 180ms ease;
}

.admin-navigation a:hover,
.admin-navigation a:focus-visible,
.admin-navigation a.is-active {
  color: var(--accent);
}

.logout-form {
  margin: 0;
}

.logout-form button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  font-weight: 400;
  transition: color 180ms ease;
}

.logout-form button:hover,
.logout-form button:focus-visible {
  color: var(--accent);
}

.welcome-page,
.products-page {
  width: calc(100% - 80px);
  max-width: 1200px;
  margin: 80px auto 0;
}

.welcome-page h1,
.products-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.product-kinds {
  display: grid;
  gap: 16px;
  margin: 32px 0 80px;
}

.product-kind {
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
}

.product-kind summary {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  cursor: pointer;
  font-size: 18px;
  list-style: none;
  transition: color 180ms ease;
}

.product-kind summary::-webkit-details-marker {
  display: none;
}

.product-kind summary::after {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-3px);
  transition: transform 180ms ease;
}

.product-kind[open] summary {
  color: var(--accent);
}

.product-kind[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.product-kind summary span {
  flex: 1;
}

.product-kind summary small {
  color: var(--muted);
  font-size: 15px;
}

.product-kind__content {
  border-top: 1px solid var(--line);
}

.product-kind__placeholder,
.product-kind__error {
  margin: 0;
  padding: 24px;
  color: var(--muted);
}

.product-kind__error {
  color: #b42318;
}

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

.products-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

.products-table th,
.products-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.products-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

.products-table td {
  font-size: 14px;
}

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

.products-table__sku {
  width: 160px;
  color: var(--muted);
  white-space: nowrap;
}

.products-table__name {
  min-width: 300px;
}

.products-table__input-cell {
  width: 140px;
}

.products-table input {
  width: 120px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fff;
}

.products-table input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(239, 127, 26, 0.1);
}

.products-table__actions {
  width: 190px;
}

.products-table__actions button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--text);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.products-table__actions button:hover,
.products-table__actions button:focus-visible {
  background: var(--accent);
}

.products-table__actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.products-table__status {
  display: block;
  min-height: 17px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.products-table__status.is-success {
  color: #18864b;
}

.products-table__status.is-error {
  color: #b42318;
}

@media (max-width: 560px) {
  .auth-shell {
    padding: 16px;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .admin-header,
  .welcome-page,
  .products-page {
    width: calc(100% - 32px);
  }

  .admin-header {
    padding-top: 20px;
  }

  .welcome-page,
  .products-page {
    margin-top: 60px;
  }

  .welcome-page h1,
  .products-heading h1 {
    font-size: 24px;
  }

  .product-kind summary {
    min-height: 64px;
    padding: 0 16px;
    font-size: 16px;
  }
}
