/* Live Nation look: black canvas, Noto Sans, signature red #E21836 */
:root {
  color-scheme: dark;
  --red: #e21836;
  --red-hover: #c3112b;
  --bg: #000;
  --surface: #141414;
  --surface-2: #202020;
  --surface-3: #2a2a2a;
  --line: #333;
  --text: #f9f9f9;
  --muted: #aaa;
  --faint: #777;
  --ok: #3ecf7a;
  --warn: #f5b83d;
  --info: #6aa8ff;
  --radius: 6px;
  --font: 'Noto Sans', Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: var(--text); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 30px; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 13px; }
.hidden { display: none !important; }

/* Header */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--surface-3); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 18px; }
.topbar img { height: 22px; display: block; }
.topbar .product { font-weight: 700; font-size: 15px; padding-left: 18px; border-left: 1px solid var(--line); white-space: nowrap; }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 13px; }

main { max-width: 1240px; margin: 0 auto; padding: 28px 20px 80px; }

/* Buttons and inputs */
button, .btn {
  font: inherit; font-weight: 600; font-size: 14px; border: 0; border-radius: var(--radius); cursor: pointer;
  padding: 9px 16px; background: var(--surface-3); color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
button:hover, .btn:hover { background: #383838; }
button.primary, .btn.primary { background: var(--red); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--red-hover); }
button.ghost { background: transparent; border: 1px solid var(--line); }
button.ghost:hover { border-color: #666; background: transparent; }
button.small { padding: 6px 11px; font-size: 13px; }
button.link { background: none; padding: 0; color: var(--muted); text-decoration: underline; font-weight: 400; }
button:disabled { opacity: .45; cursor: not-allowed; }
button .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
input, textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; min-height: 120px; }
.field { margin-bottom: 16px; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--text); font-size: 14px; }
.check input { width: auto; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--surface-3); border-radius: 10px; padding: 22px; }
.card + .card { margin-top: 16px; }
.grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.event-card { cursor: pointer; transition: border-color .15s; }
.event-card:hover { border-color: var(--red); }
.event-card .dates { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

/* Progress bar */
.progress { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-3); margin: 12px 0 10px; }
.progress span { display: block; height: 100%; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-not_requested { color: #8a8a8a; }
.s-requested { color: var(--info); }
.s-in_progress { color: var(--warn); }
.s-ready { color: #e07cff; }
.s-approved { color: var(--ok); }
.s-live { color: #fff; background: var(--red); }
.s-live::before { background: #fff; }
.pill.overdue { color: #fff; background: #7a1020; }
.bar-not_requested { background: #555; }
.bar-requested { background: var(--info); }
.bar-in_progress { background: var(--warn); }
.bar-ready { background: #e07cff; }
.bar-approved { background: var(--ok); }
.bar-live { background: var(--red); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

/* Event page */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.page-head .grow { flex: 1; min-width: 240px; }
.crumb { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.crumb a { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--surface-3); border-radius: 8px; padding: 14px 16px; cursor: pointer; }
.stat.active { border-color: var(--red); }
.stat b { display: block; font-size: 26px; }
.stat span { font-size: 12px; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input { max-width: 280px; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 12px; border-bottom: 1px solid var(--surface-3); vertical-align: middle; }
table.list tr.clickable { cursor: pointer; }
table.list tr.clickable:hover td { background: var(--surface); }
.thumb { width: 64px; height: 40px; border-radius: 4px; object-fit: cover; background: var(--surface-3); display: block; }
.thumb.empty { display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 11px; }
.ticks { display: flex; gap: 5px; }
.tick { font-size: 11px; padding: 2px 7px; border-radius: 4px; background: var(--surface-3); color: var(--faint); }
.tick.done { background: rgba(62, 207, 122, .14); color: var(--ok); }
.artist-name { font-weight: 700; }
.table-wrap { overflow-x: auto; }

/* Drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100%); background: var(--surface); z-index: 41; overflow-y: auto; border-left: 1px solid var(--surface-3); }
.drawer-head { position: sticky; top: 0; background: var(--surface); padding: 18px 24px; border-bottom: 1px solid var(--surface-3); display: flex; gap: 12px; align-items: center; z-index: 2; }
.drawer-head h2 { margin: 0; flex: 1; }
.drawer-body { padding: 22px 24px 60px; }
.section { margin-bottom: 28px; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-title h3 { margin: 0; flex: 1; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notice { background: var(--surface-2); border-left: 3px solid var(--info); padding: 12px 14px; border-radius: 4px; font-size: 14px; margin-bottom: 14px; }
.notice.warn { border-color: var(--warn); }
.notice.ok { border-color: var(--ok); }
.notice.error { border-color: var(--red); }
.linkbox { display: flex; gap: 8px; }
.linkbox input { font-size: 13px; color: var(--muted); }
.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 14px; }
.social-grid .field { margin: 0; }
.activity { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.activity li { padding: 8px 0; border-bottom: 1px solid var(--surface-3); display: flex; gap: 12px; }
.activity time { color: var(--faint); white-space: nowrap; min-width: 112px; }
.counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: 4px; }
.counter.bad { color: var(--warn); }
.ai-tag { font-size: 11px; font-weight: 600; color: #e07cff; border: 1px solid #6b3a7a; padding: 1px 6px; border-radius: 4px; }

/* Image drop zone */
.dropzone { border: 2px dashed var(--line); border-radius: 10px; padding: 28px; text-align: center; cursor: pointer; color: var(--muted); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--red); background: rgba(226, 24, 54, .06); }
.dropzone strong { color: var(--text); }
.image-preview { position: relative; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.image-preview img { width: 100%; display: block; max-height: 420px; object-fit: contain; background: #0b0b0b; }
.image-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); padding: 10px 2px 0; }
.image-meta b { color: var(--text); font-weight: 600; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; }
.modal { background: var(--surface); border: 1px solid var(--surface-3); border-radius: 10px; width: min(620px, 100%); padding: 24px; }
.modal h2 { margin-bottom: 18px; }
.modal .actions { justify-content: flex-end; margin-top: 8px; }

/* Toast */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #fff; color: #000; padding: 10px 16px; border-radius: 6px; font-size: 14px; font-weight: 600; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); max-width: 90vw; }
.toast.error { background: var(--red); color: #fff; }

/* Sign-in and artist portal */
.narrow { max-width: 720px; margin: 0 auto; }
.signin { max-width: 400px; margin: 10vh auto 0; }
.hero { padding: 36px 0 26px; border-bottom: 1px solid var(--surface-3); margin-bottom: 26px; }
.hero .eyebrow { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin-bottom: 8px; }
.steps { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.steps li::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.done { color: var(--muted); }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.step-num.done { background: var(--ok); }
.submit-bar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--surface-3); padding: 14px 0 18px; margin-top: 24px; }
.submit-bar .inner { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

@media (max-width: 700px) {
  h1 { font-size: 24px; }
  .topbar .product { display: none; }
  main { padding: 20px 16px 80px; }
  .hide-mobile { display: none; }
  .card { padding: 18px; }
  .drawer-body, .drawer-head { padding-left: 16px; padding-right: 16px; }
}

/* Settings page */
.settings-grid { display: grid; gap: 16px; }
.settings-grid .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; flex: 1; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: none; border-radius: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 14px; }
.tabs button:hover { background: none; color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--red); }
.tabs .badge { font-size: 11px; font-weight: 600; color: var(--warn); }
.save-bar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--surface-3); padding: 14px 0; margin-top: 20px; display: flex; gap: 12px; align-items: center; z-index: 5; }
.email-split { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.email-preview { border: 1px solid var(--line); border-radius: var(--radius); background: #f4f4f4; width: 100%; height: 640px; }
.preview-subject { font-size: 13px; color: var(--muted); margin-bottom: 8px; word-break: break-word; }
@media (max-width: 960px) { .email-split { grid-template-columns: 1fr; } .email-preview { height: 520px; } }

/* Rich text editor (email bodies are shown on white, as recipients will see them) */
.editor { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.editor-toolbar button { padding: 5px 9px; font-size: 13px; background: transparent; min-width: 30px; justify-content: center; }
.editor-toolbar button:hover { background: var(--surface-3); }
.editor-toolbar button.on { background: var(--surface-3); color: #fff; box-shadow: inset 0 -2px 0 var(--red); }
.editor-toolbar select { width: auto; padding: 5px 8px; font-size: 13px; margin-left: auto; }
.editor-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.editor-body { background: #fff; color: #202020; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.55; padding: 18px 20px; min-height: 360px; max-height: 640px; overflow-y: auto; outline: none; }
.editor-body p { margin: 0 0 1em; }
.editor-body h3 { font-size: 18px; margin: 0 0 .6em; }
.editor-body a { color: var(--red); }
.editor-body img { max-width: 100%; height: auto; }
.date-hint { margin-top: 5px; min-height: 0; }
.date-hint:empty { display: none; }
