* { box-sizing: border-box; }

:root {
  --accent: #dc2626;
  --accent-dark: #991b1b;
  --accent-light: #ef4444;
  --bg: #17181b;
  --card: #232427;
  --card-alt: #1a1b1e;
  --border: #35363a;
  --text: #e4e4e7;
  --text-dim: #a1a1aa;
  --text-faint: #71717a;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.55;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a3b40; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #4a4b52; }

::selection { background: rgba(220,38,38,0.35); }

.container {
  max-width: 420px;
  margin: 60px auto;
  background: var(--card);
  padding: 32px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

.auth-container {
  margin: 8vh auto;
  padding: 36px 34px;
}
.auth-header { text-align: center; margin-bottom: 26px; }
.auth-logo {
  width: 62px;
  height: 62px;
  border-radius: 13px;
  object-fit: cover;
  margin-bottom: 14px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.4);
}
.auth-header h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.auth-sub { margin: 5px 0 0; font-size: 13.5px; color: var(--text-faint); }
.auth-footer { text-align: center; margin: 22px 0 0; font-size: 13.5px; }
body:has(.auth-container) { background-image: radial-gradient(circle at 50% 0%, rgba(220,38,38,0.13), transparent 55%); }

.container.wide { max-width: 1360px; margin: 0; background: none; border: none; box-shadow: none; padding: 0; }

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 268px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 26px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.sidebar-logo { font-size: 20px; }
.sidebar-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border-radius: 11px;
  color: var(--text-dim);
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.13s ease, color 0.13s ease, border-color 0.13s ease;
}
.sidebar-link:hover { background: var(--card-alt); color: var(--text); border-color: var(--border); text-decoration: none; }
.sidebar-link.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 3px 14px rgba(220,38,38,0.35);
}
.sidebar-icon { font-size: 17px; width: 20px; text-align: center; }
.sidebar-link .pill-badge { margin-left: auto; }

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  padding: 8px;
  border-radius: 10px;
  min-width: 0;
  border: 1px solid transparent;
  transition: background 0.13s ease, border-color 0.13s ease;
}
.sidebar-profile:hover { background: var(--card-alt); border-color: var(--border); text-decoration: none; }
.sidebar-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sidebar-username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-logout {
  color: var(--text-faint);
  font-size: 18px;
  padding: 10px;
  border-radius: 9px;
  flex-shrink: 0;
  line-height: 1;
  border: 1px solid transparent;
  transition: background 0.13s ease, border-color 0.13s ease;
}
.sidebar-logout:hover { background: var(--card-alt); border-color: var(--border); text-decoration: none; }

.main-content {
  flex: 1;
  min-width: 0;
  padding: 34px 38px 60px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px;
    box-sizing: border-box;
    gap: 8px;
  }
  .sidebar-header { padding: 4px 8px; }
  .sidebar-title { display: none; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; flex: none; gap: 4px; }
  .sidebar-link { padding: 10px 12px; }
  .sidebar-link span:not(.sidebar-icon):not(.pill-badge) { display: none; }
  .sidebar-footer { margin-left: auto; border-top: none; padding-top: 0; margin-top: 0; }
  .sidebar-username { display: none; }
  .sidebar-avatar { width: 32px; height: 32px; }
  .main-content { padding: 20px 16px 40px; }
  .page-title { font-size: 20px; margin-bottom: 18px; }
}

h1 { margin-top: 0; font-size: 22px; letter-spacing: -0.01em; }
h2 { font-size: 12.5px; color: var(--text-faint); margin: 34px 0 2px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }

label { display: block; margin: 16px 0 6px; font-size: 13px; color: var(--text-dim); font-weight: 600; }
label.checkbox-label { display: flex; align-items: center; gap: 8px; margin-top: 0; font-size: 14px; color: var(--text); font-weight: 400; }

input[type=text], input[type=password], select, input[type=file], textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--card-alt);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.18);
}

button {
  margin-top: 20px;
  padding: 11px 20px;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  font-size: 13.5px;
  font-family: inherit;
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
}

button:hover { background: var(--accent-light); box-shadow: 0 3px 12px rgba(220,38,38,0.28); }
button:active { transform: scale(0.98); }
button.danger { background: transparent; border: 1px solid #7f1d1d; color: #f87171; margin-left: 8px; box-shadow: none; }
button.danger:hover { background: #3a1a1c; border-color: #b91c1c; box-shadow: none; }
button.secondary { background: var(--card-alt); border: 1px solid var(--border); color: var(--text); }
button.secondary:hover { background: var(--card); border-color: #45464c; box-shadow: none; }

.alert {
  padding: 13px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert.erro { background: #3a1a1c; color: #f87171; border: 1px solid #7f1d1d; }
.alert.sucesso { background: #14261c; color: #4ade80; border: 1px solid #166534; }

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }
p { font-size: 14px; color: var(--text-dim); }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 0;
  padding-bottom: 16px;
}
.topbar h1 { display: flex; align-items: center; gap: 8px; }
.topbar h1::before { content: '🚩'; font-size: 20px; }
.user-chip { font-size: 13px; color: var(--text-dim); }
.user-chip a { color: var(--text-dim); font-weight: 600; }
.user-chip a:hover { color: var(--accent-light); text-decoration: none; }

.pill-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 14px 0 26px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.pill:hover { color: var(--text); border-color: var(--accent-light); text-decoration: none; }
.pill.active { background: var(--accent); border-color: var(--accent); color: white; }

.pill-badge {
  background: var(--accent);
  color: white;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 800;
  margin-left: 6px;
}
.pill.active .pill-badge { background: white; color: var(--accent-dark); }

.cargo-badge { background: var(--card-alt); color: var(--accent-light); border: 1px solid var(--border); font-size: 12px; vertical-align: middle; }

/* Hero / call-to-action */
.hero {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 14px;
  padding: 30px 34px;
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(220,38,38,0.25);
}
.hero-text h2 { margin: 0 0 4px; color: white; font-size: 20px; text-transform: none; letter-spacing: 0; }
.hero-text p { margin: 0; color: rgba(255,255,255,0.85); font-size: 13.5px; }
.btn-cta {
  background: white;
  color: var(--accent-dark);
  font-weight: 800;
  padding: 13px 30px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  margin-top: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.btn-cta:hover { transform: translateY(-1px); opacity: 1; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.stat-card {
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.stat-card:hover { border-color: #45464c; transform: translateY(-1px); }
.stat-card-alert { border-color: var(--accent); background: rgba(220,38,38,0.06); }
.stat-card-alert:hover { border-color: var(--accent-light); }
.stat-card-label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; }
.stat-card-value { font-size: 30px; font-weight: 800; margin-top: 6px; color: var(--text); letter-spacing: -0.02em; line-height: 1.15; }
.stat-card-alert .stat-card-value { color: var(--accent-light); }

.activity-feed {
  margin-top: 14px;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 18px;
}
.activity-feed > p { padding: 14px 0; margin: 0; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon { font-size: 16px; }
.activity-item span:nth-child(2) { flex: 1; color: var(--text); }
.activity-time { color: var(--text-faint); font-size: 12px; white-space: nowrap; }

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: white;
  flex-shrink: 0;
}
.profile-name { margin: 0; text-transform: none; font-size: 20px; letter-spacing: 0; color: var(--text); }
.profile-sub { margin: 2px 0 0; }
.profile-risk { margin-left: auto; }

.profile-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.profile-actions form { margin: 0; }
.btn-acao {
  background: var(--card-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  cursor: pointer;
  transition: all 0.14s ease;
}
.btn-acao:hover { background: var(--card); border-color: var(--accent); color: var(--accent-light); box-shadow: none; }
.btn-acao-danger:hover { border-color: #b91c1c; color: #f87171; background: #2a1618; }

.warn-alvo {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 4px 0 6px;
  font-size: 14px;
}
.warn-alvo-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--text);
}

.badge.gravidade-leve { background: #1e2a3a; color: #60a5fa; }
.badge.gravidade-media { background: #3a2e14; color: #fbbf24; }
.badge.gravidade-grave { background: #3a1a1c; color: #f87171; }

.badge.risco-nenhum { background: #14261c; color: #4ade80; }
.badge.risco-baixo { background: #1e2a3a; color: #60a5fa; }
.badge.risco-medio { background: #3a2e14; color: #fbbf24; }
.badge.risco-alto { background: #3a1a1c; color: #f87171; }

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.account-card {
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}
.account-card h2 { margin-top: 0; }
.account-avatar-preview { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); display: inline-block; }

/* Toggle switches */
.toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 21px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.15s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 15px;
  width: 15px;
  left: 2px;
  top: 2px;
  background: var(--text-faint);
  border-radius: 50%;
  transition: 0.15s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(17px); background: white; }

.perm-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--text-dim);
}
.perm-toggle-row.destaque { color: var(--accent-light); font-weight: 700; }

/* Cargo cards (arrastáveis) */
.cargos-lista { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.cargo-card {
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: grab;
  transition: box-shadow 0.15s, transform 0.1s;
}
.cargo-card:active { cursor: grabbing; }
.cargo-card.dragging { opacity: 0.4; }
.cargo-card.drag-over { box-shadow: 0 0 0 2px var(--accent-light) inset; }

.cargo-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.drag-handle { font-size: 18px; color: var(--text-faint); user-select: none; }
.cargo-card-nome { font-weight: 800; font-size: 15px; flex: 1; min-width: 100px; }

.color-picker-group { display: flex; align-items: center; gap: 6px; }
.color-swatch-input {
  width: 30px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 7px; cursor: pointer; background: none;
}
.color-hex-input { width: 84px; padding: 6px 8px; font-size: 12.5px; font-family: monospace; }

.cargo-card-perms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2px 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.cargos-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.discord-linked { display: flex; align-items: center; gap: 12px; }
.discord-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.profile-avatar-img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.mini-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 6px; }
.mc-head { width: 22px; height: 22px; border-radius: 5px; vertical-align: middle; margin-right: 8px; image-rendering: pixelated; }

.avatar-generic {
  display: inline-block;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.mini-avatar.avatar-generic { border: none; vertical-align: middle; }

.stat-box {
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-dim);
}
.stat-box strong { color: var(--accent-light); font-size: 16px; }

.search-form { margin: 20px 0; display: flex; gap: 8px; }
.search-form input { flex: 1; }
.search-form button { margin-top: 0; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 14px;
  font-size: 13.5px;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
thead th { background: rgba(255,255,255,0.02); white-space: nowrap; }
th { color: var(--text-dim); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: rgba(255,255,255,0.025); }
td a { font-weight: 600; }

.tabela-scroll { overflow-x: auto; margin-top: 14px; }
.tabela-scroll table { margin-top: 0; }
.celula-nome { display: flex; align-items: center; gap: 9px; white-space: nowrap; }

.acoes-celula { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.acoes-celula form { margin: 0; }
.link-acao { font-size: 12.5px; font-weight: 700; }
.btn-mini {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  cursor: pointer;
  transition: all 0.13s ease;
}
.btn-mini:hover { background: var(--bg); color: var(--text); box-shadow: none; }
.btn-mini-danger:hover { background: #2a1618; border-color: #b91c1c; color: #f87171; }

.secao-divisoria {
  height: 1px;
  background: var(--border);
  margin: 42px 0 6px;
}
.secao-desc {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 6px 0 0;
}

.modal-box p:first-of-type { margin-top: 0; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
label { user-select: none; }
.meta-card { transition: border-color 0.15s ease; }
.meta-card:hover { border-color: #45464c; }
.cargo-card { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.cargo-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.hero { transition: box-shadow 0.2s ease; }
.pagination a { transition: background 0.13s ease, border-color 0.13s ease; }
.pagination a:hover { border-color: var(--accent); text-decoration: none; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.pendente { background: #3a2e14; color: #fbbf24; }
.badge.aprovado { background: #14261c; color: #4ade80; }
.badge.rejeitado { background: #3a1a1c; color: #f87171; }
.badge.ativo { background: #14261c; color: #4ade80; }
.badge.apagada { background: #2a2a2d; color: #71717a; }

.motivo-rejeicao {
  font-size: 12px;
  color: #f87171;
  margin-top: 5px;
  max-width: 260px;
  line-height: 1.4;
}

.linha-apagada { opacity: 0.45; }
.linha-apagada:hover { opacity: 0.7; }

.pagination { display: flex; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pagination a { padding: 6px 12px; border-radius: 6px; background: var(--card-alt); border: 1px solid var(--border); }
.pagination a.active { background: var(--accent); border-color: var(--accent); color: white; }

.meta-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.meta-card-info { flex: 1; min-width: 200px; font-size: 14px; }
.meta-card-nota { color: var(--text-dim); margin-top: 4px; }
.meta-card-data { color: var(--text-faint); font-size: 12px; margin-top: 4px; }
.meta-card-img { width: 130px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.meta-card-actions form { display: flex; gap: 8px; }
.meta-card-actions button { margin-top: 0; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--card);
  border-radius: 16px;
  padding: 30px;
  max-width: 440px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0,0,0,0.5);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { margin: 0; text-transform: none; letter-spacing: 0; font-size: 18px; color: var(--text); }
.modal-close {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 22px;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  line-height: 1;
}
.modal-close:hover { color: var(--text); opacity: 1; }

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 200;
  flex-direction: column;
}
.lightbox-overlay.open { display: flex; }

.lightbox-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.lightbox-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e4e4e7;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.13s ease;
}
.lightbox-btn:hover { background: rgba(255,255,255,0.16); text-decoration: none; box-shadow: none; color: white; }
.lightbox-fechar { margin-left: auto; }
.lightbox-fechar:hover { background: var(--accent); border-color: var(--accent); }
.lightbox-nivel {
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 700;
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.lightbox-palco {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox-palco.arrastavel { cursor: grab; }
.lightbox-palco.arrastavel:active { cursor: grabbing; }
.lightbox-palco img {
  display: block;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  max-width: none;
  user-select: none;
  margin: auto;
}
