*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

/* ===========================
   PALETA / TOKENS
   =========================== */

:root {
  --bg-root: #05070b;
  --bg-main: #05070b;
  --bg-panel: #11141c;
  --bg-panel-soft: #161925;
  --bg-hover: #1c2030;
  --border-subtle: #1d2230;
  --text-main: #e5e7eb;
  --text-soft: #9ca3af;
  --text-muted: #6b7280;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.16);
  --danger: #ef4444;
}

/* ===========================
   BODY / LAYOUT GERAL
   =========================== */

body.app-body {
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.8), transparent 55%),
    var(--bg-root);
  color: var(--text-main);
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===========================
   MAIN AREA (SEM TOPBAR)
   =========================== */

.main-area {
  flex: 1;
  background: var(--bg-main);
  padding: 20px 28px 230px;
  display: flex;
  flex-direction: column;
}

.main-content {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

/* ===========================
   HERO / INFO ILHA
   =========================== */

.hero-strip {
  background: var(--bg-panel);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hero-ilha-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-ilha-box img,
.hero-ilha-box > div:first-child div {
  border-radius: 12px;
  width: 111px;
  height: 111px;
  object-fit: cover;  
}

.ilha-header-desc h1 {
  font-size: 2.34rem;
  opacity: 0.4;
  margin: 0;
  padding: 0;
}

.ilha-header-desc p{
  margin: 0;
  margin-block-start: 0;
  margin-block-end: 0;
}

.ilha-header-desc p:first-child(2) {
  font-size: 0.92rem;
  color: var(--text-main);
}

.ilha-header-desc p:nth-child(3) {
  font-size: 0.78rem;
  padding: 12px 0 5px;
  color: var(--text-muted);
}

.hero-tags-ilha {
  display: flex;
  gap: 8px;
}

.hero-chip.hero-chip-button {
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid #374151;
  background: #05070b;
  transition: background 0.3s ease;
  padding: 6px 12px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.hero-chip.hero-chip-button:hover {
  background: #222735;
}

/* ===========================
   GRID ILHA (FASES / LINKS / COTIDIANO)
   =========================== */

.grid-dashboard.grid-ilha {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: flex-start;
}

/* GRID HOME (chefões / destaques / recorrentes) */
.grid-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr);
  gap: 20px;
  margin-top: 20px;
  align-items: flex-start;
}

/* Agrupamento visual dos destaques por ilha na home */
.destaques-ilha {
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.tarefa-box-home:nth-child(1) {
  border-radius: 10px 10px 0 0;
  padding-top: 3px;
}
.tarefa-box-home:nth-child(2) {
  border-radius: 0 0 0 0;
}
.tarefa-box-home:nth-child(3) {
  border-radius: 0 0 10px 10px;
  padding-bottom: 9px;
}

.tarefa-box-home:nth-child(2) .badge {
  display: none;
}
.tarefa-box-home:nth-child(3) .badge {
  display: none;
}
.tarefa-box-home:nth-child(1) .tarefa-title{
  margin-top: 13px;
}

.destaques-ilha:hover {
  transform: scale(1.01);
  transition: 0.2s ease;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.85));
}

.destaques-ilha .tarefa-check-circle {
  display: none;
}

.destaques-ilha:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.panel {
  background: var(--bg-panel);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  padding: 12px 14px 14px;
}

.diariogrid {
  height: 100%;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  opacity: 0.7;
  color: var(--text-main);
  margin-block-start: 0em;
  margin-block-end: 0em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
}

/* MARLON - omiti caso queira colocar novamente um subtitulo na fase, mas por enquanto não vou usar*/
.panel-sub {
  margin: 0px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.panel-fases {
  grid-column: 1;
  gap: 22px;
}

.panel-fases-pe {
  grid-column: 1;
}

.panel-rodape {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 12px 14px 0px;
  display: flex;
  margin: 20px 0 -230px;  
  border-radius: 16px 16px 0 0;
}

.panel-rodape .panel-header {
  display: flex;
  width: 100%;
}

.panel-rodape .panel-sub {
  display: flex;
  width: 100%;
  justify-content: space-around;
}
.panel-rodape .panel-sub span:first-of-type {
  width: 100%;
}
.panel-rodape .panel-sub span:last-of-type {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}


.panel-fases .panel-header {
  margin-bottom: -10px;
}

.fase-actions-line {
  margin: 5px 0px 3px;
}

.panel-lateral-ilha,
.panel-cotidiano {
  grid-column: 2;
}

.panel-cotidiano {
  margin-top: 16px;
}

.ilha-titulo-click {
  cursor: pointer;
}
.ilha-titulo-click:hover {
  color:var(--text-main);
  opacity: 0.9;
  transform: translateY(-1px);
}

.fase-extra-btn {
  cursor: pointer;
  font-size:0.78rem;
  color:var(--text-muted);
  margin-top:4px;
}

.fase-extra-btn:hover {
  cursor: pointer;
  font-size:0.78rem;
  color:var(--text-main);
  margin-top:4px;
}

/* ===========================
   FASES / LISTA DE TAREFAS
   =========================== */

.fases-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fase {
  padding: 0 0 0px 0;
  /* border-bottom: 1px solid var(--border-subtle); */
}

.fase:last-child {
  border-bottom: none;
}

.fase-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  margin-bottom: 0px;
}

.fase-ordem {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-soft);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid #1f2937;
}

.fase-title {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
}
.fase-title:hover {
  opacity: 0.5;
  transform: translateY(-1px);
}


.fase-header img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
}

.fase > p {
  margin: -4px 0 0px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.fase-add-task-btn, .fase-completed-btn {
  border-radius: 999px;
  border: 1px dashed #374151;
  background: transparent;
  font-size: 0.75rem;
  padding: 4px 10px;
  color: var(--text-soft);
  cursor: pointer;
  margin-bottom: 6px;
}

.fase-add-task-btn:hover, .fase-completed-btn:hover {
  border-style: solid;
  background: var(--bg-panel-soft);
}

.fase-tasks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tarefa-item {
  margin-bottom: 7px;
}

.tarefa-item.dragging .tarefa-box{
  border: 2px dotted var(--text-muted);
  background: var(--bg-panel);
  color: var(--bg-panel);
  opacity: 0.7;
  cursor: grabbing;
}

.tarefa-item.dragging .tarefa-box .tarefa-left {
  opacity: 0;
}
.tarefa-item.dragging .tarefa-box .tarefa-right {
  opacity: 0;
}

.tarefa-box {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--bg-panel-soft);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    transform 0.06s ease;
}

.tarefa-box:hover {
  background: var(--bg-hover);
  border-color: #273549;
}

.sort-fase-item.dragging .sort-fase-order {
  color: var(--bg-panel);
}

.tarefa-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tarefa-right {
  display: flex;
  align-items: center;
}
.tarefa-right:hover {
  transform: scale(1.1);
  transition: 0.1s ease;
}

/* círculo simples para marcar como feito */
.tarefa-check-circle {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;

  border-radius: 999px;
  border: 2px solid #4b5563;
  background: transparent;
  padding: 0;
  cursor: pointer;

  border-radius: 50%;  /* garante que fique circular */
  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;      /* impede de comprimir e virar oval */
  overflow: hidden;    /* impede conteúdo de estourar */
}


.tarefa-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tarefa-title-line .badge {
  margin-bottom: 0px;
}

.badge {
  font-size: 0.7rem;
  padding: 2px 6px 2px 7px;
  border-radius: 999px;
  background: #11141c;
  margin-bottom: 20px;
  color: var(--text-soft);
}

.tarefa-title {
  font-size: 0.86rem;
  padding-left: 2px;
  color: var(--text-main);
}

.tarefa-desc {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

#lista-destaques .tarefa-desc {
  display: none;
}

.tarefa-highlight-btn {
  border-radius: 999px;
  border: 1px solid #374151;
  background: transparent;
  padding: 2px 10px;
  font-size: 0.75rem;
  color: var(--text-soft);
  cursor: pointer;
}

.tarefa-highlight-btn--active {
  background: radial-gradient(circle at 20% 0, #ffd56a 0, #e5a82b 60%);
  border-color: #ffd56a;
  color: #261606;
}

/* ===========================
   LINKS RÁPIDOS
   =========================== */

.links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.links-list img {
  width: 15px;
}

.links-list li {
  padding: 6px 8px;
  font-weight: 700;
  border-radius: 10px;
  font-size: 0.7rem;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.links-list li a {
  color: inherit;
  text-decoration: none;
}

.links-list li:hover {
  background: var(--bg-panel-soft);
  color: var(--text-main);
}

/* ===========================
   COTIDIANO / TAREFAS RECORRENTES
   =========================== */

.cotidiano-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cotidiano-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.cotidiano-item:hover {
  background: var(--bg-panel-soft);
}

.cotidiano-item-feito {
  opacity: 0.5;
}
.cotidiano-item-feito .cotidiano-title, .cotidiano-item-feito .cotidiano-desc {
  text-decoration: line-through;
}

.cotidiano-toggle {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #4b5563;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.cotidiano-circle {
  font-size: 1rem;
  line-height: 3;
  color: #98a5b8;
}

.cotidiano-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cotidiano-title {
  font-size: 0.8rem;
  color: var(--text-main);
}

.cotidiano-desc {
  font-size: 0.76rem;
  color: var(--text-soft);
}

.cotidiano-empty {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===========================
   RODAPÉ – DESTAQUES ILHA
   =========================== */

.ilha-fixed-destaques {
  position: fixed;
  left: 220px;           /* mesma largura da sidebar desktop */
  right: 0;
  bottom: 0;
  padding: 8px 24px 12px;
  pointer-events: none;  /* deixa clicar só dentro do box */
  z-index: 30;
}

.ilha-fixed-destaques-inner {
  background: var(--bg-panel);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 10px 10px;
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.ilha-fixed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0px 5px 12px 5px;
}

.ilha-fixed-header h3 {
  font-size: 0.86rem;
  padding: 0;
  margin: 0;
  color: var(--text-main);
}

.ilha-fixed-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ilha-fixed-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ilha-fixed-list .card {
  background: var(--bg-panel-soft);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.ilha-fixed-destaques .badge {
  display: none;
}

.ilha-fixed-destaques h3 {
  margin: 3px 0 0;
}

/* ===========================
   FORM / BOTÕES
   =========================== */

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.text-input,
textarea.text-input,
#cotidiano-titulo,
#cotidiano-descricao,
#edit-titulo,
#edit-descricao,
#edit-chefe-nome,
#edit-chefe-imagem {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #030712;
  color: var(--text-main);
  font-size: 0.82rem;
  padding: 6px 8px;
}

textarea.text-input,
#cotidiano-descricao,
#edit-descricao {
  resize: vertical;
  min-height: 70px;
}

.btn-desafio {
  border-radius: 999px;
  border: none;
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 700;
 
  background: linear-gradient(135deg, #31627a, #1f8282, #444b5c, #3b5f96);
  background-size: 200% 200%;      /* permite mover o gradiente */
  transition: background-position 0.4s ease; /* animação suave */

  color: #f9fafb;
  cursor: pointer;
}

.btn-desafio:hover {
  background-position: right center; /* desloca gradiente */
}

.primary-btn {
  border-radius: 999px;
  border: none;
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  background: linear-gradient(135deg, #31627a, #3eb5b5);
  color: #f9fafb;
  cursor: pointer;
}

.btn-secondary {
  border-radius: 999px;
  border: 1px solid #374151;
  padding: 6px 14px;
  font-size: 0.8rem;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
}

.btn-danger {
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.9);
  padding: 6px 14px;
  font-size: 0.8rem;
  background: rgba(127, 29, 29, 0.25);
  color: #fecaca;
  cursor: pointer;
}

.icon-btn {
  border-radius: 999px;
  border: 1px solid #374151;
  width: 28px;
  height: 28px;
  background: transparent;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ===========================
   MODAIS (CONCLUÍDAS / EDITAR / COTIDIANO)
   =========================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal-overlay.modal-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(8px);
}

/* modais de concluídas / editar */
.modal-dialog {
  position: relative;
  z-index: 41;
  background: var(--bg-panel);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  padding: 14px 16px 12px;
  width: 420px;
  max-width: calc(100% - 32px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 0.9rem;
  color: var(--text-main);
}

.modal-body {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* modal de cotidiano usa .modal em vez de .modal-dialog */
#modal-cotidiano .modal {
  position: relative;
  z-index: 41;
  background: var(--bg-panel);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  padding: 14px 16px 12px;
  width: 420px;
  max-width: calc(100% - 32px);
}

.field-help {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* lista dentro do modal concluídas */
.modal-item {
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--bg-panel-soft);
  border: 1px solid transparent;
  cursor: pointer;
  margin-bottom: 6px;
  font-size: 0.8rem;
}

.modal-item:hover {
  border-color: #273549;
  background: var(--bg-hover);
}

.modal-item-title {
  color: var(--text-main);
}

.modal-item-date {
  font-size: 0.76rem;
  color: var(--text-muted);
}


/* MODAL ORGANIZAR ORDEM DAS FASES */

.sort-fases-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sort-fase-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--bg-panel-soft);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  cursor: grab;
}

.sort-fase-item.dragging {
  border: 2px dotted var(--text-muted);
  background: var(--bg-panel);
  color: var(--bg-panel);
  opacity: 0.7;
  cursor: grabbing;
}

.sort-fase-item.dragging .sort-fase-order {
  color: var(--bg-panel);
}

.sort-fase-handle {
  font-size: 0.9rem;
  opacity: 0.8;
}

.sort-fase-order {
  width: 24px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.sort-fase-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* só pra alinhar os botões no header de fases */
.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fase-actions {
  margin: 3px 0 5px;
}

/* ==== SIDEBAR (versão larga, com ilhas) ==== */

.sidebar {
  width: 220px;
  padding: 20px 16px;
  background: #05070b;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.sidebar-logo {
  width: 100%;
  height: auto;
  border-radius: 18px;
  /* background: linear-gradient(135deg, #31627a, #3eb5b5); */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3\rem;
  color: #ffffff;
}
.sidebar-logo img {
  width: 150px;
}

.sidebar-nav {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.sidebar-bottom {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: space-around;}

/* botões da sidebar (versão “redondinha”) */
.nav-item {
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  padding: 0;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.1s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.nav-item-rodape {
  color: white;
  padding-top: 3px;
  border: 0;
  cursor: pointer;
  width: 100%;
  height: 50px;
  border-radius: 18px;
  background: linear-gradient(135deg, #31627a, #1f8282, #444b5c, #3b5f96);
  background-size: 200% 200%;      /* permite mover o gradiente */
  transition: background-position 0.4s ease; /* animação suave */
}

.nav-item-rodape:hover {
  background-position: right center; /* desloca gradiente */
}

.nav-item img {
  width: 55px;
}

#btn-diario img {
  width: 63px;
}

button#btn-diario.nav-item {
  background: rgba(255, 0, 0, 0);
  border:  rgba(255, 0, 0, 0);
}

.nav-item span {
  font-size: 1.1rem;
}

.nav-item:hover {
  transform: translateY(-5px);
  transition: 0.5s ease;
  filter: drop-shadow(0 0 23px rgba(45, 125, 255, 0.9));
}

.nav-item-active {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-color: transparent;
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(79, 70, 229, 0.8),
    0 12px 32px rgba(79, 70, 229, 0.65);
}

/* lista de ilhas na sidebar */
.sidebar-ilhas {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.sidebar-ilha-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(6, 10, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font-size: 0.8rem;
  text-decoration: none;
  overflow: hidden;
}

.sidebar-ilha-pill:hover {
  background: rgba(24, 36, 74, 0.95);
  border-color: rgba(54, 225, 255, 0.5);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(45, 125, 255, 0.5);
}

.sidebar-ilha-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #ffffff;
}

.sidebar-ilha-text {
  flex: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sidebar-ilha-count {
  min-width: 24px;
  padding: 2px 0;
  border-radius: 999px;
  background: rgba(48, 80, 255, 0.22);
  color: #d6ddff;
  font-size: 0.75rem;
  text-align: center;
}

.sidebar-add-ilha-btn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px dashed var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-align: center;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.sidebar-add-ilha-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--accent);
}


/* Toggle Chefão */

.chefe-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.chefe-toggle-label input[type="checkbox"] {
  display: none;
}

.chefe-toggle-pill {
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: #111827;
  border: 1px solid #374151;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chefe-toggle-thumb {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #6b7280;
  transition: transform 0.15s ease, background 0.15s ease;
}

/* estado ativo */
.chefe-toggle-label input[type="checkbox"]:checked + .chefe-toggle-pill {
  background: linear-gradient(135deg, #facc15, #f97316);
  border-color: #facc15;
}

.chefe-toggle-label input[type="checkbox"]:checked + .chefe-toggle-pill .chefe-toggle-thumb {
  transform: translateX(16px);
  background: #111827;
}

/* ===== DESAFIO DA SEMANA ===== */

.desafio-col-tarefas {
  display: grid;
  align-content: center;
  margin-left: 20px;
  padding-bottom: 30px;
}


/* Espaço dentro do box da tarefa */
.desafio-col-tarefas .desafio-tarefa-item {
  padding-right: 50px;
}

.desafio-grid {
  display: grid;
  grid-template-columns: 3.8fr 2.8fr 3.8fr;
  gap: 15px;
}

.desafio-grid1 {
  display: grid;
  grid-template-columns: 5.8fr 3.8fr;
  gap: 15px;
}

.desafio-grid2 {
  display: grid;
  grid-template-columns: 6.10fr 4.10fr;
  gap: 15px;
  align-items: start;
}

.desafio-col {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.desafio-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted, #9ca3af);
  margin-bottom: 4px;
    margin-block-start: 0px;
    margin-block-end: 0em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
}

.desafio-titulo {
  text-wrap: balance;
  font-size: 2.8rem;
  line-height: 3rem;
  margin-bottom: 35px;
  margin-top: 4px;
  cursor: pointer;

}

.desafio-titulo:hover {
  text-decoration: underline;
}

.desafio-descricao {
  margin: 0;
  opacity: 0.8;
}

.desafio-meta {
  display: flex;
  align-items: center;
  position: relative;
  gap: 8px;
  margin: 25px 0px 16px;
  flex-wrap: wrap;
}

.desafio-gemas {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1.1rem;
}

.desafio-status {
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  margin-bottom: 43px;
}

/* COLUNA 2 – tarefas do desafio */

.desafio-tarefas-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  margin-right: -70px;
  z-index: 4;
}

.desafio-tarefas-list .desafio-tarefa-item {
  background: var(--bg-panel);
}

.desafio-tarefa-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(45, 255, 196, 0.3);
  box-shadow: 0 0 12px rgba(45, 255, 196, 0.35);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: opacity 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.desafio-tarefa-item.completa {
  opacity: 0.6;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.08);
}

.desafio-tarefa-circle {
  width: 23px;
  height: 23px;
  background: var(--bg-panel);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  margin: 5px 3px 0px 0px;
}

.desafio-tarefa-circle[data-done="true"] {
  background: rgba(45, 255, 196, 0.45);
  border-color: rgba(45, 255, 196, 0.9);
}

.desafio-tarefa-text-title {
  font-size: 0.95rem;
}

.desafio-tarefa-text-sub {
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
}

/* COLUNA – imagem do desafio */

.desafio-imagem-wrapper {
  border-radius: 0 16px 16px 0;
  min-height: 160px;
  max-height: 395px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.desafio-imagem {
  width: 100%;
  object-fit: cover;
}

.desafio-imagem-placeholder {
  font-size: 0.85rem;
  color: var(--text-muted, #9ca3af);
  padding: 12px;
  text-align: center;
}

/* Modal desafio */

.modal-desafio-dialog {
  max-width: 560px;
}

.desafio-tarefas-escolha {
  max-height: 260px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px;
  display: grid;
  gap: 6px;
}

.desafio-parabens-text {
  font-size: 0.95rem;
  margin-bottom: 8px;
}



/* ==== Modal Desafio – lista de tarefas em destaque ==== */

.desafio-tarefas-escolha {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

/* cada tarefa disponível pro desafio */

.desafio-escolha-checkbox {
  cursor: pointer;
  background: var(--panel-panel-soft);
  margin-top: 2px;
  padding: 2px;
}

.desafio-escolha-item-active {
  border: 2px solid #fff;
}

.desafio-escolha-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.desafio-escolha-item small {
  color: var(--text-muted, #9ca3af);
  font-size: 0.75rem;
}

.desafio-escolha-item label {
  display: block;
  width: 100%;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.18);
  background: #030712;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.desafio-escolha-item label:hover {
  border: 1px solid #00e0ff;
  transform: translateY(-2px);
  transition: 0.3s ease;
  background: rgba(0,255,200,0.10);
}

.desafio-escolha-item--selecionado label {
  border:1px solid #00e0ff;
  background: #11141c;
  font-weight: 700;
}

.selecionado {
  border:5px solid #00e0ff;
}

/* título e info da tarefa dentro do label */
.desafio-escolha-item label > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.desafio-escolha-item label > div > div {
  font-size: 0.9rem;
  font-weight: 500;
}

.desafio-escolha-item small {
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
}

/* ==== Scrollbar custom – lista de tarefas do desafio ==== */

.desafio-tarefas-escolha {
  scrollbar-width: thin;
  scrollbar-color: #38bdf8 rgba(15, 23, 42, 0.9);
}

/* Chrome, Edge, Safari */
.desafio-tarefas-escolha::-webkit-scrollbar {
  width: 8px;
}

.desafio-tarefas-escolha::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
}

.desafio-tarefas-escolha::-webkit-scrollbar-thumb {
  background: #38bdf8;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.9);
}

.desafio-tarefas-escolha::-webkit-scrollbar-thumb:hover {
  background: #0ea5e9;
}

/* ==== Scrollbar custom – Diário de Bordo ==== */

.diario-list {
  scrollbar-width: auto;
  scrollbar-color: #4f46e5 rgba(19, 28, 51, 0.9);
}
.main-header h1 {
      margin-block-end: -10px;

}

/* Chrome, Edge, Safari */
.diario-list::-webkit-scrollbar {
  width: 8px;
}

.diario-list::-webkit-scrollbar-track {
  background: rgba(19, 28, 51, 0.9);
  border-radius: 999px;
}

.diario-list::-webkit-scrollbar-thumb {
  background: #4f46e5;
  border-radius: 999px;
  border: 2px solid rgba(19, 28, 51, 0.9);
}

.diario-list::-webkit-scrollbar-thumb:hover {
  background: #161f38;
}

/* === Ilhas em destaque na home (5 colunas aleatórias) === */

.home-ilhas-section {
  margin: 10px 0 18px;
}

.home-ilhas-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: flex-start;
  margin: 35px 0 30px;
}

@media (max-width: 1024px) {
  .home-ilhas-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-ilhas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.home-ilha-item {
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  cursor: pointer;
}

.home-ilha-icon:hover {
  transform: scale(1.08);
  transition: 0.5s ease;
  filter: drop-shadow(0 0 33px rgba(45, 255, 196, 0.45));
}

.home-ilha-item:hover .home-ilha-nome {
  opacity: 0.7;
  transition: 0.5s ease;
  transform: translateY(-4px);  
}

.home-ilha-icon {
  width: 87%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.home-ilha-icon-fallback {
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.home-ilha-nome {
  font-size: 1rem;
  text-align: center;
  font-weight: 700;
  max-width: 120px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* === Chefões da jornada === */

.chefes-slider {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 23px;
}

/* Cartão base do chefão */
.chefe-card {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  text-wrap: balance;
  cursor: pointer;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.chefe-card:hover {
  transform: translateY(-2px);
  transition: 0.3s ease;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.9);
  border-color: #38bdf8;
}

/* Imagem / avatar do chefão */
.chefe-img-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at top, #1d263a 0, #020617 60%);
  min-height: 120px;
  display: flex;
  border: 0;
  align-items: stretch;
  justify-content: stretch;
  box-sizing: content-box;
}

.chefe-img-wrap img {
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

/* Placeholder quando não há imagem */
.chefe-img-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11rem;
  font-family: script;
  opacity: 0.35;
}

.chefe-img-placeholder-dotted {
  border: 4px dashed rgba(148, 163, 184, 0.4);
  width: 97%;
  border-radius: 12px;
}

/* Faixa de informação por cima da imagem (rodapé) */
.chefe-info-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 0rem 0rem;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 1),
    rgba(15, 23, 42, 0.89),
    transparent
  );
}

.chefe-nome {
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: capitalize;
  font-size: 1.3rem;
  color: #e5e7eb;
  margin: -30px 0 3px 0;
  z-index: 20;
}

.chefe-tarefa {
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  margin: 1px 0 5px;
  color: #e5e7eb;
}

.chefe-meta {
  font-size: 0.68rem;
  color: #9ca3af;
  margin: 0px 0 10px;
}

/* Botão "Chefão derrotado" dentro da carta */
.chefe-footer {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chefe-btn-derrotado {
  border: none;
  gap: 4rem;
  border-radius: 11px;
  padding: 13px 5px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #31627a, #1f8282, #444b5c, #3b5f96);
  background-size: 200% 200%;      /* permite mover o gradiente */
  transition: background-position 0.4s ease; /* animação suave */
  color: #ecfdf5;
  cursor: pointer;
  white-space: nowrap;
}

.chefe-btn-derrotado:hover {
  background-position: right center; /* desloca gradiente */
}

.chefe-card-derrotado .chefe-btn-derrotado {
  background: transparent;
  border: 1px dashed rgba(52, 211, 153, 0.7);
  color: #a7f3d0;
}

/* Card vazio “Em breve um novo chefão” */
.chefe-card-vazio {
  justify-content: center;
  align-items: center;
  text-align: center;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top, #020617 0, #020617 60%);
  cursor: default;
}

.chefe-empty-text {
  font-size: 1rem;
  font-weight: 700;
  color: #9ca3af;
  margin-top: 0.5rem;
  padding: 0 0.25rem;
}

/* ===== Desafio da semana – seleção de tarefas ===== */
/* Esconde o checkbox */
#desafio-tarefas-escolha input[type="checkbox"] {
  display: none;
}


/* Coluna de tarefas recorrentes na home */
.panel-recorrentes {
  padding-bottom: 20px;
  height: 100%;
}

.recorrentes-ilha {
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 8px;
}

.recorrentes-ilha:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recorrentes-ilha-nome {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--text-soft);
  margin: 13px 0 7px;
}

.recorrentes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recorrente-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  margin: 4px 0;
}

.recorrente-exec-btn {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #4b5563;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding-block: 1px;
  padding-inline: 20px;
  padding: 0;
}

.recorrente-exec-btn:hover {
  border: 2px solid #8099ba;
}

.recorrente-exec-btn span {
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0;

}

.recorrente-text {
  flex: 1;
}

.recorrente-titulo {
  font-weight: 500;
}

.recorrente-desc {
  font-size: 0.75rem;
  color: var(--text-soft);
}

.recorrente-item:hover .recorrente-titulo {
  color: var(--accent-cyan);
}

/* ===========================
   DIÁRIO DE BORDO
   =========================== */

.grid-dashboard.grid-diario {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr);
  gap: 20px;
  align-items: flex-start;
  margin-top: 16px;
}

.diario-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.diario-item {
  border-radius: 10px;
  padding: 6px 8px;
  background: var(--bg-panel-soft);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diario-item-sm {
  font-size: 0.85rem;
}

.diario-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.diario-title {
  font-weight: 500;
}

.diario-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.diario-desc {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.diario-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  border: 1px solid #374151;
  background: transparent;
}

.ilha-tag {
  color: #a5b4fc;
  border-color: #4f46e5;
}

.desafio-tag {
  color: #fbbf24;
  border-color: #fbbf24;
}

.diario-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Chefes no diário */

#diario-chefes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.chefe-card-derrotado {
  opacity: 0.9;
  gap: 34px;
}

.chefe-info-overlay-derrotado {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  align-items: center;
  padding: 4px 8px;
  font-size: 0.7rem;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.7)
  );
}

.chefe-badge-derrotado {
  background: rgba(34, 197, 94, 0.2);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.7);
  color: #bbf7d0;
}

.chefe-data-derrotado {
  color: var(--text-soft);
}

.chefe-img-diario {
  width: 100%;
  height: 140px;
  object-fit: cover;
}


/* ===========================
   SAGAS – painel na home
   =========================== */

.panel-sagas {
  margin-top: 24px;
}

.panel-sagas .panel-body {
  padding-top: 12px;
}

.sagas-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: 16px;
  align-items: flex-start;
}

.sagas-list-col,
.sagas-detalhes-col {
  min-height: 200px;
}

/* lista de sagas (coluna esquerda) */
.sagas-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sagas-list .list-group-item {
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.85);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.1s ease;
}

.sagas-list .list-group-item:hover {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}


.sagas-list .list-group-item.active-saga {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
  background: radial-gradient(
    circle at top,
    rgba(56, 189, 248, 0.10),
    var(--bg-panel-soft)
  );
  color: var(--text-main);
}

/* header da saga: título + contador 4/15 encostado à direita */
.saga-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.saga-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.saga-item-count {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-soft);
  white-space: nowrap;
}

.saga-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* coluna direita: tarefas da saga */
#sagas-tarefas-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#sagas-tarefas-list .list-group-item {
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.9);
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.1s ease;
}

#sagas-tarefas-list .list-group-item:hover {
  border-color: #4ade80;
  background: rgba(22, 163, 74, 0.08);
  transform: translateY(-1px);
}

.saga-tarefa-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.list-group-item.saga-tarefa-item.dragging {
  border: 3px solid #FF0000;
}

.saga-tarefa-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

.saga-tarefa-origem {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;      /* evita quebrar */
}

.saga-tarefa-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 3px 0 0 0;
}

/* tarefas concluídas da saga: riscadas e esmaecidas */
#sagas-tarefas-list .list-group-item.saga-tarefa-concluida {
  text-decoration: line-through;
  opacity: 0.55;
  color: var(--text-muted);
}

/* estado vazio */
#sagas-detalhes-vazio,
.sagas-detalhes-vazio {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hidden {
  display: none;
}

/*Drag and Drop Função*/

/* Drag & drop Sagas */
.sagas-list .saga-item {
  display: block;
  position: relative;
}

.saga-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.saga-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.saga-item-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.saga-item-desc {
  font-size: 0.75rem;
  opacity: 0.8;
}

.saga-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.saga-drag-handle {
  font-size: 0.9rem;
  opacity: 0.6;
  cursor: grab;
  user-select: none;
}

.saga-item.dragging {
  border: 2px dotted var(--text-muted) !important;
}
.saga-item.dragging .saga-item-header {
  opacity: 0;
  background: #11141c;
}

/* Drag & drop das tarefas da saga */
.saga-tarefa-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.saga-tarefa-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.saga-tarefa-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.saga-tarefa-desc {
  font-size: 0.75rem;
  opacity: 0.8;
}

.saga-tarefa-drag {
  font-size: 0.9rem;
  opacity: 0.6;
  cursor: grab;
  user-select: none;
  margin-left: 4px;
}

.saga-tarefa-item.dragging {
  border: 2px dotted var(--text-muted) !important;
}

.saga-tarefa-item.dragging .saga-tarefa-top {
  opacity: 0;
}

/* container alinhado como o selector de tarefas */
.saga-tarefa-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===============================
   Seção com imagem de fundo na home
   =============================== */

.sec-img-fundo {
  width: 100%;
  height: 380px; /* ajusta se quiser mais alta */
  background: url("../images/capabg-home1.jpg") center center / cover no-repeat;
  border-radius: 16px;
  margin-top: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

/* responsivo */
@media (max-width: 768px) {
  .sec-img-fundo {
    height: 140px;
    border-radius: 12px;
  }
}


/* ===========================
   SAGAS – seleção de tarefas no modal
   =========================== */

/* o container já usa .desafio-tarefas-escolha, só ajusta altura */
.saga-tarefas-opcoes {
  max-height: 260px;
  overflow-y: auto;
}

/* cabeçalho com o nome da ilha agrupando as tarefas */
.saga-ilha-header {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 4px;
  padding: 0 2px;
}

/* usa a mesma base visual do "Desafio da semana" para cada opção */
.saga-tarefa-opcao.desafio-escolha-item {
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #030712;
  padding: 5px 10px 8px 13px;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 2px;
  text-align: left;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.saga-tarefa-opcao.desafio-escolha-item:hover {
  border-color: #00e0ff;
  background: rgba(0, 255, 200, 0.10);
  transform: translateY(-1px);
}

.saga-tarefa-opcao.desafio-escolha-item.desafio-escolha-item-selecionado {
  border-color: #00e0ff;
  background: #11141c;
  font-weight: 700;
}

/* título da tarefa */
.saga-tarefa-opcao strong {
  font-weight: 600;
  color: var(--text-main);
}

/* linha com fase */
.saga-tarefa-opcao .text-muted.small {
  font-size: 0.75rem;
  font-weight: 400;
  margin: 0 0 -5px 4px;
  color: var(--text-muted);
}



/* ===========================
   Diário - Desafios com imagem
   =========================== */

.diario-item-desafio {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.diario-desafio-content {
  display: flex;
  flex-direction: row;
  position: relative;
}

.diario-desafio-textos {
  flex: 1;
  padding: 12px;
  z-index: 2;
  /* texto levemente sobre a área escurecida */
}

.diario-desafio-img-wrapper {
  position: relative;
  width: 35%;              /* 1/3 do card */
  min-width: 120px;
  max-height: 100%;
  overflow: hidden;
}

.diario-desafio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.diario-desafio-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(15, 23, 42, 0.90),
    rgba(15, 23, 42, 0.45),
    transparent
  );
  pointer-events: none;
}

.diario-item-desafio .diario-title {
  font-size: 1rem;
  font-weight: 600;
}

.diario-item-desafio .diario-meta {
  margin-top: 4px;
}



/* ===========================
   MOBILE (até 768px)
   =========================== */
@media (max-width: 768px) {
  /* Fonte um pouco maior no celular */
  body {
    font-size: 16px;
  }

  /* Layout geral */
  .app-layout {
    min-height: 100vh;
    flex-direction: column;
  }

  /* Sidebar vira painel retrátil */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.25s ease-out;
    z-index: 100;
  }

  .sidebar.sidebar-open,
  body.menu-open .sidebar {
    transform: translateX(0);
  }

  /* Área principal sem “espaço lateral” da sidebar */
  .main-area {
    padding: 60px 12px 140px; /* mais espaço em cima por causa do botão */
  }

  /* Botão sanduíche */
  .mobile-menu-toggle {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-panel);
    color: var(--text-main);
    font-size: 1.3rem;
    cursor: pointer;
  }

  /* Overlay escuro atrás da sidebar */
  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
    z-index: 40;
  }

  .mobile-menu-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* Desafio da semana em layout “card em cima / 3 tarefas embaixo” */
  .desafio-grid1,
  .desafio-grid2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .desafio-col-tarefas {
    margin-left: 0;
    padding-bottom: 12px;
  }

  .desafio-col-tarefas .desafio-tarefa-item {
    padding-right: 0;
  }

  .desafio-titulo {
    font-size: 2rem;
    line-height: 2.3rem;
    margin-bottom: 18px;
  }

  /* Popups em tela cheia */
  .modal-overlay {
    align-items: stretch;
    justify-content: flex-start;
  }

  .modal-dialog,
  .modal-desafio-dialog {
    border-radius: 0;
    width: 100%;
    padding-top: 50px;
    max-width: none;
    height: 100vh;
    margin: 0;
  }

  .modal-body {
    max-height: calc(100vh - 120px);
    overflow: auto;
  }

  .grid-dashboard.grid-ilha {
    display: flex;
    flex-direction:column;
    align-items: stretch;
  }

  .panel-cotidiano {
    margin-bottom: 70px;
  }

  .ilha-fixed-list .card {
    padding: 5px 5px 0px 7px;
    font-size: 10px;
  }

  .ilha-fixed-list {
    gap: 5px;
  }
  /*ilha*/
  .hero-strip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-top: 55px;
  }
  .hero-ilha-box {
    margin-top: -65px;
    display: flex;
    gap: 0px;
    flex-direction: column;
  }
  .ilha-header-desc h1 {
    margin-bottom: 10px;
  }
  .ilha-header-desc p:nth-child(3){
    font-size: 10px;
  }

  /* Destaques da ilha FIXOS no rodapé, menores */
  .ilha-fixed-destaques {
    left: 0;
    right: 0;
    padding: 4px 8px 8px;

    width: 100%;
    max-width: 100vw;
  }

  .ilha-fixed-destaques-inner {
    max-width: 100%;
    border-radius: 12px;
    padding: 6px 8px;
  }

  .ilha-fixed-destaques h3 {
    font-size: 0.8rem;
  }

  .ilha-fixed-destaques .tarefa-title {
    font-size: 0.9rem;
  }

  /* Chefões: grid pensado para 4 cards */
  .chefes-slider {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* Grid de ilhas: 2x2 no celular (mas só 4 itens pelo JS) */
  .home-ilhas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* No desktop o botão e overlay não aparecem */
@media (min-width: 769px) {
  .mobile-menu-toggle,
  .mobile-menu-overlay {
    display: none;
  }
}



/* ===== Lista de Vilões (página viloes.html) ===== */
.viloes-panel .panel-header h1 {
  font-size: 2.6rem;
  margin-top: 0px;
  margin-bottom: 4px;
}

.viloes-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 768px) {
  .viloes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.chefe-card-list {
  cursor: pointer;
}

.chefe-card-list .chefe-card-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.chefe-card-list .chefe-img-wrap {
  width: 100%;
  max-width: 170px; /* aumenta se quiser ainda maior */
  aspect-ratio: 2 / 3; /* proporção exata pedida: 2x3 */
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a; /* fallback */
  flex-shrink: 0;
}

.chefe-card-list .chefe-img-wrap img,
.chefe-card-list .chefe-img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover; /* ocupa tudo sem deformar */
  border-radius: 0;
}

.chefe-card-list .chefe-body {
  flex: 1;
}

.chefe-card-list .chefe-nome {
  margin: 0 0 7px;
  color: #e5e7eb;
  font-weight: 700;
  text-transform: capitalize;
  font-size: 1.3rem;
  opacity: 0.8;
  letter-spacing: 0.03em;

}

.chefe-card-list .chefe-tarefa,
.chefe-card-list .chefe-descricao,
.chefe-card-list .chefe-meta {
  margin: 2px 0 13px;
  font-size: 0.85rem;
}

.viloes_link {
  text-decoration: none;
}
.viloes_link:hover {
  text-decoration: underline;
  color: var(--text-main);
  opacity: 1;
}

/* Ajuste MOBILE */


@media (max-width: 768px) {
  .home-ilhas-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chefe-card-list .chefe-img-wrap {
  max-width: 100px; /* aumenta se quiser ainda maior */
  }

  .chefes-slider {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-dashboard {
  display: block;
  align-items: flex-start;
  margin-top: 20px;
  }

  .panel.panel-destaques {
    margin-bottom: 20px !important;
  }

  .desafio-tarefas-list {
    margin: 0 0 0 0;
  }

  .desafio-col-imagem-desktop {
    display: none !important;
    border-radius: 16px !important;
  }
  
  .desafio-imagem-wrapper {
    border-radius: 16px;        /* opcional */
  }
  
  .desafio-status {
    margin-bottom: 20px;
  }

  .panel-rodape {
    margin: 20px 0 -16  9px 0;
  }

  .panel-sub {
    font-size: 10px;
  }

  .sidebar-logo {
    margin-top: -10px;
    background: transparent;
    height: auto;
  }

  .sidebar-logo img {
    max-width: 50%;
  }

  .grid-dashboard.grid-diario {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .diario-list {
    gap:15px;
  }

  .desafio-tag {
    display: none;
  }

}

@media (min-width: 769px) {
  .desafio-col-imagem-mobile {
    display: none !important;
    border-radius: 16px !important;
  }
}


/* NAV MOBILE DIÁRIO – cartelas empilhadas no rodapé */
@media (max-width: 768px) {
  /* dá espaço pro conteúdo não ficar escondido atrás dos cards */
  .main-content {
    padding-bottom: 30px;
  }

  .diario-mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 12px 16px;
    z-index: 40;
    pointer-events: none;  /* quem recebe clique é só o inner/cards */
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.65),
      rgba(0, 0, 0, 0)
    );
  }

  .diario-mobile-nav-inner {
    position: relative;
    max-width: 460px;
    margin: 0 auto;
    height: 90px; /* altura do “monte” de cartelas */
  }

  .diario-nav-card {
    position: absolute;
    left: 0;
    right: 0;
    padding: 10px 16px;
    border-radius: 18px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-panel);       /* usa as cores do teu app */
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
  }

  /* ILHA */
  .tarefa-check-circle {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
  }

  /* offsets pra ficarem “aninhadas” */
  .diario-nav-card--cotidiano {
    bottom: 79px;
    opacity: 0.8;

  }

  .diario-nav-card--chefes {
    bottom: 41px;
    opacity: 0.9;
  }

  .diario-nav-card--desafios {
    bottom: 4px;
    opacity: 1;
  }

  .diario-nav-card:active {
    transform: translateY(1px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.7);
  }

  /* “Some” quando o card correspondente estiver visível */
  .diario-nav-card--hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.96);
  }
}

/* No desktop some esse nav */
@media (min-width: 769px) {
  .diario-mobile-nav {
    display: none;
  }
}

/* ===== TOPBAR MOBILE ===== */
@media (max-width: 768px) {
  .topbar-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 54px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    z-index: 60;
  }

  .mobile-menu-toggle {
    position: static;  /* remove o fixed antigo */
    margin-right: 12px;
  }

  .lifegame-logo-mobile {
    height: 38px;       /* ajuste aqui se quiser maior/menor */
    width: auto;
    object-fit: contain;
    display: block;
  }

  /* empurrar o conteúdo para baixo da topbar */
  .main-area,
  .main-content {
    padding-top: 30px !important;
  }
}

/* desktop: some a topbar mobile */
@media (min-width: 769px) {
  .topbar-mobile {
    display: none;
  }
}

.decretos {
  font-size: 8px;
  color: #222836;
  line-height: 8px;
  padding: 20px 20px 20px 20px;
}