@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

html, body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-style: normal;
  width: 100%;
  margin: 2em 0 0 0;
  background: #0f0f0f;
  color: #fff;
}

h1 {
  text-align: center;
  margin: 24px 0;
}

#descricao {
  width:100%; 
  background:#111; 
  color:#fff; 
  border-radius:8px; 
  padding:10px; 
  border:none; 
  margin-top:8px; 
  font-family:inherit;
}

h2 {
  text-align: center;
  margin-bottom: 16px;
  color: #e0e0e0;
}

img {
  margin: 50px 0 0 0;
  display: block;
  margin: 0 auto 20px auto;
  width: 150px;
}

#app {
  max-width: 900px;
  margin: 40px auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.day {
  width: 100%;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.day h3 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 18px;
  color: #e0e0e0;
}

.day button {
  width: 100%;
  background: #2a2a2a;
  border: none;
  color: #fff;
  padding: 10px;
  margin-top: 0;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s;
}

.day button:hover {
  background: #3a3a3a;
}

.form {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form.show {
  opacity: 1;
  max-height: 200px; 
}

.form input,
.form select {
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #111;
  color: #fff;
}

.form .confirmar {
  background: #4caf50;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.form .confirmar:hover {
  background: #45a049;
}

.lista {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item {
  background: #111;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  animation: m3-enter 400ms cubic-bezier(0.05, 0.7, 0.1, 1.0) forwards;
  overflow: hidden;
  transition: all 400ms cubic-bezier(0.2, 0, 0, 1);
}

.item.removing {
  animation: m3-exit 300ms cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
  pointer-events: none;
}

@keyframes m3-enter {
  0% { 
    opacity: 0; 
    transform: scale(0.7) translateY(20px); 
    filter: blur(4px);
  }
  60% {
    transform: scale(1.03) translateY(-2px);
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes m3-exit {
  0% { 
    opacity: 1; 
    transform: scale(1);
    max-height: 100px;
  }
  100% { 
    opacity: 0; 
    transform: scale(0.5) translateY(10px);
    max-height: 0;
    margin: 0;
    padding: 0;
  }
}

.day {
  animation: m3-fade-up 600ms cubic-bezier(0.2, 0, 0, 1) forwards;
}

@keyframes m3-fade-up {
  from { 
    opacity: 0; 
    transform: translateY(30px) scale(0.98); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

.form {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 400ms cubic-bezier(0.2, 0, 0, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-funcao {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
}

.tag-fotografia { background: #e67e22; }
.tag-editor { background: #9b59b6; }
.tag-storymaker { background: #e91e63; }
.tag-apoio { background: #2ecc71; }
.tag-artedesign { background: #3498db; }

.remover {
  margin: 0;
  width: 28px !important;
  height: 28px;
  min-width: 28px;
  padding: 0;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 6px;
  background: transparent;
  color: #ff4d4d;
  cursor: pointer;
  font-size: 16px;
  transition: 0.2s;
}

.remover:hover {
  background: rgba(255, 77, 77, 0.15);
}

.event-container {
  margin-bottom: 24px;
  border-bottom: 1px solid #222;
  padding-bottom: 16px;
}

.event-container:last-child {
  border-bottom: none;
}

.briefing {
  background: #111;
  padding: 12px;
  border-radius: 8px;
  margin: 8px 0;
  font-size: 13px;
  border-left: 3px solid #3498db;
}

.briefing p {
  color: #ccc;
  line-height: 1.4;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.briefing-responsavel {
  margin-top: 10px;
}

.resp-arte {
  background: rgba(52, 152, 219, 0.15) !important;
  border: 1px solid rgba(52, 152, 219, 0.3);
  color: #3498db;
  padding: 6px 10px !important;
  font-size: 12px !important;
  border-radius: 6px;
}

.briefing-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #888;
  flex-wrap: wrap;
}

.briefing-meta span {
  background: #1a1a1a;
  padding: 2px 8px;
  border-radius: 4px;
}

body.admin {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#login,
#painel {
  width: 100%;
  max-width: 400px;
  background: #1a1a1a;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  margin-top: 40px;
}

#login input,
#painel input {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border-radius: 8px;
  border: none;
  background: #111;
  color: #fff;
}

#login button,
#painel button {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  font-weight: 500;
}

#btnLogin, #btnCriar, #logout, .btn-publico {
  width: 100%;
  height: 40px;
  margin-top: 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  padding: 0;
}

#btnLogin {
  background: #2a2a2a;
  color: #fff;
}

#btnLogin:hover {
  background: #3a3a3a;
}

#btnCriar {
  background: #4caf50;
  color: #fff;
}

#btnCriar:hover {
  background: #45a049;
}

.btn-publico {
  background: #3498db;
  color: #fff;
}

.btn-publico:hover {
  background: #2980b9;
}

#logout {
  background: #ff4d4d;
  color: #fff;
}

#logout:hover {
  background: #e04343;
}

.admin-subtitle {
  margin-top: 40px;
  font-size: 13px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid #333;
  padding-bottom: 12px;
  text-align: center;
}

#lista {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 40px;
}

#lista div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
}

#lista button {
  margin: 0 0 0 0;
  width: 28px;
  height: 28px;
  min-width: 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  line-height: 1; 

  background: transparent;
  color: #ff4d4d;
  border-radius: 6px;

  font-size: 16px;
}

#lista button:hover {
  background: rgba(255, 77, 77, 0.15);
}

@media (min-width: 600px) {
  #app {
    grid-template-columns: repeat(2, 1fr);
  }

  #login,
  #painel {
    max-width: 500px;
  }
}

@media (min-width: 1024px) {
  #app {
    grid-template-columns: repeat(3, 1fr);
  }
}

#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: #1a1a1a;
  color: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  min-width: 280px;
  max-width: 90vw;
  box-shadow: 0 8px 30px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: auto;
  animation: m3-enter 400ms cubic-bezier(0.05, 0.7, 0.1, 1.0) forwards;
  border: 1px solid #333;
}

.toast.hiding {
  animation: m3-exit 300ms cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
}

.toast.error {
  border-left: 4px solid #ff4d4d;
}

.toast.success {
  border-left: 4px solid #4caf50;
}

.toast.info {
  border-left: 4px solid #3498db;
}

.dialog-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  animation: fadeIn 300ms forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

.dialog-content {
  background: #1a1a1a;
  padding: 24px;
  border-radius: 24px;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  text-align: center;
  animation: m3-enter 400ms cubic-bezier(0.05, 0.7, 0.1, 1.0) forwards;
  border: 1px solid #333;
}

.dialog-content p {
  margin-bottom: 24px;
  font-size: 16px;
  line-height: 1.5;
  color: #e0e0e0;
}

.dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.dialog-actions button {
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  flex: 1;
}

.dialog-cancel {
  background: #2a2a2a;
  color: #fff;
}

.dialog-confirm {
  background: #ff4d4d;
  color: #fff;
}

.dialog-cancel:hover { background: #3a3a3a; }
.dialog-confirm:hover { background: #e04343; }

.dialog-backdrop.hiding {
  opacity: 1;
  animation: fadeOut 300ms forwards;
}

.dialog-backdrop.hiding .dialog-content {
  animation: m3-dialog-exit 250ms cubic-bezier(0.3, 0, 0, 1) forwards;
}

@keyframes m3-dialog-exit {
  0% { 
    opacity: 1; 
    transform: scale(1);
  }
  100% { 
    opacity: 0; 
    transform: scale(0.9) translateY(10px);
  }
}

@keyframes fadeOut { to { opacity: 0; } }

/* Skeleton Loader */
.skeleton {
  background: #222;
  background: linear-gradient(110deg, #222 8%, #333 18%, #222 33%);
  border-radius: 8px;
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  to {
    background-position-x: -200%;
  }
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin: 0 auto 12px auto;
}

.skeleton-button {
  height: 40px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-item {
  height: 36px;
  width: 100%;
  margin-top: 6px;
}
