/* Borges Media Review Board — brand: #fe8200 orange · #85c61c green · #c3a00d gold · #737373 gray · Poppins */
:root {
  --orange: #fe8200;
  --orange-dark: #d96e00;
  --green: #85c61c;
  --green-dark: #6ea714;
  --gold: #c3a00d;
  --gray: #737373;
  --ink: #2b2b28;
  --bg: #f7f7f3;
  --card: #ffffff;
  --line: #e8e8e2;
  --red: #d94f2b;
  --grad: linear-gradient(120deg, var(--green), var(--orange));
  --radius: 14px;
  --shadow: 0 2px 10px rgba(43, 43, 40, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Poppins', 'Avenir Next', 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
img, video { max-width: 100%; }
a { color: var(--orange-dark); }

.brandbar { height: 5px; background: var(--grad); }
header.app {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 5px; z-index: 40;
  flex-wrap: wrap;
}
header.app .logo { height: 40px; }
header.app .slogan { color: var(--gray); font-size: 12.5px; font-weight: 300; letter-spacing: .3px; }
header.app .spacer { flex: 1; }

main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 80px; }

h1, h2, h3 { font-weight: 700; margin: 0 0 6px; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
.muted { color: var(--gray); }
.small { font-size: 12.5px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: none; cursor: pointer; border-radius: 9px;
  padding: 9px 16px; font-weight: 600; font-size: 14px;
  background: #efefe9; color: var(--ink); transition: filter .12s, transform .05s;
  text-decoration: none;
}
.btn:hover { filter: brightness(.96); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--orange); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.gold { background: var(--gold); color: #fff; }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px;
}

/* login */
.login-wrap { min-height: 82vh; display: grid; place-items: center; }
.login-card { width: min(400px, 92vw); text-align: center; padding: 36px 30px; }
.login-card .logo { height: 64px; margin-bottom: 8px; }
.login-card input {
  width: 100%; padding: 12px 14px; margin: 14px 0 6px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fbfbf8;
}
.login-card input:focus { outline: 2px solid var(--orange); border-color: transparent; }

/* filter chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px; }
.chip {
  border: 1.5px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 6px 15px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--gray);
}
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

.searchbox {
  padding: 9px 15px; border: 1.5px solid var(--line); border-radius: 999px;
  min-width: 220px; background: var(--card);
}
.searchbox:focus { outline: 2px solid var(--green); border-color: transparent; }

/* project grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.proj-card { cursor: pointer; transition: transform .12s, box-shadow .12s; position: relative; overflow: hidden; }
.proj-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(43,43,40,.12); }
.proj-card .top { height: 4px; background: var(--grad); margin: -18px -18px 12px; }
.proj-card .counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px;
}
.badge.pending { background: #f6ecc8; color: #8a7108; }
.badge.approved { background: #e4f3cc; color: #4c7410; }
.badge.revision { background: #ffe7cc; color: #a35400; }
.badge.declined { background: #f8ddd4; color: #a33417; }
.badge.archived { background: #ececec; color: var(--gray); }

/* creatives gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.creative-card { padding: 0; overflow: hidden; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.creative-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(43,43,40,.12); }
.creative-card .thumb {
  height: 160px; background: #ecece6; display: grid; place-items: center;
  overflow: hidden; font-size: 40px;
}
.creative-card .thumb img, .creative-card .thumb video { width: 100%; height: 100%; object-fit: cover; }
.creative-card .meta { padding: 12px 14px; }
.creative-card .meta .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }

/* upload zone */
.dropzone {
  border: 2px dashed #cfcfc4; border-radius: var(--radius);
  padding: 26px; text-align: center; color: var(--gray);
  background: #fdfdfa; cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone.drag { border-color: var(--green); background: #f3fae6; }

/* overlay / modal */
.overlay {
  position: fixed; inset: 0; background: rgba(30, 30, 26, .55);
  display: grid; place-items: center; z-index: 100; padding: 18px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--card); border-radius: 16px; width: min(560px, 96vw);
  max-height: 92vh; overflow: auto; padding: 24px;
}
.modal h2 { margin-bottom: 14px; }
.modal label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
.modal input, .modal select, .modal textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line);
  border-radius: 9px; background: #fbfbf8;
}
.modal input:focus, .modal select:focus, .modal textarea:focus { outline: 2px solid var(--orange); border-color: transparent; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* creative detail */
.detail {
  background: var(--card); border-radius: 16px; width: min(1060px, 97vw);
  max-height: 94vh; overflow: auto; display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
}
.detail .viewer {
  background: #23231f; display: grid; place-items: center; min-height: 320px;
  border-radius: 16px 0 0 16px; position: relative; padding: 14px;
}
.detail .viewer img { max-height: 78vh; object-fit: contain; border-radius: 6px; }
.detail .viewer video { max-height: 78vh; border-radius: 6px; }
.detail .viewer iframe { width: 100%; height: 78vh; border: 0; border-radius: 6px; background: #fff; }
.detail .side { padding: 20px; display: flex; flex-direction: column; min-width: 0; }
.detail .side .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.close-x {
  border: none; background: #efefe9; border-radius: 50%; width: 34px; height: 34px;
  cursor: pointer; font-size: 16px; flex-shrink: 0;
}

.vtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.vtab {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 8px;
  padding: 4px 12px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.vtab.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.status-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }

/* comments */
.comments { flex: 1; overflow-y: auto; margin: 6px 0; padding-right: 4px; min-height: 120px; }
.comment { margin-bottom: 12px; }
.comment .bubble {
  background: #f4f4ee; border-radius: 12px; padding: 9px 13px;
  border-top-left-radius: 4px;
}
.comment.team .bubble { background: #fff3e4; }
.comment .who { font-size: 12px; font-weight: 700; }
.comment.team .who { color: var(--orange-dark); }
.comment:not(.team) .who { color: var(--green-dark); }
.comment .when { font-size: 11px; color: var(--gray); font-weight: 400; }
.comment .replies { margin: 8px 0 0 22px; border-left: 2px solid var(--line); padding-left: 12px; }
.reply-btn { background: none; border: none; color: var(--gray); font-size: 12px; cursor: pointer; padding: 2px 4px; }
.reply-btn:hover { color: var(--ink); }

.comment-box { display: flex; gap: 8px; margin-top: 8px; }
.comment-box textarea {
  flex: 1; resize: vertical; min-height: 44px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fbfbf8;
}
.comment-box textarea:focus { outline: 2px solid var(--green); border-color: transparent; }

/* activity */
.activity-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.activity-item:last-child { border-bottom: none; }
.activity-item .ico { flex-shrink: 0; }

/* layout: project page */
.project-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 20px; }
.backlink { color: var(--gray); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.backlink:hover { color: var(--ink); }

/* toast */
#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 14px; z-index: 200; opacity: 0; transition: opacity .2s; pointer-events: none;
  max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; }

/* live dot */
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray); }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: #cfcfc4; }
.live.on .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(133, 198, 28, .25); }

/* portal hero */
.hero { padding: 26px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 20px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--grad); }

.empty { text-align: center; color: var(--gray); padding: 46px 16px; }
.empty .big { font-size: 42px; }

.share-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.share-row code { background: #f4f4ee; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; word-break: break-all; }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .detail .viewer { border-radius: 16px 16px 0 0; min-height: 220px; }
  .detail .viewer img, .detail .viewer video { max-height: 46vh; }
  .detail .viewer iframe { height: 46vh; }
  .project-layout { grid-template-columns: 1fr; }
  header.app .slogan { display: none; }
}
