/* SEP Content Desk. Brand values follow the screener: blue, tan, Playfair Display and Inter. */
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url('/fonts/inter-latin.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 500 700; font-display: swap; src: url('/fonts/playfairdisplay-latin.woff2') format('woff2'); }

:root {
  --blue: #1B3F73; --blue-deep: #122C52; --blue-wash: #EEF2F7; --blue-20: #D1D9E3; --tan: #C89976; --tan-20: #F4EBE4;
  --ink: #1C2736; --muted: #65707F; --line: #E6E9EE; --bg: #F6F7F9; --card: #FFFFFF;
  --red: #C0392B; --red-wash: #FBECEA; --amber: #C98A1B; --green: #2E8B57; --grey: #98A1AD;
  --radius: 16px; --shadow: 0 1px 2px rgba(18, 44, 82, .05), 0 6px 20px rgba(18, 44, 82, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.45 Inter, system-ui, sans-serif; color: var(--ink); background: var(--bg); }
body.drawer-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: var(--blue); }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--tan); outline-offset: 2px; }

/* Navigation: side rail on desktop, floating tab bar on a phone */
.rail { position: fixed; inset: 0 auto 0 0; width: 232px; background: var(--blue-deep); color: #fff; display: flex; flex-direction: column; padding: 22px 14px; z-index: 20; }
.rail-brand img { width: 150px; display: block; }
.rail-brand span { display: block; font: 600 17px 'Playfair Display', serif; margin-top: 16px; padding-left: 4px; }
.rail-links { display: flex; flex-direction: column; gap: 4px; margin-top: 22px; flex: 1; }
.rail-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: 12px; background: none; color: #C7D3E4; cursor: pointer; text-align: left; font-weight: 500; transition: background .15s, color .15s; }
.rail-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.rail-link.on { background: rgba(255, 255, 255, .13); color: #fff; }
.rail-foot { display: flex; align-items: center; gap: 10px; padding: 8px 4px 0; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 14px; }
.rail-name { flex: 1; font-weight: 500; }
.rail-foot .icon-btn { color: #C7D3E4; background: none; border: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--tan); color: var(--blue-deep); font-weight: 700; display: grid; place-items: center; flex: none; }
.avatar.small { width: 26px; height: 26px; font-size: 13px; }

.main { margin-left: 232px; padding: 32px clamp(18px, 4vw, 48px) 60px; max-width: 1180px; outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font: 600 30px/1.15 'Playfair Display', serif; color: var(--blue); }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 11px; border: 1px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, opacity .15s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn .ic { width: 17px; height: 17px; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-deep); }
.btn.primary:disabled { opacity: .4; cursor: default; }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--blue-wash); }
.btn.danger { background: var(--red); color: #fff; }
.btn.small { padding: 6px 11px; font-size: 13.5px; border-radius: 9px; }
.btn.wide { width: 100%; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; color: var(--ink); flex: none; }
.icon-btn:hover { background: var(--blue-wash); }

/* Stats and panels */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 15px 18px; box-shadow: var(--shadow); }
.stat b { display: block; font: 600 30px/1.1 'Playfair Display', serif; color: var(--blue); }
.stat span { color: var(--muted); font-size: 13.5px; }
.stat.bad b { color: var(--red); }
.panel { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.panel h2 { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.panel h2.late, .late { color: var(--red); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.panel-head h2 { margin: 0; }
.panel-actions { display: flex; gap: 6px; }
.count { background: var(--blue-wash); color: var(--blue); font-size: 12px; font-weight: 650; border-radius: 99px; padding: 1px 8px; }
.later summary { cursor: pointer; list-style: none; }
.later summary::-webkit-details-marker { display: none; }
.later summary h2 { margin: 0; }
.later[open] summary { margin-bottom: 8px; }
.empty { background: var(--card); border-radius: var(--radius); padding: 36px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.empty strong { font: 600 21px 'Playfair Display', serif; color: var(--blue); }
.small-note { font-size: 13px; }

/* Jobs */
.job { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.jobs .job:first-child { border-top: 0; }
.job-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.job-title { font-weight: 600; }
.job-sub { color: var(--muted); font-size: 13.5px; }
.job-lock { color: var(--muted); font-size: 12.5px; font-style: italic; }
.job-note { color: #7A5A3E; background: var(--tan-20); border-radius: 8px; padding: 3px 8px; font-size: 13px; width: fit-content; }
.is-locked .job-title { color: var(--muted); }
.tick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--blue-20); background: none; display: grid; place-items: center; color: transparent; cursor: pointer; flex: none; transition: all .15s; padding: 0; }
.tick .ic { width: 16px; height: 16px; }
button.tick:hover { border-color: var(--green); background: var(--green); color: #fff; }
.tick.locked { border-color: transparent; color: var(--grey); cursor: default; }
.pick { width: 21px; height: 21px; accent-color: var(--blue); flex: none; margin: 0 3px; cursor: pointer; }
.thumb { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; flex: none; background: var(--blue-wash); }
.thumb.big { width: 100%; height: 150px; border-radius: 12px 12px 0 0; }
.due { font-size: 13px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.due.late { color: var(--red); font-weight: 650; }
.due.today { color: var(--blue); font-weight: 650; }

/* Tags and status */
.tag { display: inline-block; font-size: 11.5px; font-weight: 650; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.t-fbig { background: #E4EDFD; color: #2456B5; } .t-linkedin { background: #DDF1F7; color: #0F6E88; }
.t-blog { background: var(--tan-20); color: #8A5A32; } .t-reel, .t-newreel { background: #EEE7FA; color: #6B3FB5; }
.t-newsletter { background: #E2F4E9; color: #1F7A48; } .t-ad { background: #FBE6EE; color: #B02A62; }
.t-event, .t-usevent { background: #FDF2D5; color: #8F6A00; } .t-video { background: #FBE5E2; color: #B23A2A; }
.status { font-size: 12px; font-weight: 600; white-space: nowrap; }
.status.s-overdue { color: var(--red); } .status.s-progress { color: var(--amber); } .status.s-scheduled { color: var(--blue); }
.status.s-live, .status.s-recorded { color: var(--green); } .status.s-hold, .status.s-cancelled { color: var(--grey); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.s-overdue { background: var(--red); } .dot.s-progress { background: var(--amber); } .dot.s-scheduled { background: var(--blue); }
.dot.s-live { background: #6CC08F; } .dot.s-recorded { background: var(--green); } .dot.s-hold, .dot.s-cancelled { background: var(--grey); }

/* Team */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.person-card { display: flex; align-items: center; gap: 11px; background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.person-card div { display: flex; flex-direction: column; min-width: 0; }
.person-card .muted { font-size: 13px; }
.person-card b.late { font-weight: 650; }
.golive { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.golives .golive:first-child { border-top: 0; }
.golive-title { flex: 1; min-width: 0; }
.golive-day { width: 40px; text-align: center; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; flex: none; }
.golive-day b { display: block; font: 600 18px 'Playfair Display', serif; color: var(--blue); text-transform: none; }

/* Calendar */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pill { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 500; cursor: pointer; }
.pill.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: 9px 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.day { min-height: 112px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.day:nth-child(7n + 1) { border-left: 0; }
.day.other { background: #FAFBFC; }
.day.other .day-num { color: var(--grey); }
.day-num { align-self: flex-start; width: 25px; height: 25px; border-radius: 50%; border: 0; background: none; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; }
.day-num:hover { background: var(--blue-wash); }
.day.is-today .day-num { background: var(--blue); color: #fff; }
.chip { display: flex; align-items: center; gap: 5px; border: 0; border-radius: 6px; padding: 2px 6px; font-size: 11.5px; font-weight: 600; cursor: pointer; overflow: hidden; white-space: nowrap; text-align: left; min-width: 0; }
.cal-event { display: block; background: var(--blue-deep); color: #fff; border-radius: 6px; padding: 2px 6px; font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda { display: none; }
.agenda-day { margin-bottom: 16px; }
.agenda-day h3 { font-size: 13.5px; color: var(--muted); margin-bottom: 4px; }
.agenda-day h3.today { color: var(--blue); }
.agenda .golives { background: var(--card); border-radius: 12px; padding: 2px 12px; box-shadow: var(--shadow); margin-top: 4px; }

/* Content */
.searchbar { display: flex; gap: 8px; margin-bottom: 12px; }
.searchbar input, .searchbar select { padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); }
.searchbar input { flex: 1; min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 12px; margin-top: 8px; }
.card { border: 1px solid var(--line); border-radius: 13px; cursor: pointer; transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.card-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; }
.card-body .muted { font-size: 13px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
progress { appearance: none; width: 100%; height: 5px; border: 0; border-radius: 9px; overflow: hidden; background: var(--blue-wash); margin-top: 4px; }
progress::-webkit-progress-bar { background: var(--blue-wash); }
progress::-webkit-progress-value { background: var(--blue); border-radius: 9px; }
progress::-moz-progress-bar { background: var(--blue); }

/* Events */
.event { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.events .event:first-child { border-top: 0; }
.event-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.event-body .muted { font-size: 13px; }

/* Settings */
.settings { width: 100%; border-collapse: collapse; font-size: 14px; }
.settings th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.settings td { padding: 7px 6px; border-top: 1px solid var(--line); }
.settings tr.off td:nth-child(2) { color: var(--grey); text-decoration: line-through; }
.settings select, .settings input[type=email] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); width: 100%; max-width: 290px; }

/* Drawer */
.scrim { position: fixed; inset: 0; background: rgba(18, 44, 82, .35); z-index: 30; animation: fade .15s; }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(500px, 100%); background: var(--card); z-index: 40; overflow-y: auto; padding: 18px 22px 40px; box-shadow: -10px 0 40px rgba(18, 44, 82, .18); animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head .icon-btn { border: 0; }
.drawer-title { font: 600 24px/1.2 'Playfair Display', serif; color: var(--blue); margin: 6px 0; }
.drawer-meta { color: var(--muted); font-size: 14px; display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.drawer-actions, .file-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.drawer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 8px; }
.banner { background: var(--tan-20); color: #7A5A3E; border-radius: 10px; padding: 9px 12px; margin-top: 10px; font-weight: 500; }
.pictures { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 14px; }
.pictures img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 11px; display: block; }
.files li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 14px; }
.notes { white-space: pre-wrap; }
.steps { position: relative; }
.step { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.step:not(:last-child)::before { content: ''; position: absolute; left: 12px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.step-mark { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--blue-20); display: grid; place-items: center; flex: none; background: var(--card); color: var(--grey); }
.step-mark .ic { width: 14px; height: 14px; }
.step.closed .step-mark { background: var(--green); border-color: var(--green); color: #fff; }
.step.over .step-mark { border-color: var(--red); }
.step-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.step-body .muted { font-size: 13px; }
.step.over .step-body .muted { color: var(--red); }
.step.closed strong { color: var(--muted); font-weight: 500; }
.step-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.history { margin-top: 10px; font-size: 13.5px; }
.history summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.history li { padding: 6px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.history li:first-child { margin-top: 8px; }

/* Dialog */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(440px, calc(100% - 28px)); box-shadow: 0 20px 60px rgba(18, 44, 82, .3); color: var(--ink); }
dialog::backdrop { background: rgba(18, 44, 82, .4); }
.dialog-form { padding: 22px; display: flex; flex-direction: column; gap: 13px; }
.dialog-form h2 { font: 600 21px 'Playfair Display', serif; color: var(--blue); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 600; }
.field input:not([type=checkbox]), .field select, .field textarea { padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; font-weight: 400; font-size: 15px; background: var(--card); width: 100%; }
.field input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--blue); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--blue-deep); color: #fff; padding: 11px 16px; border-radius: 12px; z-index: 60; display: flex; gap: 14px; align-items: center; box-shadow: 0 8px 30px rgba(18, 44, 82, .35); max-width: calc(100% - 28px); animation: fade .15s; }
.toast button { background: none; border: 0; color: var(--tan); font-weight: 700; cursor: pointer; }

/* Sign-in */
.login-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--blue-deep), var(--blue)); padding: 20px; }
.login-card { width: min(380px, 100%); background: var(--card); border-radius: 22px; overflow: hidden; padding: 0 26px 26px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.login-logo { width: calc(100% + 52px); margin: 0 -26px 8px; background: var(--blue); padding: 22px 80px; }
.login-card h1 { font: 600 27px 'Playfair Display', serif; color: var(--blue); }
.login-card form { display: flex; flex-direction: column; gap: 10px; }
.login-card input { padding: 12px; border-radius: 11px; border: 1px solid var(--line); width: 100%; }
.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.who { padding: 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer; }
.who:hover { background: var(--blue-wash); border-color: var(--blue-20); }
.form-error { color: var(--red); font-size: 14px; min-height: 1em; }

/* Phone */
@media (max-width: 820px) {
  .rail { inset: auto 10px calc(10px + env(safe-area-inset-bottom)) 10px; width: auto; flex-direction: row; padding: 5px; border-radius: 20px; background: rgba(18, 44, 82, .92); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 10px 30px rgba(18, 44, 82, .35); }
  .rail-brand, .rail-foot { display: none; }
  .rail-links { flex-direction: row; margin: 0; gap: 0; justify-content: space-around; }
  .rail-link { flex: 1; flex-direction: column; gap: 2px; padding: 7px 2px; font-size: 10.5px; align-items: center; }
  .main { margin-left: 0; padding: 20px 14px 110px; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 26px; }
  .stat { padding: 11px 13px; }
  .stat b { font-size: 25px; }
  .stat span { font-size: 12px; }
  .panel { padding: 13px 14px; }
  .cal, .legend { display: none; }
  .agenda { display: block; }
  .job { gap: 10px; align-items: flex-start; }
  .tick, .avatar.small { margin-top: 2px; }
  .drawer { width: 100%; }
  .toast { bottom: 90px; width: max-content; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
