/* ===========================
   Reset / Base
=========================== */
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: #eef2f7;
  color: #122033;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ===========================
   Topbar
=========================== */
.topbar {
  background: linear-gradient(to right, #0e305d, #0a5bd7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  box-shadow: 0 4px 12px rgba(10,91,215,0.08);
  position: sticky;
  top: 0;
  height: 90px;
  z-index: 9999;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.arara {
    transition: opacity 0.5s ease; /* animação suave */
  }
  .fade-out {
    opacity: 0;
  }

.brand {
  display: flex;
  flex-direction: column;     /* coloca info e botão em coluna */
  align-items: flex-start;    /* alinha tudo à esquerda */
  gap: 0.4rem;
}

.brand-info {
  display: flex;              /* mantém ícone + dot + título em linha */
  align-items: center;
  gap: 0.6rem;
}

.brand h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
	font-size: 10px;
    padding: 10px;
	color: white;
	height: 56px;
  }
  
@media (max-height: 700px) {
  .login-links {
    display: none;
  }
}


.dot { width: 10px; height: 10px; border-radius: 50%; }
.online { background: #29cc7a; box-shadow: 0 0 0 3px rgba(41,204,122,0.18); }

.actions-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar a.btn.ghost {
  background: #fff;
  color: #0a5bd7;
  border: 1px solid rgba(10,91,215,0.3);
}

.forte {
	font-weight: 600;
}



/* ===========================
   Botões
=========================== */
.btn {
  background: #0a5bd7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn:hover { filter: brightness(0.95); }
.btn:active { transform: translateY(1px); }

.btn.ghost {
  background: transparent;
  color: #0a5bd7;
  border: 1px solid rgba(10,91,215,0.14);
}

.btn.purple {
  background: #6c5ce7;
}

.btn.cancel {
  background: #E57373;
  color: white;
}

.btn.create {
  background: #8BC34A;
  color: white;
}

.btn.primary {
  width: 300px;
}


/* ===========================
   Container e Grid
=========================== */
.container {
  max-width: 980px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.lista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ===========================
   Cards
=========================== */
.card {
  background: #ffffff;
  border: 1px solid #e3e7ef;
  border-radius: 12px;
  padding: 24px 30px;
  box-shadow: 0 8px 20px rgba(17,24,39,0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(17,24,39,0.08);
}
.card .title { font-weight: 700; font-size: 1.05rem; color: #0f1724; margin: 0; }

/* ===========================
   Roteiro Page
=========================== */
.roteiro-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 2rem;
}

.block-card {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 900px;
  width: 100%;
}

.block-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.block-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6c5ce7;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
}

/* Inputs / Textareas */
.input {
  width: 95%;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  background: #fff;
  outline: none;
  transition: border-color 0.12s;
}
.input:focus { border-color: #0a5bd7; box-shadow: 0 0 0 6px rgba(10,91,215,0.06); }

.input.text {
  min-height: 160px;
  max-height: 300px;
  overflow: auto;
  resize: vertical;
}

/* Galeria de imagens */
.galeria {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.img-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #fafbff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-wrapper .trash {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.55);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  font-size: 14px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*ícone*/

.img-icon {
  max-height: 50px;
  width: auto;
}

.img-icon-small {
  max-height: 16px;
  width: auto;
}

/* animação bugada */
@keyframes erroWobble {
  0%   { transform: rotate(0deg) skew(0deg, 0deg); }
  10%  { transform: rotate(30deg) skew(10deg, -5deg); }
  20%  { transform: rotate(60deg) translateX(3px); }
  30%  { transform: rotate(90deg) skew(-10deg, 5deg); }
  40%  { transform: rotate(120deg) translateY(-3px); }
  50%  { transform: rotate(180deg) skew(15deg, -10deg); }
  70%  { transform: rotate(250deg) translateX(-4px); }
  90%  { transform: rotate(330deg) skew(-15deg, 8deg); }
  100% { transform: rotate(360deg) skew(0deg, 0deg); }
}

.img-icon.animar {
  animation: erroWobble 1.5s infinite linear;
}

/* Modal geral */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  background: rgba(6, 10, 20, 0.35);
}

.modal.hidden { display: none; }

.modal-content {
  background: #f8fafc;
  width: 420px;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(2,6,23,0.28);
  overflow: hidden;
  animation: pop 0.18s ease-out;
}

.modal-titlebar {
  background: #0a5bd7;
  color: white;
  padding: 0.72rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.05rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

/* Modalzinha "Salvo!" */
.save-modal {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #14c414;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 1000;
}

.save-modal.show {
  opacity: 1;
}

/* Helpers */
.sr-only { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

@keyframes pop {
  from { transform: translateY(-6px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Container para botão + select */
.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

/* Select estilizado */
.select-sort {
  padding: 0.4rem 0.7rem;
  border: 1px solid #cfcfcf;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s ease;
  outline: none;
}

.select-sort:hover {
  background: #ebebeb;
}

.select-sort:focus {
  border-color: #5c8df6;
  box-shadow: 0 0 0 2px rgba(66,133,244,0.3);
}

.brand-info h1 {
  font-size: 1.4rem;
}

/* Cards mais elegantes */
.lista .card {
  background: white;
  padding: 1.2rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform .12s ease, box-shadow .12s ease;
}

.lista .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 14px rgba(0,0,0,0.15);
}

/* Título do card */
.card .title {
  margin-bottom: .5rem;
  font-size: 1.2rem;
}

/* Metadados */
.card .meta {
  color: #888;
  margin-bottom: .8rem;
  font-size: .9rem;
  line-height: 1.3rem;
}

/* Botões do card */
.card-actions {
  display: flex;
  gap: .5rem;
}

body.login {
  background: linear-gradient(to right, #0e305d, #0a5bd7);
}

/* wrapper do usuário */
.user-menu {
  margin-left: auto;
  position: relative;
}


/* nome do usuário */
.usuario-logado {
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
}

.usuario-logado:hover {
  background: rgba(255,255,255,0.08);
}

/* dropdown */
.user-dropdown {
  position: absolute;
  right: 0;
  top: 120%;
  background: #1e1e1e;
  border-radius: 8px;
  padding: 0.3rem;
  display: none;
  min-width: 120px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  z-index: 100;
}

.user-dropdown button {
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  padding: 0.5rem;
  cursor: pointer;
  text-align: left;
}

.user-dropdown button:hover {
  background: rgba(255,255,255,0.1);
}

/* visível */
.user-dropdown.show {
  display: block;
}

.hamburger,
.mobile-menu {
  display: none;
}

@media (max-width: 768px) {

  .topbar-actions {
    display: none;
  }

  .hamburger {
    display: block;
    font-size: 1.6rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
  }

	.mobile-menu {
	  position: fixed;
	  top: 90px;
	  right: 0;
	  width: 240px;
	  background: #0e305d;
	  padding: 1rem;
	  display: none;
	  flex-direction: column;
	  gap: 1rem;
	  z-index: 9998;
	}

	.mobile-menu.show {
	  display: flex;
	}

  
  .mobile-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  .mobile-links a {
    color: white;
    font-weight: 600;
    padding: 0.6rem;
    border-radius: 6px;
	display: block;
    width: 100%;
  }

  .mobile-links a:hover {
    background: rgba(255,255,255,0.1);
  }

  .mobile-user {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
  }

  .user-menu {
    display: none;
  }
  
  .menu-separator {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 0.6rem 0;
}

.logout-btn {
  width: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 0.6rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.logout-btn:hover {
  background: rgba(229,115,115,0.9);
}

.fala {
  position: absolute;
  top: 50%; 
  left: calc(100% + 10px);
  transform: translateY(-50%);
  background: #ffd966;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.fala.shake {
  animation: shake 0.4s ease-in-out infinite;
}


.fala.show {
  opacity: 1;
}

.fala .mao {
  display: inline-block;
  transform-origin: bottom center;
}




