/* =========================================================
   ENCONTROS ALEATÓRIOS — DARK & GOLD (TORMENTA STYLE)
   ========================================================= */

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

:root {
  /* Tema Sangue */
  --bg-principal: #0a0404;
  --bg-radial: radial-gradient(circle at center, #1b0a0a 0%, #0a0404 100%);
  --bg-card: rgba(22, 14, 14, 0.75);
  --bg-card-solid: #160e0e;
  --borda-card: rgba(204, 13, 13, 0.22);
  --borda-card-hover: rgba(204, 13, 13, 0.45);
  
  --ouro: #cc0d0d;
  --ouro-glow: rgba(204, 13, 13, 0.35);
  --ouro-dark: #8b0000;
  
  --rubi: #ff2e2e;
  --rubi-glow: rgba(255, 46, 46, 0.25);
  --rubi-dark: #b91c1c;
  
  --texto-principal: #e8e4e4;
  --texto-secundario: #a39898;
  --text-muted: #736868;
  --border-focus: #cc0d0d;

  --radius-panel: 16px;
  --radius-card: 12px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --bg-input: rgba(22, 14, 14, 0.7);
  --bg-sub-card: rgba(22, 14, 14, 0.4);
}

.theme-dark {
  /* Tema Sombras */
  --bg-principal: #07080c;
  --bg-radial: radial-gradient(circle at center, #111524 0%, #07080c 100%);
  --bg-card: rgba(18, 22, 33, 0.75);
  --bg-card-solid: #121621;
  --borda-card: rgba(255, 213, 79, 0.09);
  --borda-card-hover: rgba(255, 213, 79, 0.22);
  
  --ouro: #ffd54f;
  --ouro-glow: rgba(255, 213, 79, 0.15);
  --ouro-dark: #d4af37;
  
  --rubi: #e0483f;
  --rubi-glow: rgba(224, 72, 63, 0.25);
  --rubi-dark: #c0392b;
  
  --texto-principal: #e2e8f0;
  --texto-secundario: #8a9ba8;
  --text-muted: #64748b;
  --border-focus: #ffd54f;

  --bg-input: rgba(10, 12, 19, 0.7);
  --bg-sub-card: rgba(10, 12, 19, 0.4);
}

.theme-classic {
  /* Tema Clássico */
  --bg-principal: #f0ece4;
  --bg-radial: radial-gradient(circle at center, #fbf9f5 0%, #f0ece4 100%);
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-solid: #ffffff;
  --borda-card: #b0b8c8;
  --borda-card-hover: #7f8c8d;
  
  --ouro: #e74c3c;
  --ouro-glow: rgba(231, 76, 60, 0.2);
  --ouro-dark: #c0392b;
  
  --rubi: #2c3e50;
  --rubi-glow: rgba(44, 62, 80, 0.15);
  --rubi-dark: #1a252f;
  
  --texto-principal: #2c3e50;
  --texto-secundario: #4a5568;
  --text-muted: #7f8c8d;
  --border-focus: #e74c3c;

  --bg-input: #ffffff;
  --bg-sub-card: #f9f8f6;
}

/* ===== BASE RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  background-color: var(--bg-principal);
  background-image: var(--bg-radial);
  color: var(--texto-principal);
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.5;
  padding-bottom: 80px;
  position: relative;
  overflow-x: hidden;
}

/* Marca d'água discreta de fundo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("capa.jpeg") center / cover no-repeat;
  opacity: .04;
  pointer-events: none;
  z-index: -1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0b0d14;
}
::-webkit-scrollbar-thumb {
  background: #1e2436;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ouro-dark);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(18, 22, 33, 0.95);
  border: 1px solid var(--borda-card);
  border-left: 4px solid var(--ouro);
  border-radius: 8px;
  padding: 12px 20px;
  color: var(--texto-principal);
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  opacity: 0;
}

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

.toast-sucesso {
  border-left-color: #2ecc71;
  box-shadow: 0 5px 15px rgba(46, 204, 113, 0.15);
}

.toast-aviso {
  border-left-color: var(--rubi);
  box-shadow: 0 5px 15px rgba(224, 72, 63, 0.15);
}

/* ===== HEADER ===== */
.header {
  background: rgba(10, 12, 19, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--borda-card);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.btn-back {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  position: absolute;
  left: 20px;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--ouro);
  color: var(--ouro);
  transform: translateX(-2px);
}

.header-brand {
  text-align: center;
}

.header-title {
  font-family: "Tormenta", serif;
  font-size: 2.2rem;
  letter-spacing: 2px;
  color: var(--ouro);
  text-shadow: 0 0 15px var(--ouro-glow);
}

.header-subtitle {
  font-size: 0.9rem;
  color: var(--texto-secundario);
  margin-top: 2px;
  font-weight: 500;
}

.header-spacer {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  position: absolute;
  right: 0;
}

.header-home-btn,
.header-theme-btn {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--borda-card);
  color: var(--ouro);
  font-size: 0.9rem;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  transition: var(--transition);
}
.header-home-btn:hover,
.header-theme-btn:hover {
  border-color: var(--ouro);
  box-shadow: 0 0 10px var(--ouro-glow);
  transform: scale(1.05);
}
.header-theme-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  justify-content: center;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
  }
  .btn-back {
    position: static;
    align-self: flex-start;
  }
  .header-spacer {
    position: static;
    justify-content: center;
    width: 100%;
  }
  .header-title {
    font-size: 1.8rem;
  }
}

/* ===== CONTAINER GRID ===== */
.container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 16px;
}

.encounter-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

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

/* ===== PANELS ===== */
.panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--borda-card);
  border-radius: var(--radius-panel);
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 24px;
  transition: border-color 0.3s;
}

.panel:hover {
  border-color: rgba(255, 213, 79, 0.15);
}

.panel-title {
  font-family: "Tormenta", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ouro);
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 213, 79, 0.15);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 213, 79, 0.15);
  padding-bottom: 8px;
}

.panel-header-row .panel-title {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

/* ===== CORES E TEXTOS ===== */
.text-accent {
  color: var(--ouro);
}
.text-rubi {
  color: var(--rubi);
}
.text-muted {
  color: var(--texto-secundario);
}
.w-100 {
  width: 100%;
}
.flex-1 {
  flex: 1;
}

/* ===== DICAS / COMO FUNCIONA ===== */
.guide-panel {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.15);
  padding: 16px;
  margin-bottom: 20px;
}

.guide-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--texto-secundario);
  cursor: pointer;
  font-size: 0.95rem;
  transition: var(--transition);
}

.guide-toggle:hover {
  color: var(--ouro);
}

.guide-toggle-icon {
  font-size: 0.8rem;
  color: var(--ouro);
}

.guide-content {
  margin-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

.guide-content p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--texto-secundario);
}

.guide-content strong {
  color: var(--texto-principal);
}

/* ===== DIÁRIO DE VIAGEM ===== */
.travel-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--bg-sub-card);
  border: 1px solid var(--borda-card);
  border-radius: var(--radius-card);
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--texto-secundario);
  margin-bottom: 4px;
}

.stat-value {
  font-family: "Tormenta", serif;
  font-size: 1.6rem;
  font-weight: 700;
}

/* ===== INPUTS & CAMPOS ===== */
.field {
  margin-bottom: 16px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--texto-secundario);
  display: block;
  margin-bottom: 6px;
}

input[type="number"],
.select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--borda-card);
  border-radius: 8px;
  color: var(--texto-principal);
  font-family: inherit;
  font-weight: 600;
  transition: var(--transition);
}

input[type="number"]:focus,
.select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.15);
}

/* ===== BOTÕES ===== */
.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  background: var(--rubi);
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 10px 16px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--ouro);
  color: #0c0f17;
  border-color: var(--ouro-dark);
}

.btn-primary:hover {
  box-shadow: 0 0 15px rgba(255, 213, 79, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--texto-principal);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--ouro);
  color: var(--ouro);
}

.btn-ghost {
  background: transparent;
  color: var(--texto-secundario);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--ouro);
  color: var(--ouro);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.btn-glow {
  box-shadow: 0 0 15px rgba(255, 213, 79, 0.2);
}

.btn-danger {
  background: var(--rubi);
  color: white;
}

.btn-danger:hover {
  box-shadow: 0 0 15px rgba(224, 72, 63, 0.3);
}

/* ===== CARDS E SEÇÕES ===== */
.stack {
  display: grid;
  gap: 16px;
}

.card-dark {
  background: var(--bg-sub-card);
  border: 1px solid var(--borda-card);
  border-radius: var(--radius-card);
  padding: 14px;
}

.card-subtitle-gold {
  font-family: "Tormenta", serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ouro);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.empty-state-message {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-state-message i {
  font-size: 1.8rem;
  opacity: 0.6;
}

/* ===== SEGMENTADO (PATAMAR) ===== */
.btn-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.seg-btn {
  position: relative;
  background: var(--bg-sub-card);
  border: 1px solid var(--borda-card);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--texto-secundario);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.seg-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg-btn:hover {
  background: rgba(255, 213, 79, 0.04);
  border-color: var(--ouro);
  color: var(--texto-principal);
}

.seg-btn.active {
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.12) 0%, rgba(212, 175, 55, 0.03) 100%);
  border-color: var(--ouro);
  color: var(--ouro);
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.15);
}

/* Tooltip Imagem no Hover */
.hover-content {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d1017;
  border: 1px solid var(--ouro);
  border-radius: 10px;
  padding: 10px;
  width: 200px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 100;
  pointer-events: none;
}

.seg-btn:hover .hover-content {
  display: block;
}

.radio-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.seg-btn .message {
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--texto-principal);
}

/* ===== RESULT TABLE ===== */
.result-panel {
  animation: fadeIn 0.4s ease-out;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--borda-card);
  background: var(--bg-sub-card);
  margin-bottom: 20px;
}

.str-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.str-table th {
  background: rgba(15, 20, 31, 0.9);
  color: var(--ouro);
  font-family: "Tormenta", serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 2px solid var(--borda-card);
  white-space: nowrap;
}

.str-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
  color: var(--texto-principal);
  vertical-align: middle;
}

.str-table tr:hover {
  background: rgba(255, 213, 79, 0.02);
}

.str-table td strong {
  color: var(--ouro);
}

.str-table img {
  width: 80px;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: block;
}

/* ===== THREAT CARDS & STAT CARDS ===== */
.threats-section {
  border-top: 1px solid rgba(255, 213, 79, 0.15);
  padding-top: 18px;
  margin-top: 10px;
}

.threats-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.threats-section-header .threats-section-title {
  margin-bottom: 0;
}

.threats-section-title {
  font-family: "Tormenta", serif;
  font-size: 1.05rem;
  color: var(--ouro);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.threat-cards-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.threat-card {
  background: var(--bg-sub-card);
  border: 1px solid var(--borda-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: var(--transition);
}

.threat-card:hover {
  border-color: var(--borda-card-hover);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.threat-header {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.threat-name-row {
  display: flex;
  flex-direction: column;
}

.threat-title {
  font-family: "Tormenta", serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ouro);
}

.threat-type {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--texto-secundario);
}

.threat-nd-badge {
  font-family: "Tormenta", serif;
  font-weight: 800;
  font-size: 0.8rem;
  background: rgba(255, 213, 79, 0.1);
  border: 1px solid var(--ouro);
  color: var(--ouro);
  padding: 3px 8px;
  border-radius: 4px;
  text-shadow: 0 0 5px var(--ouro-glow);
}

.threat-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.threat-summary-item {
  display: flex;
  flex-direction: column;
}

.threat-summary-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.threat-summary-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--texto-principal);
}

.threat-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.15);
  align-items: center;
  flex-wrap: wrap;
}

/* Ficha Expandida Detalhes */
.threat-details {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.85rem;
  animation: slideDown 0.25s ease-out;
}

.threat-attrs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  text-align: center;
}

.threat-attr-item {
  background: rgba(10, 12, 19, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 6px 4px;
}

.threat-attr-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--texto-secundario);
  display: block;
}

.threat-attr-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ouro);
}

.threat-details-block {
  margin-bottom: 12px;
}

.threat-details-lbl {
  font-weight: 700;
  color: var(--ouro-dark);
  margin-bottom: 4px;
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.threat-details-val {
  color: var(--texto-principal);
  line-height: 1.4;
}

.threat-attacks-list, .threat-skills-list {
  list-style: none;
}

.threat-attack-item, .threat-skill-item {
  margin-bottom: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--ouro-dark);
  border-radius: 0 6px 6px 0;
}

.threat-attack-title, .threat-skill-title {
  font-weight: 700;
  color: var(--texto-principal);
}

.threat-attack-dano {
  color: var(--rubi);
  font-weight: 700;
}

.threat-attack-desc, .threat-skill-desc {
  font-size: 0.78rem;
  color: var(--texto-secundario);
  margin-top: 2px;
}

/* Envio para combate modal inline */
.combat-sender-box {
  background: rgba(224, 72, 63, 0.05);
  border: 1px dashed var(--rubi);
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.combat-sender-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.combat-qty-input {
  width: 60px;
  text-align: center;
}


/* ===== HISTÓRICO DE ROLAGENS ===== */
.history-panel {
  border-color: rgba(255, 255, 255, 0.05);
}

.history-list {
  list-style: none;
  font-size: 0.8rem;
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-list li {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.history-list li:last-child {
  border-bottom: none;
}

.history-list strong {
  color: var(--ouro-dark);
}

.history-list span {
  line-height: 1.4;
}

.history-list small {
  color: var(--text-muted);
  white-space: nowrap;
}

.history-empty {
  font-style: italic;
  color: var(--text-muted);
  justify-content: center !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; overflow: hidden; }
  to { opacity: 1; max-height: 500px; }
}

/* =========================================================
   ASSINATURA / CRÉDITOS (STR-style) - PRESERVADOS
   ========================================================= */

.sig-wrap {
  max-width: 1100px;
  margin: 28px auto 40px;
  padding: 0 16px;
}

.sig-card {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
  overflow: hidden;
}

.sig-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px;
  background: #2f3f4f;
  /* header STR */
  color: #ffffff;
  position: relative;
}

.sig-summary::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: #e0483f;
  /* faixa vermelha */
}

.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(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  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;
  opacity: .95;
}

.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: #f6f7fb;
  /* leve cinza como card do STR */
}

.sig-hero {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .10);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .06);
  margin-bottom: 14px;
}

.sig-h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

.sig-p {
  margin: 0 0 10px;
  color: rgba(15, 23, 42, .86);
  line-height: 1.45;
}

.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: #ffffff;
  border: 1px solid rgba(0, 0, 0, .10);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .06);
}

.sig-h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: .7px;
}

.sig-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .10);
  text-decoration: none;
  background: #ffffff;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
  margin-bottom: 10px;
}

.sig-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, .08);
  border-color: rgba(0, 0, 0, .16);
}

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

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

.sig-link-name {
  font-weight: 900;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.15;
}

.sig-link-url {
  color: rgba(15, 23, 42, .62);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sig-ext {
  color: rgba(15, 23, 42, .55);
  font-size: 16px;
  flex: 0 0 auto;
}

.sig-link-primary {
  border-color: rgba(224, 72, 63, .35);
  box-shadow: 0 10px 20px rgba(224, 72, 63, .10);
}

.sig-link-primary:hover {
  border-color: rgba(224, 72, 63, .55);
  box-shadow: 0 14px 24px rgba(224, 72, 63, .14);
}

.sig-note {
  margin-top: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(0, 0, 0, .16);
  background: rgba(47, 63, 79, .04);
  padding: 12px;
}

.sig-note-title {
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(15, 23, 42, .72);
  margin-bottom: 6px;
}

.sig-note-text {
  color: rgba(15, 23, 42, .78);
  font-size: 13px;
  line-height: 1.35;
}

.sig-footer {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .10);
  background: #ffffff;
  display: flex;
  justify-content: center;
}

.sig-footer-text {
  color: rgba(15, 23, 42, .68);
  font-size: 12px;
}

/* =========================================================
   THEME: CLASSIC (Azul + Vermelho)
   ========================================================= */
.theme-classic {
  --bg-principal: #f0ece4;
  --bg-radial: radial-gradient(circle at center, #f7f3eb 0%, #e8e2d6 100%);
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-solid: #ffffff;
  --borda-card: #b0b8c8;
  --borda-card-hover: #8a9ab0;
  --ouro: #2c3e50;
  --ouro-glow: rgba(44, 62, 80, 0.12);
  --ouro-dark: #1a252f;
  --rubi: #e74c3c;
  --rubi-glow: rgba(231, 76, 60, 0.18);
  --rubi-dark: #c0392b;
  --texto-principal: #2c3e50;
  --texto-secundario: #5a6a7a;
  --text-muted: #7a8a9a;
  --border-focus: #2980b9;
}
.theme-classic body {
  background-color: var(--bg-principal);
  background-image: var(--bg-radial);
  color: var(--texto-principal);
}
.theme-classic body::before { opacity: .025; }
.theme-classic ::-webkit-scrollbar-track { background: #ddd8cc; }
.theme-classic ::-webkit-scrollbar-thumb { background: #b0b8c4; }
.theme-classic ::-webkit-scrollbar-thumb:hover { background: #8a96a6; }
.theme-classic .header {
  background: #2c3e50;
  border-bottom: 2px solid #e74c3c;
}
.theme-classic .header-title {
  color: #ecf0f1;
  text-shadow: none;
}
.theme-classic .header-subtitle {
  color: #bdc3c7;
}
.theme-classic .btn-back {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ecf0f1;
}
.theme-classic .btn-back:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}
.theme-classic .panel {
  background: var(--bg-card);
  border-color: var(--borda-card);
}
.theme-classic .card-dark {
  background: #e8e2d6;
  border-color: var(--borda-card);
}
.theme-classic .card-subtitle-gold { color: var(--ouro); }
.theme-classic .field input,
.theme-classic .field select,
.theme-classic input[type="number"],
.theme-classic .select {
  background: #ffffff;
  border-color: var(--borda-card);
  color: var(--texto-principal);
}
.theme-classic .btn-primary {
  background: #2c3e50;
  border-color: #2c3e50;
  color: #fff;
}
.theme-classic .btn-primary:hover {
  background: #1a252f;
}
.theme-classic .btn-secondary {
  background: rgba(44, 62, 80, 0.06);
  border-color: var(--borda-card);
  color: var(--texto-principal);
}
.theme-classic .btn-secondary:hover {
  background: rgba(44, 62, 80, 0.10);
}
.theme-classic .btn-ghost {
  color: var(--texto-secundario);
}
.theme-classic .btn-ghost:hover {
  color: var(--texto-principal);
  background: rgba(44, 62, 80, 0.04);
}
.theme-classic .btn-danger {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}
.theme-classic .btn-danger:hover {
  background: #c0392b;
}
.theme-classic .btn-glow {
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.20);
}
.theme-classic .seg-btn {
  background: #ddd8cc;
  border-color: var(--borda-card);
}
.theme-classic .seg-btn.active {
  background: #2c3e50;
  border-color: #2c3e50;
}
.theme-classic .seg-btn.active span { color: #fff; }
.theme-classic .seg-btn:hover:not(.active) {
  border-color: #e74c3c;
}
.theme-classic .threat-card {
  background: #ffffff;
  border-color: var(--borda-card);
}
.theme-classic .threat-header {
  background: linear-gradient(135deg, #e8e2d6, #ddd8cc);
}
.theme-classic .threat-header .threat-title { color: var(--texto-principal); }
.theme-classic .threat-header .threat-type { color: var(--texto-secundario); }
.theme-classic .threat-summary {
  background: rgba(44, 62, 80, 0.03);
}
.theme-classic .threat-summary-val {
  color: var(--texto-principal);
}
.theme-classic .threat-attr-item {
  background: rgba(44, 62, 80, 0.03);
  border-color: rgba(44, 62, 80, 0.08);
}
.theme-classic .threat-attr-val {
  color: var(--texto-principal);
}
.theme-classic .threat-summary-item {
  background: rgba(44, 62, 80, 0.03);
}
.theme-classic .toast {
  background: #ffffff;
  border-color: var(--borda-card);
  color: var(--texto-principal);
}
.theme-classic .travel-stats .stat-card {
  background: #ffffff;
  border-color: var(--borda-card);
}
.theme-classic .travel-stats .stat-label { color: var(--texto-secundario); }
.theme-classic .travel-stats .stat-value { color: var(--texto-principal); }
.theme-classic .sig-card {
  background: #ffffff;
  border-color: var(--borda-card);
}
.theme-classic .sig-summary {
  background: rgba(44, 62, 80, 0.03);
}
.theme-classic .sig-footer {
  background: #e8e2d6;
}
.theme-classic .sig-note {
  border-color: var(--borda-card);
  background: rgba(44, 62, 80, 0.03);
}
.theme-classic .header-home-btn,
.theme-classic .theme-switcher {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ecf0f1;
}
.theme-classic .header-home-btn:hover,
.theme-classic .theme-switcher:hover {
  border-color: #e74c3c;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.25);
}

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

.theme-btn {
  background: transparent;
  border: none;
  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;
}

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

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

.theme-dark .theme-switcher {
  border-color: rgba(255, 213, 79, 0.3);
}

.theme-classic .theme-switcher {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.2);
}
