:root {
  --ink: #151719;
  --muted: #65727a;
  --paper: #f3fbfc;
  --card: rgba(255, 255, 255, 0.92);
  --line: rgba(12, 28, 32, 0.12);
  --teal: #02aeb7;
  --teal-deep: #008a92;
  --teal-dark: #086a70;
  --teal-soft: rgba(2, 174, 183, 0.12);
  --black: #171717;
  --red: #c8443f;
  --blue: #275a72;
  --shadow: 0 22px 70px rgba(3, 35, 39, 0.12);
  font-family: "Onest", "Manrope", "Montserrat", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(2, 174, 183, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 2%, rgba(23, 23, 23, 0.08), transparent 24rem),
    linear-gradient(135deg, #ffffff 0%, #f0fbfc 45%, #eef7f8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(2, 174, 183, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 174, 183, 0.055) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
}

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

button,
a {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

button:hover,
.source:hover {
  transform: translateY(-1px);
}

.shell {
  position: relative;
  width: min(1560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.hero-main {
  min-width: 0;
}

.brand-row {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.brand-logo {
  width: 248px;
  max-width: 42vw;
  height: auto;
  padding: 10px 14px;
  border: 1px solid rgba(2, 174, 183, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(3, 35, 39, 0.09);
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--teal-deep);
  font-weight: 900;
  font-size: 12px;
}

.brand-subtitle {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}

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

h1 {
  max-width: 980px;
  margin-bottom: 12px;
  color: var(--black);
  font-size: clamp(42px, 6vw, 96px);
  line-height: 0.88;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 8px;
  color: var(--black);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.hero-copy {
  max-width: 900px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.hero-panel,
.card {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border-radius: 30px;
}

.hero-panel {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(230, 251, 252, 0.9)),
    #fff;
}

.hero-panel strong {
  color: var(--black);
}

.hero-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.status-dot {
  width: 13px;
  height: 13px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 8px rgba(2, 174, 183, 0.16);
}

.layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.card {
  padding: 18px;
}

.card-note {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.45;
}

.sidebar,
.details {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 16px;
}

.card-head,
.form-title,
.results-head,
.lot-top,
.lot-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.ghost,
.secondary,
.primary,
.approve,
.reject,
.post {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
}

.ghost {
  color: var(--muted);
  background: transparent;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--black), #263033);
  padding: 13px 20px;
  box-shadow: 0 14px 28px rgba(23, 23, 23, 0.18);
}

.primary:hover {
  background: linear-gradient(135deg, #000, var(--teal-dark));
}

.secondary {
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 13px 18px;
}

.request-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.request-item {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
}

.request-item.active {
  border-color: rgba(2, 174, 183, 0.58);
  background: rgba(2, 174, 183, 0.1);
}

.request-item strong {
  display: block;
  margin-bottom: 4px;
}

.request-item small {
  color: var(--muted);
}

.source-card {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(230, 251, 252, 0.86)),
    #fff;
}

.source-card ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.source-card li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.source-card span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--teal);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(2, 174, 183, 0.22);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.source-grid span {
  display: block;
  width: auto;
  height: auto;
  padding: 8px 10px;
  border: 1px solid rgba(2, 174, 183, 0.16);
  border-radius: 14px;
  color: var(--teal-dark);
  background: rgba(2, 174, 183, 0.08);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  box-shadow: none;
}

.quality-card {
  background:
    linear-gradient(160deg, rgba(21, 23, 25, 0.94), rgba(8, 106, 112, 0.92)),
    #151719;
  color: #fff;
}

.quality-card h2 {
  color: #fff;
}

.quality-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.workspace {
  display: grid;
  gap: 18px;
}

.search-form {
  display: grid;
  gap: 16px;
  border-top: 5px solid var(--teal);
}

.form-title p,
.results-head p {
  margin: 0;
  color: var(--muted);
}

.context-pill,
.score-badge {
  border-radius: 999px;
  background: rgba(2, 174, 183, 0.12);
  color: var(--teal-dark);
  padding: 8px 12px;
  font-weight: 900;
  white-space: nowrap;
}

.crm-panel {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 0.9fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(2, 174, 183, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(2, 174, 183, 0.12), rgba(255, 255, 255, 0.74)),
    #fff;
}

.crm-panel div {
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.crm-panel small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.crm-panel strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-wide {
  grid-column: 1 / -1;
}

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

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(2, 174, 183, 0.7);
  box-shadow: 0 0 0 4px rgba(2, 174, 183, 0.12);
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.checks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.checks label {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  font-weight: 800;
}

.checks input {
  accent-color: var(--teal);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.results-shell {
  min-height: 420px;
}

.results-head {
  margin: 8px 2px 14px;
}

.score-badge {
  display: flex;
  align-items: baseline;
  color: var(--black);
  background: linear-gradient(135deg, rgba(2, 174, 183, 0.17), rgba(255, 255, 255, 0.72));
}

.score-badge span {
  font-size: 26px;
}

.empty {
  padding: 42px;
  border: 1px dashed rgba(2, 174, 183, 0.42);
  border-radius: 28px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
}

.empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lot-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 46px rgba(3, 35, 39, 0.1);
}

.lot-card[data-decision="approved"] {
  box-shadow: 0 18px 56px rgba(2, 174, 183, 0.18);
}

.lot-card[data-decision="rejected"] {
  opacity: 0.72;
}

.lot-image {
  min-height: 188px;
  background:
    linear-gradient(135deg, rgba(2, 174, 183, 0.88), rgba(23, 23, 23, 0.82)),
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(255, 255, 255, 0.16) 10px 12px);
  display: grid;
  place-items: center;
  color: white;
  font-size: 44px;
  font-weight: 900;
}

.lot-body {
  padding: 16px;
}

.lot-top h3 {
  margin: 0;
  font-size: 18px;
}

.tag {
  padding: 6px 9px;
  border-radius: 999px;
  color: white;
  background: var(--teal-deep);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.fact {
  padding: 9px;
  border-radius: 14px;
  background: rgba(2, 174, 183, 0.075);
}

.fact small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.fact strong {
  display: block;
  margin-top: 2px;
}

.why {
  color: var(--ink);
  line-height: 1.45;
}

.quality-line {
  margin: -2px 0 10px;
  padding: 9px 10px;
  border: 1px solid rgba(2, 174, 183, 0.2);
  border-radius: 14px;
  color: var(--teal-dark);
  background: linear-gradient(135deg, rgba(2, 174, 183, 0.12), rgba(255, 255, 255, 0.72));
  font-size: 13px;
  font-weight: 950;
}

.market {
  margin: 8px 0 10px;
  padding: 10px;
  border-radius: 14px;
  color: #07565c;
  background: rgba(2, 174, 183, 0.13);
  font-weight: 850;
  line-height: 1.4;
}

.risk {
  margin: 10px 0 14px;
  padding: 10px;
  border-radius: 14px;
  color: #61410a;
  background: rgba(246, 176, 60, 0.16);
  font-weight: 800;
}

.lot-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.approve,
.reject,
.post,
.source {
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 13px;
  text-decoration: none;
}

.approve {
  color: white;
  background: var(--teal-deep);
}

.reject {
  color: white;
  background: var(--red);
}

.post {
  color: white;
  background: var(--black);
}

.source {
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-weight: 900;
}

.source.disabled {
  pointer-events: none;
  color: var(--muted);
  background: rgba(101, 114, 122, 0.1);
}

.post-preview {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.78);
}

.full {
  width: 100%;
  margin-top: 10px;
}

.api-card {
  display: grid;
  gap: 10px;
}

.api-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.api-card code {
  display: block;
  padding: 10px;
  border-radius: 12px;
  color: var(--teal-dark);
  background: rgba(2, 174, 183, 0.08);
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .details {
    position: static;
  }

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

@media (max-width: 760px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

  .brand-row,
  .form-title,
  .results-head,
  .crm-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .crm-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: min(260px, 100%);
    max-width: 100%;
  }

  h1 {
    font-size: 38px;
  }
}
