:root {
  --bg: #0e1116;
  --bg-2: #151a21;
  --bg-3: #1c232c;
  --panel: #171d25;
  --line: #262f3a;
  --line-2: #313c49;
  --text: #e6ebf1;
  --muted: #8b98a8;
  --muted-2: #62707f;
  --accent: #f2a33c;
  --accent-2: #ffbf6b;
  --danger: #e5484d;
  --danger-bg: #2a1618;
  --ok: #46b06e;
  --prio: #f2a33c;
  --radius: 12px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }
a { color: var(--accent-2); }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text);
  padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 13px;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--bg-2); border-color: var(--muted-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #201400; }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--bg-3); color: var(--text); }
.btn.danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn.danger:hover { background: var(--danger-bg); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--bg-3); color: var(--text); }

/* --------------------------------------------------------------- inputs */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; letter-spacing: .02em; }
.input, textarea.input, select.input {
  width: 100%; background: var(--bg); border: 1px solid var(--line-2); color: var(--text);
  padding: 9px 12px; border-radius: 9px; outline: none; transition: border-color .15s;
}
.input:focus, textarea.input:focus, select.input:focus { border-color: var(--accent); }
textarea.input { resize: vertical; min-height: 60px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* ----------------------------------------------------------------- auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #1a222d 0%, var(--bg) 60%); }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.brand .clap { font-size: 24px; }
.auth-card h1 { font-size: 19px; margin: 22px 0 4px; }
.auth-card p.sub { color: var(--muted); margin: 0 0 22px; font-size: 13px; }
.auth-toggle { text-align: center; margin-top: 18px; color: var(--muted); font-size: 13px; }
.auth-toggle button { background: none; border: none; color: var(--accent-2); font-weight: 700; cursor: pointer; }
.err { color: var(--danger); font-size: 13px; margin-top: 4px; min-height: 18px; }

/* --------------------------------------------------------------- layout */
.shell { display: grid; grid-template-columns: 268px 1fr; height: 100vh; }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.sidebar-top { padding: 18px 18px 12px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.projects-list { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
.proj-item { display: block; width: 100%; text-align: left; border: 1px solid transparent; background: transparent;
  color: var(--text); padding: 11px 12px; border-radius: 10px; margin-bottom: 3px; }
.proj-item:hover { background: var(--bg-3); }
.proj-item.active { background: var(--bg-3); border-color: var(--line-2); }
.proj-item .pname { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-item .pmeta { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.sidebar-foot { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.userchip { display: flex; align-items: center; gap: 9px; min-width: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #201400; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.userchip .uname { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userchip .umail { font-size: 11px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; overflow-y: auto; min-height: 0; }
.empty-state { height: 100%; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 40px; }
.empty-state .big { font-size: 46px; margin-bottom: 10px; }

/* ------------------------------------------------------------ proj head */
.proj-header { position: sticky; top: 0; z-index: 5; background: rgba(14,17,22,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: 18px 26px 0; }
.ph-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ph-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.ph-desc { color: var(--muted); font-size: 13px; margin: 5px 0 0; max-width: 640px; }
.ph-actions { display: flex; gap: 8px; flex: none; }
.tabs { display: flex; gap: 4px; margin-top: 16px; }
.tab { padding: 9px 15px; border-radius: 9px 9px 0 0; border: 1px solid transparent; border-bottom: none;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel); color: var(--text); border-color: var(--line); }
.stat-badges { display: flex; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.stat-badges b { color: var(--text); }

.proj-body { padding: 22px 26px 80px; }

/* --------------------------------------------------------------- groups */
.group { margin-bottom: 26px; }
.group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.group-title { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.group-count { font-size: 12px; color: var(--muted-2); background: var(--bg-3); padding: 2px 9px; border-radius: 20px; }
.group-head .spacer { flex: 1; }

/* -------------------------------------------------------------- table vw */
.tbl-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
table.shots { width: 100%; border-collapse: collapse; }
table.shots th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2);
  padding: 10px 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); font-weight: 700; }
table.shots td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.shots tr:last-child td { border-bottom: none; }
table.shots tr.prio td { background: rgba(242,163,60,.05); }
table.shots tr:hover td { background: var(--bg-2); }
.cell-desc { font-weight: 600; max-width: 360px; }
.cell-desc .note { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; background: var(--bg-3); color: var(--text); border: 1px solid var(--line-2); white-space: nowrap; }
.thumbs { display: flex; gap: 4px; }
.thumbs img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line-2); }
.thumbs .more { width: 34px; height: 34px; border-radius: 6px; background: var(--bg-3); display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.prio-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--prio); display: inline-block; }
.row-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .1s; }
tr:hover .row-actions { opacity: 1; }
.add-shot-row td { padding: 0; }
.add-shot-btn { width: 100%; text-align: left; padding: 10px 14px; background: transparent; border: none; color: var(--muted); font-weight: 600; }
.add-shot-btn:hover { background: var(--bg-2); color: var(--accent-2); }

/* ------------------------------------------------------ edição inline */
table.shots.editable td { padding: 6px 8px; }
table.shots.editable tr:hover td { background: transparent; }
.cell-input {
  width: 100%; min-width: 90px; background: transparent; border: 1px solid transparent; border-radius: 7px;
  color: var(--text); padding: 6px 8px; font: inherit; transition: border-color .12s, background .12s;
}
.cell-input::placeholder { color: var(--muted-2); }
.cell-input:hover { border-color: var(--line-2); }
.cell-input:focus { border-color: var(--accent); background: var(--bg); outline: none; }
textarea.cell-input { resize: none; overflow: hidden; min-height: 32px; line-height: 1.4; display: block; }
.cell-desc-input { font-weight: 600; }
.cell-note-input { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
select.cell-input.status-sel { appearance: none; -webkit-appearance: none; cursor: pointer; font-weight: 600; min-width: 104px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238b98a8' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; padding-right: 22px; }
select.cell-input.status-sel option { background: var(--bg-3); color: var(--text); }
.p-cell { width: 30px; text-align: center; }
.p-toggle { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: transparent; padding: 0; display: inline-grid; place-items: center; transition: background .12s, border-color .12s; }
.p-toggle:hover { border-color: var(--prio); }
.p-toggle.on { background: var(--prio); border-color: var(--prio); }
.p-toggle.on::after { content: '★'; font-size: 11px; color: #201400; }
.refs-cell { cursor: pointer; border-radius: 8px; }
.refs-cell:hover { background: var(--bg-2); }

/* -------------------------------------------------------------- cards vw */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card.prio { border-color: rgba(242,163,60,.5); }
.card-media { aspect-ratio: 16/9; background: var(--bg); position: relative; overflow: hidden; display: grid; }
.card-media img { width: 100%; height: 100%; object-fit: cover; grid-area: 1/1; }
.card-media .noimg { display: grid; place-items: center; color: var(--muted-2); font-size: 30px; }
.card-media .prio-flag { position: absolute; top: 8px; left: 8px; background: var(--accent); color: #201400; font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; }
.card-media .refcount { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.card-body { padding: 12px 13px; flex: 1; display: flex; flex-direction: column; }
.card-body .cdesc { font-weight: 600; font-size: 13.5px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.card-body .cnote { color: var(--muted); font-size: 12px; margin-top: 9px; }
.card-foot { display: flex; gap: 4px; padding: 8px 9px; border-top: 1px solid var(--line); }
.add-card { border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: transparent; color: var(--muted);
  min-height: 120px; display: grid; place-items: center; font-weight: 600; }
.add-card:hover { border-color: var(--accent); color: var(--accent-2); }

/* ------------------------------------------------------------- kanban vw */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 14px; }
.kcol { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 200px; }
.kcol.drag-over { border-color: var(--accent); background: var(--bg-3); }
.kcol-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 700; font-size: 13px; }
.kcol-head .dot { width: 9px; height: 9px; border-radius: 50%; }
.kcol-head .kcount { margin-left: auto; color: var(--muted-2); font-weight: 600; }
.kcard { background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 11px; margin-bottom: 9px; cursor: grab; }
.kcard.prio { border-left: 3px solid var(--accent); }
.kcard.dragging { opacity: .4; }
.kcard .kdesc { font-weight: 600; font-size: 13px; }
.kcard .ktags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.kcard .kthumbs { display: flex; gap: 4px; margin-top: 8px; }
.kcard .kthumbs img { width: 30px; height: 30px; object-fit: cover; border-radius: 5px; }
.kcard .kgroup { font-size: 10.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }

/* --------------------------------------------------------------- modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px; z-index: 100; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  width: 100%; max-width: 620px; max-height: 90vh; display: flex; flex-direction: column; }
.modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }
.checkbox { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 9px; cursor: pointer; user-select: none; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--accent); }
.checkbox.on { border-color: var(--accent); background: rgba(242,163,60,.08); }

/* ------------------------------------------------- settings / import */
.setting-section { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin: 0 0 12px; color: var(--text); }
.setting-section svg { color: var(--accent); }
.setting-status { font-size: 13px; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); padding: 9px 12px; border-radius: 9px; margin-bottom: 16px; }
.setting-status.ok { color: var(--ok); border-color: rgba(70,176,110,.35); }
.seg { display: flex; gap: 6px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 4px; }
.seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px; border-radius: 7px; border: none; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg-btn.on { background: var(--bg-3); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.seg-btn.on svg { color: var(--accent); }
.imp-hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.imp-hint.warn { color: var(--accent-2); }
.linkbtn { background: none; border: none; color: var(--accent-2); font-weight: 700; cursor: pointer; padding: 0; font-size: 12.5px; text-decoration: underline; }

/* ---------------------------------------------- seleção múltipla + mover */
.sel-cell { width: 30px; text-align: center; }
.sel-chk { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
table.shots tr.selected td { background: rgba(242,163,60,.10) !important; }
.sel-bar { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 150;
  display: flex; align-items: center; gap: 12px; background: var(--bg-3); border: 1px solid var(--line-2);
  padding: 10px 12px 10px 18px; border-radius: 14px; box-shadow: var(--shadow); animation: pop .18s ease; }
.sel-bar .sel-count { font-weight: 700; font-size: 13px; }

/* ------------------------------------------------------- picker do flom */
.flom-tag { position: absolute; bottom: 4px; left: 4px; background: rgba(0,0,0,.7); color: var(--accent-2);
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 5px; }
.flom-modal { max-width: 820px; }
.flom-body { display: flex; flex-direction: column; gap: 12px; min-height: 340px; }
.flom-tabs { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.flom-searchrow { display: flex; gap: 8px; }
.flom-searchrow .input { flex: 1; }
.flom-status { color: var(--muted); font-size: 13px; text-align: center; padding: 6px; }
.flom-crumb { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.flom-crumb-name { font-weight: 700; }
.flom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.flom-tile { position: relative; aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; border: 2px solid transparent;
  background: var(--bg); padding: 0; cursor: pointer; }
.flom-tile img, .flom-tile .vthumb { width: 100%; height: 100%; }
.flom-tile img { object-fit: cover; display: block; }
.flom-tile.on { border-color: var(--accent); }
.flom-tile .flom-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: transparent; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.flom-tile.on .flom-check { background: var(--accent); color: #201400; }
.flom-tile .flom-dur { position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 20px; }
.flom-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; width: 100%; }
.flom-col { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); font-weight: 600; text-align: left; }
.flom-col:hover { border-color: var(--accent); background: var(--bg-2); }
.flom-col-count { color: var(--muted-2); font-size: 12px; }

/* ---------------------------------------------------------- ref uploader */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin-top: 8px; }
.ref-item { position: relative; aspect-ratio: 1; border-radius: 9px; overflow: hidden; border: 1px solid var(--line-2); }
.ref-item img { width: 100%; height: 100%; object-fit: cover; }
.ref-item .del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 6px; border: none;
  background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; }
.ref-item .del:hover { background: var(--danger); }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 20px; text-align: center; color: var(--muted);
  cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--accent); background: rgba(242,163,60,.06); color: var(--accent-2); }
.dropzone input { display: none; }

/* --------------------------------------------------------------- toast */
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; font-weight: 600; animation: pop .2s ease; }
.toast.err { border-color: var(--danger); color: #ff9ea1; }
.toast.ok { border-color: var(--ok); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

.muted { color: var(--muted); }
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--muted-2); border-top-color: var(--text); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* --------------------------------------------------------- video thumbs */
.vthumb { position: relative; display: inline-grid; overflow: hidden; border-radius: 6px; background: #000; }
.vthumb video, .vthumb img { width: 100%; height: 100%; object-fit: cover; grid-area: 1/1; pointer-events: none; }
.vthumb.fill { width: 100%; height: 100%; border-radius: 0; }
.vthumb .playbadge { grid-area: 1/1; place-self: center; z-index: 1; color: #fff; font-size: 11px;
  background: rgba(0,0,0,.55); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.thumbs .vthumb { width: 34px; height: 34px; border: 1px solid var(--line-2); }
.kcard .kthumbs .vthumb { width: 30px; height: 30px; }
.card-media .vthumb { width: 100%; height: 100%; border-radius: 0; }
.card-media .vthumb .playbadge { width: 34px; height: 34px; font-size: 15px; }

/* ------------------------------------------------------------- operador */
.operator { max-width: 640px; margin: 0 auto; }
.op-bar { position: sticky; top: 0; z-index: 4; background: var(--bg); padding: 4px 0 14px; margin-bottom: 6px; }
.op-progress { position: relative; height: 30px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; }
.op-progress-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2f9e56, var(--ok)); transition: width .35s ease; }
.op-progress-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.op-chips { display: flex; gap: 8px; margin-top: 10px; }
.op-chip { flex: 1; padding: 9px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--muted); font-weight: 600; font-size: 13px; }
.op-chip.on { border-color: var(--accent); color: var(--accent-2); background: rgba(242,163,60,.1); }
.op-group { font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--muted);
  margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.op-group-count { background: var(--bg-3); color: var(--muted-2); padding: 1px 8px; border-radius: 20px; font-size: 11px; }
.op-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 16px; transition: opacity .2s; }
.op-card.prio { border-color: rgba(242,163,60,.5); }
.op-card.done { opacity: .62; }
.op-media { background: #000; }
.op-media-main video, .op-media-main img { width: 100%; display: block; max-height: 62vh; object-fit: contain; background: #000; }
.op-strip { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: var(--bg-2); }
.op-strip-item { flex: none; width: 54px; height: 54px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: #000; padding: 0; }
.op-strip-item.on { border-color: var(--accent); }
.op-strip-item img, .op-strip-item .vthumb { width: 100%; height: 100%; object-fit: cover; }
.op-noref { aspect-ratio: 16/9; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted-2); background: var(--bg); }
.op-body { padding: 15px 16px 16px; }
.op-prio { display: inline-block; background: var(--accent); color: #201400; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.op-desc { font-size: 17px; font-weight: 700; line-height: 1.3; }
.op-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.op-specs .tag { font-size: 13px; padding: 4px 10px; }
.op-notes { margin-top: 12px; color: var(--muted); font-size: 13.5px; background: var(--bg-2); padding: 10px 12px; border-radius: 9px; }
.op-mark { width: 100%; margin-top: 16px; padding: 15px; border-radius: 11px; font-size: 15px; font-weight: 800;
  border: 2px solid var(--ok); background: rgba(70,176,110,.1); color: var(--ok); transition: background .15s; }
.op-mark:active { transform: scale(.99); }
.op-mark small { font-weight: 500; opacity: .85; }
.op-mark.is-done { background: var(--ok); color: #08260f; border-color: var(--ok); }
.op-edit { width: 100%; margin-top: 8px; padding: 10px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.op-edit:hover { background: var(--bg-3); color: var(--text); }

/* -------------------------------------------------------- mobile topbar */
.main-col { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.mobile-topbar { display: none; }
.sb-backdrop { display: none; }

/* --------------------------------------------------------------- print */
.print-view { display: none; }

@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; }
  .shell, .proj-header, #modal-root, #toast-root { display: none !important; }
  .print-view { display: block !important; }
  .print-view { padding: 0; font-size: 11px; color: #000; }
  .print-view h1 { font-size: 20px; margin: 0 0 2px; }
  .print-view .p-sub { color: #555; margin: 0 0 4px; font-size: 11px; }
  .print-view .p-meta { color: #777; font-size: 10px; margin-bottom: 16px; border-bottom: 1.5px solid #000; padding-bottom: 8px; }
  .print-view .p-group { font-size: 14px; font-weight: 800; margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .03em; page-break-after: avoid; }
  .print-view table { width: 100%; border-collapse: collapse; page-break-inside: auto; }
  .print-view thead { display: table-header-group; }
  .print-view th { text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1.5px solid #000; padding: 5px 6px; }
  .print-view td { border-bottom: .5px solid #ccc; padding: 6px; vertical-align: top; page-break-inside: avoid; }
  .print-view tr.prio td { background: #fff4e2; }
  .print-view .p-num { color: #999; font-weight: 700; width: 24px; }
  .print-view .p-prio { font-weight: 800; }
  .print-view .p-desc { font-weight: 700; }
  .print-view .p-desc .pn { font-weight: 400; color: #444; display: block; margin-top: 2px; }
  .print-view .p-thumbs { display: flex; gap: 3px; flex-wrap: wrap; }
  .print-view .p-thumbs img { width: 46px; height: 46px; object-fit: cover; border: .5px solid #999; }
  .print-view .p-vid { font-size: 9px; border: .5px solid #999; padding: 3px 5px; border-radius: 3px; color: #444; white-space: nowrap; }
}

/* --------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
  .tbl-wrap { overflow-x: auto; }
  table.shots { min-width: 720px; }

  /* sidebar vira drawer deslizante */
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 82vw; max-width: 320px; z-index: 60;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .shell.drawer-open .sidebar { transform: translateX(0); }
  .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55;
    opacity: 0; pointer-events: none; transition: opacity .25s; }
  .shell.drawer-open .sb-backdrop { opacity: 1; pointer-events: auto; }

  /* topbar mobile */
  .mobile-topbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-bottom: 1px solid var(--line); background: var(--bg-2); position: sticky; top: 0; z-index: 10; }
  .mt-title { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 7px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mt-title .clap { font-size: 17px; }

  /* header do projeto mais compacto */
  .proj-header { padding: 14px 16px 0; position: static; backdrop-filter: none; }
  .ph-title { font-size: 19px; }
  .ph-desc { display: none; }
  .ph-actions .btn span:not([class]) { display: none; } /* deixa botões só com ícone */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex: none; }
  .proj-body { padding: 16px 14px 90px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-badges { flex-wrap: wrap; gap: 8px 14px; }

  /* alvos de toque maiores */
  .icon-btn { width: 38px; height: 38px; }
  .btn { padding: 10px 15px; }
}

@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .op-desc { font-size: 16px; }
}
