/* Hedge Marketing Studio — internal tool UI */

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;
  src: url('/assets-brand/fonts/jost-latin.woff2') format('woff2');
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Jost', 'Helvetica Neue', Helvetica, sans-serif;
  background: #f4f3f1;
  color: #111;
  font-size: 15px;
  line-height: 1.55;
}

.topbar {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 20px 34px;
  background: #fff;
  border-bottom: 1px solid #e2e0dc;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar img { width: 92px; align-self: center; }
.topbar h1 { font-size: 17px; font-weight: 480; letter-spacing: 0.14em; text-transform: uppercase; }
.topbar-status { margin-left: auto; font-size: 12.5px; color: #8a8880; }
.topbar .btn { align-self: center; margin-left: 26px; padding: 9px 16px; font-size: 11.5px; }

main { max-width: 1080px; margin: 30px auto 90px; padding: 0 22px; display: grid; gap: 22px; }
main > * { min-width: 0; } /* grid children may not widen the page; wide content scrolls in place */

.card {
  background: #fff;
  border: 1px solid #e2e0dc;
  padding: 26px 30px 30px;
}
.card h2 {
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

label { display: block; font-size: 13px; font-weight: 440; margin-bottom: 14px; }
.hint { color: #8a8880; font-weight: 380; font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.hint a { color: #111; text-decoration: underline; }
input, textarea, select {
  display: block;
  width: 100%;
  min-width: 0; /* let grid/flex tracks shrink below the input's intrinsic size */
  margin-top: 5px;
  border: 1px solid #cfccc5;
  background: #fdfdfc;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 14.5px;
}
input:focus, textarea:focus { outline: 1.5px solid #111; }
input[hidden] { display: none !important; }
textarea { resize: vertical; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-4 > label { min-width: 0; }
.grid-4 .span-2 { grid-column: span 2; }
.grid-4 .span-3 { grid-column: span 3; }
.grid-2-inner .pair { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
@media (max-width: 760px) { .grid-4 { grid-template-columns: 1fr 1fr; } .grid-4 .span-3 { grid-column: span 2; } }

.lookup-row { display: flex; align-items: center; gap: 14px; margin: 2px 0 18px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 22px;
  background: #fff;
  color: #111;
  border: 1px solid #111;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #f0efec; }
.btn.solid { background: #111; color: #fff; }
.btn.solid:hover { background: #333; }
.btn[disabled] { opacity: 0.45; cursor: default; }

.dropzone {
  border: 1.5px dashed #b9b5ac;
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.dragover { border-color: #111; background: #faf9f7; }
.dropzone p { font-size: 13.5px; margin-bottom: 8px; }
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .media-row { grid-template-columns: 1fr; } }
.dropzone.small { margin-bottom: 0; }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.thumb {
  position: relative;
  width: 118px;
  height: 84px;
  cursor: grab;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .del {
  position: absolute;
  top: 3px; right: 3px;
  width: 20px; height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
}
.thumb .badge {
  position: absolute;
  left: 3px; top: 3px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  letter-spacing: 0.06em;
}
.thumb.dragging { opacity: 0.4; }
#parcel-preview img { max-width: 200px; margin-top: 6px; }
#video-status { font-size: 13px; color: #55524b; }

.materials { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 22px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14.5px; margin: 0; }
.check input { width: auto; margin: 0; }

.actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; flex-wrap: wrap; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button {
  font-family: inherit;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  padding: 9px 18px;
  border: 1px solid #cfccc5;
  background: #fff;
  cursor: pointer;
}
.tabs button.active { border-color: #111; background: #111; color: #fff; }
.tabs button.error { border-color: #b3261e; color: #b3261e; }

.preview-frame-wrap { border: 1px solid #cfccc5; height: 78vh; }
#preview-frame { width: 100%; height: 100%; border: 0; background: #fff; }

/* ---------- Auth pages ---------- */
.wordmark { font-weight: 640; letter-spacing: 0.02em; }
.wordmark a { color: inherit; text-decoration: none; }
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  background: #fff;
  border: 1px solid #e2e0dc;
  padding: 40px 44px;
  width: 100%;
  max-width: 420px;
}
.auth-card .wordmark { font-size: 22px; margin-bottom: 26px; }
.auth-card h2 { font-size: 16px; font-weight: 500; margin-bottom: 18px; }
.auth-alt { margin-top: 22px; font-size: 13.5px; color: #8a8880; }
.auth-alt a { color: #111; text-decoration: underline; }

/* ---------- Dashboard ---------- */
.dash-nav { display: flex; gap: 22px; margin-left: 34px; font-size: 13.5px; align-self: center; }
.dash-nav a { color: #111; }
.dash-nav a.active { border-bottom: 1.5px solid #111; padding-bottom: 2px; }
.dash-nav a.soon { color: #b5b2aa; cursor: default; }
.dash-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.property-card { border: 1px solid #e2e0dc; background: #fdfdfc; }
.property-card .cover {
  display: block;
  aspect-ratio: 3 / 2;
  background: #efedea;
  overflow: hidden;
}
.property-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.property-card .no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #b5b2aa;
  font-size: 13px;
}
.property-card .body { padding: 14px 16px 16px; }
.property-card .title { font-weight: 520; font-size: 15px; display: block; margin-bottom: 2px; color: #111; text-decoration: none; }
.property-card .meta { font-size: 12.5px; color: #8a8880; margin: 0 0 2px; }
.property-card .row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.property-card .btn { padding: 7px 13px; font-size: 11px; }
.property-card .btn.del { border-color: #cfccc5; color: #8a8880; }
.property-card .btn.del:hover { border-color: #b3261e; color: #b3261e; background: #fff; }

/* ---------- Brand kit editor ---------- */
.brand-sub {
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 34px 0 16px;
  padding-top: 22px;
  border-top: 1px solid #eceae6;
}
.agent-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 1.4fr 40px;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}
.agent-row input { margin: 0; }
.agent-row .del { padding: 8px 0; font-size: 14px; border-color: #cfccc5; color: #8a8880; }
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.asset-tile { border: 1px solid #e2e0dc; padding: 12px; background: #fdfdfc; }
.asset-tile .preview {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-conic-gradient(#f0eeea 0% 25%, #fff 0% 50%) 0 0/16px 16px;
  border: 1px solid #eceae6;
  margin-bottom: 10px;
}
.asset-tile .preview img { max-width: 100%; max-height: 84px; }
.asset-tile p { font-size: 12px; color: #55524b; margin-bottom: 10px; min-height: 30px; }
.asset-tile .btn { padding: 7px 13px; font-size: 11px; }

/* ---------- Domain purchase ---------- */
.domain-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  border: 1px solid #e2e0dc;
  background: #fdfdfc;
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 14.5px;
}
.domain-result .price { color: #55524b; margin-left: auto; margin-right: 16px; font-size: 13.5px; }
.domain-result.unavailable { color: #b5b2aa; }
.domain-result .btn { padding: 8px 16px; font-size: 11px; }
.domain-status {
  border: 1px solid #e2e0dc;
  background: #fdfdfc;
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.9;
  margin-bottom: 16px;
}
.domain-status .pill {
  display: inline-block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 10px; border: 1px solid #111; margin-left: 10px;
}
.domain-status .pill.ok { background: #111; color: #fff; }
.domain-status .pill.warn { border-color: #b3261e; color: #b3261e; }

/* ---------- Tables (team page & friends) ---------- */
/* Data tables scroll inside their own container; the page never scrolls sideways. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 480px; }

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  /* Topbar wraps: identity + actions on the first row, nav on its own
     scrollable row beneath. The org/user readout is desktop-only. */
  .topbar { flex-wrap: wrap; row-gap: 10px; padding: 12px 16px; align-items: center; }
  .topbar h1 { font-size: 15px; }
  .topbar img { width: 72px; }
  .topbar-status { display: none; }
  .topbar .btn { margin-left: auto !important; padding: 8px 12px; font-size: 10.5px; }
  .dash-nav {
    order: 10;
    width: 100%;
    margin-left: 0;
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .dash-nav a { flex-shrink: 0; }

  /* Studio header: the sample button drops to its own row. */
  #btn-sample { order: 11; }

  /* Brand kit agent rows: two columns instead of five. */
  .agent-row {
    grid-template-columns: 1fr 1fr;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0eeea;
  }
  .agent-row .del { grid-column: 2; justify-self: end; width: 44px; }
}

@media (max-width: 560px) {
  main { margin: 16px auto 60px; padding: 0 12px; gap: 14px; }
  .card { padding: 20px 16px 24px; }
  .grid-4 { gap: 10px; }
  .property-grid { grid-template-columns: 1fr; }
}
