/* Variáveis CSS - Tema Anjos Benefícios (Proteção Veicular) */
:root {
  /* Cores principais do Anjos Benefícios */
  --primary: #06688f;
  --primary-light: #2196b6;
  --primary-dark: #123752;
  --secondary: #123752;
  --secondary-light: #22507a;
  --secondary-dark: #0a2236;

  /* Cores de sistema */
  --color-black: #000000;
  --color-white: #ffffff;
  --color-gold: #06688f; /* Mudando de dourado para azul principal */
  --color-light-gray: #f5f7fa;
  --color-medium-gray: #bdbdbd;

  /* Cores de status */
  --success: #28a745;
  --success-light: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #2196b6;

  /* Gradientes */
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary),
    var(--primary-light)
  );
  --gradient-secondary: linear-gradient(
    135deg,
    var(--secondary),
    var(--primary)
  );
  --gradient-dark: linear-gradient(135deg, var(--color-black), #333333);

  /* Tipografia */
  --font-primary: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;

  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);

  /* Transições */
  --transition: all 0.3s ease;

  /* Bordas */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* Reset e estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-light-gray);
  color: var(--color-black);
  font-size: 14px;
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Layout principal */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: var(--gradient-secondary);
  color: var(--color-white);
  padding: 1.5rem 0;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo h2 {
  color: var(--color-white);
  letter-spacing: 1px;
  font-weight: 700;
}

.logo-img {
  max-width: 100%;
  height: auto;
  max-height: 80px;
  margin: 0.5rem 0;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}

.sidebar-nav {
  margin-top: 2rem;
  flex-grow: 1;
}

.sidebar-nav ul li {
  margin-bottom: 0.5rem;
}

.sidebar-nav ul li a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  border-left: 3px solid transparent;
  color: var(--color-white);
  border-radius: 8px;
  margin: 0 0.5rem;
}

.sidebar-nav ul li a i {
  margin-right: 1rem;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: var(--color-white);
}

.sidebar-nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: var(--primary-light);
  color: var(--color-white);
}

.sidebar-nav ul li.active a {
  background: var(--gradient-primary);
  border-left-color: var(--primary-light);
  color: var(--color-white);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 240px;
  transition: var(--transition);
}

/* Top Navbar */
.top-navbar {
  background-color: var(--color-white);
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 99;
}

.search-container {
  position: relative;
  width: 300px;
}

.search-container i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-medium-gray);
}

.search-container input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border: 1px solid var(--color-light-gray);
  border-radius: 50px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-container input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(6, 104, 143, 0.1);
}

.user-menu {
  display: flex;
  align-items: center;
}

.notifications {
  position: relative;
  margin-right: 1.5rem;
  cursor: pointer;
}

.notifications i {
  font-size: 1.2rem;
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--primary);
  color: var(--color-white);
  font-size: 0.7rem;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-info span {
  margin-right: 0.75rem;
  font-weight: 500;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: visible;
  border: 2px solid var(--primary);
  position: relative;
  cursor: pointer;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background-color: var(--color-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1000;
}

.user-avatar:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 15px;
  width: 10px;
  height: 10px;
  background-color: var(--color-white);
  transform: rotate(45deg);
  box-shadow: var(--shadow-sm);
}

.user-dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.user-dropdown ul li {
  padding: 0;
  margin: 0;
}

.user-dropdown ul li a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: var(--color-black);
  text-decoration: none;
  transition: var(--transition);
}

.user-dropdown ul li a:hover {
  background-color: var(--color-light-gray);
  color: var(--primary);
}

.user-dropdown ul li a i {
  margin-right: 8px;
  font-size: 14px;
}

/* Dashboard Content */
.dashboard-content {
  padding: 2rem;
}

.page-title {
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  font-weight: 600;
}

/* Metrics Cards */
.metrics-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.metric-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.metric-icon i {
  font-size: 1.5rem;
  color: var(--color-white);
}

.metric-info h3 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-medium-gray);
  margin-bottom: 0.25rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.metric-change {
  font-size: 0.8rem;
  font-weight: 500;
}

.metric-change.positive {
  color: #4caf50;
}

.metric-change.negative {
  color: #f44336;
}

.metric-change span {
  color: var(--color-medium-gray);
  font-weight: 400;
}

/* Charts */
.charts-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.chart-card h3 {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--color-black);
}

.chart-wrapper {
  height: 300px;
  position: relative;
}

/* Bottom Container */
.bottom-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
}

/* Activities Card */
.activities-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.activities-card h3 {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.activity-list {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-light-gray);
}

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

.activity-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.activity-icon i {
  color: var(--color-white);
  font-size: 1rem;
}

.activity-details {
  flex: 1;
}

.activity-text {
  margin-bottom: 0.25rem;
}

.activity-time {
  font-size: 0.8rem;
  color: var(--color-medium-gray);
}

/* Pipeline Card */
.pipeline-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.pipeline-card h3 {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.pipeline-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.pipeline-column {
  min-width: 200px;
  flex: 1;
}

.pipeline-column h4 {
  font-size: 0.9rem;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--primary);
}

.pipeline-item {
  background-color: var(--color-light-gray);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  transition: var(--transition);
  cursor: pointer;
}

.pipeline-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.project-name {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.project-value {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
  .metrics-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-container {
    grid-template-columns: 1fr;
  }

  .bottom-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .chart-card {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 992px) {
  .sidebar {
    width: 70px;
    padding: 1rem 0;
  }

  .sidebar-header {
    padding: 1rem 0.5rem;
    text-align: center;
  }

  .logo-img {
    max-height: 60px;
  }

  .logo h2 {
    font-size: 1rem;
  }

  .sidebar-nav ul li a span {
    display: none;
  }

  .sidebar-nav ul li a {
    padding: 0.75rem;
    justify-content: center;
  }

  .sidebar-nav ul li a i {
    margin-right: 0;
  }

  .main-content {
    margin-left: 70px;
  }

  .pipeline-container {
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .pipeline-container::-webkit-scrollbar {
    height: 6px;
  }

  .pipeline-container::-webkit-scrollbar-thumb {
    background-color: var(--color-medium-gray);
    border-radius: 20px;
  }

  .pipeline-column {
    min-width: 220px;
  }

  .kanban-container {
    overflow-x: auto;
    padding-bottom: 1rem;
  }

  .kanban-column {
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .metrics-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .search-container {
    width: 200px;
  }

  .top-navbar {
    padding: 0 1rem;
  }

  .user-info span {
    display: none;
  }

  .page-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .dashboard-content {
    padding: 1.5rem 1rem;
  }

  .chart-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .chart-wrapper {
    height: 250px;
  }

  .activities-card {
    margin-bottom: 1.5rem;
  }

  .activity-item {
    padding: 0.75rem;
  }

  .pipeline-card h3,
  .activities-card h3,
  .chart-card h3 {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
  }

  .modal-content {
    width: 95%;
    max-width: 450px;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 14px;
  }

  .search-container {
    display: none;
  }

  .metrics-container {
    margin-bottom: 1rem;
  }

  .metric-card {
    padding: 1rem;
  }

  .metric-value {
    font-size: 1.2rem;
  }

  .metric-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .dashboard-content {
    padding: 1rem 0.75rem;
  }

  .chart-wrapper {
    height: 220px;
  }

  .top-navbar {
    padding: 0 0.75rem;
    height: 60px;
  }

  .notifications {
    margin-right: 0.75rem;
  }

  .notification-count {
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
  }

  .activity-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .activity-time {
    font-size: 0.8rem;
  }

  .pipeline-item {
    padding: 0.75rem;
  }

  .project-name {
    font-size: 0.9rem;
  }

  .project-value {
    font-size: 0.85rem;
  }

  .main-content {
    margin-left: 60px;
  }

  .sidebar {
    width: 60px;
  }

  .sidebar-nav ul li a {
    padding: 0.6rem;
  }

  .sidebar-nav ul li a i {
    font-size: 1rem;
  }
}

/* Ajustes para telas muito pequenas */
@media (max-width: 400px) {
  .dashboard-content {
    padding: 0.75rem 0.5rem;
  }

  .metric-card {
    padding: 0.75rem;
  }

  .metric-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    margin-right: 0.75rem;
  }

  .chart-card,
  .activities-card,
  .pipeline-card {
    margin-bottom: 1rem;
  }

  .chart-wrapper {
    height: 200px;
  }

  .pipeline-column h4 {
    font-size: 0.9rem;
    padding: 0.6rem;
  }

  .page-title {
    font-size: 1.3rem;
  }
}
