:root {
  --navy: #1E3550;
  --pink: #C1367A;
  --blue: #4FA3E3;
  --light-blue: #B6DBEE;
  --off-white: #F6EFE6;
  --yellow: #FFD23F;
  --ink: #172536;
  --muted: #637083;
  --border: #d7dce2;
  --white: #ffffff;
  --danger: #a72828;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--off-white);
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

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

button {
  cursor: pointer;
}

.toolbar {
  min-height: 92px;
  padding: 14px 18px;
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  color: var(--off-white);
  background: var(--navy);
  border-bottom: 5px solid var(--pink);
}

.brand {
  min-width: 220px;
}

.brand h1,
.dialog-header h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  transform: skew(-5deg);
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  justify-content: flex-end;
}

.filters label,
.form-grid label {
  display: grid;
  gap: 4px;
}

.filters label span,
.form-grid label span {
  font-size: 12px;
  font-weight: 800;
}

.filters input,
.filters select {
  width: 155px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 10px;
}

.filters input[type="search"] {
  width: 210px;
}

.primary-button,
.secondary-button,
.icon-button,
.small-button {
  border: 0;
  border-radius: 6px;
  font-weight: 800;
}

.primary-button {
  min-height: 40px;
  padding: 0 15px;
  color: var(--white);
  background: var(--pink);
}

.primary-button:hover {
  filter: brightness(1.08);
}

.secondary-button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--navy);
  background: var(--off-white);
}

.workspace {
  height: calc(100% - 97px);
  display: grid;
  grid-template-columns: minmax(290px, 365px) 1fr;
}

.sidebar {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--off-white);
  border-right: 1px solid var(--border);
}

.sidebar-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
}

.sidebar-header span {
  color: var(--muted);
  font-size: 12px;
}

.billboard-list {
  overflow-y: auto;
  padding: 10px;
}

.billboard-card {
  width: 100%;
  margin-bottom: 9px;
  padding: 13px;
  text-align: left;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--blue);
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(30, 53, 80, 0.06);
}

.billboard-card:hover {
  border-color: var(--pink);
}

.card-title {
  display: flex;
  gap: 8px;
  align-items: start;
  justify-content: space-between;
}

.card-title strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
}

.vendor-logo-wrap {
  flex: 0 0 125px;
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.vendor-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 120px;
  max-height: 38px;
  object-fit: contain;
}

.vendor-name {
  flex: 0 0 auto;
  max-width: 125px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.1;
  text-align: right;
}

.card-subtitle,
.card-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.badges {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--light-blue);
  font-size: 11px;
  font-weight: 800;
}

.badge.status-shortlisted {
  color: var(--white);
  background: var(--pink);
}

.badge.status-reserved {
  color: var(--navy);
  background: var(--blue);
}

.badge.status-quote-requested {
  background: var(--yellow);
}

.badge.status-passed {
  color: var(--white);
  background: #7d8792;
}

.card-actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
}

.small-button {
  padding: 6px 9px;
  color: var(--navy);
  background: var(--off-white);
  border: 1px solid var(--border);
  font-size: 12px;
}

.small-button.danger {
  color: var(--danger);
}

.empty-state {
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
}

#map {
  min-width: 0;
  height: 100%;
}

.add-notice {
  position: fixed;
  z-index: 10;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px;
  color: var(--navy);
  background: var(--yellow);
  border-radius: 999px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
  font-weight: 800;
}

.mapboxgl-popup-content {
  min-width: 250px;
  padding: 14px;
  border-radius: 7px;
}

.popup-title {
  margin: 0 0 7px;
  color: var(--navy);
  font-size: 17px;
}

.popup-row {
  margin-top: 4px;
  font-size: 13px;
}

.popup-image {
  width: 100%;
  max-height: 180px;
  margin-top: 9px;
  object-fit: cover;
  border-radius: 5px;
}

dialog {
  width: min(760px, calc(100% - 30px));
  max-height: calc(100% - 30px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.35);
}

dialog::backdrop {
  background: rgba(23, 37, 54, 0.65);
}

#billboardForm {
  padding: 22px;
}

.dialog-header {
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.dialog-header .eyebrow {
  color: var(--pink);
}

.icon-button {
  width: 36px;
  height: 36px;
  color: var(--navy);
  background: var(--off-white);
  font-size: 26px;
  line-height: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  color: var(--ink);
  background: var(--white);
}

.full-width {
  grid-column: 1 / -1;
}

.dialog-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.dialog-actions .secondary-button {
  border: 1px solid var(--border);
}

.form-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 950px) {
  .toolbar {
    align-items: start;
    flex-direction: column;
  }

  .filters {
    justify-content: flex-start;
  }

  .workspace {
    height: calc(100% - 190px);
  }
}

@media (max-width: 680px) {
  .filters label,
  .filters input,
  .filters select,
  .filters input[type="search"] {
    width: 100%;
  }

  .filters {
    width: 100%;
  }

  .workspace {
    height: auto;
    min-height: calc(100% - 320px);
    grid-template-columns: 1fr;
    grid-template-rows: 45vh 55vh;
  }

  .sidebar {
    grid-row: 2;
    border-top: 1px solid var(--border);
    border-right: 0;
  }

  #map {
    grid-row: 1;
  }

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

  .full-width {
    grid-column: auto;
  }

  .vendor-logo-wrap {
  flex-basis: 105px;
  min-height: 34px;
}

.vendor-logo {
  max-width: 100px;
  max-height: 32px;
}

.vendor-name {
  max-width: 105px;
  font-size: 14px;
}
}
