/* ==========================================================================
   GERENCIADOR DE CAMPANHAS — PREMIUM DARK & GOLD
   Tema: Tormenta Style
   ========================================================================== */

@font-face {
  font-family: "Tormenta";
  src: url("Tormenta.ttf") format("truetype");
}

:root {
  /* Tema Padrão: Sangue */
  --bg-dark-base: #0a0404;
  --bg-dark-surface: #120a0a;
  --bg-dark-panel: #160e0e;
  --bg-dark-panel-hover: #241414;
  --border-color: #4a1414;
  --border-glow-gold: rgba(204, 13, 13, 0.18);
  --border-glow-rubi: rgba(204, 13, 13, 0.18);

  /* Cores de Texto */
  --text-primary: #e8e4e4;
  --text-secondary: #a39898;
  --text-muted: #736868;

  /* Ouro Metálico */
  --gold-primary: #cc0d0d;
  --gold-secondary: #cfa053;
  --gold-glow: rgba(204, 13, 13, 0.35);

  /* Rubi / Carmesim */
  --rubi-primary: #cc0d0d;
  --rubi-secondary: #b91c1c;
  --rubi-glow: rgba(204, 13, 13, 0.22);

  /* Glassmorphism */
  --glass-bg: rgba(22, 14, 14, 0.75);
  --glass-backdrop: blur(12px);
  --glass-border: rgba(204, 13, 13, 0.1);

  /* Fontes */
  --font-heading: "Tormenta", serif;
  --font-heading-fancy: "Tormenta", serif;
  --font-body: 'Segoe UI', sans-serif;

  /* Transições */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --radius-lg: 16px;
  --radius-md: 10px;
}

.theme-dark {
  /* Tema: Sombras (STR Dark) */
  --bg-dark-base: #06070c;
  --bg-dark-surface: #0b0e1a;
  --bg-dark-panel: rgba(18, 23, 38, 0.72);
  --bg-dark-panel-hover: rgba(18, 23, 38, 0.85);

  --border-color: rgba(201, 147, 58, 0.2);
  --border-glow-gold: rgba(201, 147, 58, 0.18);
  --border-glow-rubi: rgba(224, 72, 63, 0.18);

  --text-primary: #e2d8c3;
  --text-secondary: #8e7d65;
  --text-muted: #8e7d65;

  --gold-primary: #c9933a;
  --gold-secondary: #d4af37;
  --gold-glow: rgba(201, 147, 58, 0.22);

  --rubi-primary: #e0483f;
  --rubi-secondary: #b91c1c;
  --rubi-glow: rgba(224, 72, 63, 0.22);

  --glass-bg: rgba(18, 23, 38, 0.72);
  --glass-backdrop: blur(12px);
  --glass-border: rgba(201, 147, 58, 0.1);
}

.theme-classic {
  /* Tema: Clássico (STR Classic) */
  --bg-dark-base: #f0ece4;
  --bg-dark-surface: #ffffff;
  --bg-dark-panel: #ffffff;
  --bg-dark-panel-hover: #f0ede6;
  --border-color: #b0b8c8;
  --border-glow-gold: rgba(231, 76, 60, 0.12);
  --border-glow-rubi: rgba(231, 76, 60, 0.1);
  --text-primary: #2c3e50;
  --text-secondary: #4a5568;
  --text-muted: #7f8c8d;
  --gold-primary: #e74c3c;
  --gold-secondary: #c0392b;
  --gold-glow: rgba(231, 76, 60, 0.2);
  --rubi-primary: #e74c3c;
  --rubi-secondary: #c0392b;
  --rubi-glow: rgba(231, 76, 60, 0.15);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-backdrop: blur(8px);
  --glass-border: rgba(231, 76, 60, 0.06);
}

.theme-classic body {
  background-color: var(--bg-dark-base) !important;
  background-image: none !important;
}

.theme-classic header h1 {
  background: none;
  -webkit-text-fill-color: var(--gold-primary);
  color: var(--gold-primary);
  text-shadow: none;
}

.theme-classic header::after {
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.theme-classic .config-panel,
.theme-classic .ficha-panel,
.theme-classic .campaign-manager {
  background: var(--glass-bg);
  border-color: var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.theme-classic input[type="text"],
.theme-classic input[type="number"],
.theme-classic select,
.theme-classic textarea {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.theme-classic input[type="text"]:focus,
.theme-classic input[type="number"]:focus,
.theme-classic select:focus,
.theme-classic textarea:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
  background: var(--bg-dark-surface);
}

.theme-classic button {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.theme-classic button:hover {
  background: var(--gold-primary);
  color: #fff;
  border-color: var(--gold-primary);
  box-shadow: 0 4px 12px var(--gold-glow);
  transform: translateY(-1px);
}

.theme-classic .btn-add {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-secondary) 100%);
  color: #fff;
  border-color: var(--gold-primary);
}
.theme-classic .btn-add:hover {
  background: linear-gradient(135deg, var(--gold-secondary) 0%, var(--gold-primary) 100%);
  color: #fff;
}

.theme-classic .btn-tab-update {
  background: #e67e22 !important;
}
.theme-classic .btn-tab-copy {
  background: #3498db !important;
}
.theme-classic .btn-tab-delete {
  background: var(--rubi-secondary) !important;
}

.theme-classic .tab-missao {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.theme-classic .cena-card {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.theme-classic .drag-handle {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--border-color);
  color: var(--text-muted);
}

.theme-classic .parte-header {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.theme-classic .parte-header:hover {
  background: rgba(212, 61, 53, 0.03);
  border-color: var(--gold-primary);
}

.theme-classic .cena-plot textarea {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.theme-classic .status-bar {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border-bottom-color: var(--gold-primary);
}

.theme-classic .ficha-badge {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
}

.theme-classic .ficha-badge.ficha-selecionada {
  background: rgba(212, 61, 53, 0.04);
  border-color: var(--gold-primary);
}

.theme-classic .sig-card {
  background: var(--glass-bg) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

.theme-classic .sig-summary {
  background: var(--bg-dark-surface) !important;
  color: var(--text-primary) !important;
}
.theme-classic .sig-summary::after {
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent) !important;
}

.theme-classic .sig-body {
  background: rgba(0, 0, 0, 0.01) !important;
}

.theme-classic .sig-hero {
  background: var(--bg-dark-surface) !important;
  border-color: var(--border-color) !important;
}

.theme-classic .header-home-btn,
.theme-classic .header-theme-btn {
  color: var(--gold-primary);
  border-color: var(--border-color);
  background: rgba(212, 61, 53, 0.06);
  box-shadow: none;
}

.theme-classic .header-home-btn:hover,
.theme-classic .header-theme-btn:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.theme-classic .select-dificuldade,
.theme-classic .select-mover-parte {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.theme-classic .perigo-section {
  background: rgba(212, 61, 53, 0.03);
}

.theme-classic .tesouro-section {
  background: rgba(0, 0, 0, 0.02);
}

.theme-classic .link-ficha-modelo {
  border-color: rgba(212, 61, 53, 0.2);
  background: rgba(212, 61, 53, 0.03);
  color: var(--gold-primary);
}
.theme-classic .link-ficha-modelo:hover {
  background: rgba(212, 61, 53, 0.08);
  border-color: var(--gold-primary);
}

.theme-classic #btnCopiar {
  background: var(--bg-dark-surface);
  color: #2e7d32;
  border-color: rgba(46, 125, 50, 0.3);
}
.theme-classic #btnCopiar:hover {
  background: #2e7d32;
  color: #fff;
}

.theme-classic #btnLimpar {
  background: var(--bg-dark-surface);
  color: var(--rubi-primary);
  border-color: rgba(212, 61, 53, 0.2);
}
.theme-classic #btnLimpar:hover {
  background: var(--rubi-primary);
  color: #fff;
}

.theme-classic #btnExportar,
.theme-classic #btnExportarJSON {
  background: var(--bg-dark-surface);
  color: #415a77;
  border-color: rgba(65, 90, 119, 0.3);
}
.theme-classic #btnExportar:hover,
.theme-classic #btnExportarJSON:hover {
  background: #415a77;
  color: #fff;
}

.theme-classic #btnExportarCampanha {
  background: var(--bg-dark-surface);
  color: #7d3ac9;
  border-color: rgba(125, 58, 201, 0.3);
}
.theme-classic #btnExportarCampanha:hover {
  background: #7d3ac9;
  color: #fff;
}

.theme-classic #btnImportarFicha {
  background: var(--bg-dark-surface);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}
.theme-classic #btnImportarFicha:hover {
  background: #3b82f6;
  color: #fff;
}

.theme-classic #btnImportarAmeacaT20 {
  background: var(--bg-dark-surface);
  color: var(--rubi-primary);
  border-color: rgba(212, 61, 53, 0.2);
}
.theme-classic #btnImportarAmeacaT20:hover {
  background: var(--rubi-primary);
  color: #fff;
}

.theme-classic #btnImportarAmeacaFoundry {
  background: var(--bg-dark-surface);
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.3);
}
.theme-classic #btnImportarAmeacaFoundry:hover {
  background: #8b5cf6;
  color: #fff;
}

.theme-classic #btnImportarJSON {
  background: var(--bg-dark-surface) !important;
  color: #3b82f6 !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}
.theme-classic #btnImportarJSON:hover {
  background: #3b82f6 !important;
  color: #fff !important;
  border-color: #3b82f6 !important;
}

.theme-classic #btnExportarJSON {
  background: var(--bg-dark-surface);
  color: #415a77;
  border-color: rgba(65, 90, 119, 0.3);
}
.theme-classic #btnExportarJSON:hover {
  background: #415a77;
  color: #fff;
}

.theme-classic #btnLimparCampanha {
  background: var(--bg-dark-surface) !important;
  color: var(--rubi-primary) !important;
  border-color: rgba(212, 61, 53, 0.2) !important;
}
.theme-classic #btnLimparCampanha:hover {
  background: var(--rubi-primary) !important;
  color: #fff !important;
  border-color: var(--rubi-primary) !important;
}

.theme-classic .modal-box {
  background: var(--glass-bg);
  border-color: var(--border-color);
}

.theme-classic .modal-header {
  background: var(--bg-dark-surface);
  border-bottom-color: var(--gold-primary);
}

.theme-classic .modal-filtros,
.theme-classic .modal-footer {
  background: rgba(0, 0, 0, 0.02);
}

.theme-classic .perigo-item.active {
  background: rgba(212, 61, 53, 0.06);
  border-left-color: var(--gold-primary);
}
.theme-classic .perigo-item:hover {
  background: rgba(212, 61, 53, 0.03);
}

.theme-classic .perigo-lista {
  background: rgba(0, 0, 0, 0.01);
}

.theme-classic .perigo-preview-panel {
  background: rgba(0, 0, 0, 0.01);
}

.theme-classic .parte-nome-input {
  color: var(--text-primary);
  border-bottom-color: rgba(212, 61, 53, 0.2);
}
.theme-classic .parte-nome-input:focus {
  border-bottom-color: var(--gold-primary);
  background: rgba(212, 61, 53, 0.02);
}

.theme-classic .resumo-partes {
  background: rgba(0, 0, 0, 0.02);
}

.theme-classic ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
}
.theme-classic ::-webkit-scrollbar-thumb {
  background: var(--border-color);
}
.theme-classic ::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
  box-shadow: 0 0 6px var(--gold-glow);
}

/* ===== HEADER BUTTONS ===== */
.header-btns {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.header-home-btn,
.header-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
}

.header-home-btn {
  padding: 7px 12px;
  border-radius: 8px;
  gap: 5px;
}

.header-home-btn:hover,
.header-theme-btn:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.header-theme-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.2rem;
  padding: 0;
}

.header-theme-btn:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  header { padding: 30px 16px 20px; }
  header h1 { font-size: 2rem; }
  .header-btns { position: static; transform: none; justify-content: center; margin-top: 12px; }
}

/* ===== BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark-base);
  background-image: radial-gradient(circle at center, var(--bg-dark-surface) 0%, var(--bg-dark-base) 100%);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 50px;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark-base);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-secondary);
  box-shadow: 0 0 8px var(--gold-glow);
}

a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: #fff;
  text-shadow: 0 0 5px var(--gold-glow);
}

/* ===== HEADER ===== */
header {
  padding: 30px 60px 20px;
  text-align: center;
  position: relative;
  z-index: 10;
  background: transparent;
  border-bottom: none;
}
header h1 {
  font-family: "Tormenta", var(--font-heading-fancy);
  font-weight: 900;
  font-size: 3.2rem;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--gold-primary), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  margin: 0;
}
header::after {
  content: "";
  display: block;
  width: 250px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-secondary), transparent);
  margin: 15px auto 0;
}

/* ===== GRID LAYOUT RESPONSIBLE (DESKTOP) ===== */
.container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 992px) {
  .container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-areas:
      "config biblioteca"
      "manager biblioteca"
      "resumo resumo"
      "cenas cenas";
    gap: 20px;
  }
  .config-panel { grid-area: config; }
  .ficha-panel { grid-area: biblioteca; display: flex; flex-direction: column; height: 100%; }
  .campaign-manager { grid-area: manager; }
  #resumoMissao { grid-area: resumo; }
  #listaCenas { grid-area: cenas; }
}

/* ===== PANELS (GLASSMORPHISM) ===== */
.config-panel,
.ficha-panel,
.campaign-manager {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ficha-panel {
  gap: 15px;
}

.campaign-manager {
  gap: 15px;
}

/* ===== CONTROLS & FORMS ===== */
.control-row {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  width: 100%;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.input-group label,
.ficha-header label,
.campaign-header label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gold-primary);
}

input[type="text"],
input[type="number"],
select,
textarea {
  background: rgba(14, 16, 23, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 14px;
  transition: all var(--transition-fast);
  width: 100%;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
  background: rgba(14, 16, 23, 0.9);
}

#selectNivel {
  width: 80px;
  flex: none;
  text-align: center;
  font-weight: bold;
}

#nomeMissao {
  height: 44px;
}

/* ===== BUTTONS ===== */
button {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  border: 1px solid rgba(201, 147, 58, 0.15);
  background: linear-gradient(135deg, #1f2330 0%, #161922 100%);
  color: var(--gold-primary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  min-height: 40px;
  padding: 8px 16px;
  white-space: nowrap;
}

button:hover {
  background: linear-gradient(135deg, var(--gold-secondary) 0%, var(--gold-primary) 100%);
  color: #07080c;
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

.btn-group {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-add {
  background: linear-gradient(135deg, var(--gold-secondary) 0%, var(--gold-primary) 100%);
  color: #07080c;
  border-color: var(--gold-primary);
}
.btn-add:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* Custom button types */
#btnCopiar {
  background: linear-gradient(135deg, #163a16 0%, #0f2b0f 100%);
  color: #81c784;
  border-color: rgba(76, 175, 80, 0.2);
}
#btnCopiar:hover {
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
  color: #fff;
  border-color: #4caf50;
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.4);
}

#btnLimpar {
  background: linear-gradient(135deg, #2b1111 0%, #1c0a0a 100%);
  color: var(--rubi-primary);
  border-color: rgba(220, 53, 69, 0.2);
}
#btnLimpar:hover {
  background: linear-gradient(135deg, var(--rubi-secondary) 0%, var(--rubi-primary) 100%);
  color: #fff;
  border-color: var(--rubi-primary);
  box-shadow: 0 0 12px var(--rubi-glow);
}

#btnExportar {
  background: linear-gradient(135deg, #1b263b 0%, #0d1b2a 100%);
  color: #8d99ae;
  border-color: rgba(141, 153, 174, 0.2);
}
#btnExportar:hover {
  background: linear-gradient(135deg, #415a77 0%, #778da9 100%);
  color: #fff;
  border-color: #778da9;
  box-shadow: 0 0 12px rgba(119, 141, 169, 0.4);
}

.btn-add-parte {
  background: linear-gradient(135deg, #1a2e40 0%, #253d52 100%);
  color: #7aaac8;
  border-color: #4a7a9a;
}
.btn-add-parte:hover {
  background: linear-gradient(135deg, #253d52, #306080);
  border-color: #6aaad8;
  color: #fff;
}

.btn-add-nota {
  background: linear-gradient(135deg, #1a2a1a 0%, #253525 100%);
  border-color: #4a7a4a;
  color: #8ab88a;
}
.btn-add-nota:hover {
  background: linear-gradient(135deg, #253525, #306030);
  border-color: #6ab86a;
  color: #fff;
}

/* ===== TABS & CAMPAIGN ACTIONS ===== */
.campaign-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tabs-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 4px;
  min-height: 70px;
}

.tab-missao {
  background: var(--bg-dark-panel);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.tab-missao:hover {
  border-color: var(--gold-secondary);
}

.tab-titulo {
  font-weight: bold;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
}

.tab-titulo small {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.tab-btns {
  display: flex;
  gap: 5px;
}

.tab-btns button {
  flex: 1;
  min-width: 0;
  height: 28px;
  min-height: 28px;
  padding: 0;
  font-size: 0.8rem;
  border-radius: 4px;
  border: none;
}

.btn-tab-update {
  background: #e67e22 !important;
  color: #fff !important;
}

.btn-tab-copy {
  background: #3498db !important;
  color: #fff !important;
}

.btn-tab-delete {
  background: var(--rubi-secondary) !important;
  color: #fff !important;
}

#abasCampanha:empty::after {
  content: "Nenhuma missão salva na campanha ainda...";
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 10px 0;
}

#campanhaActions {
  display: flex;
  gap: 10px;
}

#btnExportarCampanha {
  background: linear-gradient(135deg, #3d145a 0%, #240a3a 100%);
  color: #dfccf5;
  border-color: rgba(150, 80, 220, 0.2);
}
#btnExportarCampanha:hover {
  background: linear-gradient(135deg, #5a208c 0%, #7d3ac9 100%);
  color: #fff;
  border-color: #9c27b0;
  box-shadow: 0 0 12px rgba(156, 39, 176, 0.4);
}

#btnExportarJSON {
  background: linear-gradient(135deg, #1b263b 0%, #0d1b2a 100%);
  color: #8d99ae;
  border-color: rgba(141, 153, 174, 0.2);
}
#btnExportarJSON:hover {
  background: linear-gradient(135deg, #415a77 0%, #778da9 100%);
  color: #fff;
  border-color: #778da9;
  box-shadow: 0 0 12px rgba(119, 141, 169, 0.4);
}

#btnImportarJSON,
#btnLimparCampanha {
  background: #1f2330 !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

#btnLimparCampanha:hover {
  background: var(--rubi-secondary) !important;
  color: #fff !important;
  border-color: var(--rubi-primary) !important;
}

/* ===== BIBLIOTECA DE FICHAS PANEL ===== */
.ficha-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.biblioteca-controles-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.links-criacao-row,
.botoes-importacao-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.link-ficha-modelo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--gold-primary);
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid rgba(201, 147, 58, 0.2);
  border-radius: var(--radius-md);
  background: rgba(201, 147, 58, 0.05);
  transition: all var(--transition-fast);
}

.link-ficha-modelo:hover {
  background: rgba(201, 147, 58, 0.15);
  border-color: var(--gold-primary);
  box-shadow: 0 0 5px var(--gold-glow);
}

#btnImportarFicha,
#btnImportarAmeacaT20,
#btnImportarAmeacaFoundry {
  flex: 1;
  font-size: 0.8rem;
  padding: 8px 12px;
  min-height: 36px;
}

#btnImportarFicha {
  background: linear-gradient(135deg, #1b2a4a 0%, #0f1c3f 100%);
  border-color: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}
#btnImportarFicha:hover {
  background: #3b82f6;
  color: #fff;
}

#btnImportarAmeacaT20 {
  background: linear-gradient(135deg, #4a1c1c 0%, #2f0f0f 100%);
  border-color: rgba(220, 53, 69, 0.2);
  color: #fca5a5;
}
#btnImportarAmeacaT20:hover {
  background: var(--rubi-primary);
  color: #fff;
}

#btnImportarAmeacaFoundry {
  background: linear-gradient(135deg, #2e1f47 0%, #1e1333 100%);
  border-color: rgba(139, 92, 246, 0.2);
  color: #c084fc;
}
#btnImportarAmeacaFoundry:hover {
  background: #8b5cf6;
  color: #fff;
}

.db-import-search-wrap {
  width: 100%;
  margin-top: 4px;
}

#dbAmeacaSearch {
  background: rgba(7, 8, 12, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.9rem;
}

/* Ficha List Container */
.ficha-list-container {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.ficha-vazia {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.biblioteca-secao {
  margin-top: 15px;
}

.biblioteca-secao-titulo {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.ficha-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-dark-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  gap: 10px;
  transition: all var(--transition-fast);
}

.ficha-badge:hover {
  border-color: var(--gold-primary);
  background: var(--bg-dark-panel-hover);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.ficha-badge.ficha-selecionada {
  border-color: var(--gold-primary);
  background: rgba(201, 147, 58, 0.06);
  box-shadow: 0 0 10px var(--gold-glow);
}

.ficha-check-label {
  display: flex;
  align-items: center;
  width: 100%;
  cursor: pointer;
  gap: 10px;
}

.ficha-checkbox {
  accent-color: var(--gold-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.ficha-badge-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.ficha-nome {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: bold;
}

.ficha-detalhe {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.btn-remove-ficha {
  background: none !important;
  border: none !important;
  color: var(--rubi-primary) !important;
  font-size: 1.1rem !important;
  cursor: pointer;
  padding: 4px 6px !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  opacity: 0.7;
  transition: all var(--transition-fast);
}

.btn-remove-ficha:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* ===== STATUS BAR (INTENSITY) ===== */
.status-bar {
  background: var(--bg-dark-panel);
  border: 1px solid var(--border-color);
  border-bottom: 3px solid var(--gold-secondary);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.intensidade-pontos {
  display: flex;
  gap: 6px;
  align-items: center;
}

.intensidade-ponto {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: transparent;
  transition: background 0.3s, border-color 0.3s;
}

.intensidade-ponto.ativo {
  background: var(--gold-primary);
  border-color: transparent;
  box-shadow: 0 0 8px var(--gold-glow);
}

/* ===== PARTES & CENAS LIST CONTAINER ===== */
#listaCenas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.parte-wrapper {
  margin-bottom: 6px;
  border-radius: var(--radius-lg);
}

.parte-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #161922 0%, #0e1017 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  margin-bottom: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.parte-header:hover {
  background: linear-gradient(135deg, #1f2330 0%, #161922 100%);
  border-color: var(--gold-secondary);
}

.parte-header-orphan {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  cursor: default;
}

.parte-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.parte-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.parte-chevron {
  font-size: 0.8rem;
  color: var(--gold-primary);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.parte-chevron.collapsed {
  transform: rotate(-90deg);
}

.parte-nome-input {
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--gold-glow);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 2px 6px;
  width: 100%;
  min-width: 0;
  cursor: text;
  border-radius: 0;
}

.parte-nome-input:focus {
  outline: none;
  border-bottom-color: var(--gold-primary);
  background: rgba(255, 255, 255, 0.04);
}

.parte-stat-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-remover-parte {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  min-height: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-remover-parte:hover {
  background: var(--rubi-secondary) !important;
  border-color: var(--rubi-primary) !important;
  color: #fff !important;
  transform: scale(1.1);
}

.parte-cenas-container {
  padding-left: 14px;
  border-left: 2px solid var(--border-color);
  margin-left: 10px;
  transition: all var(--transition-fast);
}

.parte-cenas-container.collapsed {
  display: none;
}

.parte-cenas-container.sortable-drag-over {
  border-left-color: var(--gold-primary);
  background: rgba(201, 147, 58, 0.03);
}

.select-mover-parte {
  background: var(--bg-dark-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  font-size: 0.75rem;
  padding: 3px 6px;
  cursor: pointer;
  max-width: 120px;
  width: auto;
}

.select-mover-parte:focus {
  outline: none;
  border-color: var(--gold-primary);
}

/* ===== SCENE CARDS ===== */
.cena-card {
  display: flex;
  align-items: stretch;
  background: var(--bg-dark-surface);
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
}

.drag-handle {
  padding: 0 12px;
  color: var(--text-muted);
  cursor: grab;
  font-size: 1.2rem;
  background: rgba(7, 8, 12, 0.3);
  border-right: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.drag-handle:active {
  cursor: grabbing;
}

.cena-main {
  flex-grow: 1;
  padding: 16px;
  cursor: pointer;
}

.cena-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
}

.cena-info-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cena-textos {
  display: flex;
  flex-direction: column;
}

.chevron-icon {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.cena-card:has(.cena-plot.aberto) .chevron-icon {
  transform: rotate(90deg);
  color: var(--gold-primary);
}

.input-titulo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
}

.input-titulo:focus {
  outline: none;
  color: var(--gold-primary);
}

.cena-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-dificuldade {
  min-width: 180px;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-dark-panel);
}

.btn-remover {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  min-height: 0;
}

.btn-remover:hover {
  color: var(--rubi-primary);
  transform: scale(1.2);
}

/* Scene Card Border Themes */
.border-interpretacao {
  border-left: 8px solid #3b82f6;
  box-shadow: inset 4px 0 10px rgba(59, 130, 246, 0.05), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.border-exploracao {
  border-left: 8px solid #10b981;
  box-shadow: inset 4px 0 10px rgba(16, 185, 129, 0.05), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.border-combate {
  border-left: 8px solid #f59e0b;
  box-shadow: inset 4px 0 10px rgba(245, 158, 11, 0.05), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.border-boss {
  border-left: 8px solid var(--rubi-primary);
  box-shadow: inset 4px 0 15px rgba(220, 53, 69, 0.1), 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: boss-pulse 3s infinite alternate;
}
@keyframes boss-pulse {
  0% { border-left-color: var(--rubi-secondary); box-shadow: inset 4px 0 10px rgba(220, 53, 69, 0.1), 0 4px 20px rgba(220, 53, 69, 0.05); }
  100% { border-left-color: var(--rubi-primary); box-shadow: inset 4px 0 20px rgba(220, 53, 69, 0.2), 0 4px 25px rgba(220, 53, 69, 0.15); }
}

/* Neutral Slate/Gray styling for annotations */
.border-anotacao {
  border-left: 8px solid #64748b !important;
  background: rgba(30, 41, 59, 0.3) !important;
  box-shadow: inset 4px 0 10px rgba(100, 116, 139, 0.05), 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

.cena-card.border-anotacao .drag-handle {
  color: #64748b;
  background: rgba(15, 23, 42, 0.2);
}

/* ===== SCENE CARD PLOT (ENREDO) ===== */
.cena-plot {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.cena-plot.aberto {
  max-height: 1000px;
  opacity: 1;
  margin-top: 15px;
}

.plot-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cena-plot textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(7, 8, 12, 0.5);
  color: var(--text-primary);
  resize: vertical;
}

/* Image insertion section */
.imagem-section {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(14, 16, 23, 0.4);
}

.imagem-section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-secondary);
  padding: 8px 12px 4px;
  background: rgba(7, 8, 12, 0.3);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-heading);
}

.imagem-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(7, 8, 12, 0.3);
}

.imagem-tab {
  flex: 1 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 7px 10px !important;
  font-size: 0.75rem !important;
  font-family: var(--font-body) !important;
  background: transparent !important;
  color: var(--text-secondary) !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none !important;
  text-transform: none !important;
}

.imagem-tab.ativo {
  color: var(--gold-primary) !important;
  border-bottom-color: var(--gold-primary) !important;
  font-weight: 600;
  background: rgba(14, 16, 23, 0.6) !important;
}

.imagem-tab:hover:not(.ativo) {
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--text-primary) !important;
}

.imagem-aba {
  display: none;
  padding: 12px;
}

.imagem-aba.ativa {
  display: block;
}

.image-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-input-wrapper input {
  flex: 1;
}

.imagem-aviso {
  display: block;
  font-size: 0.75rem;
  color: var(--gold-secondary);
  margin-top: 6px;
  line-height: 1.4;
}

.upload-area {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(7, 8, 12, 0.2);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 10px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.upload-area:hover {
  border-color: var(--gold-primary);
  background: rgba(201, 147, 58, 0.03);
  color: var(--gold-primary);
}

.upload-trocar {
  color: var(--gold-primary);
  text-decoration: underline;
  cursor: pointer;
}

.plot-preview-img {
  width: 100%;
  margin-top: 6px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
}

.plot-preview-img img {
  width: 100%;
  display: block;
  max-height: 200px;
  object-fit: contain;
  background: rgba(7, 8, 12, 0.5);
}

.btn-remove-img {
  background: none !important;
  border: none !important;
  color: var(--rubi-primary) !important;
  font-size: 1.2rem !important;
  cursor: pointer;
  margin-left: 8px;
  padding: 0 5px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  transition: transform var(--transition-fast);
}

.btn-remove-img:hover {
  transform: scale(1.2);
}

/* Insert characters selection block */
.inserir-ficha-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  background: rgba(7, 8, 12, 0.3);
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  align-items: center;
}

.select-fichas-cena {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-dark-panel);
  font-size: 0.85rem;
}

.btn-inserir-ficha {
  white-space: nowrap;
  padding: 6px 12px !important;
  font-size: 0.82rem !important;
  min-height: 0 !important;
}

/* ===== PARALLEL PANELS: PERIGOS & TESOURO (PAREDINHA) ===== */
.perigo-section {
  border-top: 1px solid var(--border-color);
  background: linear-gradient(135deg, #1c1a08 0%, #2a2510 100%);
  padding: 10px 14px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.perigo-controles {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.perigo-label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--gold-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-buscar-perigo {
  background: linear-gradient(135deg, #5a4a00, #7a6500) !important;
  color: #ffe87a !important;
  border: 1px solid #8a7500 !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  padding: 6px 12px !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  font-family: var(--font-heading) !important;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-buscar-perigo:hover {
  background: linear-gradient(135deg, #7a6500, #9a8500) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 10px rgba(150, 130, 0, 0.35);
}

.btn-limpar-perigo {
  background: none !important;
  border: 1px solid #5a4a00 !important;
  color: #a89050 !important;
  font-size: 0.75rem !important;
  padding: 4px 8px !important;
  border-radius: 5px !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  cursor: pointer;
  font-family: var(--font-body) !important;
  transition: all 0.2s;
}

.btn-limpar-perigo:hover {
  background: rgba(90, 74, 0, 0.3) !important;
  color: var(--rubi-primary) !important;
}

.perigo-mini-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #4a3f00;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-top: 8px;
}

.perigo-mini-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.perigo-mini-nome {
  color: var(--gold-primary);
  font-size: 0.95rem;
  font-family: var(--font-heading);
}

.perigo-mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ptag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  font-family: var(--font-body);
}

.ptag-nd {
  background: #7a2000;
  color: #ffcbaa;
}

.ptag-tipo {
  background: #2a4a00;
  color: #c0f080;
}

.ptag-origem {
  background: #1a1a4a;
  color: #aabbff;
}

.btn-inserir-perigo-plot {
  background: linear-gradient(135deg, #3a3000, #5a4a00) !important;
  color: #f0d080 !important;
  border: 1px dashed #6a5a00 !important;
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  padding: 6px 10px !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  white-space: nowrap;
  font-family: var(--font-body) !important;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-inserir-perigo-plot:hover {
  background: linear-gradient(135deg, #5a4a00, #7a6500) !important;
  color: #fff8cc !important;
}

/* ===== TESOURO SECTION ===== */
.tesouro-section {
  border-top: 1px solid var(--border-color);
  background: linear-gradient(135deg, #0d1f0a 0%, #162612 100%);
  padding: 10px 14px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.tesouro-controles {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tesouro-label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: #c8e6a0;
  white-space: nowrap;
  flex-shrink: 0;
}

.tesouro-mod-select {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid #2a5a18;
  background: #0a1808;
  color: #c8e6a0;
  font-size: 0.82rem;
  cursor: pointer;
  min-width: 90px;
}

.btn-rolar-tesouro {
  background: linear-gradient(135deg, #1d5a0a, #2d7a14) !important;
  color: #e0f5cc !important;
  border: 1px solid #3a9a1e !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  padding: 6px 12px !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  font-family: var(--font-heading) !important;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-rolar-tesouro:hover {
  background: linear-gradient(135deg, #2d7a14, #3d9a1e) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 10px rgba(40, 140, 20, 0.3);
}

.btn-limpar-tesouro {
  background: none !important;
  border: none !important;
  color: #5a8a40 !important;
  font-size: 0.9rem !important;
  cursor: pointer;
  padding: 4px !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-limpar-tesouro:hover {
  opacity: 1;
  color: var(--rubi-primary) !important;
}

.tesouro-resultado {
  display: none;
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: #c8e6a0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #1a4a10;
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 8px;
}

.tesouro-resultado.visivel {
  display: block;
  animation: fadeInDown 0.3s ease;
}

.tesouro-resultado strong {
  color: #ffe87a;
}

.btn-copiar-tesouro {
  background: #2a3a2a !important;
  border: 1px solid #4a6a4a !important;
  color: #8ab88a !important;
  border-radius: 4px !important;
  font-size: 0.75rem !important;
  padding: 3px 7px !important;
  cursor: pointer;
  min-height: 0 !important;
  font-family: var(--font-body) !important;
  transition: all 0.2s;
}

.btn-copiar-tesouro:hover {
  background: #3a5a3a !important;
  color: #fff !important;
}

/* Paredinha Expandable side layout for Desktop */
@media (min-width: 768px) {
  .cena-card {
    display: flex;
  }
  
  .tesouro-section,
  .perigo-section {
    border-top: none;
    border-left: 1px solid var(--border-color);
    width: 240px;
    min-width: 240px;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease, opacity 0.25s ease;
    overflow: hidden;
  }

  .tesouro-section.recolhido,
  .perigo-section.recolhido {
    width: 0;
    min-width: 0;
    padding: 0;
    opacity: 0;
    border-left: none;
    pointer-events: none;
  }

  .btn-paredinha {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    min-width: 18px;
    flex-shrink: 0;
    align-self: stretch;
    background: linear-gradient(180deg, #161922 0%, #0e1017 100%);
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, width 0.15s;
  }

  .btn-paredinha:hover {
    background: var(--bg-dark-panel-hover) !important;
    width: 24px;
    min-width: 24px;
  }

  .paredinha-icon {
    font-size: 0.65rem;
    color: var(--gold-secondary);
    pointer-events: none;
    transition: color 0.2s;
  }

  .btn-paredinha:hover .paredinha-icon {
    color: var(--gold-primary);
    text-shadow: 0 0 5px var(--gold-glow);
  }
}

/* ===== GLASSMORPHIC PERIGOS COMPLEXOS MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.modal-box {
  background: rgba(22, 25, 34, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(201, 147, 58, 0.1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 2px solid var(--gold-secondary);
  background: linear-gradient(135deg, #10131e 0%, #161922 100%);
  flex-shrink: 0;
}

.modal-titulo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--gold-primary);
  margin: 0;
}

.modal-fechar {
  background: none !important;
  border: none !important;
  color: var(--text-secondary) !important;
  font-size: 1.3rem !important;
  cursor: pointer;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  transition: all 0.2s;
  line-height: 1;
}

.modal-fechar:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.modal-filtros {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: rgba(7, 8, 12, 0.5);
}

.perigo-input-busca {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(7, 8, 12, 0.6);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.perigo-selects {
  display: flex;
  gap: 10px;
}

.perigo-select {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(7, 8, 12, 0.6);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.modal-corpo {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.perigo-lista {
  width: 35%;
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  background: rgba(7, 8, 12, 0.3);
}

.perigo-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.perigo-item:hover {
  background: rgba(201, 147, 58, 0.03);
}

.perigo-item.active {
  background: rgba(201, 147, 58, 0.08);
  border-left: 4px solid var(--gold-primary);
}

.perigo-item-nome {
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-primary);
}

.perigo-item-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.perigo-preview-panel {
  width: 65%;
  padding: 20px;
  overflow-y: auto;
  background: rgba(7, 8, 12, 0.1);
  display: flex;
  flex-direction: column;
}

.perigo-preview-vazio {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-style: italic;
}

.perigo-preview-titulo {
  font-family: var(--font-heading);
  color: var(--gold-primary);
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.perigo-preview-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.perigo-preview-efeito {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.perigo-preview-efeito hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 15px 0;
}

.perigo-preview-efeito ul {
  padding-left: 20px;
  margin-bottom: 15px;
}

.perigo-preview-efeito li {
  margin-bottom: 6px;
}

.perigo-preview-img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(7, 8, 12, 0.5);
  display: flex;
  justify-content: center;
}

.link-perigos-externo {
  font-size: 0.85rem;
  color: var(--gold-primary);
  font-family: var(--font-heading);
}

/* Tooltips, spinners & toasts */
.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(201, 147, 58, 0.2);
  color: var(--gold-primary);
  font-size: 0.7rem;
  font-weight: bold;
  cursor: help;
  position: relative;
  vertical-align: middle;
}

.tooltip-icon::after {
  content: attr(aria-label);
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-dark-panel);
  border: 1px solid var(--gold-secondary);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  width: 220px;
  line-height: 1.4;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.tooltip-icon:hover::after {
  display: block;
}

#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 11000;
  pointer-events: none;
}

.toast {
  background: var(--bg-dark-panel);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--text-muted);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 320px;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.toast-sucesso { border-left-color: #27ae60; }
.toast.toast-erro { border-left-color: var(--rubi-primary); }
.toast.toast-aviso { border-left-color: var(--gold-primary); }
.toast.toast-info { border-left-color: #3b82f6; }

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--gold-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== PART GROUPING RESUME CHIPS ===== */
.resumo-partes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid var(--border-color);
  border-top: none;
}

.resumo-parte-chip {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: rgba(14, 16, 23, 0.6);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================
   ASSINATURA / CRÉDITOS (STR-style) - Dark & Gold themed
   ========================= */
.sig-wrap {
  max-width: 1100px;
  margin: 28px auto 40px;
  padding: 0 16px;
}

.sig-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-dark-surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  overflow: hidden;
}

.sig-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  background: var(--bg-dark-panel);
  color: var(--text-primary);
  position: relative;
  font-family: var(--font-heading);
}

.sig-summary::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-secondary), transparent);
}

.sig-summary::-webkit-details-marker {
  display: none;
}

.sig-summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sig-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(201, 147, 58, 0.1);
  border: 1px solid rgba(201, 147, 58, 0.2);
  color: var(--gold-primary);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.sig-title {
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sig-summary-right {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.sig-hint {
  font-size: 12px;
  opacity: .85;
  white-space: nowrap;
}

.sig-chevron {
  font-size: 16px;
  transition: transform .18s ease;
}

.sig-card[open] .sig-chevron {
  transform: rotate(180deg);
}

.sig-body {
  padding: 18px;
  background: var(--bg-dark-base);
}

.sig-hero {
  background: var(--bg-dark-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .3);
  margin-bottom: 14px;
}

.sig-h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
  color: var(--gold-primary);
  font-family: var(--font-heading);
}

.sig-p {
  margin: 0 0 10px;
  color: var(--text-primary);
  line-height: 1.45;
}

.sig-p strong {
  color: var(--gold-primary);
}

.sig-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}

@media (max-width: 900px) {
  .sig-grid {
    grid-template-columns: 1fr;
  }

  .sig-hint {
    display: none;
  }
}

.sig-col {
  background: var(--bg-dark-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .3);
}

.sig-h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 900;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: .7px;
  font-family: var(--font-heading);
}

.sig-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  background: var(--bg-dark-panel);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  margin-bottom: 10px;
}

.sig-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
  border-color: var(--gold-primary);
}

.sig-link:active {
  transform: translateY(0px);
}

.sig-link-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sig-link-name {
  font-weight: 900;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.15;
}

.sig-link-url {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sig-ext {
  color: var(--gold-primary);
  font-size: 16px;
  flex: 0 0 auto;
}

.sig-link-primary {
  border-color: rgba(201, 147, 58, .35);
  box-shadow: 0 10px 20px rgba(201, 147, 58, .05);
}

.sig-link-primary:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 14px 24px rgba(201, 147, 58, .15);
}

.sig-note {
  background: var(--bg-dark-base);
  border-left: 4px solid var(--gold-primary);
  padding: 12px;
  border-radius: 0 8px 8px 0;
  margin-top: 14px;
}

.sig-note-title {
  font-weight: 900;
  color: var(--gold-primary);
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.sig-note-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.sig-note-text a {
  color: var(--gold-primary);
  text-decoration: underline;
}

.sig-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.sig-footer-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== MOBILE & RESPONSIVENESS ===== */
@media (max-width: 991px) {
  .container {
    padding: 0 12px;
  }
  
  .config-panel,
  .ficha-panel,
  .campaign-manager {
    padding: 16px;
  }
}

@media (max-width: 767px) {
  header h1 {
    font-size: 2.2rem;
  }

  .control-row {
    flex-wrap: wrap !important;
  }

  .control-row:first-of-type .input-group:nth-child(1),
  .control-row:first-of-type .input-group:nth-child(2),
  .control-row:first-of-type .input-group:nth-child(3) {
    flex: 1 1 100% !important;
  }

  .btn-group {
    flex-wrap: wrap;
  }

  button {
    min-width: 80px;
    height: 44px;
    font-size: 0.8rem;
  }

  #btnCopiar,
  #btnLimpar,
  #btnExportar {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }

  .cena-card {
    flex-direction: column;
  }

  .tesouro-section,
  .perigo-section {
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-top: 1px solid var(--border-color);
    border-left: none;
    max-height: 600px;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
  }

  /* No mobile, they should not collapse to 0 size because we don't have paredinha toggler */
  .tesouro-section.recolhido,
  .perigo-section.recolhido {
    width: 100% !important;
    max-height: 600px !important;
    padding: inherit !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .btn-paredinha {
    display: none !important;
  }

  .tab-btns button {
    height: 44px !important;
    min-height: 44px !important;
    font-size: 0.95rem !important;
    touch-action: manipulation;
  }

  .tab-missao {
    min-width: 150px;
    max-width: 200px;
  }

  .status-bar {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .campaign-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  #campanhaActions {
    flex-wrap: wrap;
    width: 100%;
  }

  #campanhaActions button {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }

  .modal-corpo {
    flex-direction: column;
    overflow-y: auto;
  }

  .perigo-lista {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .perigo-preview-panel {
    width: 100%;
  }
}

/* Regra para forçar a visibilidade dos campos no PDF */
@media print {
  .cena-plot {
    max-height: none !important;
    opacity: 1 !important;
    display: block !important;
  }
}

.theme-classic body {
  background: var(--bg-dark-base) !important;
  background-image: none !important;
}

.theme-classic header {
  background: linear-gradient(185deg, #2c3e50 0%, #1a252f 100%) !important;
  border-bottom: 2px solid #e74c3c !important;
  padding: 30px 60px 20px !important;
}

.theme-classic header h1 {
  background: none !important;
  -webkit-text-fill-color: #ecf0f1 !important;
  color: #ecf0f1 !important;
  text-shadow: none !important;
}

.theme-classic header::after {
  background: linear-gradient(90deg, transparent, #e74c3c, transparent) !important;
}

.theme-classic .header-title {
  color: #ecf0f1;
  text-shadow: none;
}

.theme-classic .header-home-btn,
.theme-classic .header-theme-btn {
  color: #ecf0f1;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
}

.theme-classic .header-home-btn:hover,
.theme-classic .header-theme-btn:hover {
  border-color: #e74c3c;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
}

.theme-classic .config-panel,
.theme-classic .ficha-panel,
.theme-classic .campaign-manager {
  background: var(--glass-bg);
  border-color: var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.theme-classic input[type="text"],
.theme-classic input[type="number"],
.theme-classic select,
.theme-classic textarea {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.theme-classic input[type="text"]:focus,
.theme-classic input[type="number"]:focus,
.theme-classic select:focus,
.theme-classic textarea:focus {
  border-color: #2980b9;
  box-shadow: 0 0 8px rgba(41, 128, 185, 0.3);
  background: var(--bg-dark-surface);
}

.theme-classic button {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.theme-classic button:hover {
  background: #2c3e50;
  color: #fff;
  border-color: #2c3e50;
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.25);
  transform: translateY(-1px);
}

.theme-classic .btn-add {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #fff;
  border-color: #2c3e50;
}
.theme-classic .btn-add:hover {
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
  color: #fff;
}

.theme-classic .btn-tab-update {
  background: #2980b9 !important;
}
.theme-classic .btn-tab-copy {
  background: #3498db !important;
}
.theme-classic .btn-tab-delete {
  background: #c0392b !important;
}

.theme-classic .tab-missao {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  border-left: 3px solid #e74c3c;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.theme-classic .cena-card {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  border-left: 3px solid #2c3e50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.theme-classic .drag-handle {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--border-color);
  color: var(--text-muted);
}

.theme-classic .parte-header {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
}
.theme-classic .parte-header:hover {
  background: rgba(44, 62, 80, 0.04);
  border-color: #2c3e50;
}

.theme-classic .cena-plot textarea {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.theme-classic .status-bar {
  background: #2c3e50;
  border-color: #1a252f;
  color: #ecf0f1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-bottom-color: #e74c3c;
}

.theme-classic .ficha-badge {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.theme-classic .ficha-badge.ficha-selecionada {
  background: rgba(44, 62, 80, 0.06);
  border-color: #2c3e50;
}

.theme-classic .sig-card {
  background: var(--glass-bg) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

.theme-classic .sig-summary {
  background: var(--bg-dark-surface) !important;
  color: var(--text-primary) !important;
}
.theme-classic .sig-summary::after {
  background: linear-gradient(90deg, transparent, #e74c3c, transparent) !important;
}

.theme-classic .sig-body {
  background: rgba(0, 0, 0, 0.01) !important;
}

.theme-classic .sig-hero {
  background: var(--bg-dark-surface) !important;
  border-color: var(--border-color) !important;
}

.theme-classic .select-dificuldade,
.theme-classic .select-mover-parte {
  background: var(--bg-dark-surface);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.theme-classic .perigo-section {
  background: rgba(231, 76, 60, 0.03);
}

.theme-classic .tesouro-section {
  background: rgba(44, 62, 80, 0.03);
}

.theme-classic .link-ficha-modelo {
  border-color: rgba(41, 128, 185, 0.3);
  background: rgba(41, 128, 185, 0.05);
  color: #2980b9;
}
.theme-classic .link-ficha-modelo:hover {
  background: rgba(41, 128, 185, 0.12);
  border-color: #2980b9;
}

.theme-classic #btnCopiar {
  background: var(--bg-dark-surface);
  color: #2e7d32;
  border-color: rgba(46, 125, 50, 0.3);
}
.theme-classic #btnCopiar:hover {
  background: #2e7d32;
  color: #fff;
}

.theme-classic #btnLimpar {
  background: var(--bg-dark-surface);
  color: #c0392b;
  border-color: rgba(192, 57, 43, 0.3);
}
.theme-classic #btnLimpar:hover {
  background: #c0392b;
  color: #fff;
}

.theme-classic #btnExportar,
.theme-classic #btnExportarJSON {
  background: var(--bg-dark-surface);
  color: #415a77;
  border-color: rgba(65, 90, 119, 0.3);
}
.theme-classic #btnExportar:hover,
.theme-classic #btnExportarJSON:hover {
  background: #415a77;
  color: #fff;
}

.theme-classic #btnExportarCampanha {
  background: var(--bg-dark-surface);
  color: #7d3ac9;
  border-color: rgba(125, 58, 201, 0.3);
}
.theme-classic #btnExportarCampanha:hover {
  background: #7d3ac9;
  color: #fff;
}

.theme-classic #btnImportarFicha {
  background: var(--bg-dark-surface);
  color: #2980b9;
  border-color: rgba(41, 128, 185, 0.3);
}
.theme-classic #btnImportarFicha:hover {
  background: #2980b9;
  color: #fff;
}

.theme-classic #btnImportarAmeacaT20 {
  background: var(--bg-dark-surface);
  color: #c0392b;
  border-color: rgba(192, 57, 43, 0.3);
}
.theme-classic #btnImportarAmeacaT20:hover {
  background: #c0392b;
  color: #fff;
}

.theme-classic #btnImportarAmeacaFoundry {
  background: var(--bg-dark-surface);
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.3);
}
.theme-classic #btnImportarAmeacaFoundry:hover {
  background: #8b5cf6;
  color: #fff;
}

.theme-classic #btnImportarJSON {
  background: var(--bg-dark-surface) !important;
  color: #2980b9 !important;
  border-color: rgba(41, 128, 185, 0.3) !important;
}
.theme-classic #btnImportarJSON:hover {
  background: #2980b9 !important;
  color: #fff !important;
  border-color: #2980b9 !important;
}

.theme-classic #btnLimparCampanha {
  background: var(--bg-dark-surface) !important;
  color: #c0392b !important;
  border-color: rgba(192, 57, 43, 0.3) !important;
}
.theme-classic #btnLimparCampanha:hover {
  background: #c0392b !important;
  color: #fff !important;
  border-color: #c0392b !important;
}

.theme-classic .modal-box {
  background: var(--glass-bg);
  border-color: var(--border-color);
}

.theme-classic .modal-header {
  background: #2c3e50;
  color: #ecf0f1;
  border-bottom-color: #e74c3c;
}

.theme-classic .modal-filtros,
.theme-classic .modal-footer {
  background: rgba(44, 62, 80, 0.03);
}

.theme-classic .perigo-item.active {
  background: rgba(44, 62, 80, 0.06);
  border-left-color: #e74c3c;
}
.theme-classic .perigo-item:hover {
  background: rgba(44, 62, 80, 0.03);
}

.theme-classic .perigo-lista {
  background: rgba(44, 62, 80, 0.02);
}

.theme-classic .perigo-preview-panel {
  background: rgba(44, 62, 80, 0.02);
}

.theme-classic .parte-nome-input {
  color: var(--text-primary);
  border-bottom-color: rgba(44, 62, 80, 0.2);
}
.theme-classic .parte-nome-input:focus {
  border-bottom-color: #2980b9;
  background: rgba(41, 128, 185, 0.04);
}

.theme-classic .resumo-partes {
  background: rgba(44, 62, 80, 0.03);
}

.theme-classic ::-webkit-scrollbar-track {
  background: rgba(44, 62, 80, 0.05);
}
.theme-classic ::-webkit-scrollbar-thumb {
  background: #b0b8c8;
}
.theme-classic ::-webkit-scrollbar-thumb:hover {
  background: #2c3e50;
  box-shadow: none;
}

.theme-classic .perigo-panel-title {
  color: #e74c3c !important;
}

/* ===== THEME SWITCHER ===== */
.theme-switcher {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 3px;
  transition: border-color 0.25s ease;
}

.theme-btn {
  background: transparent;
  border: none !important;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, transform 0.1s;
  opacity: 0.55;
  box-shadow: none !important;
  min-height: unset !important;
  padding: 0 !important;
}

.theme-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1) !important;
  transform: scale(1.15);
}

.theme-btn.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) !important;
}

.theme-dark .theme-switcher {
  border-color: rgba(201, 147, 58, 0.3);
}

.theme-classic .theme-switcher {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.05);
}

.theme-classic .theme-btn:hover {
  background: rgba(0, 0, 0, 0.08) !important;
}

.theme-classic .theme-btn.active {
  background: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) !important;
}
