:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #061d54;
  color: #ffffff;
  --deep-sea: #061d54;
  --midnight: #030c2d;
  --cobalt: #1557e6;
  --electric: #2e8fff;
  --ice: #a9c6f4;
  --glass: rgba(9, 38, 107, 0.72);
  --glass-line: rgba(169, 198, 244, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(46, 143, 255, 0.34), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(21, 87, 230, 0.38), transparent 30%),
    linear-gradient(145deg, #061d54 0%, #0b45b2 48%, #04133d 100%);
}

button,
textarea {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(18px, env(safe-area-inset-left)) 14px max(18px, env(safe-area-inset-right));
  background: rgba(3, 12, 45, 0.78);
  color: #fff;
  border-bottom: 1px solid rgba(169, 198, 244, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(3, 12, 45, 0.34);
}

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

.topbar small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
}

.search-row button,
.detail-header button {
  border: 0;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.72fr);
  gap: 16px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.catalog-panel,
.detail-panel {
  background: linear-gradient(180deg, rgba(12, 55, 150, 0.72), rgba(3, 12, 45, 0.76));
  border: 1px solid var(--glass-line);
  border-radius: 22px;
  box-shadow: 0 24px 54px rgba(3, 12, 45, 0.34);
  backdrop-filter: blur(18px);
}

.section-title,
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.catalog-panel,
.detail-panel {
  padding: 16px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 16px;
}

input[type="search"] {
  width: 100%;
  border: 1px solid rgba(169, 198, 244, 0.28);
  border-radius: 12px;
  padding: 12px;
  color: #ffffff;
  background: rgba(3, 12, 45, 0.38);
  outline: none;
  min-height: 44px;
}

input[type="search"]:focus {
  border-color: var(--electric);
  box-shadow: 0 0 0 3px rgba(46, 143, 255, 0.18);
}

input[type="search"]::placeholder {
  color: rgba(169, 198, 244, 0.72);
}

.search-row button {
  background: rgba(169, 198, 244, 0.12);
  border: 1px solid rgba(169, 198, 244, 0.28);
  color: var(--ice);
  font-weight: 700;
}

.section-title small {
  color: var(--ice);
  font-weight: 600;
}

.catalog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding-right: 4px;
}

.catalog-card {
  display: grid;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(169, 198, 244, 0.18);
  border-radius: 16px;
  padding: 12px;
  background: rgba(6, 29, 84, 0.46);
  cursor: pointer;
}

.catalog-card:hover,
.catalog-card.active {
  border-color: rgba(46, 143, 255, 0.68);
  box-shadow: inset 3px 0 0 var(--electric), 0 14px 32px rgba(3, 12, 45, 0.26);
}

.catalog-card.active {
  background: linear-gradient(135deg, rgba(21, 87, 230, 0.52), rgba(6, 29, 84, 0.58));
}

.catalog-card strong,
.catalog-card small,
.catalog-card em {
  display: block;
}

.catalog-card strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
}

.catalog-card small {
  margin-top: 5px;
  color: var(--ice);
  line-height: 1.35;
}

.catalog-card em {
  margin-top: 8px;
  color: rgba(169, 198, 244, 0.7);
  font-style: normal;
  font-size: 12px;
}

.detail-panel {
  position: sticky;
  top: 86px;
  align-self: start;
}

.detail-box.empty {
  color: var(--ice);
}

.detail-box.empty span {
  display: block;
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
}

.detail-header span {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
}

.detail-header button {
  background: linear-gradient(135deg, #278cff, #0c48c7 62%, #082f91);
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

dl {
  margin: 16px 0 0;
}

dl div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid rgba(169, 198, 244, 0.18);
}

dt {
  color: var(--ice);
  font-weight: 700;
}

dd {
  margin: 0;
  color: #ffffff;
  line-height: 1.45;
}

.big-price {
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(46, 143, 255, 0.42);
}

.detail-note {
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(3, 12, 45, 0.36);
  border: 1px solid rgba(169, 198, 244, 0.14);
  color: var(--ice);
  line-height: 1.55;
}

@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .detail-panel {
    position: static;
  }

  .catalog-list {
    max-height: none;
  }
}
