:root {
  --primary-color: #004d40;
  --secondary-color: #00796b;
  --accent-color: #ffc107;
  --bg-color: #f4f7f6;
  --sidebar-bg: #002521;
  --text-light: #ffffff;
  --text-dark: #333333;
  --card-bg: rgba(255, 255, 255, 0.9);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
}

body {
  background: var(--bg-color);
  color: var(--text-dark);
}

/* Login Page */
.login-body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("../assets/img/login.png") no-repeat center center;
  background-size: cover;
}

.login-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  padding: 2.5rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.login-card h1 {
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  outline: none;
  transition: border-color 0.3s;
}

.form-control:focus {
  border-color: var(--secondary-color);
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: var(--secondary-color);
}

.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

.alert-danger {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.footer-credit {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: #666;
}

.footer-credit a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

/* Main Layout */
.wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: 280px;
  background: var(--sidebar-bg);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  transition: all 0.3s ease;
  z-index: 1000;
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.sidebar-header h2 {
  font-size: 1.5rem;
  letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 0;
}

.sidebar-nav ul {
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.9rem 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.nav-link i {
  width: 20px;
  margin-right: 1rem;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  padding-left: 1.8rem;
}

.nav-link.active {
  background: linear-gradient(
    90deg,
    var(--secondary-color) 0%,
    transparent 100%
  );
  color: var(--text-light);
  border-left: 4px solid var(--accent-color);
}

.nav-link:active::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.4);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

.submenu {
  list-style: none;
  background: rgba(0, 0, 0, 0.15);
  display: none;
  overflow: hidden;
  animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.has-submenu.active .submenu {
  display: block;
}

.has-submenu .arrow {
  margin-left: auto;
  font-size: 0.6rem;
  transition: transform 0.3s;
  opacity: 0.5;
}

.has-submenu.active .arrow {
  transform: rotate(180deg);
}

.submenu a {
  display: block;
  padding: 0.7rem 2.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: all 0.3s;
}

.submenu a:hover,
.submenu a.active {
  color: var(--accent-color);
  padding-left: 2.8rem;
}

.admin-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-label {
  padding: 0.5rem 1.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.sidebar-footer {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.8rem;
}

.sync-info {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.6);
}

.credit {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

.credit a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2.5rem;
  transition: all 0.3s;
  background: var(--bg-color);
  width: calc(100% - 280px);
}

.content-header {
  margin-bottom: 2.5rem;
}

.content-header h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  border: 1px solid transparent;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--secondary-color);
}

.stat-icon {
  font-size: 2.5rem;
  margin-right: 1.5rem;
  background: var(--bg-color);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.stat-data {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

.stat-label {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.2rem;
}

.stat-card.highlight {
  background: var(--primary-color);
  color: white;
}

.stat-card.highlight .stat-value {
  color: white;
}
.stat-card.highlight .stat-label {
  color: rgba(255, 255, 255, 0.8);
}
.stat-card.highlight .stat-icon {
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile Components */
.mobile-toggle {
  display: none;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
  .sidebar {
    left: -280px;
  }
  .sidebar.open {
    left: 0;
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1.5rem;
    padding-top: 5rem;
  }
  .mobile-toggle {
    display: block;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-toggle.active {
    left: 290px; /* Posiciona o botão à direita da sidebar (280px) */
    background: var(--secondary-color);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
