:root {
  color-scheme: light;
  --ink: #080808;
  --muted: #647181;
  --line: #dbe3ec;
  --panel: #ffffff;
  --page: #e9eef3;
  --soft: #f5f7fa;
  --accent: #ff4b1f;
  --accent-dark: #d93612;
  --danger: #a13d45;
  --shadow: 0 18px 50px rgba(27, 42, 57, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

[hidden] {
  display: none !important;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.login-card {
  display: grid;
  gap: 16px;
  width: min(100%, 430px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 26px;
}

.login-card h1 {
  margin-bottom: 6px;
  font-size: 30px;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.login-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 850;
}

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

.catalogue-panel,
.offer-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.catalogue-panel {
  padding: 24px;
  overflow: hidden;
}

.offer-panel {
  align-self: start;
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 36px);
  padding: 22px;
  overflow: auto;
}

.topbar,
.offer-header,
.toolbar,
.summary div,
.cart-item {
  display: flex;
  align-items: center;
}

.topbar,
.offer-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
}

h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.brand-logo {
  display: inline-flex;
  align-items: baseline;
  color: #000;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

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

.page-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-nav a,
.logout-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.page-nav a[aria-current="page"] {
  border-color: var(--accent);
  color: var(--accent);
}

.logout-button {
  cursor: pointer;
}

.brand-i {
  color: var(--accent);
  margin-right: 1px;
}

.toolbar {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.search-field,
.select-field,
.offer-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.search-field {
  flex: 1 1 340px;
}

.select-field {
  flex: 0 1 220px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
  font-weight: 750;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 75, 31, 0.14);
}

input:disabled,
textarea:disabled {
  background: #f7f9fb;
  color: #8390a0;
}

.notice {
  margin-bottom: 18px;
  border-left: 4px solid var(--accent);
  background: #fff1e8;
  color: #4a2417;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
}

.bike-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.bike-card {
  display: grid;
  gap: 12px;
  min-height: 242px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.bike-card.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(255, 75, 31, 0.16);
}

.bike-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bike-title strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.bike-title span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.plate {
  align-self: start;
  border-radius: 999px;
  background: #202936;
  color: #fff !important;
  padding: 6px 10px;
  font-size: 12px !important;
  font-weight: 900 !important;
  white-space: nowrap;
}

.bike-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 12px;
  margin: 0;
}

.bike-meta div {
  display: grid;
  gap: 3px;
}

.bike-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.bike-meta dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.bike-link {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.bike-link:hover {
  text-decoration: underline;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.price {
  color: var(--accent);
  font-size: 22px;
  font-weight: 950;
}

.add-button,
.primary-button,
.icon-button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
}

.add-button,
.primary-button {
  background: var(--accent);
  color: #fff;
  padding: 0 16px;
}

.add-button:hover,
.primary-button:hover {
  background: var(--accent-dark);
}

.add-button.is-selected {
  background: var(--ink);
}

.icon-button {
  width: 40px;
  background: #fff1ee;
  color: var(--danger);
  font-size: 18px;
}

.cart-list {
  display: grid;
  gap: 8px;
}

.cart-item {
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.cart-item strong {
  display: block;
  font-size: 14px;
}

.cart-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.cart-price {
  color: var(--accent) !important;
  font-weight: 950 !important;
  white-space: nowrap;
}

.empty-state {
  border: 1px dashed #b8c4cf;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  padding: 18px;
  text-align: center;
  font-weight: 900;
}

.summary {
  display: grid;
  gap: 8px;
  margin: 0;
}

.summary div {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.summary dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.summary dd {
  margin: 0;
  font-size: 20px;
  font-weight: 950;
}

.offer-form {
  display: grid;
  gap: 13px;
}

.primary-button {
  width: 100%;
}

.primary-button:disabled {
  background: #9aa6b2;
  cursor: not-allowed;
}

.sent-panel {
  border: 1px solid #ffd0bd;
  border-radius: 8px;
  background: #fff8f4;
  color: #5a210f;
  padding: 13px;
}

.sent-panel p {
  margin: 0;
  color: #5a210f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

input[readonly] {
  background: #f7f9fb;
  color: var(--ink);
}

.user-badge {
  display: grid;
  gap: 2px;
  text-align: right;
}

.user-badge strong {
  font-size: 13px;
  font-weight: 900;
}

.user-badge span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.combo {
  position: relative;
}

.combo-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.combo-button::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}

.combo-button:focus,
.combo-button[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 75, 31, 0.14);
  outline: none;
}

.combo-button:disabled {
  background: #f7f9fb;
  color: #8390a0;
  cursor: not-allowed;
}

.combo-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 6px;
}

.combo-search {
  min-height: 38px;
  margin-bottom: 6px;
  padding: 8px 10px;
}

.combo-list {
  max-height: 240px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.combo-option,
.combo-empty {
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 750;
}

.combo-option {
  color: var(--ink);
  cursor: pointer;
}

.combo-option small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.combo-option.is-active {
  background: var(--soft);
}

.combo-option[aria-selected="true"] {
  color: var(--accent);
}

.combo-empty {
  color: var(--muted);
}

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

  .offer-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 10px;
  }

  .catalogue-panel,
  .offer-panel {
    padding: 14px;
  }

  .topbar,
  .offer-header,
  .bike-title,
  .price-row {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-area {
    flex-wrap: wrap;
  }

  .user-badge {
    text-align: left;
  }

  h1 {
    font-size: 28px;
  }
}
