/* Zenith · base visual compartilhada (painel, galeria e portfólio) */
:root {
  --bg: #ffffff;
  --ink: #141414;
  --ink-2: #3d3d3d;
  --muted: #8d8d8d;
  --line: #ebebeb;
  --soft: #f6f5f2;
  --soft-2: #eeede9;
  --accent: #141414;
  --accent-ink: #ffffff;
  --danger: #b3261e;
  --ok: #2f7a4e;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Jost', 'Inter', system-ui, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --shadow: 0 10px 40px rgba(0, 0, 0, .12);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.label {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 18px; border: 1px solid var(--line); background: var(--bg);
  border-radius: 2px; cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap;
  text-decoration: none; transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { border-color: #cfcfcf; }
.btn:disabled { opacity: .45; cursor: default; }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--primary:hover { background: #2b2b2b; border-color: #2b2b2b; }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover { background: var(--soft); border-color: transparent; }
.btn--danger { color: var(--danger); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; color: inherit;
}
.icon-btn:hover { background: rgba(127, 127, 127, .12); }
.icon-btn svg { width: 18px; height: 18px; }

.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; color: var(--ink);
}
.link-btn:hover { text-decoration: underline; }
.link-btn svg { width: 15px; height: 15px; }

/* Campos */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > span { font-size: 12px; color: var(--ink-2); }
.input, .textarea, .select {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 2px;
  background: var(--bg); outline: none; transition: border-color .15s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--ink); }
.input--line { border: 0; border-bottom: 1px solid var(--line); padding: 0 2px; border-radius: 0; }
.hint { font-size: 12px; color: var(--muted); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i {
  width: 38px; height: 22px; border-radius: 22px; background: #d8d8d8; position: relative; transition: background .2s; flex: none;
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 32px; background: var(--bg);
  cursor: pointer; font-size: 12.5px;
}
.chip:hover { border-color: #cfcfcf; }
.chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 20, 20, .45); display: grid; place-items: center;
  padding: 16px; z-index: 170; animation: fade .18s ease;
}
.modal {
  background: var(--bg); width: min(460px, 100%); max-height: calc(100svh - 32px); overflow: auto;
  padding: 30px 32px 26px; box-shadow: var(--shadow); animation: rise .22s var(--ease);
}
.modal--wide { width: min(640px, 100%); }
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.modal__title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.modal p { color: var(--ink-2); margin: 0 0 12px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* Aviso rápido */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
.toast {
  background: #1d1d1d; color: #fff; padding: 11px 18px; font-size: 13px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; animation: rise .2s var(--ease);
}
.toast svg { width: 16px; height: 16px; }

.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(127,127,127,.3); border-top-color: currentColor;
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.copy-row { display: flex; align-items: center; gap: 10px; background: var(--soft); padding: 0 12px; height: 44px; }
.copy-row code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 13px/1 var(--font-ui); }

/* Visualização ampliada (lightbox) */
.lb {
  position: fixed; inset: 0; z-index: 150; background: #0b0b0b; color: #fff; display: grid;
  grid-template-rows: auto 1fr auto; animation: fade .2s ease; touch-action: pan-y;
}
.lb__bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; }
.lb__count { font-size: 12px; letter-spacing: .08em; opacity: .75; margin-right: auto; padding-left: 8px; }
.lb__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 56px; }
.lb__stage img, .lb__stage video {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none;
}
.lb__stage video { background: #000; }
.lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; display: grid; place-items: center;
}
.lb__nav:hover { background: rgba(255,255,255,.18); }
.lb__nav svg { width: 22px; height: 22px; }
.lb__nav--prev { left: 6px; }
.lb__nav--next { right: 6px; }
.lb__caption { text-align: center; font-size: 12.5px; opacity: .7; padding: 10px 16px 16px; min-height: 40px; }
.lb .icon-btn { color: #fff; }
.lb__quality { height: 28px; padding: 0 10px; border-radius: 28px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; font-size: 11px; letter-spacing: .08em; cursor: pointer; }
.lb__loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
@media (max-width: 700px) {
  .lb__stage { padding: 0; }
  .lb__nav { display: none; }
}

/* Selo de vídeo na grade */
.vbadge {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px 3px 6px;
  border-radius: 20px; backdrop-filter: blur(4px); pointer-events: none;
}
.vbadge svg { width: 11px; height: 11px; }
.play-center {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: rgba(0,0,0,.42); display: grid; place-items: center; color: #fff; pointer-events: none;
  backdrop-filter: blur(4px); transition: transform .2s var(--ease);
}
.play-center svg { width: 18px; height: 18px; margin-left: 3px; }
