* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f5f5;
  padding: 20px;
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }
}

/* ========== TELA DE LOGIN ========== */
.login-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 420px;
  animation: slideIn 0.4s ease-out;
}

@media (max-width: 768px) {
  .login-box {
    padding: 25px;
    margin: 0 10px;
  }
}

@media (max-width: 480px) {
  .login-box {
    padding: 20px;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo-img {
  height: 80px;
  width: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.login-logo h1 {
  color: #333;
  font-size: 24px;
  font-weight: 600;
}

.app-version {
  display: block;
  margin-top: 8px;
  color: #888;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.login-logo .app-version {
  margin-top: 5px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: #555;
  font-weight: 500;
  font-size: 14px;
}

.form-group input {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
}

.form-group input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.error-message {
  color: #e74c3c;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
  font-weight: 500;
}

.login-btn {
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
  transform: translateY(0);
}

/* ========== CONTAINER PRINCIPAL ========== */

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 20px;
  min-height: 90vh;
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
    border-radius: 0;
    min-height: 100vh;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
    border: none;
  }
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

@media (max-width: 768px) {
  .header-bar {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  width: fit-content;
  margin-bottom: 0;
}

.logo .app-version {
  margin-left: -5px;
  font-size: 11px;
}

@media (max-width: 768px) {
  .logo {
    padding: 10px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .logo .app-version {
    margin-left: 0;
    margin-top: 2px;
  }
}

.logo-img {
  height: 80px;
  width: auto;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .logo-img {
    height: 60px;
  }
}

@media (max-width: 480px) {
  .logo-img {
    height: 50px;
  }
}

.user-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

@media (max-width: 768px) {
  .user-section {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

.user-greeting {
  color: #555;
  font-size: 20px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .user-greeting {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .user-greeting {
    font-size: 14px;
  }
}

.logout-btn {
  padding: 10px 20px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 480px) {
  .logout-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

.logout-btn:hover {
  background: #c0392b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.logout-btn:active {
  transform: translateY(0);
}

.main-content {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 250px 1fr;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 768px) {
  .sidebar {
    gap: 10px;
  }
}

.btn {
  padding: 30px;
  border: 2px solid #666;
  border-radius: 8px;
  background: white;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 1024px) {
  .btn {
    padding: 20px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .btn {
    padding: 15px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 12px;
    font-size: 14px;
    letter-spacing: 0.5px;
  }
}

.btn:hover {
  background: #f0f0f0;
  border-color: #ff6b35;
  transform: translateY(-2px);
}

.btn.active {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
}

.submenu {
  display: none;
  flex-direction: column;
  gap: 15px;
  margin-top: -10px;
  padding-left: 20px;
}

.submenu.show {
  display: flex;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.submenu-btn {
  padding: 20px 25px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  letter-spacing: 0.5px;
}

@media (max-width: 1024px) {
  .submenu-btn {
    padding: 15px 20px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .submenu-btn {
    padding: 12px 18px;
  }
}

@media (max-width: 480px) {
  .submenu-btn {
    padding: 10px 15px;
    font-size: 13px;
  }
}

.submenu-btn:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.submenu-btn.active {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transform: translateX(5px) scale(1.02);
  font-weight: 600;
}

.submenu-btn.cadastros {
  background: #2196f3;
}

.submenu-btn.cadastros:hover,
.submenu-btn.cadastros.active {
  background: #1976d2;
}

.submenu-btn.movimento {
  background: #78909c;
}

.submenu-btn.movimento:hover,
.submenu-btn.movimento.active {
  background: #607d8b;
}

.submenu-btn.financeiro {
  background: #c9a961;
}

.submenu-btn.financeiro:hover,
.submenu-btn.financeiro.active {
  background: #b89650;
}

.submenu-btn.escritorio {
  background: #2f5d62;
}

.submenu-btn.escritorio:hover,
.submenu-btn.escritorio.active {
  background: #1f4347;
}

.submenu-btn.gestao-financeiro {
  background: #4caf50;
}

.submenu-btn.gestao-financeiro:hover,
.submenu-btn.gestao-financeiro.active {
  background: #45a049;
}

.submenu-btn.gestao-funcionario {
  background: #ff9800;
}

.submenu-btn.gestao-funcionario:hover,
.submenu-btn.gestao-funcionario.active {
  background: #f57c00;
}

.submenu-btn.financeiro-pagar-receber {
  background: #9c27b0;
}

.submenu-btn.financeiro-pagar-receber:hover,
.submenu-btn.financeiro-pagar-receber.active {
  background: #7b1fa2;
}

.submenu.level-2 {
  padding-left: 40px;
}

.right-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-area {
  border: 2px solid #666;
  border-radius: 8px;
  padding: 30px;
  min-height: 400px;
  max-height: 600px;
  background: #fafafa;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

@media (max-width: 768px) {
  .content-area {
    padding: 20px;
    min-height: 300px;
    max-height: 500px;
  }
}

@media (max-width: 480px) {
  .content-area {
    padding: 15px;
    min-height: 250px;
    max-height: 400px;
    border-radius: 6px;
  }
}

.content-area::-webkit-scrollbar {
  width: 8px;
}

.content-area::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.content-area::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.content-area::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.content-area h2 {
  color: #1a1a4d;
  margin-bottom: 20px;
}
.content-area h2 {
  color: #1a1a4d;
  margin-bottom: 20px;
}

.chat-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
}

.message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.ai {
  justify-content: flex-start;
}

.message.user {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 65%;
  padding: 12px 16px;
  border-radius: 8px;
  word-wrap: break-word;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.ai .message-bubble {
  background: white;
  border-bottom-left-radius: 2px;
}

.message.user .message-bubble {
  background: #dcf8c6;
  border-bottom-right-radius: 2px;
}

.message-text {
  font-size: 14px;
  line-height: 1.5;
  color: #303030;
  margin: 0;
}

@media (max-width: 480px) {
  .message-text {
    font-size: 13px;
  }
}

.message-time {
  font-size: 11px;
  color: #667781;
  margin-top: 4px;
  text-align: right;
}

.message-sender {
  font-size: 12px;
  font-weight: 600;
  color: #ff6b35;
  margin-bottom: 4px;
}

.loading-dots {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: #667781;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.welcome-message {
  text-align: center;
  color: #667781;
  padding: 40px 20px;
  font-size: 14px;
}

.welcome-message h2 {
  color: #1a1a4d;
  margin-bottom: 10px;
}

.active-section-indicator {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.section-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-path {
  color: white;
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}

@media (max-width: 768px) {
  .active-section-indicator {
    padding: 10px 15px;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .section-label {
    font-size: 11px;
  }
  
  .section-path {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .active-section-indicator {
    padding: 8px 12px;
    border-radius: 6px;
  }
  
  .section-label {
    font-size: 10px;
  }
  
  .section-path {
    font-size: 12px;
  }
}

.message-input-container {
  border: 2px solid #666;
  border-radius: 8px;
  padding: 20px;
  background: white;
}

@media (max-width: 768px) {
  .message-input-container {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .message-input-container {
    padding: 12px;
    border-radius: 6px;
  }
}

.message-input-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.message-input {
  width: 100%;
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.3s ease;
}

.message-input:focus {
  outline: none;
  border-color: #ff6b35;
}

.send-btn {
  margin-top: 10px;
  padding: 12px 30px;
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  transition: background 0.3s ease;
}

@media (max-width: 480px) {
  .send-btn {
    padding: 10px 24px;
    font-size: 13px;
    width: 100%;
  }
}

.send-btn:hover {
  background: #e55a2b;
}

/* Remove margens extras dos parágrafos gerados pelo Markdown */
.message.bot p {
  margin: 0 0 10px 0;
}
.message.bot p:last-child {
  margin-bottom: 0;
}

/* Estilo para listas (se a IA mandar passo a passo) */
.message.bot ul,
.message.bot ol {
  margin: 5px 0;
  padding-left: 20px;
}

/* Estilo para o LINK ficar bonito e visível */
.message.bot a {
  color: #007bff; /* Azul padrão ou a cor da sua marca */
  text-decoration: none;
  font-weight: bold;
  border-bottom: 1px dotted #007bff;
}

.message.bot a:hover {
  text-decoration: underline;
}

/* Força bruta no CSS para garantir que links apareçam */
.message-text a {
  color: #007bff !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* ========== BOTÃO DE CONFIGURAÇÕES DO ADMIN ========== */
.admin-settings-btn {
  padding: 10px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.admin-settings-btn:hover {
  background: #2980b9;
  transform: translateY(-1px) rotate(90deg);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.admin-settings-btn:active {
  transform: translateY(0) rotate(90deg);
}

/* ========== MODAL DE CONFIGURAÇÕES DO ADMIN ========== */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

/* Painel Lateral */
.admin-sidebar {
  width: 350px;
  background: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
  animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.admin-sidebar-header {
  padding: 25px;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.admin-sidebar-header h2 {
  color: white;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.agents-list {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.agent-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: 8px;
  background: #f8f9fa;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.agent-item:hover {
  background: #e9ecef;
  border-color: #667eea;
  transform: translateX(5px);
}

.agent-item.active {
  background: linear-gradient(135deg, #667eea15, #764ba215);
  border-color: #667eea;
}

.agent-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.agent-info {
  flex: 1;
  min-width: 0;
}

.agent-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-role {
  font-size: 12px;
  color: #777;
  margin-top: 2px;
}

/* Modal de Edição do Agente */
.agent-edit-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.agent-edit-content {
  background: white;
  border-radius: 12px;
  width: 90vw;
  max-width: 1400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
}

.agent-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 2px solid #f0f0f0;
  background: #f8f9fa;
}

.agent-edit-header h3 {
  color: #667eea;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.close-edit-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.close-edit-btn:hover {
  color: #e74c3c;
  background: #ffe5e5;
}

.agent-edit-body {
  padding: 25px;
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .admin-form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

.agent-edit-footer {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding: 20px 25px;
  border-top: 2px solid #f0f0f0;
  background: #f8f9fa;
}

/* Responsividade */
@media (max-width: 768px) {
  .admin-sidebar {
    width: 280px;
  }
  
  .agent-edit-content {
    width: 85vw;
  }
  
  .agent-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.admin-modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 2px solid #f0f0f0;
}

.admin-modal-header h2 {
  color: #333;
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

@media (max-width: 768px) {
  .admin-modal-header h2 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .admin-modal-header h2 {
    font-size: 16px;
  }
}

.close-modal-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: all 0.3s ease;
}

.close-modal-btn:hover {
  color: #e74c3c;
  transform: rotate(90deg);
}

.admin-modal-body {
  padding: 25px;
}

@media (max-width: 768px) {
  .admin-modal-body {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .admin-modal-body {
    padding: 15px;
  }
}

.admin-form-group {
  margin-bottom: 25px;
}

.admin-form-group:last-child {
  margin-bottom: 0;
}

.admin-section {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 2px solid #f0f0f0;
}

.admin-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.admin-section-title {
  color: #667eea;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .agents-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

.admin-form-group label {
  display: block;
  color: #333;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.admin-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
}

.admin-input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.admin-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
  background: white;
  cursor: pointer;
}

.admin-select:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.admin-select option {
  padding: 10px;
}

.admin-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
}

.admin-textarea:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.temperature-control {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 5px;
}

.admin-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  background: linear-gradient(to right, #3498db 0%, #e74c3c 100%);
}

.admin-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 3px solid #3498db;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.2);
}

.admin-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 3px solid #3498db;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.2);
}

.temperature-value {
  font-weight: 600;
  color: #3498db;
  min-width: 35px;
  text-align: center;
  font-size: 16px;
}

.help-text {
  display: block;
  color: #777;
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.4;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding: 20px 25px;
  border-top: 2px solid #f0f0f0;
}

@media (max-width: 768px) {
  .admin-modal-footer {
    padding: 15px 20px;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .admin-modal-footer {
    flex-direction: column;
    padding: 15px;
    gap: 10px;
  }
  
  .admin-cancel-btn,
  .admin-save-btn {
    width: 100%;
  }
}

.admin-cancel-btn {
  padding: 12px 24px;
  background: #95a5a6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-cancel-btn:hover {
  background: #7f8c8d;
  transform: translateY(-1px);
}

.admin-save-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.admin-save-btn:active {
  transform: translateY(0);
}

/* ========== MEDIA QUERIES ADICIONAIS PARA RESPONSIVIDADE ========== */

/* Tablets em modo paisagem e desktops pequenos */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
  }
}

/* Tablets em modo retrato */
@media (max-width: 768px) {
  .login-logo h1 {
    font-size: 20px;
  }
  
  .form-group input {
    font-size: 14px;
  }
  
  .login-btn {
    font-size: 15px;
  }
  
  .admin-modal-header {
    padding: 15px 20px;
  }
}

/* Smartphones em modo paisagem */
@media (max-width: 640px) {
  .user-section {
    width: 100%;
  }
  
  .submenu {
    padding-left: 10px;
  }
  
  .submenu.level-2 {
    padding-left: 20px;
  }
}

/* Smartphones em modo retrato */
@media (max-width: 480px) {
  .login-logo h1 {
    font-size: 18px;
  }
  
  .login-logo .app-version {
    font-size: 11px;
  }
  
  .login-logo-img {
    height: 60px;
  }
  
  .form-group label {
    font-size: 13px;
  }
  
  .form-group input {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .login-btn {
    padding: 12px;
    font-size: 14px;
  }
  
  .admin-settings-btn {
    width: 36px;
    height: 36px;
    padding: 8px;
  }
  
  .admin-settings-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .message-input {
    min-height: 60px;
    padding: 12px;
    font-size: 13px;
  }
  
  .message-input-label {
    font-size: 12px;
  }
  
  .chat-container {
    gap: 10px;
  }
  
  .message-bubble {
    max-width: 85%;
    padding: 10px 12px;
  }
}

/* Smartphones muito pequenos */
@media (max-width: 360px) {
  body {
    padding: 5px;
  }
  
  .container {
    padding: 8px;
  }
  
  .header-bar {
    padding-bottom: 10px;
  }
  
  .user-greeting {
    font-size: 13px;
  }
  
  .btn {
    padding: 10px;
    font-size: 13px;
  }
  
  .content-area {
    padding: 10px;
  }
  
  .admin-modal-content {
    width: 95%;
  }
}

/* Orientação paisagem para dispositivos móveis */
@media (max-height: 600px) and (orientation: landscape) {
  .login-box {
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .content-area {
    max-height: 300px;
  }
  
  .admin-modal-content {
    max-height: 85vh;
  }
}

/* ========== MODAL DE CONFIRMAÇÃO ========== */
.confirmation-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.confirmation-content {
  background: white;
  border-radius: 12px;
  padding: 40px 35px 30px;
  max-width: 550px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.3s ease;
  position: relative;
}

.confirmation-icon {
  margin: 0 auto 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.confirmation-icon svg {
  animation: checkMark 0.5s ease 0.2s both;
}

@keyframes checkMark {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) rotate(0deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.confirmation-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 15px 0;
}

.confirmation-message {
  font-size: 16px;
  color: #7f8c8d;
  margin: 0 0 25px 0;
  line-height: 1.5;
}

.confirmation-btn {
  padding: 12px 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.confirmation-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.confirmation-btn:active {
  transform: translateY(0);
}
