/* CURRENT brand kit: charcoal · white · warm gray · gold (accent only) */
:root {
  --black: #282729;      /* charcoal — page background */
  --ink: #303031;        /* inputs, wells */
  --panel: #383738;      /* panels */
  --panel-2: #424143;    /* raised panels */
  --line: #4c4b4e;       /* borders */
  --gray: #aaa8a5;       /* warm gray — secondary text */
  --gray-light: #d6d4d1;
  --white: #ffffff;
  --gold: #e2b56c;       /* accent, small touches only */
  --gold-bright: #ecc78a;
  --gold-dim: rgba(226, 181, 108, 0.14);
  --red: #d27a68;
  --red-dim: rgba(210, 122, 104, 0.16);
  --radius: 10px;
  --serif: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --sans: 'Open Sans', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--black); color: var(--white); font-family: var(--sans); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
.hidden { display: none !important; }

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-weight: 500; transition: border-color .15s, background .15s, color .15s; white-space: nowrap; }
.btn:hover { border-color: var(--gray); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-gold { background: var(--white); color: var(--black); border-color: var(--white); font-weight: 700; }
.btn-gold:hover { background: var(--gold); border-color: var(--gold); }
.btn-outline-gold { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn-outline-gold:hover { background: var(--gold-dim); }
.btn-danger { border-color: var(--red); color: var(--red); background: transparent; }
.btn-danger:hover { background: var(--red-dim); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--gray-light); }
.btn-ghost:hover { color: var(--white); border-color: var(--line); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--gray); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=url], select, textarea {
  width: 100%; padding: 10px 12px; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; color: var(--white);
}
input::placeholder, textarea::placeholder { color: #85838a; }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input[type=datetime-local] { color-scheme: dark; }
.error { color: var(--red); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at 50% 0%, #3a393b 0%, var(--black) 55%, #1f1e20 100%); }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 36px 30px 28px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.wordmark { font-family: var(--serif); font-weight: 400; letter-spacing: .28em; color: var(--gold); font-size: 22px; }
.auth-card .wordmark { font-size: 30px; text-align: center; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--gray); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 28px; }
.auth-card .btn { width: 100%; padding: 12px; }

/* ---------- Shell ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 14px 24px; background: rgba(40,39,41,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.topbar .wordmark { margin-right: 4px; }
.topbar .portal-label { color: var(--gray); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding-left: 14px; border-left: 1px solid var(--line); }
.topbar .spacer { flex: 1; }
.topbar select { width: auto; min-width: 180px; padding: 8px 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; color: var(--gray-light); font-size: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--gold); color: var(--white); display: grid; place-items: center; font-weight: 700; font-size: 12px; }

main { padding: 24px; max-width: 1400px; margin: 0 auto; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar h1 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 8px 0 0; min-width: 210px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { padding: 8px 14px; background: transparent; border: 0; cursor: pointer; color: var(--gray-light); }
.seg button.on { background: var(--white); color: var(--black); font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; transition: border-color .15s; text-align: left; }
.stat:hover, .stat.on { border-color: var(--gold); }
.stat .n { font-family: var(--serif); font-size: 28px; font-weight: 600; }
.stat .l { color: var(--gray); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; display: flex; align-items: center; gap: 6px; }

/* ---------- Status ---------- */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.pending { background: var(--gray); }
.dot.approved { background: var(--gold); }
.dot.rejected { background: var(--red); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.badge.pending { background: var(--line); color: var(--gray-light); }
.badge.approved { background: var(--gold-dim); color: var(--gold-bright); }
.badge.rejected { background: var(--red-dim); color: #eba08f; }

/* ---------- Month calendar ---------- */
.cal { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 10px 12px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gray); border-bottom: 1px solid var(--line); background: var(--ink); }
.day { min-height: 128px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 5px; position: relative; }
.day:nth-child(7n) { border-right: 0; }
.day.other { background: #2f2e30; }
.day.other .num { color: #6f6d70; }
.day .num { font-size: 13px; color: var(--gray-light); font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.day.today .num span { background: var(--gold); color: var(--black); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; font-weight: 700; }
.day .add { opacity: 0; border: 0; background: transparent; color: var(--gold); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; }
.day:hover .add { opacity: 1; }
.chip { display: flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--gray); cursor: pointer; font-size: 12px; text-align: left; width: 100%; overflow: hidden; }
.chip:hover { border-color: var(--gray); }
.chip.approved { border-left-color: var(--gold); }
.chip.rejected { border-left-color: var(--red); }
.chip .t { color: var(--gray); flex: none; font-variant-numeric: tabular-nums; }
.chip .ti { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.chip .cl { color: var(--gold); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; flex: none; }

/* ---------- List view ---------- */
.list-day { margin-bottom: 22px; }
.list-day h3 { font-family: var(--serif); font-weight: 400; font-size: 17px; margin: 0 0 10px; color: var(--gold); }
.row { display: grid; grid-template-columns: 72px 64px 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; text-align: left; width: 100%; }
.row:hover { border-color: var(--gold); }
.row .time { color: var(--gray-light); font-variant-numeric: tabular-nums; }
.row .thumb { width: 64px; height: 64px; border-radius: 8px; background: var(--ink) center/cover no-repeat; border: 1px solid var(--line); display: grid; place-items: center; color: var(--gray); font-size: 11px; }
.row .main { min-width: 0; }
.row .title { font-weight: 600; margin-bottom: 4px; }
.row .cap { color: var(--gray); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.plats { display: flex; gap: 4px; flex-wrap: wrap; }
.plat { font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 3px 6px; border-radius: 4px; background: var(--line); color: var(--gray-light); }
.empty { text-align: center; color: var(--gray); padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Drawer & modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--panel); border-left: 1px solid var(--line); z-index: 50; display: flex; flex-direction: column; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer header { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 0 0 6px; }
.drawer header .when { color: var(--gray-light); font-size: 14px; }
.drawer .body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.drawer .close { margin-left: auto; }
.media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--ink); margin-bottom: 16px; }
.media img, .media video { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #000; }
.caption { white-space: pre-wrap; line-height: 1.6; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; }
.section-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gray); margin: 18px 0 10px; }
.decide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.decide .btn { padding: 12px; }
.notes { display: flex; flex-direction: column; gap: 10px; }
.note { background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.note.mine { border-color: rgba(226,181,108,.35); }
.note .who { font-size: 12px; color: var(--gray); margin-bottom: 4px; display: flex; gap: 8px; }
.note .who b { color: var(--gold); font-weight: 600; }
.note .txt { white-space: pre-wrap; line-height: 1.5; }
.event { font-size: 12px; color: var(--gray); display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.event::before { content: ''; width: 14px; height: 1px; background: var(--line); }
.composer { padding: 14px 22px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 44px; height: 44px; }

.modal { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.modal .card { pointer-events: auto; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal h2 { font-family: var(--serif); font-weight: 400; margin: 0 0 18px; font-size: 22px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.modal .actions .left { margin-right: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 13px; text-transform: capitalize; }
.checks input { accent-color: var(--gold); }
.checks label:has(input:checked) { border-color: var(--gold); color: var(--gold-bright); background: var(--gold-dim); }
.upload { display: flex; gap: 10px; align-items: center; }
.upload .preview { width: 56px; height: 56px; border-radius: 8px; border: 1px solid var(--line); background: var(--ink) center/cover; flex: none; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 8px; }
.table td, .table th { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gray); font-weight: 500; }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--gray); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--gold); border-bottom-color: var(--gold); }
.inline-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; }
.inline-form .full { grid-column: 1 / -1; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--white); color: var(--black); padding: 10px 18px; border-radius: 999px; font-weight: 500; opacity: 0; transition: all .2s; pointer-events: none; z-index: 100; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .topbar { padding: 12px 16px; gap: 10px; }
  .topbar .portal-label, .user-chip .name { display: none; }
  main { padding: 16px; }
  .toolbar h1 { font-size: 22px; min-width: 0; flex-basis: 100%; }
  .day { min-height: 84px; padding: 4px; }
  .chip .t, .chip .cl, .chip .ti { display: none; }
  .chip { padding: 4px; justify-content: center; }
  .cal-head div { padding: 8px 4px; text-align: center; letter-spacing: .04em; }
  .row { grid-template-columns: 52px 1fr; }
  .row .thumb { display: none; }
  .row .meta { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .grid2, .inline-form { grid-template-columns: 1fr; }
}

/* ---------- Brand: Bebas headlines, logo lockup, gold bar ---------- */
.wordmark, .toolbar h1, .stat .n, .drawer header h2, .modal h2, .list-day h3 { text-transform: uppercase; letter-spacing: .04em; }
.wordmark { color: var(--white); letter-spacing: .08em; font-size: 26px; line-height: 1; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 32px; width: auto; display: block; }
.brand img.wm { height: 17px; }
.goldbar { width: 40px; height: 3px; background: var(--gold); border: 0; margin: 0; }
.toolbar h1 { font-size: 38px; line-height: 1; }
.toolbar h1::after, .modal h2::after { content: ''; display: block; width: 36px; height: 3px; background: var(--gold); margin-top: 8px; }
.stat .n { font-size: 34px; line-height: 1.1; }
.drawer header h2 { font-size: 30px; line-height: 1.05; }
.modal h2 { font-size: 30px; }
.list-day h3 { font-size: 22px; color: var(--white); }
.auth-card .logo { display: block; height: 70px; margin: 0 auto 22px; }
.auth-card .wm { display: block; height: 30px; margin: 0 auto; max-width: 100%; }
.auth-card .wordmark { font-size: 46px; letter-spacing: .1em; }
.auth-card .goldbar { margin: 10px auto 12px; }
.auth-card .sub { margin-bottom: 6px; }
.auth-card .tagline { text-align: center; color: var(--gray); font-size: 14px; font-style: italic; margin: 0 0 26px; }
@media (max-width: 860px) { .toolbar h1 { font-size: 30px; } .brand img { height: 26px; } .brand img.wm { height: 13px; } .wordmark { font-size: 22px; } }

/* ---------- Post previews (platform-style mockups) ---------- */
.modal .card.wide { max-width: 1040px; }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.ed-prev { position: sticky; top: 0; }
.pv-wrap { margin-bottom: 8px; }
.pv-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pv-tabs button { background: transparent; border: 1px solid var(--line); color: var(--gray-light); border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.pv-tabs button.on { background: var(--white); color: var(--black); border-color: var(--white); font-weight: 700; }
.pv-stage { display: flex; justify-content: center; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 12px; }
.pv-foot { color: var(--gray); font-size: 11px; margin-top: 6px; text-align: center; }
.pv { width: 100%; max-width: 360px; background: #fff; color: #0f1419; border-radius: 10px; overflow: hidden; font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.4; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.pv b { font-weight: 600; }
.pv-sp { flex: 1; }
.pv-muted { color: #8a8d91; }
.pv-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.pv-head.small { padding: 8px 10px 12px; font-size: 13px; }
.pv-av { width: 32px; height: 32px; border-radius: 50%; background: #282729; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; border: 2px solid #e2b56c; }
.pv-sub { color: #65676b; font-size: 12px; }
.pv-media { background: #efefef; position: relative; overflow: hidden; }
.pv-media img, .pv-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-media.sq { aspect-ratio: 1 / 1; }
.pv-media.sq img { object-fit: cover; }
.pv-media.wide img, .pv-media.wide video { height: auto; max-height: 420px; object-fit: contain; background: #000; }
.pv-media.round { border-radius: 14px; border: 1px solid #e6ecf0; margin-top: 10px; max-height: 300px; }
.pv-media.round img { height: auto; }
.pv-media.tall { aspect-ratio: 9 / 16; background: #111; }
.pv-media.pin { aspect-ratio: 2 / 3; border-radius: 16px; margin: 10px 10px 0; }
.pv-empty { display: grid; place-items: center; color: #9a9a9a; font-size: 13px; min-height: 180px; }
.pv-actions { display: flex; gap: 14px; padding: 10px 12px 4px; color: #262626; }
.pv-actions.small { padding: 10px 0 0; justify-content: space-between; max-width: 260px; color: #536471; }
.pv-text { padding: 4px 12px 8px; white-space: pre-wrap; word-wrap: break-word; }
.pv-date { color: #8e8e8e; font-size: 10px; letter-spacing: .03em; padding: 0 12px 12px; }
.pv-more { background: none; border: 0; padding: 0; color: #8a8d91; cursor: pointer; font: inherit; }
.pv-fb .pv-text { padding: 0 12px 10px; }
.pv-fb .pv-bar { display: flex; justify-content: space-around; border-top: 1px solid #e4e6eb; margin: 0 12px; padding: 6px 0; color: #65676b; font-size: 13px; font-weight: 600; }
.pv-fb .pv-bar span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; }
.pv-fb .pv-more { color: #65676b; font-weight: 600; }
.pv-tw { display: flex; gap: 10px; padding: 12px; }
.pv-tw .pv-body { flex: 1; min-width: 0; }
.pv-tw .pv-text { padding: 2px 0 0; }
.pv-tw .pv-line { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-vert { position: relative; max-width: 260px; background: #000; color: #fff; }
.pv-vert .pv-empty { color: #777; }
.pv-rail { position: absolute; right: 8px; bottom: 70px; display: flex; flex-direction: column; align-items: center; gap: 16px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.pv-over { position: absolute; left: 0; right: 48px; bottom: 0; padding: 40px 12px 14px; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-size: 13px; }
.pv-over .pv-text, .pv-over div { padding: 0; }
.pv-over .pv-more { color: #fff; font-weight: 600; }
.pv-note { position: absolute; top: 8px; left: 8px; right: 8px; text-align: center; font-size: 10px; background: rgba(0,0,0,.55); border-radius: 6px; padding: 4px; color: #ddd; }
.pv-pin .pv-text { padding: 8px 12px 0; font-weight: 600; }
@media (max-width: 900px) { .ed-grid { grid-template-columns: 1fr; } .ed-prev { position: static; } }
