:root {
  --primary-green: #25d366;
  --primary-orange: #ff6b35;
  --light-red: #FF000018;
  --primary-red: #FF0000;
  --dark-green: #128c7e;
  --light-green: #dcf8c6;
  --dark-gray: #2a2a2a;
  --light-gray: #f5f5f5;
  --white: #ffffff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--light-gray) 0%, #e8f5e8 100%);
  min-height: 100vh;
  color: var(--dark-gray);
}

/* Header Styles */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--dark-gray);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--primary-green);
}

/* Main Content */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 140px);
}

/* Login Form Styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 140px);
}

.login-card {
  background: var(--white);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-card h2 {
  color: var(--dark-gray);
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: 600;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--dark-gray);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
  color: var(--white);
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--primary-orange);
  color: var(--white);
}

.btn-secondary:hover {
  background: #e55a2b;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}


/* Switch Styles */
.switch-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.switch-input {
  display: none;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin: 0;
}

.switch-slider {
  position: relative;
  width: 50px;
  height: 26px;
  background: var(--border-color);
  border-radius: 13px;
  transition: all 0.3s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-input:checked + .switch-label .switch-slider {
  background: var(--primary-green);
}

.switch-input:checked + .switch-label .switch-slider::before {
  transform: translateX(24px);
}

.switch-text {
  font-weight: 500;
  color: var(--dark-gray);
}

/* Alert Styles */
.alert {
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.alert-danger {
  background: #ffe6e6;
  color: #d32f2f;
  border: 1px solid #ffcdd2;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.alert-info {
  background: #e3f2fd;
  color: #1976d2;
  border: 1px solid #bbdefb;
}

/* Footer */
.footer {
  background: var(--dark-gray);
  color: var(--white);
  text-align: center;
  padding: 2rem 0;
  margin-top: auto;
}

/* Dashboard Styles */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark-gray);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.icon-green {
  background: var(--light-green);
  color: var(--dark-green);
}

.icon-orange {
  background: #ffe8e0;
  color: var(--primary-orange);
}

.card-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 0.5rem;
}

.card-description {
  color: #666;
  font-size: 0.9rem;
}

/* Table Styles */
.table-container {
  background: var(--white);
  border-radius: 15px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 2rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.table th {
  background: var(--light-gray);
  font-weight: 600;
  color: var(--dark-gray);
}

.table tbody tr:hover {
  background: #f9f9f9;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Status Badges */
.status-badge {
    display: inline-block; /* garante que o badge seja um bloco de largura ajustada */
  text-align: center;    /* centraliza o texto dentro dele */
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  
}

.status-active {
  background: var(--light-green);
  color: var(--dark-green);
}

.status-inactive {
  background: #ffe8e0;
  color: var(--primary-orange);
}

.status-pending {
  background: #fff3e0;
  color: #f57c00;
}

/* Enhanced Header Styles */
.header-container {
  position: relative;
}

.logo a {
  transition: transform 0.3s ease;
}

.logo a:hover {
  transform: scale(1.02);
}

/* Navigation Styles */
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--dark-gray);
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--light-green);
  color: var(--dark-green);
  transform: translateY(-1px);
}

.nav-link i {
  font-size: 1rem;
}

/* User Dropdown */
.nav-item-dropdown {
  position: relative;
}

.user-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-green);
  color: var(--white);
  border: none;
  border-radius: 25px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-dropdown-toggle:hover {
  background: var(--dark-green);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.dropdown-menu {
  
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-hover);
  padding: 0.5rem 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  margin-top: 0.5rem;
}

.dropdown-menu.show {
  display: block !important;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--dark-gray);
  transition: background 0.2s ease;
}

.dropdown-item:hover {
  background: var(--light-gray);
  color: var(--dark-gray);
}

.dropdown-item.text-danger {
  color: #dc3545;
}

.dropdown-item.text-danger:hover {
  background: #ffe6e6;
  color: #dc3545;
}

.dropdown-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 0.5rem 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  background: none;
  display: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark-gray);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.mobile-menu-toggle:hover {
  background: var(--light-gray);
}

/* Enhanced Alert Styles */
.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-weight: 500;
  border: none;
  animation: slideInDown 0.5s ease-out;
}

.alert i {
  font-size: 1.2rem;
}

.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border-left: 4px solid #28a745;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  border-left: 4px solid #dc3545;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
  }

  .main-container {
    padding: 1rem;
  }

  .login-card {
    padding: 2rem;
    margin: 1rem;
  }

  .nav-menu {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block !important;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    border-radius: 0 0 15px 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  .nav-menu.show {
    display: block;       /* <— ou display: flex */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
  }

  .nav-link {
    padding: 1rem 1.5rem;
    border-radius: 0;
    justify-content: flex-start;
  }

  .nav-item-dropdown {
    width: 100%;
  }

  .user-dropdown-toggle {
    width: calc(100% - 3rem);
    margin: 0 1.5rem;
    justify-content: center;
    border-radius: 10px;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--light-gray);
    margin: 0.5rem 1.5rem 0;
    border-radius: 10px;
  }

  .logo span {
    display: none;
  }
}


#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Toast base */
.toast-item {
  min-width: 280px;
  max-width: 340px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  color: #333;
  font-size: 14px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 4.7s forwards;
}

/* Ícone + mensagem */
.toast-item i {
  margin-right: 8px;
  font-size: 16px;
}

/* Tipos */
.toast-success { background: #d1fae5; border-left: 5px solid #10b981; }
.toast-error   { background: #fee2e2; border-left: 5px solid #ef4444; }
.toast-warning { background: #fef3c7; border-left: 5px solid #f59e0b; }
.toast-info    { background: #e0f2fe; border-left: 5px solid #3b82f6; }

/* Botão fechar */
.toast-item button {
  background: none;
  border: none;
  color: #555;
  font-size: 16px;
  cursor: pointer;
}
.toast-item button:hover {
  color: #000;
}

/* Animações */
@keyframes slideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100%); }
}


