@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Rajdhani:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Rajdhani:wght@300;400;500;600;700&display=swap");

/* Theme Variables */
:root {
  /* Light mode colors */
  --bg-primary: #eef2f7;
  --bg-secondary: #f7fafc;
  --bg-tertiary: #edf2f7;
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --text-light: #a0aec0;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
  --hover-bg: #f7fafc;
  --input-bg: #ffffff;
  --sidebar-bg: #f8f9fa;
  --sidebar-hover: #edf2f7;
  --primary-color: #702966;
  --primary-hover: #8b3479;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --transition-fast: all 0.2s ease;
}

[data-theme="dark"] {
  /* Dark mode colors */
  --bg-primary: #1a1d2e;
  --bg-secondary: #13151f;
  --bg-tertiary: #0f1117;
  --text-primary: #e2e8f0;
  --text-secondary: #a0aec0;
  --text-light: #718096;
  --border-color: #2d3748;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --card-bg: #252938;
  --hover-bg: #2d3748;
  --input-bg: #2d3748;
  --sidebar-bg: #13151f;
  --sidebar-hover: #1a1d2e;
  --primary-color: #9d4edd;
  --primary-hover: #7209b7;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --transition-fast: all 0.2s ease;
}

html {
  transition: background-color 0.3s ease;
}

body, html {
  font-family: "Montserrat", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Simple page transition animation */
@keyframes pageContentFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Apply to all main container types */
.form-container,
.tickets-container,
.management-container,
.settings-container,
.dashboard-container,
.statistics-container,
.container,
.container-fluid {
  animation: pageContentFadeIn 0.25s ease-out;
}

.container{
  padding: 15px;
}

main {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Ensure content area doesn't overflow */
main > *:last-child {
  min-width: 0;
  overflow-x: hidden;
}

/* Modern Header Styles */
header.main-header {
  margin-top: 0;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #702966 0%, #8b3479 100%);
  box-shadow: 0 2px 10px rgba(112, 41, 102, 0.15);
  position: relative;
  width: 100%;
  border-bottom: none;
  min-height: 85px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-image {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: white;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.logo-text {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-text a {
  color: white;
  text-decoration: none;
  transition: color 0.2s ease;
}

.logo-text a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Switch */
.theme-toggle {
  cursor: pointer;
  padding: 4px;
}

.theme-toggle-track {
  position: relative;
  width: 70px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  transition: all 0.3s ease;
}

.theme-toggle:hover .theme-toggle-track {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.theme-toggle-thumb {
  position: absolute;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  left: 4px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(34px);
}

.theme-toggle .theme-icon {
  font-size: 1rem;
  color: white;
  z-index: 2;
  transition: all 0.3s ease;
}

.theme-toggle .bi-sun-fill {
  opacity: 1;
}

.theme-toggle .bi-moon-stars-fill {
  opacity: 0.6;
}

[data-theme="dark"] .theme-toggle .bi-sun-fill {
  opacity: 0.6;
}

[data-theme="dark"] .theme-toggle .bi-moon-stars-fill {
  opacity: 1;
}

.header-user .user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  margin-right: 0.5rem;
  min-width: 120px;
  height: 45px;
  gap: 2px;
}

.header-user .user-name {
  font-weight: 600;
  color: white;
  font-size: 0.95rem;
  line-height: 1;
  margin: 0;
}

.header-user .user-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  margin: 0;
}

.user-avatar {
  color: var(--text-primary);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 0 0 2px rgba(157, 78, 221, 0.2);
}

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

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0e6ed 0%, #e6d4e1 100%);
  color: #702966;
  font-weight: 700;
  font-size: 1.25rem;
}

/* Modern Sidebar Styles */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  min-height: 100vh;
  overflow-y: auto;
  padding: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-nav {
  padding: 1.5rem 0;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  display: block;
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #95a5a6;
  margin-bottom: 0.5rem;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin: 0.25rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-item .nav-link {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  color: #2c3e50;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  gap: 0.75rem;
}

.nav-item .nav-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: #6c757d;
  transition: color 0.2s ease;
}

.nav-item .nav-link span {
  flex: 1;
}

.nav-item:hover {
  background: transparent;
}

.nav-item:hover .nav-link {
  background: rgba(112, 41, 102, 0.08);
  color: #702966;
}

.nav-item:hover .nav-link i {
  color: #702966;
}

.nav-item.active {
  border-left: none;
  background: transparent;
}

.nav-item.active .nav-link {
  background: linear-gradient(135deg, rgba(112, 41, 102, 0.15) 0%, rgba(112, 41, 102, 0.08) 100%);
  color: #702966;
  font-weight: 600;
  border-left: 3px solid #702966;
}

.nav-item.active .nav-link i {
  color: #702966;
}

.nav-item.logout .nav-link {
  color: #dc3545;
}

.nav-item.logout .nav-link i {
  color: #dc3545;
}

.nav-item.logout:hover .nav-link {
  background: rgba(220, 53, 69, 0.08);
}

/* Scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    grid-template-columns: auto 1fr;
  }

  .sidebar {
    width: 70px;
    padding: 0;
  }

  .sidebar-nav {
    padding: 1rem 0;
  }

  .nav-section-title {
    display: none;
  }

  .nav-item {
    margin: 0.25rem 0.5rem;
  }

  .nav-item .nav-link {
    padding: 0.85rem 0.5rem;
    justify-content: center;
    gap: 0;
  }

  .nav-item .nav-link span {
    display: none;
  }

  .nav-item .nav-link i {
    font-size: 1.3rem;
    width: auto;
  }

  .nav-item.active .nav-link {
    border-left: none;
    border-bottom: 3px solid #702966;
  }

  header.main-header {
    padding: 1rem 1.5rem;
  }

  .header-user .user-info {
    display: none;
  }

  .logo-text {
    font-size: 1.5rem;
  }
}

body a:hover {
  color: #702966;
  text-decoration: none;
}

body a {
  color: black;
  text-decoration: none;
}

.custom-button{
  background: linear-gradient(135deg, #702966 0%, #8b3479 100%);
  border-color: #702966;
}

.custom-button:hover{
  background: linear-gradient(135deg, #8b3479 0%, #702966 100%);
  border-color: #8b3479;
}

.custom-user-label{
  font-size: 90%;
}

.status-text {
  margin: 0;
  border-radius: 10px;
  padding: 5px 10px;
  color: #fff;
  text-align: center;
}

.status-text.aberto {
  background-color: #4CAF50; /* Green */
}

.status-text.em-progresso {
  background-color: #ff8800; /* Yellow */
}

.status-text.resolvido {
  background-color: #13401f; /* Dark Grey */
}

.status-text{
  display: inline;
}

.logout a{
  color: darkred;
}

.logout i{
  color: darkred;
}


.sidebar .logout:hover .nav-link .bi{
  color: rgb(187, 19, 19);
}

.sidebar .logout:hover .nav-link{
  color: rgb(187, 19, 19);
}

.table tbody td{
  vertical-align: middle;
}

@media (max-width: 1060px) {

  main{
    grid-template-columns: min-content 1fr;
  }

  .nav-link {
    font-size: 0;
  }

  .nav-link i {
    font-size: 1rem;
  }

  .sidebar .nav-item{
    border-left: 8px solid transparent;
  }
}

/* Notification container */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 300px;
  z-index: 1000;
}

/* Notification container */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 300px;
  z-index: 1000;
}

/* Notification item */
.notification {
  background-color: #fff; /* White background for notifications */
  color: #333; /* Dark text color */
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  font-family: "Montserrat", sans-serif;
}

/* View button */
.view-button {
  background-color: #702966; /* Match the custom color scheme */
  color: #fff;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  margin-right: 10px;
  font-family: "Poppins", sans-serif;
}

/* View button hover effect */
.view-button:hover {
  background-color: rgba(112,41,102,0.8);
}

/* Close button */
.close-button {
  background: none;
  border: none;
  color: #702966; /* Match the custom color scheme */
  font-size: 14px;
  cursor: pointer;
  position: absolute;
  top: 5px;
  right: 5px;
  font-family: "Poppins", sans-serif;
}

/* Close button hover effect */
.close-button:hover {
  color: rgba(112,41,102,0.8);
}

/* ========================================
   DARK MODE COMPREHENSIVE STYLES
   ======================================== */

[data-theme="dark"] {
  /* Header in dark mode */
  header.main-header {
    background: linear-gradient(135deg, #9d4edd 0%, #7209b7 100%);
  }
  
  /* Sidebar in dark mode */
  .sidebar {
    background: var(--sidebar-bg);
    border-right-color: var(--border-color);
  }
  
  .nav-section-title {
    color: var(--text-light);
  }
  
  .nav-link {
    color: var(--text-secondary);
  }
  
  .nav-item:hover .nav-link {
    background: var(--sidebar-hover);
    color: #9d4edd;
  }
  
  .nav-item:hover .nav-link i {
    color: #9d4edd;
  }
  
  .nav-item.active .nav-link {
    background: rgba(157, 78, 221, 0.15);
    color: #9d4edd;
    border-left-color: #9d4edd;
  }
  
  .nav-item.active .nav-link i {
    color: #9d4edd;
  }
  
  /* Cards and containers */
  .card,
  .settings-card,
  .management-card,
  .tickets-card,
  .filters-card,
  .page-header {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
  }
  
  /* Tables */
  table,
  .table,
  .tickets-table,
  .management-table,
  .emails-table {
    background: var(--card-bg);
    color: var(--text-primary);
  }
  
  thead th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
  }
  
  tbody td {
    border-color: var(--border-color);
    color: var(--text-primary);
  }
  
  tbody tr:hover {
    background: var(--hover-bg) !important;
  }
  
  /* Forms */
  .form-control,
  input[type=\"text\"],
  input[type=\"email\"],
  input[type=\"password\"],
  input[type=\"date\"],
  textarea,
  select {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
  }
  
  .form-control:focus {
    background: var(--input-bg);
    border-color: var(--primary-color);
    color: var(--text-primary);
  }
  
  /* Labels and text */
  label,
  .form-label,
  .page-subtitle,
  .header-text p {
    color: var(--text-secondary);
  }
  
  h1, h2, h3, h4, h5, h6,
  .page-title,
  .ticket-subject,
  .user-name {
    color: var(--text-primary);
  }
  
  /* Badges */
  .company-badge {
    color: var(--text-primary);
  }
  
  /* Modals */
  .modal-content {
    background: var(--card-bg);
    color: var(--text-primary);
  }
  
  .modal-body {
    color: var(--text-primary);
  }
  
  /* Buttons - keep primary colored */
  .btn-view,
  .btn-filter,
  .btn-submit,
  .btn-create {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  }
  
  .btn-view:hover,
  .btn-filter:hover,
  .btn-submit:hover,
  .btn-create:hover {
    opacity: 0.9;
  }
  
  /* Secondary buttons */
  .btn-clear,
  .btn-secondary {
    background: var(--hover-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
  }
  
  .btn-clear:hover,
  .btn-secondary:hover {
    background: var(--bg-tertiary);
  }
  
  /* Borders and dividers */
  .border,
  hr {
    border-color: var(--border-color) !important;
  }
  
  /* Empty states */
  .empty-state {
    color: var(--text-secondary);
  }
  
  /* Language options */
  .language-option {
    background: var(--hover-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
  }
  
  .language-option:hover {
    background: var(--bg-tertiary);
  }
  
  .language-option.active {
    border-color: var(--primary-color);
    background: var(--sidebar-hover);
  }
  
  /* Status badges keep their colors but adjust opacity */
  .status-badge {
    opacity: 0.9;
  }
  
  /* Fix avatar placeholders */
  .avatar-placeholder {
    background: var(--primary-color);
    color: white;
  }
  
  /* Fix scrollbars */
  ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--border-color);
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
  }
}
