/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #0b0c10;
  --surface: #13151b;
  --surface-2: #1a1d25;
  --surface-3: #232733;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .12);
  --text: #eceef3;
  --muted: #8b92a5;
  --accent: #6366f1;
  --accent-hover: #7477f4;
  --accent-soft: rgba(99, 102, 241, .14);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, .14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, .14);
  --interviewer: #a5b4fc;
  --candidate: #86efac;
  --text-2: #c8ccd6;
  --placeholder: #5d6476;
  --header-bg: rgba(11, 12, 16, .85);
  --backdrop: rgba(5, 6, 10, .7);
  --warning: #fde047;
  --warning-soft: rgba(250, 204, 21, .12);
  --danger-text: #fca5a5;
  --accent-text: #a5b4fc;
  --check-border: #4b5163;
  color-scheme: dark;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Tema claro: escolhido no menu da conta, ou automático quando o sistema está no modo claro */
:root[data-theme="light"] {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f1f2f6;
  --surface-3: #e6e8ef;
  --border: rgba(15, 23, 42, .08);
  --border-strong: rgba(15, 23, 42, .15);
  --text: #151821;
  --muted: #5f6678;
  --accent: #5b5ef0;
  --accent-hover: #4f46e5;
  --accent-soft: rgba(91, 94, 240, .12);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, .12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, .1);
  --interviewer: #4338ca;
  --candidate: #15803d;
  --text-2: #353b4a;
  --placeholder: #9aa1b2;
  --header-bg: rgba(255, 255, 255, .85);
  --backdrop: rgba(15, 23, 42, .35);
  --warning: #a16207;
  --warning-soft: rgba(234, 179, 8, .16);
  --danger-text: #dc2626;
  --accent-text: #4338ca;
  --check-border: #b8bdcc;
  --shadow: 0 10px 30px rgba(15, 23, 42, .1);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .16);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f6fa;
    --surface: #ffffff;
    --surface-2: #f1f2f6;
    --surface-3: #e6e8ef;
    --border: rgba(15, 23, 42, .08);
    --border-strong: rgba(15, 23, 42, .15);
    --text: #151821;
    --muted: #5f6678;
    --accent: #5b5ef0;
    --accent-hover: #4f46e5;
    --accent-soft: rgba(91, 94, 240, .12);
    --success: #16a34a;
    --success-soft: rgba(22, 163, 74, .12);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, .1);
    --interviewer: #4338ca;
    --candidate: #15803d;
    --text-2: #353b4a;
    --placeholder: #9aa1b2;
    --header-bg: rgba(255, 255, 255, .85);
    --backdrop: rgba(15, 23, 42, .35);
    --warning: #a16207;
    --warning-soft: rgba(234, 179, 8, .16);
    --danger-text: #dc2626;
    --accent-text: #4338ca;
    --check-border: #b8bdcc;
    --shadow: 0 10px 30px rgba(15, 23, 42, .1);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, .16);
    color-scheme: light;
}
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; }
h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); font-size: 14px; margin: 12px 0 0; }

::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* Ícones (SVG no estilo Lucide) */
.i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Botões e campos
   ========================================================================== */
button, input, textarea, select { font: inherit; color: inherit; }

button, a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
button:hover, a.button:hover { background: var(--surface-3); }
button:active { transform: translateY(1px); }
button:focus-visible, a.button:focus-visible, a.icon-btn:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
  border-color: var(--accent);
}
button:disabled { opacity: .45; cursor: default; transform: none; }

button.primary, a.button.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}
button.primary:hover, a.button.primary:hover { background: var(--accent-hover); }

button.danger { background: var(--danger); border-color: transparent; color: #fff; }
button.danger:hover { background: #f05252; }

button.ghost { background: transparent; }
button.ghost:hover { background: var(--surface-2); }

button.sm { padding: 6px 12px; font-size: 13px; }
button.sm .i { width: 16px; height: 16px; }
.block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  flex-shrink: 0;
}
a.icon-btn:hover { background: var(--surface-3); }

.chip {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 999px;
  background: var(--surface-2);
}
.chip .i { width: 15px; height: 15px; color: var(--muted); }

input, textarea, select {
  width: 100%;
  padding: 11px 13px;
  margin-top: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }

label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hint { color: var(--muted); font-weight: 400; font-size: 12px; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-3);
  white-space: nowrap;
}
.badge.interviewer { background: var(--accent-soft); color: var(--interviewer); }
.badge.candidate { background: var(--success-soft); color: var(--candidate); }

/* ==========================================================================
   Telas de entrada (login, criar entrevista, lobby, aviso)
   ========================================================================== */
.lobby {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 16px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(99, 102, 241, .16), transparent 70%),
    var(--bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.01em;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 6px 18px rgba(99, 102, 241, .35);
}
.brand-mark.sm { width: 28px; height: 28px; border-radius: 8px; }
.brand-mark.sm .i { width: 16px; height: 16px; }

.card {
  width: 100%;
  max-width: 440px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.card.wide { max-width: 680px; }
.card.center { text-align: center; }
.card > .muted { margin: 0 0 24px; }
.card .badge { margin-bottom: 12px; }

.form { display: grid; gap: 16px; }
.form .muted.small { margin: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row.schedule-row { grid-template-columns: 1.4fr 1fr 1fr; }
.row.between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }

.account {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: -8px 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.file-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.file-pick:hover { border-color: var(--accent); background: var(--accent-soft); }
.file-pick input { display: none; }
.file-pick .i { color: var(--accent); }

label.inline { display: inline-flex; align-items: center; gap: 8px; }
label.inline input { width: 72px; margin: 0; padding: 8px 10px; text-align: center; }
label.inline input[type="date"] { width: auto; text-align: left; }

#login-code { font-size: 24px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }

#preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 4px 0 20px;
  background: #000;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: cover;
  transform: scaleX(-1);
}

.link-box { display: flex; align-items: center; gap: 8px; }
.link-box input { margin: 0; min-width: 0; font-size: 13px; color: var(--muted); }
.link-box .badge { flex: 0 0 116px; justify-content: center; margin: 0; }

/* ==========================================================================
   Painel do administrador
   ========================================================================== */

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.list-head h1 { margin: 0; }
.list-head p { margin: 2px 0 0; }

.search { position: relative; margin-bottom: 12px; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input { margin: 0; padding-left: 38px; }

/* Cabeçalho do painel (no estilo do Google Meet) */
.admin-app { min-height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 68px;
  padding: 0 20px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.app-header .brand { color: var(--text); text-decoration: none; justify-self: start; }
.header-center { display: flex; align-items: center; gap: 10px; }
.header-search { width: min(440px, 40vw); margin: 0; }
.header-search input { margin: 0; border-radius: 999px; background: var(--surface-2); padding-top: 10px; padding-bottom: 10px; }
.header-center .new-btn { border-radius: 999px; padding: 10px 18px; }
.header-account { position: relative; display: flex; align-items: center; justify-self: end; }
.account-btn { padding: 3px; border-radius: 50%; background: transparent; border: 0; }
.account-btn:hover, .account-btn[aria-expanded="true"] { background: var(--surface-3); }
.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  width: 300px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.account-menu-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.account-menu-id { display: grid; min-width: 0; }
.account-menu-id strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-avatar.lg { width: 44px; height: 44px; font-size: 18px; }
.menu-label { margin: 14px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.theme-switch button {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 4px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.theme-switch button:hover { color: var(--text); background: var(--surface-3); }
.theme-switch button[aria-checked="true"] { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent); }
.menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.menu-link:hover { background: var(--surface-2); }
.menu-link .i { width: 18px; height: 18px; color: var(--muted); }
.menu-link + .menu-logout { margin-top: 6px; }
.menu-logout { justify-content: flex-start; margin-top: 14px; }

/* Triagem com vários candidatos */
#screening-dialog .modal-body { display: grid; gap: 14px; }
.sg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.section-title { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
#sg-list { max-height: 360px; overflow-y: auto; }
#sg-list .status { flex-shrink: 0; }
.sg-add { display: flex; gap: 8px; align-items: flex-start; }
.sg-add textarea { margin: 0; min-height: 44px; flex: 1; resize: vertical; }
.sg-add button { flex-shrink: 0; }
.invite-note { color: var(--muted); }
.invite-note.error { color: var(--danger-text); }
.user-actions .icon-btn { width: 32px; height: 32px; background: transparent; border-color: transparent; color: var(--muted); }
.user-actions .icon-btn:hover { background: var(--surface-3); color: var(--text); }
.user-actions .button { padding: 6px 12px; font-size: 13px; }
.user-actions .icon-btn.confirm-delete { background: var(--danger); color: #fff; }

/* Teste: entrega e avaliação */
#submission-dialog .modal-body { display: grid; gap: 14px; }
#submission-dialog .back { justify-self: start; margin: 0; }
#submission-dialog .form { padding: 0; }
.delivery { display: grid; gap: 8px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; }
.delivery-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.delivery-row .i { color: var(--muted); flex-shrink: 0; width: 16px; height: 16px; }
.delivery-row a { color: var(--interviewer); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-comment { white-space: pre-wrap; color: var(--text-2); }
.test-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; width: 100%; max-width: 1180px; margin: 0 auto; padding: 40px 24px; }
.test-statement { font-size: 15px; line-height: 1.6; white-space: pre-wrap; color: var(--text-2); max-height: 60vh; overflow-y: auto; }
.test-form-title { margin: 0; font-size: 18px; }
#test-form .file-pick { display: inline-flex; }

/* Teste: aprovar ou reprovar */
.verdict { display: grid; gap: 8px; }
.verdict-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.verdict-btn { justify-content: center; padding: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.verdict-btn.approve[aria-checked="true"] { background: var(--success-soft); border-color: var(--success); color: var(--candidate); }
.verdict-btn.reject[aria-checked="true"] { background: var(--danger-soft); border-color: var(--danger); color: var(--danger-text); }
.status.approved { background: var(--success-soft); color: var(--candidate); }
.status.rejected { background: var(--danger-soft); color: var(--danger-text); }

/* Cliente (tenant) */
.tenant-chip {
  margin-left: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tenant-chip:empty { display: none; }
.menu-tenant { padding-bottom: 2px; }
.menu-tenant-name { font-weight: 600; font-size: 14px; }
.menu-tenant select { margin-top: 0; padding-top: 8px; padding-bottom: 8px; font-size: 14px; }
.tenant-add { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 8px; }
.tenant-add input { margin: 0; min-width: 0; }
#tenants-dialog .modal-body { display: grid; gap: 14px; }
#tenants-dialog .modal-body > p { margin: 0; }
.role-badge { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); }
.user-actions { display: flex; gap: 4px; flex-shrink: 0; }
.user-add select { width: auto; margin: 0; flex-shrink: 0; }

/* Usuários */
#users-dialog .modal-body { display: grid; gap: 14px; }
#users-dialog .modal-body > p { margin: 0; }
.user-add { display: flex; gap: 8px; }
.user-add input { margin: 0; flex: 1; min-width: 0; }
.user-add button { flex-shrink: 0; }
.user-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.user-main { flex: 1; min-width: 0; }
.user-email { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-email .you { margin-left: 6px; font-weight: 400; color: var(--muted); font-size: 13px; }
.user-sub { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.user-sub .i { width: 14px; height: 14px; }
.user-item .account-avatar { width: 34px; height: 34px; font-size: 14px; }
.user-item button { flex-shrink: 0; }
.account-avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
}

.admin-main { flex: 1; width: 100%; padding: 28px 24px 48px; }
.admin-main .panel {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.admin-main .panel > .muted { margin: 0 0 24px; }

/* Popup de nova entrevista / edição */
.modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow-y: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.modal[open] { animation: modal-in .18s ease-out; }
.modal:focus { outline: none; }
.modal::backdrop { background: var(--backdrop); backdrop-filter: blur(3px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 28px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.modal-head p { margin: 4px 0 0; }
.modal-close { background: transparent; border-color: transparent; color: var(--muted); }
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal .form { padding: 20px 28px 24px; }
.page-modal .modal-body { padding: 28px; }
.modal.wide { width: min(900px, calc(100vw - 32px)); }
.page-modal .detail-head h1 { font-size: 22px; }
.page-modal .modal-body { position: relative; }
.page-modal .detail-head { align-items: center; padding-right: 44px; }
.page-modal .modal-close { position: absolute; top: 18px; right: 18px; }
.modal .error { margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.modal-actions .primary { min-width: 180px; justify-content: center; }
.warning { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); }
.edit-btn { background: transparent; border-color: transparent; color: var(--muted); }
.edit-btn:hover { background: var(--surface-3); color: var(--text); }

/* Tipo: entrevista ou triagem */
.type-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type-option {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 12px 14px 12px 40px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
}
.type-option input { position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.type-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.type-option:has(input:disabled) { cursor: default; }
.type-option:has(input:disabled:not(:checked)) { opacity: .45; }
.type-name { font-size: 14px; font-weight: 600; color: var(--text); }
.type-desc { font-size: 12px; font-weight: 400; color: var(--muted); }
.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  vertical-align: middle;
}

/* Modelos de roteiro */
.header-center .header-tpl { border-radius: 999px; padding: 10px 16px; }
.tpl-view { display: grid; gap: 16px; }
.tpl-view > *, .tpl-list > li { min-width: 0; }
#tpl-editor .back { justify-self: start; margin: 0; }
#tpl-editor h1 { margin: 0; font-size: 22px; }
.tpl-name-row { grid-template-columns: 1fr 180px; }
#tpl-tabs { margin-bottom: 2px; }
#tpl-editor .file-pick { justify-self: start; }
#tpl-content { min-height: 280px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.tpl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tpl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, background .15s;
}
.tpl-item:hover { border-color: var(--border-strong); background: var(--surface-3); }
.tpl-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.tpl-link > .i { color: var(--accent); flex-shrink: 0; }
.tpl-main { flex: 1; min-width: 0; }
.tpl-name { font-weight: 600; }
.tpl-preview { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-item .button { flex-shrink: 0; padding: 7px 12px; font-size: 13px; }
.template-bar { display: flex; align-items: center; gap: 8px; margin-bottom: -8px; }
.template-bar select { flex: 1; margin: 0; padding-top: 9px; padding-bottom: 9px; }
.template-save { display: flex; align-items: center; gap: 8px; margin-bottom: -8px; }
.template-save input { flex: 1; margin: 0; padding-top: 8px; padding-bottom: 8px; }
.modal-actions .spacer { flex: 1; }

/* Menu lateral (no estilo do Google Meet): Entrevistas e Vagas */
.header-center.off { visibility: hidden; }
.admin-body { flex: 1; display: flex; min-height: 0; }
.admin-body .admin-main { min-width: 0; }
.side-nav {
  position: sticky;
  top: 68px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 96px;
  height: calc(100dvh - 68px);
  padding: 20px 8px;
}
.nav-item {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.nav-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 32px;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.nav-item:hover .nav-icon { background: var(--surface-2); }
.nav-item.active { color: var(--accent-text); font-weight: 600; }
.nav-item.active .nav-icon { background: var(--accent-soft); color: var(--accent-text); }
.nav-item:focus-visible { outline: none; }
.nav-item:focus-visible .nav-icon { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Vagas */
.jobs-view { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.jobs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.jobs-head h1 { margin: 0; font-size: 26px; font-weight: 500; }
.jobs-head p { margin: 2px 0 0; }
.new-job-btn { border-radius: 999px; padding: 10px 18px; flex-shrink: 0; }
.job-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.job-list > li { min-width: 0; }
.job-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.job-side .icon-btn { background: transparent; border-color: transparent; color: var(--muted); }
.job-side .icon-btn:hover { background: var(--surface-2); color: var(--text); }
.job-apps-pill { font-size: 13px; color: var(--muted); text-decoration: none; padding: 4px 8px; border-radius: var(--radius-sm); white-space: nowrap; }
.job-apps-pill:hover { color: var(--text); background: var(--surface-2); }
/* Talentos */
.talents-search { width: min(380px, 100%); margin: 0; }
.talent-item .account-avatar { width: 40px; height: 40px; font-size: 16px; }
.talent-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.talent-skill { padding: 2px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 500; }
#talent-dialog .modal-body { display: grid; gap: 18px; }
.talent-head { display: flex; align-items: center; gap: 14px; padding-right: 44px; }
.talent-head h1 { margin: 0; font-size: 22px; }
.talent-head p { margin: 2px 0 0; }
.talent-contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.talent-contact { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 13px; text-decoration: none; }
.talent-contact .i { width: 15px; height: 15px; color: var(--muted); }
a.talent-contact:hover { border-color: var(--border-strong); background: var(--surface-3); }
.talent-section { display: grid; gap: 4px; }
.talent-section > .app-resume-label:first-child { margin-top: 0; }
.talent-apps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.talent-app { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.talent-app-title { font-weight: 500; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
a.talent-app-title:hover { color: var(--accent-text); }
#talent-dialog .detail-actions { justify-content: flex-start; }

#job-dialog .modal-body, #job-edit-dialog .modal-body { display: grid; gap: 16px; }
#job-edit-dialog .form { padding: 0; }
#job-dialog .sg-head { align-items: center; }
.job-stages { display: grid; gap: 8px; padding: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.job-stages .muted.small { margin: 0; }
.job-stages a.hint { color: var(--accent-text); text-decoration: none; }
.job-stages a.hint:hover { text-decoration: underline; }
.job-stages select { background-color: var(--surface); }
.job-stages-info { margin: -6px 0 0; }
.job-apps-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.job-apps-bar .spacer { flex: 1; }
.job-apps-bar .check { align-items: center; }
.job-apps-bar .check input { margin: 0; }
.app-select { width: 18px; height: 18px; margin: 8px 0 0; flex-shrink: 0; accent-color: var(--accent); cursor: pointer; }
.app-item .user-actions .icon-btn.confirm-delete { background: var(--danger); color: #fff; }
.row.job-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.job-apps { display: grid; gap: 12px; }
.app-item { align-items: flex-start; }
.app-contacts { flex-wrap: wrap; gap: 4px 12px; }
.app-contacts a { color: var(--accent-text); text-decoration: none; }
.app-contacts a:hover { text-decoration: underline; }
.app-message { margin: 6px 0 0; font-size: 14px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.app-resume { margin-top: 8px; }
.app-resume summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--accent-text); }
.app-resume-label { margin-top: 10px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.app-resume .app-message { margin-top: 2px; }
.app-resume-item { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--border-strong); font-size: 14px; }
.app-resume-item .app-message { margin: 0; color: var(--muted); }

.app-item .icon-btn { background: transparent; border-color: transparent; color: var(--muted); }
.app-item .icon-btn:hover { background: var(--surface-3); color: var(--text); }
.app-item .icon-btn.confirm-delete { background: var(--danger); color: #fff; }

/* Página pública da vaga (landing page) */
.job-loading { display: grid; place-items: center; min-height: 100%; }
.job-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.job-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 420px at 15% -20%, rgba(99, 102, 241, .22), transparent 70%),
    radial-gradient(700px 380px at 95% 0%, rgba(139, 92, 246, .14), transparent 70%),
    var(--bg);
}
.job-company { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }
.job-title { margin: 0; max-width: 820px; font-size: clamp(32px, 5vw, 52px); font-weight: 800; line-height: 1.08; letter-spacing: -.035em; }
.job-summary { margin: 16px 0 0; max-width: 680px; font-size: 18px; color: var(--text-2); }
.job-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; }
.job-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 14px;
  font-weight: 500;
}
.job-facts .i { width: 16px; height: 16px; color: var(--accent-text); }
.job-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.job-hero-actions .job-cta { padding: 13px 28px; border-radius: 999px; font-size: 15px; box-shadow: 0 10px 28px rgba(99, 102, 241, .35); }
.job-share { padding: 13px 22px; border-radius: 999px; }
.job-closed { display: inline-block; margin: 28px 0 0; padding: 10px 16px; border-radius: var(--radius); background: var(--warning-soft); color: var(--warning); font-weight: 500; }
.job-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; padding-top: 48px; padding-bottom: 64px; align-items: start; }
.job-content { display: grid; gap: 40px; }
.job-content h2 { font-size: 22px; font-weight: 700; margin: 0 0 14px; }
.job-text { color: var(--text-2); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.job-text p { margin: 0 0 14px; }
.job-text h3 { margin: 24px 0 8px; font-size: 17px; color: var(--text); }
.job-text ul { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 8px; }
.job-text li { position: relative; padding-left: 26px; }
.job-text li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.job-text > :last-child { margin-bottom: 0; }
.job-aside { position: sticky; top: 24px; }
.job-apply { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); scroll-margin-top: 24px; }
.job-apply h2 { font-size: 20px; font-weight: 700; }
.job-apply .error { margin: 0; }
.job-done { display: grid; justify-items: center; gap: 8px; text-align: center; }
.job-done p { margin: 0; }
.job-done-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.job-done-icon .i { width: 26px; height: 26px; }
.job-aside-facts { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 10px; font-size: 14px; color: var(--text-2); }
.job-aside-facts li { display: flex; align-items: center; gap: 10px; }
.job-aside-facts .i { width: 16px; height: 16px; color: var(--accent-text); }
.job-aside-cta { padding: 13px 20px; font-size: 15px; }
.job-apply h2 + p { margin: 6px 0 0; }

/* Inscrição em etapas */
.apply-modal { width: min(640px, calc(100vw - 32px)); }
.apply-form textarea { min-height: 0; }
.apply-form fieldset { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cv-upload { display: grid; gap: 10px; justify-items: start; padding: 16px; background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius); }
.cv-upload p { margin: 0; }
.cv-upload .file-pick { background: var(--surface); }
.autofill-status { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.autofill-status.loading { color: var(--accent-text); }
.autofill-status.loading::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.autofill-status.ok { color: var(--candidate); }
.autofill-status.error { color: var(--danger-text); }
@keyframes spin { to { transform: rotate(360deg); } }
.items-field { display: grid; gap: 10px; }
.items-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.items-title { font-size: 13px; font-weight: 500; color: var(--text-2); }
.items-empty { margin: 0; padding: 14px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.item-list { display: grid; gap: 10px; }
.apply-form .resume-item { gap: 12px; padding: 14px 16px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.resume-item input, .resume-item select, .resume-item textarea { background-color: var(--surface); min-width: 0; }
.resume-item input:disabled { opacity: .5; }
.resume-item .row { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.resume-item .row.row-3 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
.resume-item-head { display: flex; justify-content: space-between; align-items: center; }
.resume-item-title { font-size: 13px; }
.resume-item-head .icon-btn { width: 30px; height: 30px; background: transparent; border-color: transparent; color: var(--muted); }
.resume-item-head .icon-btn:hover { background: var(--surface-3); color: var(--danger-text); }
.stepper { list-style: none; display: flex; gap: 8px; margin: 0 0 4px; padding: 0; counter-reset: step; }
.stepper li { flex: 1; display: grid; gap: 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.stepper li::before { content: ''; height: 4px; border-radius: 999px; background: var(--surface-3); transition: background .2s; }
.stepper li.active::before, .stepper li.done::before { background: var(--accent); }
.stepper li.active { color: var(--text); }
.stepper li.done { color: var(--text-2); }
.step-n { display: none; }
.apply-review { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 16px; margin: 0; padding: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; }
.apply-review dt { display: grid; align-content: start; gap: 2px; color: var(--muted); font-weight: 500; }
.apply-review dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 9.5em; overflow: auto; }
.link-btn { justify-self: start; padding: 0; border: 0; background: none; color: var(--accent-text); font-size: 12px; font-weight: 500; }
.link-btn:hover { background: none; text-decoration: underline; }
.apply-actions { align-items: center; }
.apply-done { display: grid; justify-items: center; gap: 10px; padding: 40px 28px 32px; text-align: center; }
.apply-done p { margin: 0 0 8px; max-width: 420px; }
.job-footer { padding: 24px; text-align: center; border-top: 1px solid var(--border); }
.job-page .toast { bottom: 24px; }

/* Agenda (tela principal) */
.agenda-view { max-width: 1240px; margin: 0 auto; }
.agenda-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; padding: 0 18px; }
.agenda-title { display: flex; align-items: center; gap: 10px; position: relative; }
.agenda-title h1 { margin: 0; font-size: 26px; font-weight: 500; }
.agenda-title .icon-btn { background: transparent; border-color: transparent; color: var(--muted); }
.agenda-title .icon-btn:hover { background: var(--surface-2); color: var(--text); }
.visually-hidden { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.week-strip { display: flex; align-items: center; gap: 6px; }
.week-strip .icon-btn { background: transparent; border-color: transparent; color: var(--muted); }
.week-strip .icon-btn:hover { background: var(--surface-2); color: var(--text); }
.week-days { display: flex; gap: 4px; }
.week-day {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 58px;
  padding: 8px 0;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
}
.week-day:hover { background: var(--surface-2); }
.week-day .wd { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.week-day .dn { font-size: 18px; color: var(--text); }
.week-day.today .wd, .week-day.today .dn { color: var(--interviewer); font-weight: 700; }
.week-day.selected { background: var(--accent-soft); }
.week-day.selected .dn { color: var(--interviewer); }
.week-day.has-items::after { content: ''; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

.agenda { display: grid; gap: 28px; }
.day-group h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 12px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.day-group h2 .day-sub { color: var(--muted); font-weight: 400; font-size: 13px; }

.agenda-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: border-color .15s, background .15s;
}
.agenda-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.agenda-item.now { border-color: rgba(99, 102, 241, .5); background: linear-gradient(90deg, var(--accent-soft), var(--surface) 60%); }
.agenda-item.past { opacity: .65; }
.agenda-link {
  display: block;
  flex: 1;
  min-width: 0;
  padding: 22px 0 22px 28px;
  color: var(--text);
  text-decoration: none;
  border-radius: 20px;
}
.agenda-link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.agenda-when { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.agenda-item .iv-title { font-size: 21px; font-weight: 500; margin-top: 2px; }
.agenda-item .iv-meta { font-size: 14px; margin-top: 4px; }
.agenda-item .iv-side .button { padding: 9px 20px; border-radius: 999px; }
.starts-in { font-size: 13px; font-weight: 600; color: var(--interviewer); white-space: nowrap; }

.iv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.iv-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s;
}
.iv-item:hover { border-color: var(--border-strong); background: var(--surface-3); }
.iv-item:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.iv-main { min-width: 0; }
.iv-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; font-size: 13px; color: var(--muted); }
.iv-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.open { background: var(--success-soft); color: var(--candidate); }
.status.ended { background: var(--surface-3); color: var(--muted); }
.status.expired { background: var(--warning-soft); color: var(--warning); }

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger-text);
}
.live::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.6s ease-in-out infinite;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 40px 16px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.empty-state p { margin: 0; }
.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 16px -4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.back:hover { color: var(--text); }
.back .i { width: 16px; height: 16px; }

#view-detail .modal-body { display: grid; gap: 12px; }
#view-detail .modal-body > .muted.small { margin: 0; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.detail-head h1 { margin: 0; }
.detail-head p { margin: 2px 0 0; }
.online-box {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger-text);
  font-size: 13px;
  font-weight: 500;
}
.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.meta-item {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.meta-label { font-size: 12px; color: var(--muted); }
.meta-value { font-size: 14px; font-weight: 500; }
.invite-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.invite-box > .i { color: var(--muted); width: 16px; height: 16px; }
.invite-text { flex: 1; min-width: 0; }
.invite-text strong { font-weight: 600; }
.invite-box.error { border-color: var(--danger-soft); background: var(--danger-soft); }
.invite-box.error > .i, .invite-box.error .invite-text { color: var(--danger-text); }
.invite-box.sent > .i { color: var(--success); }
.invite-box button { flex-shrink: 0; }
.detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.actions-right { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
button.danger-ghost { background: transparent; border-color: transparent; color: var(--danger-text); }
button.danger-ghost:hover { background: var(--danger-soft); }
button.danger-ghost[data-confirm] { background: var(--danger); color: #fff; }

/* Transcrição e anotações */
#view-report .modal-body { display: grid; gap: 16px; }
#view-report .back { justify-self: start; margin-bottom: 0; max-width: calc(100% - 44px); }
#report-back-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-head .button { flex-shrink: 0; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: fit-content;
}
.tab {
  padding: 7px 14px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}
.tab:hover { background: var(--surface-3); color: var(--text); }
.tab.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.tab-count {
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.tab-count:empty { display: none; }

.report-panel { display: grid; gap: 10px; }
.report-panel[hidden] { display: none; }

.report-summary { display: grid; gap: 8px; margin-bottom: 4px; }
.report-summary-text { font-size: 14px; color: var(--text-2); }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--success); transition: width .3s; }

.q-card {
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.q-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.q-number {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.q-card-title { font-weight: 600; line-height: 1.4; margin-bottom: 10px; }
.q-card-title .star { margin-right: 6px; }
.answer-status {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.answer-status.ok { background: var(--success-soft); color: var(--candidate); }
.answer-status.partial { background: var(--warning-soft); color: var(--warning); }
.answer-status.none { background: var(--surface-3); color: var(--muted); }

.report-transcript { display: grid; gap: 2px; }
.q-divider {
  margin: 14px 0 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--interviewer);
}
.q-divider:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.seg { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 8px 0; }
.seg-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.seg-who { font-size: 13px; font-weight: 600; }
.seg-who.interviewer { color: var(--interviewer); }
.seg-who.candidate { color: var(--candidate); }
.seg-text { margin: 2px 0 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }

/* ==========================================================================
   Chamada
   ========================================================================== */
.call {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  background: var(--bg);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
#call-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger-text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); }
  50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

.stage {
  display: flex;
  gap: 12px;
  min-height: 0;
  padding: 0 16px;
}

.grid-wrap {
  flex: 1;
  position: relative;
  display: flex;
  min-width: 0;
}
.grid {
  flex: 1;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: minmax(180px, 1fr);
  overflow: auto;
}

.waiting {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  box-shadow: var(--shadow);
}

.tile {
  position: relative;
  overflow: hidden;
  background: #050608;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(10, 11, 15, .6);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 500;
}
.tile .label .badge { padding: 1px 8px; font-size: 11px; }
.tile .avatar {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  font-size: 40px;
  font-weight: 600;
  color: #fff;
  background: radial-gradient(circle at center, var(--surface-3), var(--surface) 70%);
}
.tile .avatar::before {
  content: '';
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  z-index: -1;
}
.tile.no-video .avatar { display: grid; isolation: isolate; }

/* Própria câmera: miniatura flutuante no canto superior esquerdo */
.tile.local {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: clamp(150px, 20%, 260px);
  aspect-ratio: 16 / 9;
  border: 2px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.tile.local video { transform: scaleX(-1); }
.tile.local.screen video { transform: none; object-fit: contain; }
.tile.local .label {
  left: 8px;
  right: 8px;
  bottom: 8px;
  width: fit-content;
  max-width: calc(100% - 16px);
  padding: 2px 8px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.tile.local .label .badge { display: none; }
.tile.local .avatar { font-size: 22px; }
.tile.local .avatar::before { width: 48px; height: 48px; }

/* Barra de controles flutuante */
.controls { display: flex; justify-content: center; min-width: 0; padding: 16px; }
.control-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.ctl {
  position: relative;
  flex-direction: column;
  gap: 4px;
  min-width: 72px;
  padding: 8px 10px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}
.ctl .i { width: 20px; height: 20px; }
.ctl span { color: var(--muted); }
.ctl:hover { background: var(--surface-2); }
.ctl .i-off { display: none; }
.ctl.off { color: var(--danger-text); background: var(--danger-soft); }
.ctl.off .i-on { display: none; }
.ctl.off .i-off { display: block; }
.ctl.off span { color: var(--danger-text); }
.ctl.active { color: var(--accent-text); background: var(--accent-soft); }
.ctl.active span { color: var(--accent-text); }
.ctl.unread::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 22px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
}
.ctl.leave { color: var(--danger-text); }
.ctl.leave:hover { background: var(--danger-soft); }
.divider { width: 1px; height: 32px; margin: 0 4px; background: var(--border-strong); }
.end { border-radius: 14px; padding: 12px 16px; margin-left: 4px; }

/* ==========================================================================
   Painéis laterais (assistente e chat)
   ========================================================================== */
.side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.assistant { width: 400px; }
.chat { width: 320px; }

.side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 57px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--border);
}
.side-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.side-title .i { color: var(--accent); }
.side-head .icon-btn { width: 32px; height: 32px; background: transparent; border-color: transparent; color: var(--muted); }
.side-head .icon-btn:hover { background: var(--surface-2); color: var(--text); }

.section-label {
  padding: 12px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.composer {
  display: flex;
  gap: 8px;
  padding: 12px;
}
.composer input { margin: 0; padding: 9px 12px; }
.composer .icon-btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.composer .icon-btn.primary:hover { background: var(--accent-hover); }

/* Triagem (tela do candidato) */
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.screening-info { margin: 0; padding: 12px 14px 12px 32px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--text-2); display: grid; gap: 4px; }
.screening { min-height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.screening-top { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.screening-top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screening-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px;
}
.screening-card {
  display: grid;
  gap: 18px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.scr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scr-section { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.scr-question { margin: 6px 0 0; font-size: 28px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.scr-hint { margin: 0; font-size: 14px; }
.scr-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; border-top: 1px solid var(--border); }
.scr-footer .primary { padding: 12px 22px; font-size: 15px; }
.mic-meter { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mic-meter .i { color: var(--muted); flex-shrink: 0; }
.mic-bar { width: 120px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; flex-shrink: 0; }
#scr-level { display: block; height: 100%; width: 0; background: var(--success); border-radius: inherit; transition: width .08s linear; }
.mic-meter.hearing .i { color: var(--success); }
.scr-video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transform: scaleX(-1); background: #000; border: 1px solid var(--border); border-radius: var(--radius-lg); }

/* Assistente */
.side-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 12px 10px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.side-tab {
  position: relative;
  justify-content: center;
  padding: 7px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.side-tab:hover { background: var(--surface-3); color: var(--text); }
.side-tab.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.side-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.side-pane[hidden] { display: none; }
.side-pane .script { max-height: 60%; }
.ai-pane .assistant-actions { border-top: 0; padding-top: 0; }
.answers:empty::before {
  content: 'Use os atalhos ou faça uma pergunta. O assistente responde com base na transcrição e no roteiro.';
  display: block;
  padding: 16px 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.transcription-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.script {
  flex-shrink: 0;
  max-height: 55%;
  overflow-y: auto;
  margin: 0 12px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.script-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
#script-status { text-align: right; }
.script-progress {
  font-size: 12px;
  font-weight: 600;
  color: var(--interviewer);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.script-section {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.script-question {
  margin: 6px 0 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.01em;
}
.script-question .star { margin-right: 6px; }

.points { list-style: none; margin: 0 0 4px; padding: 0; font-size: 13px; }
.points li {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  color: var(--muted);
  line-height: 1.4;
}
.points li::before {
  content: '';
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--check-border);
}
.points li.covered { color: var(--text); }
.points li.covered::before {
  border-color: var(--success);
  background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.notes-title {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.notes { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.45; }
.notes li { margin-bottom: 4px; }
.notes li::marker { color: var(--accent); }

.script-nav { display: flex; gap: 8px; margin-top: 14px; }
.script-nav .next { flex: 1; transition: background .25s, box-shadow .25s, color .25s; }
.script-nav .next.ready {
  background: var(--success);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 0 4px var(--success-soft);
}
.script-nav .next.ready:hover { background: #2fd36b; }
.evaluating { color: var(--interviewer); }
.evaluating::before { content: '● '; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

.transcript {
  flex: 1 1 40%;
  min-height: 80px;
  margin: 0;
  padding: 0 16px 8px;
  overflow-y: auto;
  list-style: none;
  font-size: 14px;
}
.transcript li { margin-bottom: 8px; line-height: 1.45; color: var(--text-2); }
.transcript .who { font-weight: 600; margin-right: 6px; }
.transcript .who.interviewer { color: var(--interviewer); }
.transcript .who.candidate { color: var(--candidate); }
.transcript .empty { color: var(--muted); font-size: 13px; }

.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 12px 0;
  border-top: 1px solid var(--border);
}

.answers {
  flex: 1 1 60%;
  min-height: 80px;
  padding: 0 12px 12px;
  overflow-y: auto;
}
.answer {
  margin-bottom: 8px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
}
.answer .q { margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--interviewer); }
.answer .text { white-space: pre-wrap; color: var(--text-2); }
.answer.loading .text { color: var(--muted); }
.answer.error .text { color: var(--danger); }

/* Chat */
#messages {
  flex: 1;
  margin: 0;
  padding: 14px 16px;
  overflow-y: auto;
  list-style: none;
}
#messages li { margin-bottom: 14px; word-wrap: break-word; font-size: 14px; }
#messages .who { font-weight: 600; font-size: 13px; color: var(--interviewer); }
#messages .who.candidate { color: var(--candidate); }
#messages .when { margin-left: 6px; font-size: 11px; color: var(--muted); }
#messages li div { margin-top: 2px; color: var(--text-2); }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  z-index: 10;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ==========================================================================
   Telas menores
   ========================================================================== */
@media (max-width: 900px) {
  .assistant, .chat {
    position: fixed;
    inset: 12px 12px 100px;
    width: auto;
    z-index: 5;
    box-shadow: var(--shadow-lg);
  }
  /* Em tela pequena o painel inteiro rola, para o campo de pergunta nunca ficar escondido */
  .assistant { overflow-y: auto; }
  .assistant > * { flex-shrink: 0; }
  .assistant .script { max-height: none; overflow: visible; }
  .assistant .side-pane { flex: none; }
  .assistant .transcript, .assistant .answers { flex: none; max-height: 260px; }
}

@media (max-width: 900px) {
  .job-body { grid-template-columns: 1fr; gap: 40px; }
  .job-aside { position: static; }
}

@media (max-width: 640px) {
  .screening-main, .test-main { grid-template-columns: 1fr; padding: 16px 12px; gap: 12px; }
  .type-switch { grid-template-columns: 1fr; }
  .scr-video { order: -1; width: 120px; aspect-ratio: 3 / 4; justify-self: end; }
  .screening-card { padding: 20px; }
  .scr-question { font-size: 22px; }
  .scr-footer { flex-direction: column; align-items: stretch; }
  .scr-footer .primary { width: 100%; }
  .card { padding: 24px 20px; }
  .row { grid-template-columns: 1fr; }
  .list-head { flex-direction: column; }
  .iv-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .row.schedule-row { grid-template-columns: 1fr 1fr; }
  .row.schedule-row label:first-child { grid-column: 1 / -1; }
  .app-header { grid-template-columns: auto 1fr auto; gap: 10px; height: 60px; padding: 0 12px; }
  .brand-name, .tenant-chip { display: none; }
  .tenant-add { grid-template-columns: 1fr; }
  .sg-add { flex-direction: column; align-items: stretch; }
  #sg-list .user-item { flex-wrap: wrap; }
  #sg-list .user-main { flex-basis: calc(100% - 50px); }
  .user-add { flex-wrap: wrap; }
  .user-add input { flex-basis: 100%; }
  .header-search { width: auto; flex: 1; }
  .header-center { min-width: 0; }
  .header-center .new-btn { padding: 10px 12px; }
  .new-btn span, .header-tpl span { display: none; }
  .header-center .header-tpl { padding: 10px 12px; }
  .template-bar { flex-wrap: wrap; }
  .template-bar select { flex-basis: 100%; }
  .tpl-item { flex-wrap: wrap; }
  .tpl-link { flex-basis: 100%; }
  .tpl-item .button { width: 100%; }
  .admin-main { padding: 20px 12px 40px; }
  .admin-main .panel { padding: 24px 20px; }
  .modal { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .modal-head { padding: 18px 20px 14px; }
  .modal .form { padding: 16px 20px 24px; }
  .page-modal .modal-body { padding: 20px; }
  .page-modal .modal-close { top: 12px; right: 12px; }
  .page-modal .detail-head { align-items: flex-start; }
  .modal.wide { width: 100vw; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
  .agenda-head { flex-direction: column; align-items: stretch; gap: 14px; padding: 0 4px; }
  .agenda-title h1 { font-size: 22px; }
  .week-strip { justify-content: space-between; }
  .week-days { flex: 1; justify-content: space-between; gap: 0; }
  .week-day { width: auto; flex: 1; }
  .week-day .dn { font-size: 16px; }
  .day-group h2 { margin-left: 4px; }
  .agenda-item { flex-direction: column; align-items: stretch; gap: 0; padding: 0 18px 16px 0; }
  .agenda-link { padding: 18px 0 10px 18px; }
  .agenda-item .iv-title { font-size: 18px; }
  .agenda-item .iv-side { padding-left: 18px; flex-wrap: wrap; }
  .iv-title { white-space: normal; }
  .detail-actions { flex-direction: column-reverse; align-items: stretch; }
  .actions-right { flex-direction: column-reverse; }
  .detail-actions .button, .detail-actions button { width: 100%; }
  .detail-head { flex-direction: column; }
  .tabs { width: 100%; }
  .tab { flex: 1; }
  .seg { grid-template-columns: 1fr; gap: 2px; }
  .topbar { padding: 10px 12px; }
  .stage { padding: 0 8px; }
  .grid { grid-template-columns: 1fr; }
  .tile.local { width: 96px; aspect-ratio: 3 / 4; top: 8px; left: 8px; }
  .controls { padding: 10px 8px; }
  .control-bar { width: 100%; justify-content: space-between; gap: 2px; padding: 6px; }
  .ctl { min-width: 40px; padding: 8px 6px; }
  .ctl span { display: none; }
  #share-screen, .divider { display: none; }
  .end { padding: 10px; font-size: 12px; white-space: nowrap; margin-left: 2px; }
  .toast { bottom: 88px; }
  #copy-candidate-link { font-size: 0; gap: 0; padding: 6px 8px; }
  /* Menu lateral vira barra inferior */
  .side-nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9;
    flex-direction: row;
    justify-content: space-around;
    width: auto;
    height: auto;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
  }
  .admin-body .admin-main { padding-bottom: 96px; }
  .jobs-head { flex-direction: column; align-items: stretch; }
  .job-item { flex-wrap: wrap; }
  .job-item .tpl-link { flex-basis: 100%; }
  .job-side { width: 100%; }
  .job-side .status { margin-right: auto; }
  .row.job-row-3 { grid-template-columns: 1fr; }
  .job-hero { padding: 48px 0 36px; }
  .job-wrap { padding-left: 16px; padding-right: 16px; }
  .job-summary { font-size: 16px; }
  .job-hero-actions > * { flex: 1; }
  .job-apply { padding: 22px 18px; }
  .apply-modal { width: 100vw; }
  .apply-review { grid-template-columns: 1fr; gap: 2px; }
  .resume-item .row.row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resume-item .row-3 label:first-child { grid-column: 1 / -1; }
  .items-head { flex-wrap: wrap; }
  .apply-review dd { margin-bottom: 10px; }
  .apply-actions { flex-direction: row; }
  .apply-actions button { width: auto; }
  .apply-actions .primary { flex: 1; min-width: 0; }
}
