:root {
  --primary: #FFD700;
  --primary-dark: #FFC107;
  --secondary: #FFFFFF;
  --text: #333333;
  --text-light: #666666;
  --bg: #FFFFFF;
  --bg-alt: #F5F5F5;
  --scrollbar-thumb: #FFD700;
  --scrollbar-track: #F5F5F5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --secondary: #000000;
    --text: #FFFFFF;
    --text-light: #CCCCCC;
    --bg: #1A1A1A;
    --bg-alt: #2A2A2A;
    --scrollbar-thumb: #FFC107;
    --scrollbar-track: #2A2A2A;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.btn {
  background: var(--primary);
  color: var(--text);
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
}

.header {
  background: var(--primary);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--text);
  text-decoration: none;
}

.header .btn-login {
  background: var(--secondary);
  color: var(--text);
  padding: 8px 20px;
  border-radius: 20px;
}

.hero {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--text);
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  color: var(--text);
  opacity: 0.9;
}

.cards-section {
  padding: 40px 20px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.card {
  background: var(--bg-alt);
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.card i {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 15px;
}

.card h3 {
  margin-bottom: 10px;
  color: var(--text);
}

.card p {
  color: var(--text-light);
}

.contact-section {
  padding: 40px 20px;
  background: var(--bg-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.contact-card {
  background: var(--bg);
  padding: 25px;
  border-radius: 12px;
  text-align: center;
}

.contact-card i {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 10px;
}

.form-container {
  max-width: 500px;
  margin: 40px auto;
  padding: 30px;
  background: var(--bg-alt);
  border-radius: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-dark);
}

.form-group .error {
  color: #ff4444;
  font-size: 14px;
  margin-top: 5px;
}

.password-strength {
  margin-top: 10px;
}

.strength-bar {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.strength-fill.weak {
  background: #ff4444;
}

.strength-fill.medium {
  background: #FFD700;
}

.strength-fill.strong {
  background: #00aa00;
}

.strength-text {
  font-size: 14px;
  font-weight: 600;
  margin-top: 5px;
  text-align: right;
}

.requirements-list {
  list-style: none;
  margin-top: 10px;
  font-size: 13px;
}

.requirements-list li {
  margin-bottom: 5px;
  color: var(--text-light);
}

.requirements-list li.valid {
  color: #00aa00;
}

.requirements-list li.valid i::before {
  content: '\f00c';
}

.requirements-list li.optional {
  font-style: italic;
  opacity: 0.7;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input {
  width: auto;
}

.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: var(--primary);
  padding: 20px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .user-info {
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--text);
  margin-bottom: 20px;
}

.sidebar .user-info i {
  font-size: 48px;
  color: var(--text);
  margin-bottom: 10px;
}

.sidebar .user-info h3 {
  color: var(--text);
}

.sidebar .user-info .level {
  background: var(--secondary);
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 14px;
  display: inline-block;
  margin-top: 5px;
  color: var(--text);
}

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

.sidebar-nav li {
  margin-bottom: 10px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--secondary);
  color: var(--text);
}

.sidebar-nav i {
  font-size: 20px;
  width: 24px;
}

.main-content {
  flex: 1;
  margin-left: 250px;
  padding: 20px;
}

.dashboard-header {
  background: var(--primary);
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dashboard-cards .card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  cursor: pointer;
}

.dashboard-cards .card:hover {
  transform: none;
}

.dashboard-cards .card i {
  font-size: 36px;
  margin-bottom: 0;
}

.dashboard-cards .card.colspan-1 {
  grid-column: span 1;
}

.dashboard-cards .card.colspan-2 {
  grid-column: span 2;
}

.install-pwa {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  padding: 15px 25px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 1000;
  font-weight: 600;
  display: none;
}

.install-pwa.show {
  display: block;
}

.install-pwa i {
  margin-right: 8px;
}

.progressao-container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

.progressao-item {
  flex: 1;
  background: var(--bg-alt);
  padding: 15px 10px;
  border-radius: 10px;
  text-align: center;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.progressao-item.active,
.progressao-item.achieved,
.progressao-item.completed {
  opacity: 1;
  background: var(--primary);
}

.progressao-item.active {
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.progressao-icon {
  font-size: 24px;
  color: var(--text);
  margin-bottom: 8px;
}

.progressao-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.progressao-cargo {
  font-weight: bold;
  font-size: 12px;
  color: var(--text);
}

.progressao-pontos {
  font-size: 10px;
  color: var(--text-light);
}

.progressao-bar-container {
  height: 10px;
  background: var(--bg-alt);
  border-radius: 5px;
  overflow: hidden;
}

.progressao-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 5px;
  transition: width 0.5s ease;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
  }
  
  .dashboard-cards {
    grid-template-columns: 1fr;
  }
  
  .dashboard-cards .card.colspan-1,
  .dashboard-cards .card.colspan-2 {
    grid-column: span 1;
  }
  
  .sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .dashboard {
    flex-direction: column;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

.rotas-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.rotas-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.rotas-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.rota-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--bg-alt);
  border-radius: 12px;
  flex-wrap: wrap;
}

.rota-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.rota-info {
  flex: 1;
  min-width: 150px;
}

.rota-info h4 {
  margin-bottom: 5px;
  color: var(--text);
}

.rota-info p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 5px;
}

.rota-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

.status-pendente {
  background: #fff3cd;
  color: #856404;
}

.status-concluida {
  background: #d4edda;
  color: #155724;
}

.status-excluido {
  background: #f8d7da;
  color: #721c24;
}

.rota-actions {
  display: flex;
  gap: 10px;
}

.btn-icon {
  background: var(--primary);
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.3s ease;
}

.btn-icon:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.loading {
  text-align: center;
  padding: 30px;
  color: var(--text-light);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px;
  color: var(--text-light);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 15px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  overflow-y: auto;
}

.modal-content {
  background: var(--bg);
  margin: 5% auto;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .modal-content {
    margin: 10% auto;
    width: 95%;
    padding: 15px;
  }
}

.form-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-light);
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--text-light);
}

.form-divider span {
  padding: 0 10px;
}

.manual-add {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.paradas-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 20px;
  border: 1px solid var(--text-light);
  border-radius: 8px;
}

.parada-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--bg-alt);
}

.parada-item:last-child {
  border-bottom: none;
}

.parada-id {
  background: var(--primary);
  color: var(--text);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 10px;
  flex-shrink: 0;
}

.parada-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.parada-info span:first-child {
  font-weight: 600;
}

.parada-info span:last-child {
  font-size: 14px;
  color: var(--text-light);
}

.parada-actions {
  display: flex;
  gap: 5px;
}

.modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-light);
}

.modal-close:hover {
  color: var(--text);
}

.btn-scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  border: none;
  padding: 15px 20px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 100;
  display: none;
}

.btn-scroll-top:hover {
  background: var(--primary-dark);
}

@media (max-width: 768px) {
  .rota-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .rota-info {
    width: 100%;
  }

  .rota-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .modal-content {
    margin: 20% auto;
  }
}

.map-placeholder {
  text-align: center;
  padding: 100px 20px;
  background: var(--bg-alt);
  border-radius: 16px;
}

.map-placeholder i {
  font-size: 80px;
  color: var(--primary);
  margin-bottom: 20px;
}

.map-placeholder h3 {
  margin-bottom: 10px;
  color: var(--text);
}

.map-placeholder p {
  color: var(--text-light);
}