* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f6f8;
  color: #333;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: #2f3e46;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 25px 20px;
  box-shadow: 2px 0 6px rgba(0,0,0,0.1);
}

.sidebar h2 {
  margin-bottom: 35px;
  font-size: 1.7rem;
  font-weight: 600;
}

.sidebar a {
  color: #fff;
  text-decoration: none;
  margin: 12px 0;
  padding: 12px 18px;
  border-radius: 10px;
  display: block;
  transition: 0.25s;
  font-weight: 500;
}

.sidebar a:hover {
  background: #354f5f;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

/* Main */
main {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

h1 {
  margin-bottom: 30px;
  font-size: 2.4rem; /* um pouco maior */
  color: #1f2d3d;    /* tom mais profundo e moderno */
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1); /* leve sombra para profundidade */
}

#entity-select {
  width: 100%;
  max-width: 300px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #b0b0b0;
  font-size: 1rem;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08); /* sombra leve para “elevar” o select */
  margin-bottom: 30px; /* mantém espaçamento do container */
  transition: all 0.2s ease-in-out;
}

#entity-select:focus {
  border-color: #4a90e2;
  box-shadow: 0 4px 12px rgba(74,144,226,0.2);
  outline: none;
}


/* Entity Card */
.entity-card {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  margin-bottom: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  align-items: flex-start;
  transition: transform 0.25s, box-shadow 0.25s;
}

.entity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.entity-info {
  flex: 1 1 260px;
}

.entity-info label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #555;
}

.entity-info p {
  margin-bottom: 12px;
  color: #444;
  font-size: 0.95rem;
}

.entity-info input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin-bottom: 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
  font-size: 0.95rem;
}

.entity-info input:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 8px rgba(74,144,226,0.25);
  outline: none;
}

/* Logo container */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.logo-container img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid #ddd;
  transition: transform 0.2s, box-shadow 0.2s;
}

.logo-container img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.logo-container input[type="file"] {
  cursor: pointer;
  border-radius: 8px;
}

.logo-container button {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  background: #e74c3c;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}

.logo-container button:disabled {
  background: #f1a7a0;
  cursor: not-allowed;
}

.logo-container button:hover:enabled {
  background: #c0392b;
}

/* Prompts */
.prompts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.prompts-container input {
  flex: 1 1 auto;
  max-width: 220px;
  padding: 9px 12px;
  border-radius: 22px;
  border: 1px solid #ccc;
  text-align: center;
  transition: 0.2s;
  font-size: 0.92rem;
}

.prompts-container input:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 6px rgba(74,144,226,0.2);
}

/* Actions */
.entity-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 130px;
}

.entity-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: #4a90e2;
  color: #fff;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s;
  width: 100%;
  font-size: 0.95rem;
}

.entity-actions button:hover {
  background: #357abd;
}

.entity-actions button:disabled {
  background: #a0c4f2;
  cursor: not-allowed;
}

/* Loader */
.loader {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #fff;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 5px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Messages */
.message {
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  display: inline-block;
  font-weight: 500;
  font-size: 0.96rem;
}

.message.success {
  background: #d4edda;
  color: #155724;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    width: 200px;
    padding: 15px;
  }

  .entity-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .entity-actions {
    flex-direction: row;
    gap: 10px;
    width: 100%;
  }

  .entity-actions button {
    flex: 1;
  }

  .prompts-container input {
    max-width: 100%;
    flex: 1;
  }
}
