:root {
    /* Cores Principais (Tema) */
    --cor-primaria: rgb(131, 49, 49);       /* O vermelho principal */
    --cor-primaria-hover: rgb(105, 30, 30); /* Vermelho mais escuro */
    --cor-primaria-clara: #8a0303;          /* Destaques de foco */
    
    /* Cores de Texto */
    --cor-texto: rgb(180, 180, 180);
    --cor-texto-claro: rgb(204, 204, 204);
    --cor-texto-menu: #ccc;
}
.centralizar, h1, h2 {
    text-align: center;
    color: var(--cor-texto);
}
#fundo {
    background-image: url('../image/background.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: "Space Grotesk", sans-serif;
    color: var(--cor-texto-claro);
}
.caixa {
    background: linear-gradient(
        180deg,
        rgba(131, 49, 49, 0.95),
        rgba(90,25,25,0.95)
    );
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.15);
    width: calc(100% - 40px);
    min-height: calc(100dvh - 40px);
    margin: 20px;
    border-radius: 10px;
    padding: 1px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    margin-top: 90px;
}
button, .btn-voltar, .btn-navegar {
    background-color: var(--cor-primaria);
    color: var(--cor-texto);
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition:
        background-color 0.2s,
        transform 0.1s,
        box-shadow 0.1s;
}
button:hover, .btn-voltar:hover , .btn-navegar:hover  {
    background-color: var(--cor-primaria-hover);
    color:var(--cor-texto-claro);
    border: 1px solid rgb(70, 18, 18);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.5);
}
.tela {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease;
}
.tela.ativa {
  opacity: 1;
  transform: translateY(0);
}
.tela.oculta {
  opacity: 0;
}
.oculta {
  display: none;
}
.ativa {
  display: block;
}
footer {
    color: var(--cor-texto);
    font-size: 10px;
    margin-top: auto;
    border-top-width: 2px;
    border-top-color: var(--cor-texto);
    border-top-style: solid;
}
footer p {
    margin: 5px;
}
footer .canto {
    text-align: right;
    font-size: 10px;
    color: var(--cor-texto);
}
.lista, .grid, .per_jor {
    display: grid;
    margin: 10px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    justify-items: center;
}
.ap_his_obj {
    display: grid;
    margin: 10px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    justify-items: center;
}
.classe-card{
    width: 100%;
    max-width: 250px;
    min-height: 200px;
    border: 1px solid var(--cor-texto);
    padding: 10px;
    color: var(--cor-texto);
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.144);
    border-radius: 8px;
    transition: transform 0.2s ease,
                box-shadow 0.2s ease,
                border 0.2s ease;
}
.classe-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0, 0.6);
    border-color: #833131
}
.search-box {
    margin: 10px auto;
    width: 50%;
    display: flex;
    gap: 10px;
    justify-content: center;
}
.input-busca {
    flex: 2;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--cor-primaria);
    border-radius: 5px;
    color: white;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    height: 60px;
}
.input-busca:focus{
    border-color: var(--cor-primaria-clara);
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}
.container-botao-filtro {
    position: relative; /* Importante para o menu aparecer embaixo */
    display: inline-block;
    margin-bottom: 15px;
}
.btn-filtro-geral {
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: 1px solid #833131;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 5px;
}
.btn-filtro-geral:hover {
    background-color: #500a0a;
}
.menu-filtros {
    position: absolute;
    top: 100%; /* Logo abaixo do botão */
    left: 0;
    width: 250px;
    background-color: #1a1a1a;
    border: 1px solid #833131;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    z-index: 1000;
    border-radius: 5px;
    padding: 10px;
    max-height: 400px;
    overflow-y: auto; /* Barra de rolagem se ficar muito grande */
}
.titulo-categoria {
    color: #833131;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
}
.item-filtro {
    color: var(--cor-texto-menu);
    padding: 5px 10px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
}
.item-filtro:hover {
    background-color: #333;
    color: white;
}
.item-filtro.limpar {
    color: #ffcccc;
    font-style: italic;
    border-bottom: 1px solid #555;
    margin-bottom: 5px;
}
.item-filtro.selecionado {
    background-color: #833131; /* Cor de destaque */
    color: #fff;
    font-weight: bold;
}
.item-filtro.selecionado::before {
    content: "✓ ";
}
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-thumb {
    background: #833131;
    border-radius: 4px;
}
::-webkit-scrollbar-track {
    background: #111;
}
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

form input, .input-primario, textarea  {
    width: 280px;
    padding: 12px 15px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--cor-primaria);
    border-radius: 5px;
    color: var(--cor-texto-claro);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 
        border-color 0.2s,
        box-shadow 0.2s,
        transform 0.1s;
}

form input::placeholder, .input-primario::placeholder, textarea::placeholder {
    color: rgba(200, 200, 200, 0.6);
}

form input:hover, .input-primario:hover, textarea:hover {
    border-color: var(--cor-primaria-clara);
}

form input:focus, .input-primario:focus, textarea:focus {
    border-color: var(--cor-primaria-clara);
    box-shadow: 0 0 8px rgba(131, 49, 49, 0.7);
    transform: translateY(-2px);
}
.img_atrib {
    background-image: url('../image/atributos.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 60%;
    aspect-ratio: 1 / 1; /* Mantém quadrado */
    position: relative;
}
.size_m {
    font-size: larger;
    display: flex;
    align-items: center;
}
.img_atrib .input {
    position: absolute;
    width: 10%;
    text-align: center;
    outline: none;
    background: transparent;
    border: none;
    color: #fff;
    text-align: center;
    font-size: 2vw;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.for { top: 35%; left: 13%; }
.agi { top: 13%; left: 44%; }
.int { top: 35%; left: 75.5%; }
.vig { top: 72%; left: 64%; }
.pre { top: 72%; left: 23%; }
.stepper-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}
.step-wrapper {
    display: flex;
    align-items: center;
}
.step-container {
    text-align: center;
}
.title {
    padding: 5px 10px;
    border-radius: 5px;
    background-color: rgba(131, 49, 49, 0.6);
    color: var(--cor-texto-claro);
    cursor: pointer;
    font-weight: bold;
    transition: 
        background-color 0.2s, 
        color 0.2s, 
        transform 0.1s;
}
.title:hover {
    background-color: var(--cor-primaria-hover);
    color: #fff;
    transform: translateY(-2px);
}
.title.active {
    background-color: var(--cor-primaria-clara);
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}
.line {
    width: 60px;
    height: 2px;
    background-color: rgba(180, 180, 180, 0.3);
    margin: 0 8px;
    border-radius: 3px;
    transition: background-color 0.3s;
}
.step-wrapper .line.active {
    background-color: var(--cor-primaria-clara);
}
.Atributos, .Origem, .Classe, .Toques_Finais {
    display: none; 
}
.Atributos.active,
.Origem.active,
.Classe.active,
.Toques_Finais.active {
    display: block;
}
.cent {
    display: flex;
    flex-direction: column;
    align-items: center;    
    justify-content: center; 
    gap: 20px; 
}
.Toques_Finais p {
    max-width: 800px;
    margin: 0 auto 25px auto;
    line-height: 1.6;
    color: var(--cor-texto-claro);
}
.Toques_Finais h3 {
    margin-bottom: 8px;
    color: var(--cor-texto-claro);
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
}
.Toques_Finais .centralizar {
    display: flex;
    justify-content: center;
}
.ficha-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin: 20px;
}
.ficha-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    color: var(--cor-texto-claro);
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
    max-height: 1350px;
    overflow: hidden;
}
.ficha-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.atributos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}
.atributos-grid div {
    background: rgba(0,0,0,0.4);
    padding: 8px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    color: var(--cor-texto-claro);
}
.pericias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px; 
    padding-right: 5px;
    max-height: 1250px;    /* altura limitada no celular */
    overflow-y: auto;     /* scroll aparece se exceder */
    padding-right: 5px;   /* espaço para a barra de scroll */
}
#view-historico {
    line-height: 1.6;
    text-align: justify;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}
.barra-status-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 5px 0;
}
.barra-status-container label {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--cor-texto-claro);
}
.barra-status {
    width: 100%;
    height: 25px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
.barra-status div {
    height: 100%;
    width: 0%;
    border-radius: 12px;
    transition: width 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0,0,0,0.7);
    font-size: 0.9rem;
}
#barra-pv {
    background-color: #e74c3c; 
}
#barra-pe {
    background-color: #FF8811; 
}
#barra-san {
    background-color: #9b59b6; 
}
#barra-pd {
    background-color: #3498db; 
}
.input-atrib {
    width: 40px;
    background: var(--cor-primaria);
    border: 1px solid var(--cor-primaria-clara);
    color: var(--cor-texto-claro);
    font-weight: bold;
    text-align: center;
    border-radius: 4px;
    margin-left: 5px;
}
.item-pericia-edit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4); 
    border-radius: 6px;
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 6px;
    box-sizing: border-box; 
    width: 100%;
    transition: all 0.2s ease;
}
.item-pericia-edit:hover {
    background: rgba(131, 49, 49, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.nome-pericia {
    flex: 1; /* O nome ocupa o máximo de espaço possível */
    font-weight: bold;
}
.select-treino, .input-outros {
    background: rgba(0,0,0,0.6);
    border: 1px solid #833131;
    color: #fff;
    border-radius: 5px;
    padding: 3px 5px;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.2s;
}
.input-outros {
    width: auto; /* agora ocupa só o necessário */
    min-width: 40px;
    max-width: 60px;
    text-align: center;
}
.treino-5 { background: #165336 !important; font-weight: bold; } 
.treino-10 { background: #113ca1 !important; font-weight: bold; } 
.treino-15 { background: #b36b03 !important; font-weight: bold; } 
.select-treino:hover, .input-outros:hover,
.select-treino:focus, .input-outros:focus {
    border-color: var(--cor-primaria-clara);
    box-shadow: 0 0 5px rgba(255,0,0,0.5);
}
.textarea-ficha {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--cor-texto-claro);
    border: 1px solid var(--cor-primaria);
    border-radius: 5px;
    padding: 10px;
    font-family: inherit;
    resize: vertical; /* Permite esticar apenas para baixo */
    margin-top: 5px;
    margin-bottom: 15px;
    box-sizing: border-box;
}
.textarea-ficha:focus {
    border-color: var(--cor-primaria-clara);
    outline: none;
    box-shadow: 0 0 5px rgba(131, 49, 49, 0.5);
}
.input-inline {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--cor-primaria);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: inherit;
    margin-left: 5px;
}
.input-inline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #222;
}
.ficha-card h3 {
    border-left: 4px solid var(--cor-primaria);
    padding-left: 10px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 1.1rem;
}
.status-header-controle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 4px;
}
.setas-grupo {
    display: flex;
    gap: 8px;
}
.btn-seta {
    background: none;
    border: none;
    color: var(--cor-texto-claro);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
    margin: 0;
    transition: transform 0.1s, color 0.2s;
    line-height: 1;
}
.btn-seta:hover {
    color: var(--cor-texto-claro);
    transform: scale(1.3);
    background: none; /* Garante que não apareça fundo de botão padrão */
    box-shadow: none;
}
.btn-seta:active {
    transform: scale(0.9);
}
.status-header-controle label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}
.status-emergencia {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
}
.check-morte {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #555;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}
.check-morte:checked {
    background-color: #ff0000; /* Vermelho para morte, use azul para sanidade se quiser */
    border-color: #ff4444;
    box-shadow: 0 0 10px #ff0000;
}
.ocuta { display: none !important; }
.defesa-container {
    padding: 20px;
    color: var(--cor-texto-claro);
}
.defesa-principal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.defesa-valor {
    text-align: center;
}
.defesa-valor h2 {
    font-size: 3.5rem;
    margin: 0;
    color: white;
    text-shadow: 0 0 10px rgba(131, 49, 49, 0.7);
}
.defesa-valor span {
    font-size: 0.8rem;
    letter-spacing: 2px;
    opacity: 0.8;
}
.defesa-formula {
    background: rgba(0,0,0,0.5);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
}
.input-def {
    width: 55px;
    background: rgba(0,0,0,0.7);
    border: 1px solid var(--cor-primaria);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 3px;
    margin: 0 3px;
    transition: all 0.2s ease;
}
.input-def:focus {
    border-color: var(--cor-primaria-clara);
    box-shadow: 0 0 6px rgba(131, 49, 49, 0.7);
    outline: none;
}
.defesa-detalhes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}
.item-detalhe {
    background: rgba(0,0,0,0.4);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.08);
}
.item-detalhe:hover {
    background: rgba(131, 49, 49, 0.4);
    transform: translateY(-2px);
}
.item-detalhe label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
    opacity: 0.8;
}
.input-calculado span {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
}
.campo-pe-turno,
.campo-deslocamento, .campo-pd-limite {
    display: flex;
    gap: 8px;
    min-width: 180px;
    transition: all 0.2s ease;
    
}
.campo-pe-turno label,
.campo-deslocamento label, .campo-pd-limite label {
    color: var(--cor-texto-claro);
}
.input-pe-rodada, .input-pd-limite {
    width: 40px;
    font-weight: bold;
    text-align: center;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--cor-primaria);
    border-radius: 6px;
    color: white;
    padding: 5px;
    transition: all 0.2s ease;
}
.input-pe-rodada:focus, .input-pd-limite:focus {
    border-color: var(--cor-primaria-clara);
    box-shadow: 0 0 8px rgba(131,49,49,0.7);
    outline: none;
}
.input-desloc {
    display: flex;
    gap: 6px;
    flex-wrap: wrap; 
}
.input-desloc input {
    width: 55px;
    text-align: center;
    font-weight: bold;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--cor-primaria);
    border-radius: 6px;
    color: white;
    padding: 4px;
    transition: all 0.2s ease;
    flex: 1;        
    min-width: 0; 
}
.input-desloc input:focus {
    border-color: var(--cor-primaria-clara);
    box-shadow: 0 0 6px rgba(131,49,49,0.7);
    outline: none;
}
.input-desloc span {
    font-size: 0.85rem;
    opacity: 0.7;
    font-weight: bold;
    color: var(--cor-texto-claro);
}
.campo-longo {
    width: 100%;
}
.campo-longo textarea {
    width: 100%;
    box-sizing: border-box;
}
.classe-card.selecionado {
    background-color: #8a0303;
}
.sidebar-rapida {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    width: 100%;
    height: 70px;
    justify-content: center;
    align-items: center; 
    overflow: hidden;
    gap: 15px;
    padding: 0 20px;
    /* MAIS ESCURO que a .caixa */
    background: linear-gradient(
        180deg,
        rgba(40, 10, 10, 0.95),
        rgba(20, 5, 5, 0.95)
    );
    border-bottom: 2px solid var(--cor-primaria);
    box-shadow: 
        0 0 25px rgba(131, 49, 49, 0.4),
        0 15px 35px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    z-index: 3000;
}
.sidebar-rapida .nav-item {
    background: transparent;
    border: none;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: var(--cor-texto-menu);
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}
.sidebar-rapida .nav-item:hover {
    background: var(--cor-primaria);
    border-color: var(--cor-primaria-clara);
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(131, 49, 49, 0.7);
}
.rodape {
    display: flex; 
    justify-content: space-between;
}
.coluna {
    display: flex;
    flex-direction: column; 
}
.close-menu-label {
    display: none;
}
.caixa-dados {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}
.resultado-display {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--cor-primaria);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(131, 49, 49, 0.5);
    transition: transform 0.2s;
}
#valor-dado {
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
}
#tipo-dado {
    font-size: 0.8rem;
    color: var(--cor-texto-claro);
    text-transform: uppercase;
}
.grid-dados {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}
.btn-dado {
    background: rgba(20, 5, 5, 0.9);
    border: 1px solid var(--cor-primaria);
    padding: 15px;
    font-size: 1.2rem;
    color: var(--cor-texto-claro);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-dado:hover {
    background: var(--cor-primaria);
    transform: scale(1.05);
}
.historico-dados {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
}
.historico-dados ul {
    list-style: none;
    padding: 0;
    font-size: 0.9rem;
    color: var(--cor-texto);
}
.animar-dado {
    animation: tremer 0.1s infinite;
}
.config-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #222;
}
.config-info { flex: 1; padding-right: 15px; }
.config-titulo {
    color: var(--cor-texto-claro);
    font-weight: bold;
    display: block;
}
.config-desc {
    font-size: 0.85rem;
    color: #ccc;
    margin: 5px 0 0 0;
}
.status-label {
    min-width: 80px;
    text-align: right;
    font-size: 0.75rem;
    font-weight: bold;
    color: #666;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background-color: var(--cor-primaria); }
input:checked + .slider:before { transform: translateX(26px); }
input:checked ~ .status-label { color: var(--cor-primaria-clara); }
.campo-prestigio{
    display: flex;
}
.carga-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 300px;
}
.carga-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.carga-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}
.barra-progresso-carga {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
}
#barra-carga-interna {
    height: 100%;
    width: 0%;
    background: var(--cor-primaria);
    transition: width 0.3s ease;
}
#aviso-carga {
    color: #ff4444;
    display: none;
    font-size: 12px;
}
#edit-prestigio, #carga-atual, #carga-max {
    display: flex;
    max-width: 30px;
}
.modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 2, 2, 0.85);
    backdrop-filter: blur(6px);
}
.modal:not(.modal-oculto) {
    display: flex;
}
.modal-conteudo {
    width: 95%;
    max-width: 900px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(
        180deg,
        rgba(40, 10, 10, 0.95),
        rgba(20, 5, 5, 0.95)
    );
    border: 1px solid var(--cor-primaria);
    border-radius: 12px;
    box-shadow:
        0 0 25px rgba(131, 49, 49, 0.4),
        0 20px 40px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    animation: aparecerModal 0.25s ease-out;
}
@keyframes aparecerModal {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.modal-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 25px;

    border-bottom: 1px solid rgba(131,49,49,0.4);
    background: rgba(0,0,0,0.4);
}
.modal-cabecalho h2 {
    margin: 0;
    font-size: 1.3rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cor-texto-claro);
}
.modal-cabecalho button {
    background: transparent;
    border: 1px solid var(--cor-primaria);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    margin: 0;
    padding: 0;
    font-weight: bold;
}
.modal-cabecalho button:hover {
    background: var(--cor-primaria);
    transform: rotate(90deg);
}
.modal-filtros {
    padding: 18px 25px;
    display: flex;
    gap: 15px;
    background: rgba(0,0,0,0.35);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-sizing: border-box;
    flex-wrap: wrap;
}
.modal-filtros input,
.modal-filtros select {
    flex: 1;
    padding: 10px 12px;

    background: rgba(0,0,0,0.6);
    border: 1px solid var(--cor-primaria);
    border-radius: 6px;

    color: var(--cor-texto-claro);
    font-family: inherit;

    transition: all 0.2s ease;
}
.modal-filtros input:focus,
.modal-filtros select:focus {
    border-color: var(--cor-primaria-clara);
    box-shadow: 0 0 8px rgba(131,49,49,0.6);
    outline: none;
}
.grid-itens {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.grid-itens-2 {
    max-height: 300px; 
    overflow-y: auto;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.card-item-catalogo,
.card-item {
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 4px solid var(--cor-primaria);
    border-radius: 8px;
    transition: all 0.2s ease;
    margin: 5px;
}
.card-item {
    cursor: grab;
    user-select: none; 
}
.card-item-catalogo:hover,
.card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.6);
}
.item-header-modal,
.item-principal {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--cor-texto-claro);
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.item-header-modal:hover,
.item-principal:hover {
    background: rgba(131,49,49,0.2);
}
.detalhes-item-modal,
.detalhes-item {
    display: none;
    padding: 15px 18px;
    background: rgba(0,0,0,0.6);
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--cor-texto-claro);
}
.card-item-catalogo.aberto .detalhes-item-modal,
.card-item.aberto .detalhes-item {
    display: block;
}
.card-item.arrastando {
    opacity: 0.4;
    border: 2px dashed #888;
}
.card-item.drag-over {
    border-top: 5px solid #ff0000;
    transform: translateY(5px);
}
.btn-adicionar-item {
    background: rgba(0,0,0,0.5);
    border: 2px dashed var(--cor-primaria);
    border-radius: 8px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-top: 10px;
}
.btn-adicionar-item:hover {
    background: var(--cor-primaria);
    box-shadow: 0 0 15px rgba(131,49,49,0.6);
}
.btn-adicionar {
    background: var(--cor-primaria);
    border-radius: 6px;
}
.btn-remover, .btn-melhorar, .btn-editar {
    background: transparent;
    border: 1px solid var(--cor-primaria);
    border-radius: 6px;
}
.btn-remover:hover, .btn-melhorar:hover, .btn-editar:hover {
    background: var(--cor-primaria);
}
.tabela-limites {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    overflow: hidden;
}
.tabela-limites td {
    padding: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    vertical-align: middle;
}
.tabela-limites th {
    background: rgba(131,49,49,0.4);
    padding: 8px;
    font-size: 0.85rem;
    letter-spacing: 1px;
}
.linha-atual td {
    color: var(--cor-primaria-clara);
    font-weight: bold;
}
#modal-melhorias .modal-conteudo {
    width: 95%;
    max-width: 900px;
    max-height: 85vh; 
    display: flex;
    flex-direction: column;
    background: linear-gradient(
        180deg,
        rgba(40, 10, 10, 0.95),
        rgba(20, 5, 5, 0.95)
    );
    border: 1px solid var(--cor-primaria);
    border-radius: 12px;
    box-shadow:
        0 0 25px rgba(131, 49, 49, 0.4),
        0 20px 40px rgba(0, 0, 0, 0.8);
    overflow-y: auto; 
}
.listas-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 25px;
}
.listas-container h3 {
    color: var(--cor-texto-claro);
    margin: 5px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(131,49,49,0.4);
    padding-bottom: 4px;
}
.footer-modal {
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.35);
    border-top: 1px solid rgba(131,49,49,0.4);
    color: var(--cor-texto-claro);
}
.footer-modal button {
    background-color: var(--cor-primaria);
    color: var(--cor-texto);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.1s;
}
.footer-modal button:hover {
    background-color: var(--cor-primaria-hover);
    color: var(--cor-texto-claro);
    border: 1px solid rgb(70, 18, 18);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.5);
}
.nao_vaza_invent{
    max-height: 800px;
    overflow-y: auto; 
}
.nao_vaza{
    max-height: 1250px;
    overflow-y: auto; 
}
.modal-editar-conteudo {
    max-width: 800px;
}
.modal-corpo-editar {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}
.grid-editar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.campo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.campo label {
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cor-texto-claro);
    opacity: 0.8;
}
.campo input,
.campo textarea {
    width: 100%;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--cor-primaria);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--cor-texto-claro);
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.campo input:focus,
.campo textarea:focus {
    border-color: var(--cor-primaria-clara);
    box-shadow: 0 0 8px rgba(131,49,49,0.7);
    transform: translateY(-2px);
    outline: none;
}
.campo textarea {
    resize: vertical;
    min-height: 90px;
}
.campo.pequeno {
    max-width: 140px;
}
.campo-longo {
    grid-column: 1 / -1;
}
.container-avatar {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}
.avatar-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid var(--cor-primaria);
    box-shadow:
        0 0 25px rgba(131, 49, 49, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.avatar-wrapper:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 35px rgba(131, 49, 49, 0.9),
        0 15px 40px rgba(0, 0, 0, 1);
}
.avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
}
.avatar-wrapper:hover img {
    filter: brightness(0.6);
}
.overlay-foto {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.2),
        rgba(0,0,0,0.7)
    );
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.avatar-wrapper:hover .overlay-foto {
    opacity: 1;
}
.overlay-foto span {
    color: #fff;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
    background: rgba(131,49,49,0.8);
    padding: 8px 14px;
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(131,49,49,0.8);
}
.modal-foto-conteudo {
    max-width: 500px;
    height: auto;
}
.modal-corpo-foto {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.modal-corpo-foto label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cor-texto-claro);
    opacity: 0.8;
}
.modal-corpo-foto input {
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--cor-primaria);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--cor-texto-claro);
    font-family: inherit;
    transition: all 0.2s ease;
}
.modal-corpo-foto input:focus {
    border-color: var(--cor-primaria-clara);
    box-shadow: 0 0 8px rgba(131,49,49,0.7);
    outline: none;
}
.preview-avatar {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}
.preview-avatar img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cor-primaria);
    box-shadow: 0 0 20px rgba(131,49,49,0.6);
}
.toggle-password {
    position: absolute;
    top: 30%;
    right: 0px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--cor-texto-claro);
    opacity: 0.6;
    transition: 
        opacity 0.2s ease,
        transform 0.2s ease,
        color 0.2s ease;
    width: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toggle-password:hover {
    opacity: 1;
    color: #fff;
    transform: translateY(-50%) scale(1.15);
}
.toggle-password:active {
    transform: translateY(-50%) scale(0.9);
}
.password-container {
    position: relative;
}
#DT {
    border-radius: 50px;
    width: 18px;
}
.header-foto-nome {
    display: flex;
    align-items: center;
    gap: 10px;
}
.img-ritual-miniatura, .img-item-inventario {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    object-fit: cover;
    border: 1px solid #444;
}
.card-ajuda {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 4px solid var(--cor-primaria);
    border-radius: 8px;
    padding: 18px;
    transition: all 0.2s ease;
}
.card-ajuda:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    background: rgba(131,49,49,0.15);
}
.card-ajuda h4 {
    margin: 0 0 8px 0;
    color: var(--cor-texto-claro);
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
}
.card-ajuda p, .card-ajuda li {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--cor-texto);
}
.tabela-ajuda {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    border: 1px solid rgba(131,49,49,0.4);
}
.tabela-ajuda th {
    background: linear-gradient(
        90deg,
        rgba(131,49,49,0.8),
        rgba(90,25,25,0.8)
    );
    padding: 12px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.tabela-ajuda td {
    padding: 12px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--cor-texto-claro);
    border-top: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s ease, transform 0.15s ease;
}
.tabela-ajuda tr:hover td {
    background: rgba(131,49,49,0.25);
}
.abas-evolucao {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 10px 0;
    flex-wrap: wrap;
}
.aba-btn {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(131,49,49,0.4);
    border-bottom: 2px solid transparent;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cor-texto-claro);
    border-radius: 6px 6px 0 0;
    margin: 0;
    transition: all 0.2s ease;
}
.aba-btn:hover {
    background: rgba(131,49,49,0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
}
.aba-btn.active {
    background: linear-gradient(
        180deg,
        rgba(131,49,49,0.9),
        rgba(90,25,25,0.9)
    );
    border: 1px solid var(--cor-primaria);
    border-bottom: 2px solid var(--cor-primaria-clara);
    color: #fff;
    box-shadow: 0 0 15px rgba(131,49,49,0.6);
}
.tabela-classe {
    animation: fadeInTabela 0.2s ease;
}
.cabecalho-campanha {
    text-align: center;
    margin-bottom: 25px;
}
.cabecalho-campanha h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: var(--cor-texto-claro);
}
.cabecalho-campanha p {
    font-size: 0.95rem;
    margin-bottom: 15px;
}
.codigo-badge {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--cor-texto-claro);
}
.codigo-badge strong {
    color: rgb(255, 0, 0);
}
.painel-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.sessao-jogadores h2 {
    font-size: 1.1rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: var(--cor-texto-claro);
    border-bottom: 1px solid rgba(131,49,49,0.4);
    padding-bottom: 4px;
}
#select-personagem-entrada {
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--cor-primaria);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--cor-texto-claro);
    transition: all 0.2s ease;
}
#select-personagem-entrada:focus {
    border-color: var(--cor-primaria-clara);
    box-shadow: 0 0 8px rgba(131,49,49,0.7);
    outline: none;
    transform: translateY(-2px);
}
#etapa-personagem {
    max-width: 480px;
    margin: 40px auto;
    flex-direction: column;
}
#etapa-personagem p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cor-texto-claro);
}
#etapa-personagem label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}
.card-agente-mestre {
    background: linear-gradient(
        180deg,
        rgba(40, 10, 10, 0.95),
        rgba(20, 5, 5, 0.95)
    );
    border: 1px solid rgba(131,49,49,0.6);
    border-left: 5px solid var(--cor-primaria);
    border-radius: 12px;
    padding: 18px;
    box-shadow:
        0 0 25px rgba(131,49,49,0.25),
        0 15px 35px rgba(0,0,0,0.7);
    transition: all 0.25s ease;
}
.card-agente-mestre:hover {
    transform: translateY(-6px);
    box-shadow:
        0 0 35px rgba(131,49,49,0.5),
        0 25px 45px rgba(0,0,0,0.9);
}
.card-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}
.foto-agente {
    width: 75px;
    height: 75px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--cor-primaria);
    box-shadow: 0 0 15px rgba(131,49,49,0.5);
}
.info-principal h4 {
    margin: 0;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}
.info-principal p {
    margin: 2px 0;
    font-size: 0.85rem;
    opacity: 0.9;
}
.info-principal span {
    font-size: 0.75rem;
    opacity: 0.7;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 15px 0;
}
.stat {
    background: rgba(0,0,0,0.5);
    border-radius: 6px;
    padding: 6px;
    text-align: center;
    font-size: 0.75rem;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s ease;
}
.stat:hover {
    background: rgba(131,49,49,0.3);
    transform: translateY(-2px);
}
.stat b {
    display: block;
    font-size: 0.7rem;
    opacity: 0.7;
}
.stat span {
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
}
.barras-vitais {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.barra-bg {
    width: 100%;
    height: 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.barra-fill {
    height: 100%;
    transition: width 0.4s ease;
    border-radius: 8px;
}
.barra-container span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}
.barra-container small {
    position: absolute;
    right: 0;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
}
.barra-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    padding-top: 14px;
}
.detalhes-combate {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 0.75rem;
    margin-bottom: 15px;
}
.detalhes-combate span {
    background: rgba(0,0,0,0.5);
    padding: 6px 8px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}
.btn-abrir-ficha {
    width: 100%;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}
@keyframes tremer {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    50% { transform: translate(-1px, -2px) rotate(-1deg); }
    100% { transform: translate(1px, 2px) rotate(1deg); }
}
@media (max-width: 800px) {
    .stepper-container {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .step-wrapper {
        width: 100%;
        justify-content: center;
        position: relative;
    }
    .line {
        display: none; /* remove a linha horizontal no mobile */
    }
    .title {
        width: 100%;
        text-align: center;
    }
    .img_atrib .input {
        font-size: 5vw;
    }
    .ficha-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
    .ficha-card {
        max-height: none;
    }
    .close-menu-label {
        display: flex;
        position: fixed;
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        background: var(--cor-primaria-clara);
        z-index: 4000; /* Acima da barra */
        cursor: pointer;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        color: white;
        font-size: 1.5rem;
    }
    .close-menu-label::after {
        content: "☰";
    }
    .close-menu-checkbox:checked ~ .close-menu-label::after {
        content: "×";
    }
    .sidebar-rapida {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        background: rgba(20, 5, 5, 0.98); 
        gap: 20px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-in-out;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px;
        max-height: 100vh;          
        overflow-y: auto;            
        overflow-x: hidden;
    }
    .close-menu-checkbox:checked ~ .sidebar-rapida {
        opacity: 1;
        visibility: visible;
    }
    .sidebar-rapida .nav-item {
        flex-shrink: 0;
        font-size: 1.2rem;
        width: 80%;
        padding: 15px;
        border-bottom: 1px solid rgba(131, 49, 49, 0.3);
    }
    .caixa {
        margin-top: 80px; 
    }
    .menu-filtros-flutuante {
        max-width: 200px;
    }
}
@media (max-width: 590px) {
    .ficha-grid {
        grid-template-columns: repeat(1, minmax(180px, 1fr));
    }
    .menu-filtros-flutuante {
        max-width: 100px;
    }
}