/* Palette adapted from dollsinarow.art — minimalist editorial gallery look:
   white ground, black ink, deep-teal signature accent, dusty-lilac soft accent,
   champagne/gold for warm highlights, hairline grey borders. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Urbanist:wght@400;500;600;700&family=Cormorant+Garamond:wght@400;500;600&display=swap');

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f4f7;   /* faint lilac-grey */
  --line: #e6e6e6;        /* hairline */
  --line-strong: #d9d4dd;
  --ink: #0a0a0b;         /* near-black text */
  --muted: #6b6b6b;       /* darkAccent grey */
  --teal: #042524;        /* lightAccent — signature deep teal */
  --teal-2: #0c3a37;
  --header: #073029;      /* deep forest teal header bar (from the site) */
  --cream: #f3ede2;       /* warm off-white nav text */
  --lilac: #bdb2c3;       /* safeLightAccent — dusty lilac */
  --lilac-soft: #efeaf2;
  --gold: #9c7c3c;        /* champagne, text-safe */
  --ok: #1f6f5c;
  --warn: #9c7c3c;
  --err: #9e3b3b;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.6 "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-family: "Poppins", sans-serif; font-weight: 600; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.tag { margin: 4px 0 0; color: rgba(243,237,226,0.7); font-size: 13px; letter-spacing: 0.02em; }

/* Deep forest-teal header bar with cream editorial type, echoing the site. */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 36px; border-bottom: 1px solid rgba(255,255,255,0.08);
  background: var(--header); color: var(--cream);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 15px; }
.logo {
  font-size: 20px; color: var(--cream); background: transparent;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid rgba(243,237,226,0.5);
}
.topbar h1 {
  font-family: "Cormorant Garamond", serif; font-size: 26px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--cream);
}
.user-box { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(243,237,226,0.4); }
.user-avatar-fallback { display: grid; place-items: center; background: var(--lilac); color: var(--teal); font-family: "Poppins", sans-serif; font-size: 13px; font-weight: 600; }
.user-email { color: rgba(243,237,226,0.85); font-size: 12.5px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.ghost { color: rgba(243,237,226,0.85); border-color: rgba(243,237,226,0.4); }
.btn.ghost:hover { color: var(--cream); border-color: var(--cream); background: transparent; }
.tabs { display: flex; gap: 6px; }
.tab {
  background: transparent; border: none; color: rgba(243,237,226,0.65);
  padding: 8px 16px; cursor: pointer; position: relative;
  font-family: "Cormorant Garamond", serif; font-size: 17px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; transition: 0.15s;
}
.tab:hover { color: var(--cream); }
.tab.active { color: var(--cream); }
.tab.active::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 1px; background: var(--cream);
}

.scrape-panel {
  margin: 24px 32px; padding: 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.scrape-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.scrape-head h2 { font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; }
.collapse-btn { background: none; border: none; padding: 0; cursor: pointer; color: var(--ink);
  font: inherit; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500;
  font-family: "Poppins", sans-serif; display: inline-flex; align-items: center; gap: 8px; }
.collapse-btn .chevron { transition: transform 0.2s; color: var(--muted); font-size: 12px; }
/* Collapsed: hide the sub-text, steps, and log; keep the header + run controls. */
.scrape-panel.collapsed { padding-bottom: 20px; }
.scrape-panel.collapsed .scrape-sub,
.scrape-panel.collapsed .steps,
.scrape-panel.collapsed .log { display: none; }
.scrape-panel.collapsed .collapse-btn .chevron { transform: rotate(-90deg); }
.scrape-run { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
/* Styled native select — kill the default chrome, add our own caret. */
select.scrape-input {
  width: 270px; max-width: 46vw; padding: 9px 34px 9px 12px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 8px;
  font: inherit; font-family: "Poppins", sans-serif; font-size: 13px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236b6b6b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
select.scrape-input:hover { border-color: var(--teal); }
select.scrape-input:focus { outline: none; border-color: var(--teal); }
select.scrape-input option { color: var(--ink); background: var(--surface); }
.steps { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 14px; }
.step {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-family: "Poppins", sans-serif; letter-spacing: 0.01em; transition: 0.2s;
}
.step .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: 0.2s; }
.step.running .dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(156,124,60,0.15); animation: pulse 1s infinite; }
.step.done .dot { background: var(--teal); }
.step.running { color: var(--ink); border-color: var(--gold); }
.step.done { color: var(--ink); border-color: var(--teal); }
@keyframes pulse { 50% { opacity: 0.4; } }

/* One deliberate dark panel — the live log echoes the site's deep-teal accent. */
.log {
  margin: 0; max-height: 210px; overflow: auto; font-size: 12.5px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--teal); border-radius: var(--radius); padding: 14px 16px;
  color: #d7e0df; white-space: pre-wrap; line-height: 1.7;
}
.log .l-info { color: var(--lilac); }
.log .l-done { color: #7fd8b4; }
.log .l-running { color: #e6c98a; }
.log .l-error { color: #e79a9a; }

.btn {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  padding: 9px 18px; border-radius: 8px; cursor: pointer;
  font-family: "Poppins", sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.01em; transition: 0.15s;
}
.btn:hover { border-color: var(--teal); color: var(--teal); }
.btn.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn.primary:hover { background: var(--teal-2); color: #fff; }
.btn.primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost { background: transparent; }
.btn.ok { border-color: var(--ok); color: var(--ok); }
.btn.ok:hover { background: var(--ok); color: #fff; }
.btn.small { padding: 6px 13px; font-size: 12.5px; }
.btn.danger { color: var(--err); border-color: #e3c9c9; }
.btn.danger:hover { background: var(--err); color: #fff; border-color: var(--err); }

.view { padding: 0 32px 60px; }
.view-header { margin: 10px 0 24px; }
.view-header h2 { font-family: "Cormorant Garamond", serif; font-size: 32px; font-weight: 500; letter-spacing: 0.01em; }
.view-header p { margin: 6px 0 0; font-size: 14px; color: var(--muted); max-width: 720px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: 0.15s;
}
.card:hover { border-color: var(--lilac); box-shadow: 0 6px 22px rgba(4,37,36,0.06); transform: translateY(-2px); }
.card h3 { font-size: 16px; font-weight: 600; }
.card .sub { color: var(--muted); font-size: 13px; margin-top: 5px; }
.card .meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }

.chip {
  font-size: 11px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  font-family: "Poppins", sans-serif; letter-spacing: 0.02em;
}
.chip.ok { color: var(--ok); border-color: rgba(31,111,92,0.35); background: rgba(31,111,92,0.06); }
.chip.warn { color: var(--warn); border-color: rgba(156,124,60,0.35); background: rgba(156,124,60,0.07); }
.chip.accent { color: var(--teal); border-color: var(--lilac); background: var(--lilac-soft); }
.chip-link { cursor: pointer; text-decoration: none; color: var(--teal); border-color: var(--lilac); background: var(--surface); transition: 0.15s; }
.chip-link:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.chip-contact { cursor: pointer; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--ok); border-color: rgba(31,111,92,0.35); background: rgba(31,111,92,0.06); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-contact:hover { background: var(--ok); color: #fff; border-color: var(--ok); }
.toolbar { display: flex; align-items: center; gap: 12px; margin: -6px 0 20px; flex-wrap: wrap; }
.shows-search {
  width: 240px; max-width: 60vw; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 13px;
}
.shows-search:focus { outline: none; border-color: var(--teal); }
.shows-search::placeholder { color: var(--muted); }
.dropdown { position: relative; }
.filter-select { display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 8px 12px; font-family: "Poppins", sans-serif; font-size: 13px; color: var(--ink); transition: 0.15s; }
.filter-select:hover { border-color: var(--teal); }
.filter-select.active { border-color: var(--teal); background: var(--lilac-soft); color: var(--teal); }
.filter-caret { color: var(--muted); font-size: 10px; }
.filter-select.active .filter-caret { color: var(--teal); }
.dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 10; min-width: 210px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 6px;
  box-shadow: 0 12px 30px rgba(4,37,36,0.16); }
.dropdown-menu.hidden { display: none; }
.dropdown-empty { padding: 10px 12px; color: var(--muted); font-size: 13px; }
.dropdown-item { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 11px; border-radius: 7px;
  cursor: pointer; color: var(--ink); font-family: "Poppins", sans-serif; font-size: 13px; }
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item input { width: auto; margin: 0; accent-color: var(--teal); cursor: pointer; }
.card-muted { opacity: 0.62; }
.card-muted:hover { opacity: 1; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-head h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.event-tag {
  color: var(--teal); border-color: var(--teal); background: transparent; font-weight: 500;
  flex-shrink: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip.status-draft { color: var(--muted); }
.chip.status-approved { color: var(--teal); border-color: var(--lilac); background: var(--lilac-soft); }
.chip.status-sent { color: var(--ok); border-color: rgba(31,111,92,0.35); background: rgba(31,111,92,0.06); }

.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty h3 { font-weight: 600; }

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer.hidden { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(10,10,11,0.35); }
.drawer-panel {
  position: absolute; right: 0; top: 0; height: 100%; width: min(720px, 96vw);
  background: var(--bg); border-left: 1px solid var(--line); padding: 28px;
  overflow: auto; box-shadow: -24px 0 60px rgba(4,37,36,0.12);
}
.drawer-panel h2 { font-family: "Cormorant Garamond", serif; font-size: 30px; font-weight: 500; }
.img-strip { display: flex; gap: 8px; overflow-x: auto; margin: 14px 0 4px; padding-bottom: 4px; }
.brand-thumb { height: 130px; width: auto; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; display: block; }
.brand-thumb:hover { border-color: var(--teal); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.row .k { color: var(--muted); font-size: 13px; }
.row .v { text-align: right; }
.row a { color: var(--teal); text-decoration: none; border-bottom: 1px solid var(--lilac); }
.row a:hover { border-bottom-color: var(--teal); }
.section-title { margin: 26px 0 12px; font-family: "Poppins", sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 5px; font-family: "Poppins", sans-serif; letter-spacing: 0.01em; }
input, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px;
}
input:focus, textarea:focus { outline: none; border-color: var(--teal); }
textarea { min-height: 220px; resize: vertical; line-height: 1.7; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.notice { background: var(--lilac-soft); border: 1px solid var(--lilac); color: var(--teal);
  padding: 11px 14px; border-radius: 8px; font-size: 13px; margin: 16px 0; }
.close-x { position: absolute; top: 20px; right: 20px; background: none; border: none; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; }
.close-x:hover { color: var(--ink); }
.list-mini { display: flex; flex-direction: column; gap: 8px; }
.mini { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.mini .name { font-weight: 600; font-family: "Poppins", sans-serif; font-size: 14px; }
