:root {
  color-scheme: light;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f9f4e3;
  color: #15162a;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(118deg, rgb(255 225 224 / 0.86) 0%, rgb(253 245 211 / 0.72) 42%, rgb(223 246 237 / 0.9) 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

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

.shell {
  width: min(1700px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 48px 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff7aa8, #7a5cff 72%, #32d2a0);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 14px 28px rgb(122 92 255 / 0.22);
}

.brand h1 {
  margin-bottom: 2px;
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.color-headline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24em;
}

.color-word-one {
  color: #15162a;
}

.color-word-two {
  color: #8d4cff;
}

.color-word-three {
  color: #e94f7a;
}

.color-word-four {
  color: #1c9f78;
}

.brand p {
  margin-bottom: 0;
  color: #5d617c;
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-bar {
  display: grid;
  grid-template-columns: minmax(140px, 190px) minmax(190px, 250px) auto;
  align-items: center;
  gap: 8px;
  min-width: 430px;
  border: 1px solid #d7ddf4;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 16px 36px rgb(91 70 145 / 0.14);
  padding: 7px;
}

.profile-bar label {
  min-width: 0;
}

.profile-bar label + label {
  border-left: 1px solid #e0e3f3;
}

.profile-session {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  border: 1px solid #d7ddf4;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 16px 36px rgb(91 70 145 / 0.14);
  padding: 7px 7px 7px 18px;
}

.profile-session span {
  max-width: 260px;
  overflow: hidden;
  color: #15162a;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-session .ghost-action {
  min-height: 42px;
  border-radius: 999px;
}

input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #15162a;
  outline: none;
  padding: 10px 14px;
}

input::placeholder {
  color: #6b708d;
}

input:focus {
  box-shadow: inset 0 -2px 0 #8f4dff;
}

.primary-action,
.ghost-action,
.filter-chip,
.icon-button {
  border: 0;
  border-radius: 8px;
  font-weight: 700;
}

.primary-action {
  min-height: 42px;
  background: #8d4cff;
  color: #fff;
  padding: 10px 18px;
  box-shadow: 0 12px 22px rgb(141 76 255 / 0.24);
}

.primary-action:disabled {
  background: #bbb7cd;
  box-shadow: none;
}

.ghost-action {
  min-height: 42px;
  border: 1px solid #d9dcf2;
  background: #fff;
  color: #34364e;
  padding: 10px 14px;
}

.filter-strip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}

.search-pill {
  display: grid;
  flex: 0 0 68px;
  grid-template-columns: 18px 1fr;
  align-items: center;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid #d8ddf0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.86);
  color: #646a82;
  padding: 0 14px;
  transition: flex-basis 160ms ease;
}

.search-pill:focus-within,
.search-pill:hover {
  flex-basis: 220px;
}

.search-pill span {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
  border: 2px solid #6f748c;
  border-radius: 999px;
}

.search-pill span::after {
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: #6f748c;
  content: "";
  transform: rotate(45deg);
}

.search-pill input {
  padding-left: 4px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 39px;
  border: 1px solid #d8ddf0;
  background: rgb(255 255 255 / 0.86);
  color: #16182e;
  padding: 8px 18px;
  font-weight: 700;
  white-space: nowrap;
}

.filter-chip.is-active {
  border-color: #15162a;
  background: #15162a;
  color: #fff;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: start;
  gap: 26px;
}

.location-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
  min-width: 0;
}

.location-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 14px 38px rgb(64 58 122 / 0.08);
  padding: 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.location-card:not(.is-picked):hover,
.location-card.is-dragging {
  border-color: #b992ff;
  box-shadow: 0 18px 44px rgb(141 76 255 / 0.16);
  transform: translateY(-1px);
}

.location-card.is-picked {
  opacity: 0.5;
}

.company-badge {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid #edf0fb;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fbff, #fff2f5);
  color: #8d4cff;
  font-size: 0.78rem;
  font-weight: 700;
}

.company-badge img,
.company-badge span {
  grid-area: 1 / 1;
}

.company-badge img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.company-badge span {
  display: none;
}

.company-badge.logo-fallback img {
  display: none;
}

.company-badge.logo-fallback span {
  display: block;
}

.card-copy {
  min-width: 0;
}

.card-copy strong,
.card-copy span,
.card-copy small,
.wishlist-item strong,
.wishlist-item div > span {
  display: block;
  min-width: 0;
}

.card-copy strong,
.wishlist-item strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.card-copy span,
.wishlist-item div > span {
  overflow: hidden;
  margin-top: 3px;
  color: #5e637f;
  font-size: 0.86rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-copy small {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 999px;
  background: #eff0fb;
  color: #25273c;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-copy small b {
  margin-right: 4px;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  background: #8d4cff;
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  padding: 0 0 2px;
}

.icon-button:disabled {
  background: #c5c0d6;
}

.icon-button.quiet {
  background: #eef0fb;
  color: #373a52;
  font-size: 1rem;
  padding-bottom: 0;
}

.wishlist-panel {
  position: sticky;
  top: 28px;
  min-width: 0;
  border: 2px dashed #d9ccff;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.42);
  padding: 22px;
}

.wishlist-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wishlist-heading h2 {
  margin-bottom: 0;
  font-size: 1.18rem;
}

.count-badge {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #15162a;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0 8px;
}

.profile-callout {
  margin: 18px 0;
  border-radius: 8px;
  background: #f0edff;
  color: #6a6387;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 12px 14px;
}

.list-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.list-tabs button {
  min-height: 42px;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.84);
  color: #454967;
  font-weight: 700;
}

.list-tabs button.is-active {
  border-color: #15162a;
  background: #15162a;
  color: #fff;
}

.list-name-field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.list-name-field span {
  color: #666b82;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.list-name-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.86);
  color: #15162a;
  font-weight: 700;
}

.wishlist-dropzone {
  min-height: 132px;
  transition: background 140ms ease;
}

.wishlist-dropzone.is-over {
  background: rgb(255 255 255 / 0.58);
}

.empty-state {
  display: grid;
  min-height: 132px;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #666b82;
  padding: 14px 0;
  text-align: center;
}

.empty-state::before {
  content: "+";
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: #8d4cff;
  font-size: 1.45rem;
  font-weight: 700;
  box-shadow: 0 12px 24px rgb(141 76 255 / 0.12);
}

.empty-state strong {
  color: #15162a;
  font-size: 0.98rem;
  font-weight: 700;
}

.empty-state span {
  font-size: 0.82rem;
}

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

.wishlist-item {
  display: grid;
  grid-template-columns: 24px 44px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.wishlist-item.is-dragging {
  opacity: 0.55;
}

.company-badge.wishlist-logo {
  width: 44px;
  height: 44px;
}

.company-badge.wishlist-logo img {
  width: 24px;
  height: 24px;
}

.rank-number {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: #15162a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
}

.wishlist-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  margin-top: 18px;
}

.status {
  min-height: 24px;
  margin: 12px 0 0;
  color: #595e78;
  font-weight: 600;
  line-height: 1.45;
}

.share-link-card {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.82);
  padding: 12px;
  box-shadow: 0 14px 30px rgb(64 58 122 / 0.08);
}

.share-link-card > span {
  color: #666b82;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.share-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.share-link-row input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: #fff;
  color: #15162a;
  font-size: 0.84rem;
  font-weight: 700;
}

.copy-action {
  position: relative;
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: #15162a;
}

.copy-icon,
.copy-icon::after {
  display: block;
  width: 15px;
  height: 17px;
  border: 2px solid #fff;
  border-radius: 4px;
}

.copy-icon {
  position: relative;
}

.copy-icon::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 5px;
  background: #15162a;
}

.side-section {
  margin-top: 22px;
  border-top: 1px solid rgb(216 221 240 / 0.8);
  padding-top: 18px;
}

.side-section h3 {
  margin: 0 0 12px;
  color: #15162a;
  font-size: 0.98rem;
}

.company-submit-form {
  display: grid;
  gap: 9px;
}

.company-submit-form input {
  min-height: 40px;
  border: 1px solid #d8ddf0;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.76);
}

.file-input {
  display: grid;
  gap: 6px;
  border: 1px solid #d8ddf0;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.76);
  color: #666b82;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 9px 12px;
}

.file-input input {
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.company-submit-form button {
  width: 100%;
}

.moderation-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.moderation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.72);
  padding: 10px;
}

.moderation-item strong,
.moderation-item span {
  display: block;
  min-width: 0;
}

.moderation-item strong {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.moderation-item span,
.moderation-empty {
  color: #666b82;
  font-size: 0.78rem;
  font-weight: 600;
}

.moderation-item .primary-action,
.moderation-item .ghost-action {
  min-height: 34px;
  padding: 7px 10px;
}

.moderation-empty {
  border: 1px dashed #d8ddf0;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.admin-body {
  min-height: 100vh;
}

.admin-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-header h1 {
  margin: 4px 0 0;
  font-size: clamp(2rem, 4vw, 4rem);
}

.back-link {
  color: #5e637f;
  font-weight: 700;
  text-decoration: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.admin-panel {
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.78);
  box-shadow: 0 18px 48px rgb(64 58 122 / 0.1);
  padding: 22px;
}

.admin-panel-wide {
  grid-column: 1 / -1;
}

.admin-login-panel {
  width: min(520px, 100%);
}

.admin-panel h2 {
  margin: 0 0 14px;
  font-size: 1.24rem;
}

.admin-login-form,
.logo-search-form {
  display: grid;
  gap: 10px;
}

.admin-login-form label {
  display: grid;
  gap: 6px;
}

.admin-login-form span {
  color: #666b82;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-login-form input,
.logo-search-form input {
  min-height: 44px;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: #fff;
}

.logo-search-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.logo-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.logo-result {
  display: grid;
  gap: 8px;
  min-height: 132px;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: #fff;
  color: #15162a;
  font-weight: 700;
  padding: 10px;
  text-align: left;
}

.logo-result img {
  width: 100%;
  height: 72px;
  object-fit: contain;
}

.logo-result span {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-status {
  color: #9f2d3d;
}

.muted-empty {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  background: rgb(255 255 255 / 0.9);
  color: #666b82;
  padding: 24px;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.share-body {
  display: grid;
  place-items: center;
  padding: 28px;
}

.share-shell {
  display: grid;
  width: min(760px, 100%);
  gap: 18px;
  justify-items: center;
}

.share-shell img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #d7ddf4;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgb(64 58 122 / 0.14);
}

.share-shell a {
  text-decoration: none;
}

.share-card {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: -1;
  display: grid;
  width: 900px;
  gap: 24px;
  border: 1px solid #d7ddf4;
  border-radius: 24px;
  background:
    linear-gradient(118deg, rgb(255 225 224 / 0.9) 0%, rgb(253 245 211 / 0.82) 45%, rgb(223 246 237 / 0.95) 100%);
  color: #15162a;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 42px;
  box-shadow: none;
}

.share-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.share-card-header .brand-mark {
  flex-basis: 56px;
  width: 56px;
  height: 56px;
}

.share-card-header strong,
.share-card-header span {
  display: block;
}

.share-card-header strong {
  font-size: 2rem;
  line-height: 1;
}

.share-card-header span {
  margin-top: 6px;
  color: #666b82;
  font-size: 1rem;
  font-weight: 700;
}

.share-card-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.share-card-item {
  display: grid;
  grid-template-columns: 42px 64px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid #d7ddf4;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.92);
  padding: 18px;
}

.share-card-rank {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #15162a;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.company-badge.share-card-logo {
  width: 64px;
  height: 64px;
}

.company-badge.share-card-logo img {
  width: 38px;
  height: 38px;
}

.share-card-item strong,
.share-card-item div > span {
  display: block;
  min-width: 0;
}

.share-card-item strong {
  font-size: 1.35rem;
  line-height: 1.1;
}

.share-card-item div > span {
  margin-top: 5px;
  color: #666b82;
  font-size: 1rem;
  font-weight: 700;
}

@media (max-width: 1260px) {
  .shell {
    padding-inline: 28px;
  }

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

  .wishlist-panel {
    position: static;
  }
}

@media (max-width: 920px) {
  .topbar,
  .filter-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-bar {
    min-width: 0;
  }

  .profile-session {
    width: 100%;
    justify-content: space-between;
  }

  .location-board {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .search-pill,
  .search-pill:focus-within,
  .search-pill:hover {
    flex-basis: auto;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .shell {
    padding: 18px 14px 34px;
  }

  .brand-mark {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .profile-bar {
    grid-template-columns: 1fr;
    border-radius: 8px;
  }

  .profile-session {
    border-radius: 8px;
  }

  .profile-bar label + label {
    border-left: 0;
    border-top: 1px solid #e0e3f3;
  }

  .location-board {
    grid-template-columns: 1fr;
  }

  .location-card {
    grid-template-columns: 46px minmax(0, 1fr) 34px;
    min-height: 102px;
    padding: 13px;
  }

  .company-badge {
    width: 46px;
    height: 46px;
  }

  .wishlist-actions {
    grid-template-columns: 1fr;
  }
}
