/* ============================================================
   MF MEDIA · SHOOT PLANNER — DESIGN SYSTEM
   Brand navy #2B4060 · Sora display · Inter body
   ============================================================ */

:root {
  --ink-950: #0A0F18;      /* app background */
  --ink-900: #0E1522;
  --ink-800: #121B2B;      /* card surface */
  --ink-700: #182335;      /* raised surface / inputs */
  --ink-600: #223049;      /* borders strong */
  --line:    #1E2A3F;      /* borders */
  --brand:   #2B4060;      /* logo navy */
  --accent:  #5E8FCB;      /* interactive blue */
  --accent-strong: #83ACDF;
  --brass:   #C8A96A;      /* must-have + premium accents, used sparingly */
  --text:    #EDF1F7;
  --muted:   #97A4B8;
  --faint:   #6B7A92;

  --ok:      #4CAF82;
  --warn:    #D9A441;
  --danger:  #D9705C;

  --st-draft:   #7C8BA1;
  --st-review:  #D9A441;
  --st-changes: #D9705C;
  --st-approved:#4CAF82;
  --st-ready:   #5E8FCB;
  --st-wrapped: #6B7A92;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --shadow: 0 10px 30px rgba(4, 8, 15, .45);
  --shadow-lg: 0 24px 60px rgba(3, 6, 12, .6);
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--ink-950);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100dvh;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; }
.hidden { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

::selection { background: rgba(94,143,203,.35); }

/* ---------- Fullscreen screens ---------- */
.fullscreen {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative; overflow: hidden;
}

/* Signature: the shutter ring, oversized and quiet */
.aperture-backdrop {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(43,64,96,.55), transparent 60%),
    var(--ink-950);
}
.aperture-backdrop::after {
  content: ''; position: absolute;
  width: 130vmax; height: 130vmax;
  left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  background: url('../assets/logo-white.png') center / contain no-repeat;
  opacity: .028;
}

.auth-card {
  position: relative; width: 100%; max-width: 400px;
  background: linear-gradient(180deg, rgba(24,35,53,.92), rgba(14,21,34,.92));
  border: 1px solid var(--ink-600);
  border-radius: var(--r-lg);
  padding: 40px 36px 28px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}
.auth-logo { width: 84px; margin: 0 auto 14px; }
.auth-title { text-align: center; font-size: 24px; letter-spacing: .01em; }
.auth-sub {
  text-align: center; color: var(--muted); font-size: 13px;
  margin: 6px 0 26px; letter-spacing: .04em;
}
.auth-foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 18px; }

.setup-card {
  max-width: 460px; text-align: center;
  background: var(--ink-800); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 44px 36px; box-shadow: var(--shadow-lg);
}
.setup-logo { width: 76px; margin: 0 auto 16px; }
.setup-card h1 { font-size: 22px; margin-bottom: 10px; }
.setup-card p { color: var(--muted); font-size: 14px; }
.setup-card code {
  background: var(--ink-700); padding: 1px 6px; border-radius: 5px;
  font-size: 13px; color: var(--accent-strong);
}

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field-label {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted); margin-bottom: 7px;
}
.field-label .opt { color: var(--faint); font-weight: 500; text-transform: none; letter-spacing: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="date"], .field input[type="search"], .field input[type="url"],
.field select, .field textarea {
  width: 100%; background: var(--ink-700);
  border: 1px solid var(--ink-600); border-radius: var(--r-sm);
  padding: 10px 12px; color: var(--text); transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 44px; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field-help { display: block; font-size: 12px; color: var(--faint); margin-top: 6px; }
.field-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error {
  color: var(--danger); font-size: 13px; margin: -6px 0 12px;
}

/* Segmented control */
.seg {
  display: flex; background: var(--ink-700);
  border: 1px solid var(--ink-600); border-radius: var(--r-sm); padding: 3px; gap: 3px;
}
.seg-btn {
  flex: 1; padding: 7px 8px; border-radius: 6px; font-size: 13px;
  color: var(--muted); white-space: nowrap; transition: background .15s, color .15s;
}
.seg-btn.active { background: var(--brand); color: var(--text); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  border-radius: var(--r-sm); padding: 10px 18px;
  transition: background .15s, transform .1s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #0B1322; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost {
  background: transparent; border: 1px solid var(--ink-600); color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #1A0E0B; }
.btn-danger-ghost { background: transparent; border: 1px solid transparent; color: var(--danger); }
.btn-danger-ghost:hover { border-color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn {
  color: var(--accent); font-size: 13px; font-weight: 600;
}
.linkbtn:hover { color: var(--accent-strong); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 60px;
  background: rgba(10,15,24,.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 34px; height: 34px; }
.brand-text {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .02em;
}
.brand-text em {
  font-style: normal; font-weight: 500; color: var(--muted);
  display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .18em;
}
.topbar-right { display: flex; align-items: center; gap: 10px; position: relative; }
.iconbtn {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted);
  border: 1px solid transparent;
}
.iconbtn:hover { color: var(--text); border-color: var(--ink-600); }
.bell-badge {
  position: absolute; top: 2px; right: 0;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 3px 5px; border-radius: 9px; min-width: 16px; text-align: center;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); border: 1px solid var(--ink-600);
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  display: grid; place-items: center; letter-spacing: .03em;
}

.notif-panel, .user-panel {
  position: absolute; top: 48px; right: 0; z-index: 60;
  background: var(--ink-800); border: 1px solid var(--ink-600);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  width: 340px; max-width: calc(100vw - 32px); overflow: hidden;
}
.user-panel { width: 230px; }
.notif-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
}
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item {
  width: 100%; text-align: left; display: block;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--muted); line-height: 1.45;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--ink-700); }
.notif-item.unread { color: var(--text); }
.notif-item.unread::before {
  content: ''; display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent); margin-right: 8px;
}
.notif-time { display: block; font-size: 11px; color: var(--faint); margin-top: 3px; }
.notif-nothing { padding: 26px 14px; text-align: center; color: var(--faint); font-size: 13px; }

.user-meta { padding: 14px; border-bottom: 1px solid var(--line); }
.user-meta strong { display: block; font-size: 14px; }
.role-tag {
  display: inline-block; margin-top: 5px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
  border: 1px solid var(--ink-600); padding: 2px 8px; border-radius: 20px;
}
.menu-item {
  display: block; width: 100%; text-align: left;
  padding: 11px 14px; font-size: 14px;
}
.menu-item:hover { background: var(--ink-700); }

/* ---------- Views ---------- */
.view { max-width: 1120px; margin: 0 auto; padding: 28px 20px 110px; }

/* ---------- Dashboard ---------- */
.dash-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.dash-title { font-size: 28px; }
.dash-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.dash-tools {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  font-size: 13px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--ink-600); padding: 7px 13px; border-radius: 20px;
  transition: color .15s, border-color .15s, background .15s;
}
.filter-chip:hover { color: var(--text); }
.filter-chip.active { background: var(--brand); border-color: var(--brand); color: var(--text); }
.search-input {
  background: var(--ink-700); border: 1px solid var(--ink-600);
  border-radius: 20px; padding: 8px 16px; color: var(--text); width: 220px;
}
.search-input:focus { outline: none; border-color: var(--accent); }

.event-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.event-card {
  text-align: left; background: var(--ink-800);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s, transform .12s;
}
.event-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.event-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.event-couple { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.event-type {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); margin-top: 3px;
}
.event-card-meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.event-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto;
}
.event-planner { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); }
.mini-avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--brand);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 10px; font-weight: 700; color: var(--text);
}
.event-updated { font-size: 11.5px; color: var(--faint); }

/* Status pills */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  padding: 4px 11px; border-radius: 20px; white-space: nowrap;
  border: 1px solid; background: transparent;
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-draft            { color: var(--st-draft);    border-color: rgba(124,139,161,.4); }
.st-in_review        { color: var(--st-review);   border-color: rgba(217,164,65,.45); }
.st-changes_requested{ color: var(--st-changes);  border-color: rgba(217,112,92,.45); }
.st-approved         { color: var(--st-approved); border-color: rgba(76,175,130,.45); }
.st-shoot_ready      { color: var(--st-ready);    border-color: rgba(94,143,203,.5); }
.st-wrapped          { color: var(--st-wrapped);  border-color: rgba(107,122,146,.4); }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 70px 20px; }
.empty-ring {
  width: 92px; height: 92px; margin: 0 auto 20px;
  background: url('../assets/logo-white.png') center / contain no-repeat;
  opacity: .1;
}
.empty h2 { font-size: 19px; margin-bottom: 8px; }
.empty p { color: var(--muted); font-size: 14px; max-width: 380px; margin: 0 auto 20px; }

/* ---------- Workspace ---------- */
.ws-head { margin-bottom: 18px; }
.backlink { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 14px; display: inline-block; }
.backlink:hover { color: var(--text); }
.ws-title-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap;
}
.ws-title-block h1 { font-size: 26px; }
.ws-meta { color: var(--muted); font-size: 13.5px; margin-top: 5px; }
.ws-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ws-statusline {
  display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap;
}
.ws-reviewnote {
  font-size: 13px; color: var(--st-changes);
  background: rgba(217,112,92,.08); border: 1px solid rgba(217,112,92,.3);
  padding: 5px 12px; border-radius: var(--r-sm);
}

/* Day tabs */
.day-tabs-wrap {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.day-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab {
  font-family: var(--font-display); font-size: 13.5px; font-weight: 600;
  color: var(--muted); padding: 11px 16px; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.day-tab:hover { color: var(--text); }
.day-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.day-tab .day-shots-n { color: var(--faint); font-weight: 500; margin-left: 6px; font-size: 12px; }
.day-add {
  font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; padding: 8px 4px;
}
.day-add:hover { color: var(--accent-strong); }

.day-meta {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px; margin-bottom: 18px; min-height: 20px;
}
.day-meta .linkbtn { font-size: 12.5px; }
.day-meta-item { display: inline-flex; gap: 6px; align-items: center; }
.day-meta-item strong { color: var(--text); font-weight: 600; }

/* ---------- Shot cards ---------- */
.shot-list { display: flex; flex-direction: column; gap: 14px; }
.shot-card {
  background: var(--ink-800); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px;
  display: grid; grid-template-columns: 46px 1fr; gap: 16px;
  transition: border-color .15s;
}
.shot-card:hover { border-color: var(--ink-600); }

/* Shot number in an aperture ring — order is real information */
.shot-num {
  width: 46px; height: 46px; position: relative;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  color: var(--accent-strong);
}
.shot-num::before {
  content: ''; position: absolute; inset: 0;
  background: url('../assets/logo-white.png') center / 132% no-repeat;
  opacity: .22;
}
.shot-card.priority-must .shot-num { color: var(--brass); }
.shot-body { min-width: 0; }
.shot-toprow { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.shot-desc { font-size: 15px; line-height: 1.5; }
.shot-controls { display: flex; gap: 4px; flex-shrink: 0; }
.shot-ctrl {
  width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center;
  color: var(--faint); font-size: 15px;
}
.shot-ctrl:hover { color: var(--text); background: var(--ink-700); }

.shot-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.chip {
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--ink-700); border: 1px solid var(--ink-600);
  padding: 4px 10px; border-radius: 6px; white-space: nowrap;
}
.chip-cap { color: var(--accent-strong); border-color: rgba(94,143,203,.35); background: rgba(94,143,203,.08); }
.chip-must { color: var(--brass); border-color: rgba(200,169,106,.4); background: rgba(200,169,106,.07); }
.chip-look { color: var(--text); }

.shot-settings {
  margin-top: 11px; font-size: 13px; color: var(--muted);
  display: flex; gap: 8px; align-items: baseline;
}
.shot-settings::before {
  content: 'CAM'; font-family: var(--font-display); font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; color: var(--accent); flex-shrink: 0;
  border: 1px solid rgba(94,143,203,.4); padding: 2px 6px; border-radius: 4px;
  position: relative; top: -1px;
}
.shot-extra { margin-top: 8px; font-size: 12.5px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.shot-extra strong { color: var(--muted); font-weight: 600; }

.shot-refs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.shot-ref-thumb {
  width: 112px; height: 112px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--ink-600); padding: 0; background: var(--ink-700);
}
.shot-ref-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shot-ref-link {
  width: 112px; height: 112px; border-radius: 8px;
  border: 1px dashed var(--ink-600); display: grid; place-items: center;
  color: var(--accent); font-size: 11px; font-weight: 700; text-decoration: none;
  text-align: center; line-height: 1.3; padding: 6px;
}
.shot-ref-link:hover { border-color: var(--accent); }

/* FAB */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 30;
  background: var(--accent); color: #0B1322;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  padding: 14px 22px; border-radius: 30px; box-shadow: var(--shadow-lg);
}
.fab:hover { background: var(--accent-strong); }

/* ---------- Look picker ---------- */
.look-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.look-card {
  text-align: left; border: 1px solid var(--ink-600); border-radius: var(--r-sm);
  padding: 11px 13px; background: var(--ink-700);
  transition: border-color .15s, background .15s;
}
.look-card:hover { border-color: var(--accent); }
.look-card.on {
  border-color: var(--accent); background: rgba(94,143,203,.12);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.look-name { font-weight: 600; font-size: 13.5px; display: block; }
.look-desc { display: block; font-size: 11.5px; color: var(--faint); margin-top: 3px; line-height: 1.4; }
.look-card.on .look-desc { color: var(--muted); }

/* ---------- References in editor ---------- */
.ref-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.ref-tile { position: relative; width: 128px; }
.ref-tile img {
  width: 128px; height: 128px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--ink-600); cursor: zoom-in;
}
.ref-tile-link {
  width: 128px; height: 128px; border-radius: 8px;
  border: 1px dashed var(--ink-600); display: grid; place-items: center;
  color: var(--accent); font-size: 11px; font-weight: 700; text-align: center;
  padding: 8px; text-decoration: none; line-height: 1.35; word-break: break-word;
}
.ref-x {
  position: absolute; top: -7px; right: -7px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink-950); border: 1px solid var(--ink-600);
  color: var(--muted); font-size: 12px; line-height: 1;
}
.ref-x:hover { color: var(--danger); border-color: var(--danger); }
.ref-uploading {
  width: 128px; height: 128px; border-radius: 8px; border: 1px dashed var(--accent);
  display: grid; place-items: center; color: var(--accent); font-size: 11px; font-weight: 600;
}
.ref-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ref-upload { cursor: pointer; }
.ref-link-row { display: flex; gap: 8px; flex: 1; min-width: 240px; }
.ref-link-row input {
  flex: 1; background: var(--ink-700); border: 1px solid var(--ink-600);
  border-radius: var(--r-sm); padding: 8px 12px; color: var(--text); font-size: 13px;
}
.ref-link-row input:focus { outline: none; border-color: var(--accent); }

/* ---------- Modals ---------- */
.modal-veil {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(5,8,14,.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow-y: auto;
}
.modal {
  background: var(--ink-800); border: 1px solid var(--ink-600);
  border-radius: var(--r-lg); width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg); margin: auto;
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }
.modal-lg { max-width: 640px; }
.modal-sm { max-width: 380px; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px 0;
}
.modal-head h2 { font-size: 18px; }
.modal-x {
  width: 32px; height: 32px; border-radius: 8px; font-size: 20px;
  color: var(--muted); display: grid; place-items: center;
}
.modal-x:hover { color: var(--text); background: var(--ink-700); }
.modal-body { padding: 18px 22px 6px; }
.modal-lede { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 22px 20px;
}
.modal-foot-split { justify-content: space-between; }
.modal-foot-split > div { display: flex; gap: 10px; }

/* ---------- Drawer ---------- */
.drawer-veil {
  position: fixed; inset: 0; z-index: 80; background: rgba(5,8,14,.6);
  display: flex; justify-content: flex-end;
}
.drawer {
  width: 380px; max-width: 92vw; height: 100%;
  background: var(--ink-800); border-left: 1px solid var(--ink-600);
  display: flex; flex-direction: column;
  animation: slidein .2s ease-out;
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 17px; }
.drawer-body { overflow-y: auto; padding: 8px 0; flex: 1; }
.act-item { padding: 11px 20px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.act-item strong { color: var(--text); font-weight: 600; }
.act-time { display: block; font-size: 11px; color: var(--faint); margin-top: 3px; }

/* ---------- Team ---------- */
.team-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.team-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink-700); border: 1px solid var(--ink-600);
  border-radius: var(--r-sm); padding: 10px 14px;
}
.team-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-name { font-weight: 600; font-size: 14px; }
.team-email { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.team-row select {
  background: var(--ink-800); border: 1px solid var(--ink-600);
  border-radius: 7px; padding: 6px 10px; color: var(--text); font-size: 13px;
}

/* ---------- Glossary tooltip ---------- */
.term {
  color: var(--accent); font-size: 11px; font-weight: 700;
  width: 17px; height: 17px; border-radius: 50%;
  border: 1px solid rgba(94,143,203,.5);
  display: inline-grid; place-items: center; line-height: 1;
  vertical-align: middle; cursor: help;
}
.term:hover { background: rgba(94,143,203,.15); }
.term-pop {
  position: fixed; z-index: 120; max-width: 280px;
  background: var(--ink-700); border: 1px solid var(--accent);
  border-radius: var(--r-sm); padding: 11px 13px;
  font-size: 12.5px; line-height: 1.5; color: var(--text);
  box-shadow: var(--shadow-lg);
}
.term-pop strong {
  display: block; font-family: var(--font-display); font-size: 11px;
  text-transform: uppercase; letter-spacing: .1em; color: var(--accent);
  margin-bottom: 5px;
}

/* ---------------- AI ---------------- */
.ai-box {
  display: flex; gap: 8px; margin-bottom: 18px; padding: 9px;
  background: linear-gradient(120deg, rgba(94,143,203,.10), rgba(43,64,96,.16));
  border: 1px solid rgba(94,143,203,.35); border-radius: var(--r-sm);
}
.ai-box input {
  flex: 1; min-width: 0; background: var(--ink-700);
  border: 1px solid var(--ink-600); border-radius: 7px;
  padding: 8px 12px; color: var(--text); font-size: 13.5px;
}
.ai-box input:focus { outline: none; border-color: var(--accent); }
.btn-ai {
  background: transparent; border: 1px solid var(--accent); color: var(--accent-strong);
}
.btn-ai:hover { background: rgba(94,143,203,.12); }
.ai-result {
  white-space: pre-wrap; font-size: 13.5px; line-height: 1.65; color: var(--text);
}
.ai-loading {
  color: var(--muted); text-align: center; padding: 34px 0;
  animation: aiblink 1.2s ease-in-out infinite alternate;
}
@keyframes aiblink { from { opacity: .45; } to { opacity: 1; } }
@media (max-width: 640px) {
  .ai-box { flex-direction: column; }
}

/* ---------------- Chat ---------------- */
.chat-body { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.chat-msg { max-width: 88%; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-who { font-size: 11px; color: var(--faint); margin-bottom: 3px; }
.chat-bubble {
  display: inline-block; text-align: left;
  background: var(--ink-700); border: 1px solid var(--ink-600);
  border-radius: 12px; padding: 8px 13px; font-size: 13.5px; line-height: 1.5;
  word-break: break-word;
}
.chat-msg.mine .chat-bubble {
  background: rgba(94,143,203,.16); border-color: rgba(94,143,203,.4);
}
.chat-empty { color: var(--faint); font-size: 13px; text-align: center; padding: 30px 10px; }
.chat-inputrow {
  display: flex; gap: 8px; padding: 12px 14px;
  border-top: 1px solid var(--line); background: var(--ink-800);
}
.chat-inputrow input {
  flex: 1; min-width: 0; background: var(--ink-700);
  border: 1px solid var(--ink-600); border-radius: 20px;
  padding: 9px 15px; color: var(--text); font-size: 14px;
}
.chat-inputrow input:focus { outline: none; border-color: var(--accent); }
.chat-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); margin-left: 5px; vertical-align: 2px;
}
.team-row.pending { border-color: rgba(217,164,65,.55); }
.tag-new {
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--warn); border: 1px solid rgba(217,164,65,.5);
  padding: 2px 7px; border-radius: 10px; margin-left: 8px;
}

/* ---------------- Sharing ---------------- */
.collab-stack { display: inline-flex; align-items: center; }
.collab-stack .mini-avatar { border: 2px solid var(--ink-950); margin-left: -7px; width: 26px; height: 26px; }
.collab-stack .mini-avatar:first-child { margin-left: 0; }
.collab-more { font-size: 11px; color: var(--muted); margin-left: 6px; }
.share-row { cursor: pointer; }
.share-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink-700); border: 1px solid var(--ink-600);
  border-radius: 10px; padding: 11px 18px; font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: pop .18s ease-out;
  max-width: min(420px, 90vw); text-align: center;
}
.toast-ok { border-color: rgba(76,175,130,.5); }
.toast-err { border-color: rgba(217,112,92,.6); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 150; background: rgba(4,7,12,.92);
  display: flex; align-items: center; justify-content: center; padding: 30px;
}
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 10px; }
.lightbox-x { position: absolute; top: 16px; right: 16px; color: var(--text); font-size: 26px; }

/* ---------- Desktop sidebar ---------- */
.sb-new, .side-nav { display: none; }

@media (min-width: 940px) {
  .topbar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 236px; height: auto;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: 24px 16px 18px; gap: 6px;
    background: var(--ink-900);
    border-right: 1px solid var(--line); border-bottom: 0;
    backdrop-filter: none;
  }
  .brand { flex-direction: column; align-items: flex-start; gap: 13px; padding: 0 10px 20px; }
  .brand-mark { width: 46px; height: 46px; }
  .brand-text { font-size: 16px; line-height: 1.25; }
  .sb-new { display: flex; margin: 0 8px 20px; }
  .side-nav { display: flex; flex-direction: column; gap: 3px; }
  .side-item {
    text-align: left; padding: 10px 13px; border-radius: 9px;
    font-family: var(--font-display); font-weight: 600; font-size: 13.5px;
    color: var(--muted); transition: color .15s, background .15s;
  }
  .side-item:hover { color: var(--text); background: var(--ink-800); }
  .side-item.active { background: var(--brand); color: var(--text); }
  .topbar-right {
    margin-top: auto; padding-top: 16px;
    border-top: 1px solid var(--line);
    justify-content: space-between;
  }
  .notif-panel, .user-panel {
    left: calc(100% + 14px); right: auto;
    bottom: 0; top: auto;
  }
  .view { margin: 0 auto 0 236px; max-width: 1080px; padding: 36px 34px 110px; }
  .filter-row { display: none; }
  #view-dashboard #new-event-btn { display: none; }
  .dash-head { align-items: flex-start; margin-bottom: 16px; }
  .dash-tools { justify-content: flex-start; margin-bottom: 16px; }
  .search-input { width: 320px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .view { padding: 20px 14px 120px; }
  .dash-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .dash-title { font-size: 23px; }
  .search-input { width: 100%; }
  .field-2col { grid-template-columns: 1fr; gap: 0; }
  .look-grid { grid-template-columns: 1fr; }
  .brand-text em { display: none; }
  .ws-title-block h1 { font-size: 21px; }
  .ws-actions { width: 100%; }
  .ws-actions .btn { flex: 1; }
  .shot-card { grid-template-columns: 38px 1fr; padding: 14px; gap: 12px; }
  .shot-num { width: 38px; height: 38px; font-size: 14px; }
  .modal-veil { padding: 0; align-items: stretch; }
  .modal { max-width: 100%; min-height: 100dvh; border-radius: 0; border: 0; display: flex; flex-direction: column; }
  .modal-body { flex: 1; overflow-y: auto; }
  .modal-foot { border-top: 1px solid var(--line); padding-top: 14px; position: sticky; bottom: 0; background: var(--ink-800); }
  .fab { right: 16px; bottom: 16px; }
  .shot-ref-thumb, .shot-ref-link { width: 96px; height: 96px; }
  .ref-tile, .ref-tile img, .ref-tile-link, .ref-uploading { width: 108px; }
  .ref-tile img, .ref-tile-link, .ref-uploading { height: 108px; }
}

/* ============================================================
   PRINT — the branded PDF export
   ============================================================ */
#print-root { display: none; }

@media print {
  body > *:not(#print-root) { display: none !important; }
  body { background: #fff; color: #16233A; font-size: 12px; }
  #print-root { display: block; font-family: var(--font-body); }

  .p-cover {
    height: 96vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    page-break-after: always;
  }
  .p-cover img { width: 130px; margin-bottom: 30px; }
  .p-cover-eyebrow {
    font-family: var(--font-display); font-size: 11px; font-weight: 700;
    letter-spacing: .28em; text-transform: uppercase; color: #2B4060;
    margin-bottom: 14px;
  }
  .p-cover h1 { font-size: 34px; color: #16233A; margin-bottom: 10px; }
  .p-cover-meta { font-size: 14px; color: #5A6B84; }
  .p-cover-rule { width: 70px; height: 2px; background: #C8A96A; margin: 26px auto; }
  .p-cover-foot {
    font-family: var(--font-display); font-size: 10px; font-weight: 600;
    letter-spacing: .2em; text-transform: uppercase; color: #8593A8;
  }

  .p-day { page-break-before: always; }
  .p-day:first-of-type { page-break-before: auto; }
  .p-day-head { border-bottom: 2px solid #2B4060; padding-bottom: 10px; margin-bottom: 16px; }
  .p-day-head h2 { font-size: 20px; color: #2B4060; }
  .p-day-meta { font-size: 11.5px; color: #5A6B84; margin-top: 4px; }
  .p-day-notes {
    font-size: 11.5px; color: #44536B; background: #F2F5F9;
    padding: 8px 12px; border-radius: 6px; margin-bottom: 14px;
  }

  .p-shot {
    display: grid; grid-template-columns: 34px 1fr; gap: 12px;
    border: 1px solid #D8DFE9; border-radius: 8px;
    padding: 12px 14px; margin-bottom: 10px;
    page-break-inside: avoid;
  }
  .p-shot-num {
    font-family: var(--font-display); font-weight: 700; font-size: 15px;
    color: #2B4060; width: 30px; height: 30px; border: 2px solid #2B4060;
    border-radius: 50%; display: grid; place-items: center;
  }
  .p-shot.p-must .p-shot-num { border-color: #A8843C; color: #A8843C; }
  .p-shot-desc { font-size: 12.5px; line-height: 1.5; color: #16233A; }
  .p-shot-tags { margin-top: 6px; font-size: 10.5px; color: #5A6B84; }
  .p-shot-tags b { color: #2B4060; font-weight: 700; }
  .p-shot-cam {
    margin-top: 6px; font-size: 11px; color: #2B4060;
    background: #EEF3FA; padding: 5px 9px; border-radius: 5px; display: inline-block;
  }
  .p-shot-line { margin-top: 5px; font-size: 10.5px; color: #5A6B84; }
  .p-refs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
  .p-refs img {
    width: 112px; height: 112px; object-fit: cover;
    border-radius: 5px; border: 1px solid #D8DFE9;
  }
  .p-ref-url { font-size: 9.5px; color: #5E8FCB; word-break: break-all; margin-top: 4px; }

  .p-pagefoot {
    margin-top: 24px; padding-top: 10px; border-top: 1px solid #D8DFE9;
    font-family: var(--font-display); font-size: 9px; font-weight: 600;
    letter-spacing: .16em; text-transform: uppercase; color: #8593A8;
    display: flex; justify-content: space-between;
  }
}
