/* Update the toast container positioning */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  max-width: 350px;
  width: calc(100% - 2rem);
}

/* Adjust for mobile screens */
@media (max-width: 768px) {
  .toast-container {
    top: calc(var(--header-height) + 1rem); /* Position below header */
    right: 0.5rem;
    left: 0.5rem;
    max-width: none;
    width: auto;
  }

  .push-notification {
    margin: 0 0.5rem 0.5rem;
  }
}

/* Rest of existing styles remain the same */
:root {
  /* Primary Colors */
  --primary-color: #0078d4;    /* Updated to Microsoft blue */
  --secondary-color: #106ebe;  /* Darker Microsoft blue for secondary elements */
  --accent-color: #2b88d8;     /* Lighter blue for emphasis */
  --sidebar-gradient-start: #f3f3f3;
  --sidebar-gradient-end: #f3f3f3;
  
  /* Background Colors */
  --body-bg: #f8f9fa;          /* Light gray background */
  --card-bg: #ffffff;          /* Pure white for cards */
  
  /* Text Colors */
  --text-color-primary: #323130;   /* Dark gray for primary text - Microsoft UI style */
  --text-color-secondary: #605e5c;  /* Medium gray for secondary text - Microsoft UI style */
  
  /* Status Colors */
  --success-color: #107c10;    /* Microsoft green */
  --info-color: #0078d4;       /* Microsoft blue */
  --warning-color: #ffaa44;    /* Microsoft orange */
  --danger-color: #d13438;     /* Microsoft red */
  
  /* Border & Shadow Colors */
  --border-color: #edebe9;     /* Light gray for borders - Microsoft UI style */
  --box-shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  --box-shadow-lg: 0 4px 12px rgba(0,0,0,0.08);

  /* Element Specific Colors */
  --header-background: #0078d4;
  --header-text-color: #ffffff;
  --nav-link-color: var(--text-primary);
  --nav-link-hover-color: #0078d4;
  --table-header-bg: #0078d4;
  --table-header-color: #ffffff;
  --table-row-hover-bg: rgba(0,120,212,0.03);
  --button-primary-bg: #0078d4;
  --button-primary-color: #ffffff;
  --button-primary-hover-bg: #106ebe;
  --input-border-color: #edebe9;
  --input-focus-border-color: #0078d4;
  --input-box-shadow-focus: 0 0 0 0 0.2rem rgba(0,120,212,0.15);

  /* Layout Values - More Compact */
  --border-radius: 6px;
  --border-radius-sm: 4px;
  --border-radius-lg: 8px;
  --sidebar-width: 240px;
  --sidebar-width-collapsed: 60px;
  --header-height: 56px; /* Reduced from 60px */
  
  /* Spacing - More Compact */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 0.75rem;
  --spacing-lg: 1rem;
  --spacing-xl: 1.5rem;
  
  /* Typography - Smaller, More Harmonious */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 0.9rem;
  --font-size-lg: 1rem;
  --font-size-xl: 1.125rem;
  --font-size-2xl: 1.25rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.35s ease;
}

body {
  background-color: var(--body-bg);
  color: var(--text-color-primary);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.4; /* Reduced from 1.5 */
  font-weight: 400;
  font-size: var(--font-size-base); /* Smaller base font */
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

.navbar {
  background-color: #fff;
  box-shadow: var(--box-shadow-sm);
  padding: var(--spacing-md) 0; /* Reduced padding */
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
  font-weight: 600; /* Reduced from 700 */
  font-size: var(--font-size-xl); /* Smaller brand text */
  color: var(--header-text-color);
}

.logo {
  filter: drop-shadow(0 1px 2px var(--box-shadow-sm));
  transition: transform var(--transition-normal);
}

.navbar-brand:hover .logo {
  transform: rotate(6deg); /* Reduced rotation */
}

.nav-link {
  position: relative;
  padding: var(--spacing-sm) var(--spacing-md); /* Reduced padding */
  font-weight: 500;
  font-size: var(--font-size-sm); /* Smaller nav links */
  color: var(--nav-link-color);
  transition: all var(--transition-fast);
  border-radius: var(--border-radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--nav-link-hover-color);
  background-color: rgba(0, 120, 212, 0.05);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: var(--spacing-xs);
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--nav-link-hover-color);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 40%; /* Shorter underline */
}

.table-responsive {
  margin-bottom: var(--spacing-xl); /* Reduced margin */
  width: 100%;
  padding: 0;
  margin: 0;
}

.table-responsive-stack {
  width: 100%;
  box-sizing: border-box;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow-sm);
}

.table-responsive-stack th {
  background: var(--table-header-bg);
  color: var(--table-header-color);
  font-weight: 600;
  padding: var(--spacing-md) var(--spacing-sm); /* Reduced padding */
  text-align: center;
  letter-spacing: 0.02em;
  font-size: var(--font-size-sm); /* Smaller header font */
  border: none;
}

.table-responsive-stack td {
  padding: var(--spacing-md) var(--spacing-sm); /* Reduced padding */
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  vertical-align: middle;
  color: var(--text-color-secondary);
  font-size: var(--font-size-sm); /* Smaller cell font */
  transition: background-color var(--transition-fast);
}

.table-responsive-stack tr:last-child td {
  border-bottom: none;
}

.table-responsive-stack tr:hover {
  background: var(--table-row-hover-bg);
}

/* Modern Button Styles - Clean & Minimalist */
.btn {
  font-size: var(--font-size-sm);
  font-weight: 400; /* Lighter font weight */
  padding: 0.5rem 1rem; /* More compact padding */
  border-radius: 6px; /* Subtle rounded corners */
  border: 1px solid transparent; /* Thin border */
  transition: all 0.2s ease; /* Faster, smoother transition */
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  text-decoration: none;
  line-height: 1.4;
  min-height: 32px; /* More compact height */
  box-shadow: none; /* Remove default shadow */
}

.btn:hover {
  transform: translateY(-0.5px); /* Subtle hover effect */
  box-shadow: 0 2px 4px rgba(0,0,0,0.08); /* Light shadow on hover */
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-sm {
  font-size: var(--font-size-xs);
  padding: 0.375rem 0.75rem; /* More compact */
  min-height: 26px;
  font-weight: 400;
}

.btn-lg {
  font-size: var(--font-size-base);
  padding: 0.625rem 1.25rem; /* More compact */
  min-height: 38px;
  font-weight: 400;
}

.btn-primary {
  background-color: var(--button-primary-bg);
  color: var(--button-primary-color);
  border-color: var(--button-primary-bg);
  font-weight: 400; /* Lighter weight */
}

.btn-primary:hover {
  background-color: var(--button-primary-hover-bg);
  border-color: var(--button-primary-hover-bg);
  color: var(--button-primary-color);
  box-shadow: 0 2px 6px rgba(0,120,212,0.15); /* Subtle blue shadow */
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
  font-weight: 400; /* Lighter weight */
}

.btn-secondary:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  box-shadow: 0 2px 6px rgba(43,136,216,0.15); /* Subtle blue shadow */
}

.btn-secondary:active {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: white;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
  font-weight: 400; /* Lighter weight */
}

.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
  box-shadow: 0 2px 6px rgba(209,52,56,0.15); /* Subtle red shadow */
}

/* Modern Form Controls */
.form-control, .form-select {
  font-size: var(--font-size-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius);
  background-color: #fff;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.form-control:focus, .form-select:focus {
  border-color: var(--input-focus-border-color);
  box-shadow: var(--input-box-shadow-focus);
  outline: none;
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  border: 1px solid var(--input-border-color);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.periodo-select {
  font-size: var(--font-size-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
}

.obs-input {
  font-size: var(--font-size-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
}

/* Modern Card Styles */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  transition: all var(--transition-normal);
  overflow: hidden;
}

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

.card-body {
  padding: var(--spacing-lg);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-color-primary);
  margin-bottom: var(--spacing-md);
}

/* Modern Pagination */
.pagination .page-link {
  font-size: var(--font-size-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-color-primary);
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.pagination .page-link:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: var(--box-shadow-sm);
}

/* Modern Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: var(--border-radius-sm);
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Modern Notifications */
.push-notification {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition: all var(--transition-normal);
  transform: translateX(100%);
  opacity: 0;
}

.push-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.push-notification.hide {
  transform: translateX(100%);
  opacity: 0;
}

.push-notification.success {
  border-left: 4px solid var(--success-color);
}

.push-notification.error {
  border-left: 4px solid var(--danger-color);
}

.push-notification.warning {
  border-left: 4px solid var(--warning-color);
}

.push-notification.info {
  border-left: 4px solid var(--info-color);
}

/* Modern Loading Animation */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Modern Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-color-primary);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-base); }
h5 { font-size: var(--font-size-sm); }
h6 { font-size: var(--font-size-xs); }

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-color-primary);
  margin-bottom: var(--spacing-xs);
}

.card-title, .modal-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-color-primary);
}

/* Modern Sidebar */
.sidebar {
  background: linear-gradient(135deg, var(--sidebar-gradient-start), var(--sidebar-gradient-end));
  border-right: 1px solid var(--border-color);
  box-shadow: var(--box-shadow-sm);
  transition: all var(--transition-normal);
  overflow-y: auto;
  overflow-x: hidden;
  width: var(--sidebar-width);
  position: fixed;
  top: var(--header-height);
  left: 0;
  height: calc(100vh - var(--header-height));
  z-index: 1000;
}

.sidebar .nav-link {
  padding: var(--spacing-sm) var(--spacing-md);
  margin: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.sidebar .nav-link:hover {
  background-color: rgba(0, 120, 212, 0.08);
  color: var(--nav-link-hover-color);
  transform: translateX(2px);
}

.sidebar .nav-link.active {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--box-shadow-sm);
}

.sidebar .nav-link i {
  font-size: var(--font-size-base);
  width: 20px;
  text-align: center;
  transition: transform var(--transition-fast);
}

.sidebar .nav-link:hover i {
  transform: scale(1.1);
}

/* Modern Header */
.header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--header-height);
  background: var(--header-background);
  color: var(--header-text-color);
  padding: 0 2rem 0 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: relative;
  z-index: 1001;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--header-text-color);
  letter-spacing: 0.01em;
}

.header-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.header-unidade-setor {
  margin-left: 0;
  margin-right: 0;
  background: linear-gradient(90deg, #e3f0fa 60%, #dbeafe 100%);
  color: #323130;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.25rem 1rem 0.25rem 0.75rem;
  box-shadow: 0 1px 4px rgba(0,120,212,0.06);
}

@media (max-width: 768px) {
  .header {
    padding: 0 0.5rem 0 0.5rem;
  }
  .header-unidade-setor {
    font-size: 0.95rem;
    padding: 0.2rem 0.7rem 0.2rem 0.5rem;
  }
}

/* Modern Page Content */
.page-content {
  padding: var(--spacing-lg);
  margin-top: var(--header-height);
  /*margin-left: var(--sidebar-width);*/
  min-height: calc(100vh - var(--header-height));
  background-color: var(--body-bg);
  transition: margin-left var(--transition-normal);
}

/* Modern Search and Filter Container */
.search-filter-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--box-shadow-sm);
}

.search-filter-container .form-control,
.search-filter-container .form-select {
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.search-filter-container .form-control:focus,
.search-filter-container .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 120, 212, 0.15);
}

/* Modern Table Headers */
.setor-header {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-left: 4px solid var(--primary-color);
}

.setor-header td {
  padding: 12px 16px !important;
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.setor-header i {
  color: var(--primary-color);
  margin-right: var(--spacing-sm);
  font-size: var(--font-size-base);
}

.setor-header:hover {
  background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

/* Modern Badge Styles */
.badge {
  font-size: var(--font-size-xs);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modern Modal Styles */
/* .modal-content, .modal-header, .modal-body, .modal-footer removidos para evitar duplicidade, pois estão em components/modals.css */

/* Modern Dropdown Styles */
.dropdown-menu {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: var(--spacing-xs);
}

.dropdown-item {
  font-size: var(--font-size-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background-color: rgba(0, 120, 212, 0.08);
  color: var(--primary-color);
}

/* Modern Button Groups - Clean & Minimalist */
.btn-group .btn {
  border-radius: 0;
  margin: 0; /* Remove any default margins */
}

.btn-group .btn:first-child {
  border-top-left-radius: 6px; /* Consistent with main button radius */
  border-bottom-left-radius: 6px;
}

.btn-group .btn:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.btn-group .btn:not(:first-child):not(:last-child) {
  border-radius: 0;
}

/* Modern Form Groups */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-color-primary);
  margin-bottom: var(--spacing-xs);
}

/* Modern Alert Styles */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: var(--spacing-md);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-md);
}

.alert-success {
  background-color: rgba(16, 124, 16, 0.1);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.alert-danger {
  background-color: rgba(209, 52, 56, 0.1);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background-color: rgba(255, 170, 68, 0.1);
  color: var(--warning-color);
  border-left: 4px solid var(--warning-color);
}

.alert-info {
  background-color: rgba(0, 120, 212, 0.1);
  color: var(--info-color);
  border-left: 4px solid var(--info-color);
}

/* Modern Progress Bars */
.progress {
  height: 8px;
  border-radius: var(--border-radius-sm);
  background-color: #e9ecef;
  overflow: hidden;
}

.progress-bar {
  background-color: var(--primary-color);
  transition: width var(--transition-normal);
}

/* Modern Tooltip Styles */
.tooltip {
  font-size: var(--font-size-xs);
}

.tooltip-inner {
  background-color: var(--text-color-primary);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
}

/* Modern Spinner */
.spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.125em;
}

.spinner-border-sm {
  width: 0.875rem;
  height: 0.875rem;
  border-width: 0.1em;
}

/* Modern Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(0, 120, 212, 0.15);
}

/* Modern Hover Effects */
.btn:hover,
.nav-link:hover,
.dropdown-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--box-shadow-sm);
}

/* Modern Active States */
.btn:active,
.nav-link:active,
.dropdown-item:active {
  transform: translateY(0);
  box-shadow: var(--box-shadow-sm);
}

/* Modern Disabled States */
.btn:disabled,
.form-control:disabled,
.form-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Modern Responsive Design */
@media (max-width: 768px) {
  :root {
    --spacing-lg: 0.75rem;
    --spacing-xl: 1rem;
    --font-size-base: 0.875rem;
    --font-size-lg: 0.95rem;
    --font-size-xl: 1rem;
  }
  
  .page-content {
    margin-left: 0;
    padding: var(--spacing-md);
  }
  
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .header {
    padding: var(--spacing-xs) var(--spacing-md);
  }
  
  .search-filter-container {
    padding: var(--spacing-md);
  }
  
  .card-body {
    padding: var(--spacing-md);
  }
  
  .modal-body,
  .modal-header,
  .modal-footer {
    padding: var(--spacing-md);
  }
}

/* Modern Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --body-bg: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color-primary: #ffffff;
    --text-color-secondary: #cccccc;
    --border-color: #404040;
    --input-border-color: #404040;
  }
}

/* Modern Print Styles */
@media print {
  .btn,
  .nav-link,
  .sidebar,
  .header {
    display: none !important;
  }
  
  .page-content {
    margin: 0;
    padding: 0;
  }
  
  .table-responsive-stack {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* Modern Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Modern High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-color-primary: #000000;
    --text-color-secondary: #000000;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
  
  .form-control,
  .form-select {
    border: 2px solid currentColor;
  }
}









/* Update the toast container positioning */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  max-width: 350px;
  width: calc(100% - 2rem);
}

/* Adjust for mobile screens */
@media (max-width: 768px) {
  .toast-container {
    top: calc(var(--header-height) + 1rem); /* Position below header */
    right: 0.5rem;
    left: 0.5rem;
    max-width: none;
    width: auto;
  }

  .push-notification {
    margin: 0 0.5rem 0.5rem;
  }
}

/* Rest of existing styles remain the same */
:root {
  /* Primary Colors */
  --primary-color: #0078d4;    /* Updated to Microsoft blue */
  --secondary-color: #106ebe;  /* Darker Microsoft blue for secondary elements */
  --accent-color: #2b88d8;     /* Lighter blue for emphasis */
  --sidebar-gradient-start: #f3f3f3;
  --sidebar-gradient-end: #f3f3f3;
  
  /* Background Colors */
  --body-bg: #f8f9fa;          /* Light gray background */
  --card-bg: #ffffff;          /* Pure white for cards */
  
  /* Text Colors */
  --text-color-primary: #323130;   /* Dark gray for primary text - Microsoft UI style */
  --text-color-secondary: #605e5c;  /* Medium gray for secondary text - Microsoft UI style */
  
  /* Status Colors */
  --success-color: #107c10;    /* Microsoft green */
  --info-color: #0078d4;       /* Microsoft blue */
  --warning-color: #ffaa44;    /* Microsoft orange */
  --danger-color: #d13438;     /* Microsoft red */
  
  /* Border & Shadow Colors */
  --border-color: #edebe9;     /* Light gray for borders - Microsoft UI style */
  --box-shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --box-shadow: 0 4px 6px rgba(0,0,0,0.07);
  --box-shadow-lg: 0 8px 16px rgba(0,0,0,0.1);

  /* Element Specific Colors */
  --header-background: #0078d4;
  --header-text-color: #ffffff;
  --nav-link-color: var(--text-primary);
  --nav-link-hover-color: #0078d4;
  --table-header-bg: #0078d4;
  --table-header-color: #ffffff;
  --table-row-hover-bg: rgba(0,120,212,0.05);
  --button-primary-bg: #0078d4;
  --button-primary-color: #ffffff;
  --button-primary-hover-bg: #106ebe;
  --input-border-color: #edebe9;
  --input-focus-border-color: #0078d4;
  --input-box-shadow-focus: 0 0 0 0 0.25rem rgba(0,120,212,0.25);

  /* Layout Values */
  --border-radius: 8px;
  --sidebar-width: 240px;
  --sidebar-width-collapsed: 60px;
  --header-height: 60px;
}

body {
  background-color: var(--body-bg);
  color: var(--text-color-primary);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden; /* Prevent horizontal scroll */
  width: 100%; /* Ensure full width */
  position: relative; /* For proper overflow handling */
}

.navbar {
  background-color: #fff; /* Use brand primary color for navbar */
  box-shadow: var(--box-shadow-sm);
  padding: 1.25rem 0; /* Slightly increased padding */
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #ddd; /* Use secondary brand color for border */
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.75rem; /* Slightly larger brand text */
  color: var(--header-text-color);
}

.logo {
  filter: drop-shadow(0 1px 2px var(--box-shadow-sm));
  transition: transform 0.3s ease;
}

.navbar-brand:hover .logo {
  transform: rotate(8deg); /* Slightly less rotation */
}

.nav-link {
  position: relative;
  padding: 0.85rem 1.15rem; /* Adjusted padding */
  font-weight: 500;
  color: var(--nav-link-color);
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--nav-link-hover-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.6rem; /* Adjusted underline position */
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--nav-link-hover-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 50%; /* Slightly shorter underline */
}

.table-responsive {
  margin-bottom: 2.25rem; /* Slightly increased bottom margin */
  width: 100%;
  padding: 0;
  margin: 0;
}

.table-responsive-stack {
  width: 100%;
  box-sizing: border-box;
}

.table-responsive-stack th {
  background: var(--table-header-bg);
  color: var(--table-header-color);
  font-weight: 600;
  padding: 1.15rem 1rem; /* Adjusted padding */
  text-align: center;
  letter-spacing: 0.03em; /* Slight letter spacing */
  font-size: 0.95rem; /* Slightly smaller header font size */
}

.table-responsive-stack td {
  padding: 1.15rem 1rem; /* Adjusted padding */
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  vertical-align: middle;
  color: var(--text-color-secondary);
}

.table-responsive-stack tr:last-child td {
  border-bottom: none;
}

.table-responsive-stack tr:hover {
  background: var(--table-row-hover-bg);
}

@media screen and (max-width: 768px) {
  .table-responsive-stack thead {
    display: none;
  }

  .table-responsive-stack tr {
    display: block;
    margin-bottom: 1.15rem; /* Adjusted margin */
    background: var(--card-bg);
    border-radius: 0.5rem; /* Slightly less rounded corners */
    box-shadow: var(--box-shadow-sm);
    overflow: hidden;
  }

  .table-responsive-stack td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.15rem; /* Adjusted padding */
    border: none;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
  }

  .table-responsive-stack td:before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 1.15rem; /* Adjusted margin */
    text-align: left;
    min-width: 40%;
    color: var(--text-color-secondary);
  }

  .table-responsive-stack td:last-child {
    border-bottom: none;
  }

  .table-responsive-stack tr:last-child td:last-child {
    border-bottom-right-radius: 0.5rem;
  }
  .table-responsive-stack tr:last-child td:first-child {
      border-bottom-left-radius: 0.5rem;
  }
  .table-responsive-stack tr:first-child td:first-child {
      border-top-left-radius: 0.5rem;
  }
  .table-responsive-stack tr:first-child td:last-child {
      border-top-right-radius: 0.5rem;
  }

  .table-responsive-stack td[colspan="5"] {
    text-align: center;
    justify-content: center;
  }

  .table-responsive-stack td[colspan="5"]::before {
    display: none;
  }

  .form-check-input,
  .periodo-select,
  .obs-input {
    margin: 0;
  }

  .form-check-input {
    margin-left: auto;
    margin-right: 0;
    display: flex;
    justify-content: flex-end;
  }

  .obs-input {
    max-width: none;
  }

  #presenca .row.mb-3.align-items-end .col-md-4 {
    width: 100%;
    margin-top: 1rem;
  }
}

@media screen and (min-width: 769px) {
  .table-responsive-stack td[data-label="Ações"] {
    white-space: nowrap;
    min-width: 240px; /* Ensure enough space for buttons */
  }

  .table-responsive-stack td[data-label="Ações"] .btn {
    margin: 0 0.25rem; /* Add small spacing between buttons */
    display: inline-block;
    width: auto; /* Override full width from mobile styles */
  }
}

@media screen and (max-width: 768px) {
  .table-responsive-stack .form-control,
  .table-responsive-stack .form-select {
    width: 60%;
    min-width: 0;
    margin: 0;
    font-size: 0.9375rem;
  }

  .table-responsive-stack td[data-label="Período"],
  .table-responsive-stack td[data-label="Observações"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
  }

  .table-responsive-stack td[data-label="Período"]::before,
  .table-responsive-stack td[data-label="Observações"]::before {
    content: attr(data-label);
    min-width: 40%;
    text-align: left;
    font-weight: 600;
    color: var(--text-color-primary);
    opacity: 0.8;
    font-size: 0.875rem;
    padding-right: 1rem;
    position: static;
    transform: none;
  }

  .table-responsive-stack td[data-label="Período"] .periodo-select,
  .table-responsive-stack td[data-label="Observações"] .obs-input {
    width: 60%;
    margin: 0;
    font-size: 0.9375rem;
  }

  .periodo-select,
  .obs-input {
    width: auto;
    margin: 0;
    display: inline-block;
  }

  .table-responsive-stack td {
    text-align: right !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .table-responsive-stack td::before {
    text-align: left !important;
    margin-right: auto;
  }

  .table-responsive-stack select.periodo-select,
  .table-responsive-stack input.obs-input {
    min-height: 38px;
    padding: 0.375rem 0.75rem;
  }
}

@media screen and (min-width: 769px) {
  .table-responsive-stack td {
    white-space: normal; /* Allow text to wrap */
    vertical-align: middle;
    word-break: break-word; /* Break words only when necessary */
    overflow-wrap: break-word;
    padding: 1.15rem 1rem;
  }

  .table-responsive-stack th {
    vertical-align: middle;
    text-align: center !important;
    padding: 1.15rem 1rem;
  }

  .table-responsive-stack tr {
    display: table-row;
  }

  .table-responsive-stack td[data-label="Nome"],
  .table-responsive-stack td[data-label="Povoado"],
  .table-responsive-stack td[data-label="Local de Trabalho"] {
    max-width: 200px; /* Limit width to force wrapping on these columns */
  }

  /* Ensure table maintains structure */
  .table-responsive-stack {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }

  .table-responsive-stack thead {
    display: table-header-group;
  }

  .table-responsive-stack tbody {
    display: table-row-group;
  }

  /* Prevent specific columns from wrapping if possible */
  .table-responsive-stack td[data-label="ID"],
  .table-responsive-stack td[data-label="Nº Cartão"],
  .table-responsive-stack td[data-label="Período"],
  .table-responsive-stack td[data-label="Ações"] {
    white-space: nowrap;
  }

  /* Maintain alignment for numeric columns */
  .table-responsive-stack td[data-label="ID"],
  .table-responsive-stack td[data-label="Nº Cartão"] {
    text-align: center !important;
  }

  /* Set minimum width for action buttons container */
  .table-responsive-stack td[data-label="Ações"] {
    min-width: 240px;
    text-align: center !important;
  }

  /* Ensure cells don't collapse */
  .table-responsive-stack td {
    display: table-cell;
    min-width: 0;
  }

  /* Add horizontal scrolling only when absolutely necessary */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.page-content {
  background: var(--card-bg);
  border-radius: 0.5rem; /* Slightly less rounded corners */
  box-shadow: var(--box-shadow);
  padding: 1rem; /* Adjusted padding */
  margin-top: 2rem;
  animation: slideUp 0.4s ease-out; /* Slightly faster animation */
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media screen and (max-width: 768px) {
  .page-content {
    border-radius: 0;
    margin-top: 0;
    padding: 1rem;
    border: none;
    box-shadow: none;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px); /* Slightly less slide distance */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0.5rem; /* Slightly less rounded corners */
  overflow: hidden;
  background: var(--card-bg);
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
}

.table th {
  background: var(--table-header-bg);
  color: var(--table-header-color);
  font-weight: 600;
  padding: 1.15rem 1rem; /* Adjusted padding */
  text-align: left;
}

.table td {
  padding: 1.15rem 1rem; /* Adjusted padding */
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color-secondary);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background: var(--table-row-hover-bg);
}

/* Additional styles for centered table headers */
.table th,
.table-responsive-stack th {
  text-align: center !important;
}

.table td,
.table-responsive-stack td {
  text-align: center !important;
}

/* Mobile responsiveness for centered content */
@media screen and (max-width: 768px) {
  .table-responsive-stack td {
    text-align: right !important;
  }

  .table-responsive-stack td::before {
    text-align: left !important;
  }
}

/* Additional style to remove horizontal padding for .px-3 on smaller screens */
@media screen and (max-width: 768px) {
  .px-3 {
    padding-right: 0rem !important;
    padding-left: 0rem !important;
  }
}

/* Styles for mobile table responsiveness */
@media (max-width: 768px) {
  .table-responsive-stack,
  .table-responsive-stack thead,
  .table-responsive-stack tbody,
  .table-responsive-stack th,
  .table-responsive-stack td,
  .table-responsive-stack tr {
    display: block;
  }

  .table-responsive-stack thead {
    display: none;
  }

  .table-responsive-stack tr {
    display: block;
    margin-bottom: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04), 
                0 4px 8px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
    overflow: hidden;
  }

  .table-responsive-stack td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 0.9375rem;
  }

  .table-responsive-stack td:last-child {
    border-bottom: none;
  }

  .table-responsive-stack td::before {
    content: attr(data-label);
    font-weight: 600;
    min-width: 40%;
    color: var(--text-color-primary);
    opacity: 0.8;
    font-size: 0.875rem;
    padding-right: 1rem;
  }

  /* Special styling for specific columns */
  .table-responsive-stack td[data-label="Foto"] {
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
  }

  .table-responsive-stack td[data-label="Foto"]::before {
    content: attr(data-label);
    font-weight: 600;
    min-width: 40%;
    text-align: left;
    margin-right: auto;
    color: var(--text-color-primary);
    opacity: 0.8;
    font-size: 0.875rem;
  }

  .table-responsive-stack td[data-label="Foto"] div {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  .table-responsive-stack td[data-label="Foto"] img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .table-responsive-stack td[data-label="Ações"] {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0,0,0,0.02);
  }

  .table-responsive-stack td[data-label="Ações"]::before {
    display: none;
  }

  .table-responsive-stack td[data-label="Ações"] .btn {
    width: auto;
    margin: 0;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
  }

  .table-responsive-stack td[data-label="Ações"] .btn i {
    font-size: 1.1em;
  }

  /* Presence table specific styles */
  .table-responsive-stack td[data-label="Presença"] {
    justify-content: space-between;
  }

  .table-responsive-stack td[data-label="Presença"] .form-check-input {
    /* margin: 0; */
    width: 1.25rem;
    height: 1.25rem;
  }

  .table-responsive-stack td[data-label="Período"] .periodo-select {
    width: 60%;
    margin: 0;
    font-size: 0.9375rem;
  }

  .table-responsive-stack td[data-label="Observações"] .obs-input {
    width: 60%;
    margin: 0;
    font-size: 0.9375rem;
  }

  /* Status indicators */
  .table-responsive-stack td[data-label="Status"] {
    justify-content: flex-start;
  }

  .table-responsive-stack td[data-label="Status"] span {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
  }

  /* Improve form controls within tables */
  .table-responsive-stack .form-control,
  .table-responsive-stack .form-select {
    flex: 1;
    min-width: 0;
    max-width: 60%;
    margin: 0;
    font-size: 0.9375rem;
  }

  /* Empty state styling */
  .table-responsive-stack td[colspan] {
    text-align: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: var(--text-color-secondary);
    font-size: 0.9375rem;
  }

  .table-responsive-stack td[colspan]::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .table-responsive-stack td[data-label="Ações"] {
    justify-content: flex-end !important; /* Force right alignment */
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  .table-responsive-stack td[data-label="Ações"]::before {
    display: none; /* Hide the "Ações" label */
  }

  .table-responsive-stack td[data-label="Ações"] .btn-group {
    display: flex;
    gap: 0.375rem; /* Smaller gap for more compact look */
    justify-content: flex-end;
    width: 100%;
  }

  .table-responsive-stack td[data-label="Ações"] .btn {
    padding: 0.375rem 0.5rem; /* More compact for table buttons */
    min-width: 32px; /* Smaller minimum width */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs); /* Smaller font for table buttons */
  }

  /* Ensure icons in buttons are centered */
  .table-responsive-stack td[data-label="Ações"] .btn i {
    margin: 0;
    font-size: 1.1em;
  }

  /* Add some spacing between rows */
  .table-responsive-stack tr {
    margin-bottom: 1rem;
  }

  /* Adjust padding for better touch targets */
  .table-responsive-stack td[data-label="Ações"] {
    background: rgba(0,0,0,0.02);
  }
}

/* Enhance touch targets on mobile */
@media (hover: none) and (pointer: coarse) {
  .table-responsive-stack td[data-label="Ações"] .btn {
/* min-height: 44px; */
  }

  .table-responsive-stack .form-check-input,
  .table-responsive-stack .form-select,
  .table-responsive-stack .form-control {
/* min-height: 44px; */
  }
}

/* Additional styles for buttons - Clean & Minimalist */
.btn {
  border-radius: 6px; /* Consistent rounded corners */
  padding: 0.5rem 1rem; /* More compact */
  font-weight: 400; /* Lighter weight */
  transition: all 0.2s ease; /* Faster transition */
  box-shadow: none; /* Remove default shadow */
  border: 1px solid transparent; /* Thin border */
  font-size: var(--font-size-sm);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn-sm {
  padding: 0.375rem 0.75rem; /* More compact */
  font-size: var(--font-size-xs);
}

.btn-primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-color);
  font-weight: 400;
}

.btn-primary:hover {
  background: var(--button-primary-hover-bg);
  transform: translateY(-0.5px); /* Subtle hover effect */
  box-shadow: 0 2px 6px rgba(0,120,212,0.15);
}

.btn-secondary {
  background-color: var(--secondary-color) !important;
  color: white !important;
  border: 1px solid var(--secondary-color) !important;
  transition: all 0.2s ease !important;
  box-shadow: none;
  display: flex; 
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 400;
}

.btn-secondary:hover {
  background-color: var(--accent-color) !important;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 6px rgba(43,136,216,0.15);
}

.btn-secondary:active {
  background-color: var(--secondary-color) !important;
  color: white !important;
  transform: translateY(0);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
  border: 1px solid var(--danger-color);
  font-weight: 400;
}

.btn-danger:hover {
  background-color: #c82333;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 6px rgba(209,52,56,0.15);
}

.form-control, .form-select {
  border-radius: var(--border-radius);
  border: 1px solid var(--input-border-color);
  padding: 0.7rem 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: var(--box-shadow-sm);
  font-size: 0.95rem; /* Slightly smaller input text */
  color: var(--text-color-primary);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-control:focus, .form-select:focus {
  border-color: var(--input-focus-border-color);
  box-shadow: var(--input-box-shadow-focus);
  outline: none;
}

.form-check-input {
  border-radius: 0.25rem; /* Slightly less rounded checkbox */
  border: 1px solid var(--input-border-color);
  transition: background-color 0.3s, border-color 0.3s;
  box-shadow: var(--box-shadow-sm);
}

.form-check-input:checked {
  background-color: var(--success-color);
  border-color: var(--success-color);
  box-shadow: var(--box-shadow-sm);
}

.periodo-select {
  width: auto;
  margin: 0;
  display: inline-block;
}

.obs-input {
  width: auto;
  margin: 0;
  display: inline-block;
}

.card {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-2px); /* Reduced hover translate */
  box-shadow: var(--box-shadow-lg);
}

.card-body {
    padding: 1.4rem; /* Adjusted card body padding */
}

.card-title {
    font-size: 1.15rem; /* Slightly smaller card title */
    font-weight: 600;
    color: var(--text-color-primary);
    margin-bottom: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pagination .page-link {
  border-radius: 0.25rem; /* Slightly less rounded pagination links */
  margin: 0 0.2rem; /* Adjusted pagination margin */
  border: 1px solid var(--border-color);
  color: var(--text-color-secondary);
  background-color: var(--card-bg);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
  font-size: 0.9375rem; /* Adjusted pagination font size */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pagination .page-link:hover {
  background-color: #edf2f7; /* Lighter gray on hover */
  border-color: var(--accent-color);
  color: var(--text-color-primary);
}

.pagination .page-item.active .page-link {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow-sm);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px; /* Slightly thinner scrollbar */
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 0.3rem; /* Less rounded scrollbar track */
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 0.3rem; /* Less rounded scrollbar thumb */
  border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Toast Notifications */
.push-notification {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateX(120%);
  transition: all 0.3s ease;
  position: relative;
  border-left: 4px solid #2196f3;
  animation: fadeIn 0.3s ease-out;
}

.push-notification.show {
  transform: translateX(0);
}

.push-notification.hide {
  transform: translateX(120%);
  opacity: 0;
}

/* Notification types */
.push-notification.success {
  border-left-color: #4caf50;
  background-color: #f1f8e9;
}

.push-notification.error {
  border-left-color: #f44336;
  background-color: #fdecea;
}

.push-notification.warning {
  border-left-color: #ff9800;
  background-color: #fff3e0;
}

.push-notification.info {
  border-left-color: #2196f3;
  background-color: #e3f2fd;
}

/* Modern Loading Animation */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Modern Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-color-primary);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-base); }
h5 { font-size: var(--font-size-sm); }
h6 { font-size: var(--font-size-xs); }

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-color-primary);
  margin-bottom: var(--spacing-xs);
}

.card-title, .modal-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-color-primary);
}

/* Modern Sidebar */
.sidebar {
  background: linear-gradient(135deg, var(--sidebar-gradient-start), var(--sidebar-gradient-end));
  border-right: 1px solid var(--border-color);
  box-shadow: var(--box-shadow-sm);
  transition: all var(--transition-normal);
  overflow-y: auto;
  overflow-x: hidden;
  width: var(--sidebar-width);
  position: fixed;
  top: var(--header-height);
  left: 0;
  height: calc(100vh - var(--header-height));
  z-index: 1000;
}

.sidebar .nav-link {
  padding: var(--spacing-sm) var(--spacing-md);
  margin: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.sidebar .nav-link:hover {
  background-color: rgba(0, 120, 212, 0.08);
  color: var(--nav-link-hover-color);
  transform: translateX(2px);
}

.sidebar .nav-link.active {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--box-shadow-sm);
}

.sidebar .nav-link i {
  font-size: var(--font-size-base);
  width: 20px;
  text-align: center;
  transition: transform var(--transition-fast);
}

.sidebar .nav-link:hover i {
  transform: scale(1.1);
}

/* Modern Header */
.header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--header-height);
  background: var(--header-background);
  color: var(--header-text-color);
  padding: 0 2rem 0 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: relative;
  z-index: 1001;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--header-text-color);
  letter-spacing: 0.01em;
}

.header-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.header-unidade-setor {
  margin-left: 0;
  margin-right: 0;
  background: linear-gradient(90deg, #e3f0fa 60%, #dbeafe 100%);
  color: #323130;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.25rem 1rem 0.25rem 0.75rem;
  box-shadow: 0 1px 4px rgba(0,120,212,0.06);
}

@media (max-width: 768px) {
  .header {
    padding: 0 0.5rem 0 0.5rem;
  }
  .header-unidade-setor {
    font-size: 0.95rem;
    padding: 0.2rem 0.7rem 0.2rem 0.5rem;
  }
}

/* Modern Page Content */
.page-content {
  padding: var(--spacing-lg);
  margin-top: var(--header-height);
  /*margin-left: var(--sidebar-width);*/
  min-height: calc(100vh - var(--header-height));
  background-color: var(--body-bg);
  transition: margin-left var(--transition-normal);
}

/* Modern Search and Filter Container */
.search-filter-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--box-shadow-sm);
}

.search-filter-container .form-control,
.search-filter-container .form-select {
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.search-filter-container .form-control:focus,
.search-filter-container .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 120, 212, 0.15);
}

/* Modern Table Headers */
.setor-header {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-left: 4px solid var(--primary-color);
}

.setor-header td {
  padding: 12px 16px !important;
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.setor-header i {
  color: var(--primary-color);
  margin-right: var(--spacing-sm);
  font-size: var(--font-size-base);
}

.setor-header:hover {
  background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

/* Modern Badge Styles */
.badge {
  font-size: var(--font-size-xs);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modern Modal Styles */
/* .modal-content, .modal-header, .modal-body, .modal-footer removidos para evitar duplicidade, pois estão em components/modals.css */

/* Modern Dropdown Styles */
.dropdown-menu {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: var(--spacing-xs);
}

.dropdown-item {
  font-size: var(--font-size-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background-color: rgba(0, 120, 212, 0.08);
  color: var(--primary-color);
}

/* Modern Button Groups - Clean & Minimalist */
.btn-group .btn {
  border-radius: 0;
  margin: 0; /* Remove any default margins */
}

.btn-group .btn:first-child {
  border-top-left-radius: 6px; /* Consistent with main button radius */
  border-bottom-left-radius: 6px;
}

.btn-group .btn:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.btn-group .btn:not(:first-child):not(:last-child) {
  border-radius: 0;
}

/* Modern Form Groups */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-color-primary);
  margin-bottom: var(--spacing-xs);
}

/* Modern Alert Styles */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: var(--spacing-md);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-md);
}

.alert-success {
  background-color: rgba(16, 124, 16, 0.1);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.alert-danger {
  background-color: rgba(209, 52, 56, 0.1);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background-color: rgba(255, 170, 68, 0.1);
  color: var(--warning-color);
  border-left: 4px solid var(--warning-color);
}

.alert-info {
  background-color: rgba(0, 120, 212, 0.1);
  color: var(--info-color);
  border-left: 4px solid var(--info-color);
}

/* Modern Progress Bars */
.progress {
  height: 8px;
  border-radius: var(--border-radius-sm);
  background-color: #e9ecef;
  overflow: hidden;
}

.progress-bar {
  background-color: var(--primary-color);
  transition: width var(--transition-normal);
}

/* Modern Tooltip Styles */
.tooltip {
  font-size: var(--font-size-xs);
}

.tooltip-inner {
  background-color: var(--text-color-primary);
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
}

/* Modern Spinner */
.spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.125em;
}

.spinner-border-sm {
  width: 0.875rem;
  height: 0.875rem;
  border-width: 0.1em;
}

/* Modern Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(0, 120, 212, 0.15);
}

/* Modern Hover Effects */
.btn:hover,
.nav-link:hover,
.dropdown-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--box-shadow-sm);
}

/* Modern Active States */
.btn:active,
.nav-link:active,
.dropdown-item:active {
  transform: translateY(0);
  box-shadow: var(--box-shadow-sm);
}

/* Modern Disabled States */
.btn:disabled,
.form-control:disabled,
.form-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Modern Responsive Design */
@media (max-width: 768px) {
  :root {
    --spacing-lg: 0.75rem;
    --spacing-xl: 1rem;
    --font-size-base: 0.875rem;
    --font-size-lg: 0.95rem;
    --font-size-xl: 1rem;
  }
  
  .page-content {
    margin-left: 0;
    padding: var(--spacing-md);
  }
  
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .header {
    padding: var(--spacing-xs) var(--spacing-md);
  }
  
  .search-filter-container {
    padding: var(--spacing-md);
  }
  
  .card-body {
    padding: var(--spacing-md);
  }
  
  .modal-body,
  .modal-header,
  .modal-footer {
    padding: var(--spacing-md);
  }
}

/* Modern Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --body-bg: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color-primary: #ffffff;
    --text-color-secondary: #cccccc;
    --border-color: #404040;
    --input-border-color: #404040;
  }
}

/* Modern Print Styles */
@media print {
  .btn,
  .nav-link,
  .sidebar,
  .header {
    display: none !important;
  }
  
  .page-content {
    margin: 0;
    padding: 0;
  }
  
  .table-responsive-stack {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* Modern Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Modern High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-color-primary: #000000;
    --text-color-secondary: #000000;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
  
  .form-control,
  .form-select {
    border: 2px solid currentColor;
  }
}









/* Update the toast container positioning */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  max-width: 350px;
  width: calc(100% - 2rem);
}

/* Adjust for mobile screens */
@media (max-width: 768px) {
  .toast-container {
    top: calc(var(--header-height) + 1rem); /* Position below header */
    right: 0.5rem;
    left: 0.5rem;
    max-width: none;
    width: auto;
  }

  .push-notification {
    margin: 0 0.5rem 0.5rem;
  }
}

/* Rest of existing styles remain the same */
:root {
  /* Primary Colors */
  --primary-color: #0078d4;    /* Updated to Microsoft blue */
  --secondary-color: #106ebe;  /* Darker Microsoft blue for secondary elements */
  --accent-color: #2b88d8;     /* Lighter blue for emphasis */
  --sidebar-gradient-start: #f3f3f3;
  --sidebar-gradient-end: #f3f3f3;
  
  /* Background Colors */
  --body-bg: #f8f9fa;          /* Light gray background */
  --card-bg: #ffffff;          /* Pure white for cards */
  
  /* Text Colors */
  --text-color-primary: #323130;   /* Dark gray for primary text - Microsoft UI style */
  --text-color-secondary: #605e5c;  /* Medium gray for secondary text - Microsoft UI style */
  
  /* Status Colors */
  --success-color: #107c10;    /* Microsoft green */
  --info-color: #0078d4;       /* Microsoft blue */
  --warning-color: #ffaa44;    /* Microsoft orange */
  --danger-color: #d13438;     /* Microsoft red */
  
  /* Border & Shadow Colors */
  --border-color: #edebe9;     /* Light gray for borders - Microsoft UI style */
  --box-shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --box-shadow: 0 4px 6px rgba(0,0,0,0.07);
  --box-shadow-lg: 0 8px 16px rgba(0,0,0,0.1);

  /* Element Specific Colors */
  --header-background: #0078d4;
  --header-text-color: #ffffff;
  --nav-link-color: var(--text-primary);
  --nav-link-hover-color: #0078d4;
  --table-header-bg: #0078d4;
  --table-header-color: #ffffff;
  --table-row-hover-bg: rgba(0,120,212,0.05);
  --button-primary-bg: #0078d4;
  --button-primary-color: #ffffff;
  --button-primary-hover-bg: #106ebe;
  --input-border-color: #edebe9;
  --input-focus-border-color: #0078d4;
  --input-box-shadow-focus: 0 0 0 0 0.25rem rgba(0,120,212,0.25);

  /* Layout Values */
  --border-radius: 8px;
  --sidebar-width: 240px;
  --sidebar-width-collapsed: 60px;
  --header-height: 60px;
}

body {
  background-color: var(--body-bg);
  color: var(--text-color-primary);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden; /* Prevent horizontal scroll */
  width: 100%; /* Ensure full width */
  position: relative; /* For proper overflow handling */
}

.navbar {
  background-color: #fff; /* Use brand primary color for navbar */
  box-shadow: var(--box-shadow-sm);
  padding: 1.25rem 0; /* Slightly increased padding */
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #ddd; /* Use secondary brand color for border */
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.75rem; /* Slightly larger brand text */
  color: var(--header-text-color);
}

.logo {
  filter: drop-shadow(0 1px 2px var(--box-shadow-sm));
  transition: transform 0.3s ease;
}

.navbar-brand:hover .logo {
  transform: rotate(8deg); /* Slightly less rotation */
}

.nav-link {
  position: relative;
  padding: 0.85rem 1.15rem; /* Adjusted padding */
  font-weight: 500;
  color: var(--nav-link-color);
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--nav-link-hover-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.6rem; /* Adjusted underline position */
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--nav-link-hover-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 50%; /* Slightly shorter underline */
}

.table-responsive {
  margin-bottom: 2.25rem; /* Slightly increased bottom margin */
  width: 100%;
  padding: 0;
  margin: 0;
}

.table-responsive-stack {
  width: 100%;
  box-sizing: border-box;
}

.table-responsive-stack th {
  background: var(--table-header-bg);
  color: var(--table-header-color);
  font-weight: 600;
  padding: 1.15rem 1rem; /* Adjusted padding */
  text-align: center;
  letter-spacing: 0.03em; /* Slight letter spacing */
  font-size: 0.95rem; /* Slightly smaller header font size */
}

.table-responsive-stack td {
  padding: 1.15rem 1rem; /* Adjusted padding */
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  vertical-align: middle;
  color: var(--text-color-secondary);
}

.table-responsive-stack tr:last-child td {
  border-bottom: none;
}

.table-responsive-stack tr:hover {
  background: var(--table-row-hover-bg);
}

@media screen and (max-width: 768px) {
  .table-responsive-stack thead {
    display: none;
  }

  .table-responsive-stack tr {
    display: block;
    margin-bottom: 1.15rem; /* Adjusted margin */
    background: var(--card-bg);
    border-radius: 0.5rem; /* Slightly less rounded corners */
    box-shadow: var(--box-shadow-sm);
    overflow: hidden;
  }

  .table-responsive-stack td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.15rem; /* Adjusted padding */
    border: none;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
  }

  .table-responsive-stack td:before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 1.15rem; /* Adjusted margin */
    text-align: left;
    min-width: 40%;
    color: var(--text-color-secondary);
  }

  .table-responsive-stack td:last-child {
    border-bottom: none;
  }

  .table-responsive-stack tr:last-child td:last-child {
    border-bottom-right-radius: 0.5rem;
  }
  .table-responsive-stack tr:last-child td:first-child {
      border-bottom-left-radius: 0.5rem;
  }
  .table-responsive-stack tr:first-child td:first-child {
      border-top-left-radius: 0.5rem;
  }
  .table-responsive-stack tr:first-child td:last-child {
      border-top-right-radius: 0.5rem;
  }

  .table-responsive-stack td[colspan="5"] {
    text-align: center;
    justify-content: center;
  }

  .table-responsive-stack td[colspan="5"]::before {
    display: none;
  }

  .form-check-input,
  .periodo-select,
  .obs-input {
    margin: 0;
  }

  .form-check-input {
    margin-left: auto;
    margin-right: 0;
    display: flex;
    justify-content: flex-end;
  }

  .obs-input {
    max-width: none;
  }

  #presenca .row.mb-3.align-items-end .col-md-4 {
    width: 100%;
    margin-top: 1rem;
  }
}

@media screen and (min-width: 769px) {
  .table-responsive-stack td[data-label="Ações"] {
    white-space: nowrap;
    min-width: 240px; /* Ensure enough space for buttons */
  }

  .table-responsive-stack td[data-label="Ações"] .btn {
    margin: 0 0.25rem; /* Add small spacing between buttons */
    display: inline-block;
    width: auto; /* Override full width from mobile styles */
  }
}

@media screen and (max-width: 768px) {
  .table-responsive-stack .form-control,
  .table-responsive-stack .form-select {
    width: 60%;
    min-width: 0;
    margin: 0;
    font-size: 0.9375rem;
  }

  .table-responsive-stack td[data-label="Período"],
  .table-responsive-stack td[data-label="Observações"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
  }

  .table-responsive-stack td[data-label="Período"]::before,
  .table-responsive-stack td[data-label="Observações"]::before {
    content: attr(data-label);
    min-width: 40%;
    text-align: left;
    font-weight: 600;
    color: var(--text-color-primary);
    opacity: 0.8;
    font-size: 0.875rem;
    padding-right: 1rem;
    position: static;
    transform: none;
  }

  .table-responsive-stack td[data-label="Período"] .periodo-select,
  .table-responsive-stack td[data-label="Observações"] .obs-input {
    width: 60%;
    margin: 0;
    font-size: 0.9375rem;
  }

  .periodo-select,
  .obs-input {
    width: auto;
    margin: 0;
    display: inline-block;
  }

  .table-responsive-stack td {
    text-align: right !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .table-responsive-stack td::before {
    text-align: left !important;
    margin-right: auto;
  }

  .table-responsive-stack select.periodo-select,
  .table-responsive-stack input.obs-input {
    min-height: 38px;
    padding: 0.375rem 0.75rem;
  }
}

@media screen and (min-width: 769px) {
  .table-responsive-stack td {
    white-space: normal; /* Allow text to wrap */
    vertical-align: middle;
    word-break: break-word; /* Break words only when necessary */
    overflow-wrap: break-word;
    padding: 1.15rem 1rem;
  }

  .table-responsive-stack th {
    vertical-align: middle;
    text-align: center !important;
    padding: 1.15rem 1rem;
  }

  .table-responsive-stack tr {
    display: table-row;
  }

  .table-responsive-stack td[data-label="Nome"],
  .table-responsive-stack td[data-label="Povoado"],
  .table-responsive-stack td[data-label="Local de Trabalho"] {
    max-width: 200px; /* Limit width to force wrapping on these columns */
  }

  /* Ensure table maintains structure */
  .table-responsive-stack {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }

  .table-responsive-stack thead {
    display: table-header-group;
  }

  .table-responsive-stack tbody {
    display: table-row-group;
  }

  /* Prevent specific columns from wrapping if possible */
  .table-responsive-stack td[data-label="ID"],
  .table-responsive-stack td[data-label="Nº Cartão"],
  .table-responsive-stack td[data-label="Período"],
  .table-responsive-stack td[data-label="Ações"] {
    white-space: nowrap;
  }

  /* Maintain alignment for numeric columns */
  .table-responsive-stack td[data-label="ID"],
  .table-responsive-stack td[data-label="Nº Cartão"] {
    text-align: center !important;
  }

  /* Set minimum width for action buttons container */
  .table-responsive-stack td[data-label="Ações"] {
    min-width: 240px;
    text-align: center !important;
  }

  /* Ensure cells don't collapse */
  .table-responsive-stack td {
    display: table-cell;
    min-width: 0;
  }

  /* Add horizontal scrolling only when absolutely necessary */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.page-content {
  background: var(--card-bg);
  border-radius: 0.5rem; /* Slightly less rounded corners */
  box-shadow: var(--box-shadow);
  padding: 1rem; /* Adjusted padding */
  margin-top: 2rem;
  animation: slideUp 0.4s ease-out; /* Slightly faster animation */
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media screen and (max-width: 768px) {
  .page-content {
    border-radius: 0;
    margin-top: 0;
    padding: 1rem;
    border: none;
    box-shadow: none;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px); /* Slightly less slide distance */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0.5rem; /* Slightly less rounded corners */
  overflow: hidden;
  background: var(--card-bg);
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
}

.table th {
  background: var(--table-header-bg);
  color: var(--table-header-color);
  font-weight: 600;
  padding: 1.15rem 1rem; /* Adjusted padding */
  text-align: left;
}

.table td {
  padding: 1.15rem 1rem; /* Adjusted padding */
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color-secondary);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background: var(--table-row-hover-bg);
}

/* Additional styles for centered table headers */
.table th,
.table-responsive-stack th {
  text-align: center !important;
}

.table td,
.table-responsive-stack td {
  text-align: center !important;
}

/* Mobile responsiveness for centered content */
@media screen and (max-width: 768px) {
  .table-responsive-stack td {
    text-align: right !important;
  }

  .table-responsive-stack td::before {
    text-align: left !important;
  }
}

/* Additional style to remove horizontal padding for .px-3 on smaller screens */
@media screen and (max-width: 768px) {
  .px-3 {
    padding-right: 0rem !important;
    padding-left: 0rem !important;
  }
}

/* Styles for mobile table responsiveness */
@media (max-width: 768px) {
  .table-responsive-stack,
  .table-responsive-stack thead,
  .table-responsive-stack tbody,
  .table-responsive-stack th,
  .table-responsive-stack td,
  .table-responsive-stack tr {
    display: block;
  }

  .table-responsive-stack thead {
    display: none;
  }

  .table-responsive-stack tr {
    display: block;
    margin-bottom: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04), 
                0 4px 8px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
    overflow: hidden;
  }

  .table-responsive-stack td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 0.9375rem;
  }

  .table-responsive-stack td:last-child {
    border-bottom: none;
  }

  .table-responsive-stack td::before {
    content: attr(data-label);
    font-weight: 600;
    min-width: 40%;
    color: var(--text-color-primary);
    opacity: 0.8;
    font-size: 0.875rem;
    padding-right: 1rem;
  }

  /* Special styling for specific columns */
  .table-responsive-stack td[data-label="Foto"] {
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
  }

  .table-responsive-stack td[data-label="Foto"]::before {
    content: attr(data-label);
    font-weight: 600;
    min-width: 40%;
    text-align: left;
    margin-right: auto;
    color: var(--text-color-primary);
    opacity: 0.8;
    font-size: 0.875rem;
  }

  .table-responsive-stack td[data-label="Foto"] div {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  .table-responsive-stack td[data-label="Foto"] img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  .table-responsive-stack td[data-label="Ações"] {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0,0,0,0.02);
  }

  .table-responsive-stack td[data-label="Ações"]::before {
    display: none;
  }

  .table-responsive-stack td[data-label="Ações"] .btn {
    width: auto;
    margin: 0;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
  }

  .table-responsive-stack td[data-label="Ações"] .btn i {
    font-size: 1.1em;
  }

  /* Presence table specific styles */
  .table-responsive-stack td[data-label="Presença"] {
    justify-content: space-between;
  }

  .table-responsive-stack td[data-label="Presença"] .form-check-input {
    /* margin: 0; */
    width: 1.25rem;
    height: 1.25rem;
  }

  .table-responsive-stack td[data-label="Período"] .periodo-select {
    width: 60%;
    margin: 0;
    font-size: 0.9375rem;
  }

  .table-responsive-stack td[data-label="Observações"] .obs-input {
    width: 60%;
    margin: 0;
    font-size: 0.9375rem;
  }

  /* Status indicators */
  .table-responsive-stack td[data-label="Status"] {
    justify-content: flex-start;
  }

  .table-responsive-stack td[data-label="Status"] span {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
  }

  /* Improve form controls within tables */
  .table-responsive-stack .form-control,
  .table-responsive-stack .form-select {
    flex: 1;
    min-width: 0;
    max-width: 60%;
    margin: 0;
    font-size: 0.9375rem;
  }

  /* Empty state styling */
  .table-responsive-stack td[colspan] {
    text-align: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: var(--text-color-secondary);
    font-size: 0.9375rem;
  }

  .table-responsive-stack td[colspan]::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .table-responsive-stack td[data-label="Ações"] {
    justify-content: flex-end !important; /* Force right alignment */
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  .table-responsive-stack td[data-label="Ações"]::before {
    display: none; /* Hide the "Ações" label */
  }

  .table-responsive-stack td[data-label="Ações"] .btn-group {
    display: flex;
    gap: 0.375rem; /* Smaller gap for more compact look */
    justify-content: flex-end;
    width: 100%;
  }

  .table-responsive-stack td[data-label="Ações"] .btn {
    padding: 0.375rem 0.5rem; /* More compact for table buttons */
    min-width: 32px; /* Smaller minimum width */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs); /* Smaller font for table buttons */
  }

  /* Ensure icons in buttons are centered */
  .table-responsive-stack td[data-label="Ações"] .btn i {
    margin: 0;
    font-size: 1.1em;
  }

  /* Add some spacing between rows */
  .table-responsive-stack tr {
    margin-bottom: 1rem;
  }

  /* Adjust padding for better touch targets */
  .table-responsive-stack td[data-label="Ações"] {
    background: rgba(0,0,0,0.02);
  }
}

/* Enhance touch targets on mobile */
@media (hover: none) and (pointer: coarse) {
  .table-responsive-stack td[data-label="Ações"] .btn {
/* min-height: 44px; */
  }

  .table-responsive-stack .form-check-input,
  .table-responsive-stack .form-select,
  .table-responsive-stack .form-control {
/* min-height: 44px; */
  }
}

/* Additional styles for buttons - Clean & Minimalist */
.btn {
  border-radius: 6px; /* Consistent rounded corners */
  padding: 0.5rem 1rem; /* More compact */
  font-weight: 400; /* Lighter weight */
  transition: all 0.2s ease; /* Faster transition */
  box-shadow: none; /* Remove default shadow */
  border: 1px solid transparent; /* Thin border */
  font-size: var(--font-size-sm);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn-sm {
  padding: 0.375rem 0.75rem; /* More compact */
  font-size: var(--font-size-xs);
}

.btn-primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-color);
  font-weight: 400;
}

.btn-primary:hover {
  background: var(--button-primary-hover-bg);
  transform: translateY(-0.5px); /* Subtle hover effect */
  box-shadow: 0 2px 6px rgba(0,120,212,0.15);
}

.btn-secondary {
  background-color: var(--secondary-color) !important;
  color: white !important;
  border: 1px solid var(--secondary-color) !important;
  transition: all 0.2s ease !important;
  box-shadow: none;
  display: flex; 
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 400;
}

.btn-secondary:hover {
  background-color: var(--accent-color) !important;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 6px rgba(43,136,216,0.15);
}

.btn-secondary:active {
  background-color: var(--secondary-color) !important;
  color: white !important;
  transform: translateY(0);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
  border: 1px solid var(--danger-color);
  font-weight: 400;
}

.btn-danger:hover {
  background-color: #c82333;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 6px rgba(209,52,56,0.15);
}

.form-control, .form-select {
  border-radius: var(--border-radius);
  border: 1px solid var(--input-border-color);
  padding: 0.7rem 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: var(--box-shadow-sm);
  font-size: 0.95rem; /* Slightly smaller input text */
  color: var(--text-color-primary);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-control:focus, .form-select:focus {
  border-color: var(--input-focus-border-color);
  box-shadow: var(--input-box-shadow-focus);
  outline: none;
}

.form-check-input {
  border-radius: 0.25rem; /* Slightly less rounded checkbox */
  border: 1px solid var(--input-border-color);
  transition: background-color 0.3s, border-color 0.3s;
  box-shadow: var(--box-shadow-sm);
}

.form-check-input:checked {
  background-color: var(--success-color);
  border-color: var(--success-color);
  box-shadow: var(--box-shadow-sm);
}

.periodo-select {
  width: auto;
  margin: 0;
  display: inline-block;
}

.obs-input {
  width: auto;
  margin: 0;
  display: inline-block;
}

.card {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-2px); /* Reduced hover translate */
  box-shadow: var(--box-shadow-lg);
}

.card-body {
    padding: 1.4rem; /* Adjusted card body padding */
}

.card-title {
    font-size: 1.15rem; /* Slightly smaller card title */
    font-weight: 600;
    color: var(--text-color-primary);
    margin-bottom: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pagination .page-link {
  border-radius: 0.25rem; /* Slightly less rounded pagination links */
  margin: 0 0.2rem; /* Adjusted pagination margin */
  border: 1px solid var(--border-color);
  color: var(--text-color-secondary);
  background-color: var(--card-bg);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
  font-size: 0.9375rem; /* Adjusted pagination font size */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pagination .page-link:hover {
  background-color: #edf2f7; /* Lighter gray on hover */
  border-color: var(--accent-color);
  color: var(--text-color-primary);
}

.pagination .page-item.active .page-link {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: var(--box-shadow-sm);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px; /* Slightly thinner scrollbar */
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 0.3rem; /* Less rounded scrollbar track */
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 0.3rem; /* Less rounded scrollbar thumb */
  border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Toast Notifications */
.push-notification {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateX(120%);
  transition: all 0.3s ease;
  position: relative;
  border-left: 4px solid #2196f3;
  animation: fadeIn 0.3s ease-out;
}

.push-notification.show {
  transform: translateX(0);
}

.push-notification.hide {
  transform: translateX(120%);
  opacity: 0;
}

/* Notification types */
.push-notification.success {
  border-left-color: #4caf50;
  background-color: #f1f8e9;
}

.push-notification.error {
  border-left-color: #f44336;
  background-color: #fdecea;
}

.push-notification.warning {
  border-left-color: #ff9800;
  background-color: #fff3e0;
}

.push-notification.info {
  border-left-color: #2196f3;
  background-color: #e3f2fd;
}

/* Adjust notification position for mobile */
@media (max-width: 768px) {
  .push-notification {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Button spacing on mobile */
@media (max-width: 768px) {
  .location-date-wrapper {
    margin-bottom: 1rem;
  }
  
  #selectAll {
    margin-top: 1rem;
  }
}

/* Loading Spinner */
.bi-spin {
  width: 45px; /* Slightly smaller spinner */
  height: 45px;
  border: 4px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite; /* Slightly faster animation */
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Loading state for tables */
.table-loading {
  position: relative;
  min-height: 180px; /* Adjusted min height */
}

.table-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.8); /* Slightly more transparent loading overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem; /* Match table border radius */
}

/* Dashboard Styles */
.metric-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.75rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--box-shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.metric-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--box-shadow);
}

.metric-icon i {
  font-size: 28px;
  color: #ffffff !important;
}

.metric-content {
  flex: 1;
}

.metric-title {
  font-size: 0.875rem;
  color: var(--text-color-secondary);
  margin: 0 0 0.5rem 0;
  font-weight: 500;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.metric-value {
  font-size: 1.75rem;
  color: var(--text-color-primary);
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chart-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--box-shadow-sm);
  height: 100%;
  transition: all 0.3s ease;
}

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

.chart-header {
  padding: 1.5rem 1.5rem 0;
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chart-title i {
  color: var(--primary-color);
  font-size: 1.4em;
}

.chart-body {
  padding: 1.5rem;
}

.chart-container {
  position: relative;
  height: 400px;
  width: 100%;
}

@media (max-width: 768px) {
  .metric-card {
    padding: 1.25rem;
    gap: 1rem;
    margin-bottom: 1rem; /* Add bottom margin for spacing */
  }

  .metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }

  .metric-icon i {
    font-size: 24px;
  }

  .metric-title {
    font-size: 0.813rem;
  }

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

  /* Card spacing for dashboard */
  .row.mb-4 {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
  }

  .col-md-3 {
    flex: 1 1 100%;
    padding: 0;
    margin: 0;
  }

  /* Remove default Bootstrap margins that could interfere */
  .row {
    margin-left: 0;
    margin-right: 0;
  }

  .chart-container {
    height: 350px;
    margin: 0 -15px;
    padding: 0 15px;
    width: calc(100% + 30px);
  }

  .chart-body {
    padding: 1rem;
    overflow-x: hidden;
  }

  .chart-header {
    padding: 1.25rem 1.25rem 0;
  }

  .chart-title {
    font-size: 1rem;
  }
  
  /* Card row spacing in general */
  .row > [class^="col-"] {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 576px) {
  .metric-card {
    padding: 1rem;
  }

  .chart-container {
    height: 250px;
  }

  /* Tighter spacing for very small screens */
  .row.mb-4 {
    gap: 15px;
  }
}

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

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

@media (hover: none) {
  .metric-card:active {
    transform: scale(0.98);
  }

  .chart-card:active {
    transform: scale(0.98);
  }
}

/* Login and Signup Page Styles */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-page-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.login-form-section {
    background: white;
    display: flex;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.login-container {
    width: 100%;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color-primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.15);
    outline: none;
}

.password-container {
    position: relative;
}

.password-container .show-password {
    position: absolute;
    right: 12px;
    top: 70%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    z-index: 2;
}

.password-container input {
    padding-right: 40px;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
}

.remember-me input {
    margin: 0;
}

.login-options a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-options a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.btn-install {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.create-account-link {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.create-account-link a {
    color: var(--primary-color);
    font-weight: 500;
    margin-left: 0.5rem;
    text-decoration: none;
}

.create-account-link a:hover {
    text-decoration: underline;
}

.login-footer-link {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.login-footer-link a:hover {
    text-decoration: underline;
}

.version-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .login-container {
        padding: 2rem;
    }
    
    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Update header styles */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: var(--header-background);
  color: var(--header-text-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: var(--box-shadow-sm);
}

.header.expanded {
  left: var(--sidebar-width-collapsed);
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}



.header-logo img {
  height: 40px;
  width: auto;
  margin-left: auto;
}

/* Botão de Ajuda */
.btn-help {
  background: transparent;
  border: none;
  color: var(--header-text-color);
  font-size: 1.25rem;
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.btn-help:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.btn-help:active {
  transform: scale(0.95);
}

/* Modal de Ajuda */
.help-content {
  max-height: 70vh;
  overflow-y: auto;
}

.help-section {
  padding: 1rem 0;
}

.help-section h6 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

.help-section p {
  color: var(--text-color-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.help-section ul, .help-section ol {
  color: var(--text-color-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.help-section li {
  margin-bottom: 0.5rem;
}

.help-section strong {
  color: var(--text-color-primary);
  font-weight: 600;
}

.feature-item {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--body-bg);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
}

.feature-item h6 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.feature-item p {
  margin-bottom: 0;
  color: var(--text-color-secondary);
}

/* Abas do modal de ajuda */
#helpTabs .nav-link {
  color: var(--text-color-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

#helpTabs .nav-link:hover {
  color: var(--primary-color);
  background: transparent;
  border-bottom-color: var(--primary-color);
}

#helpTabs .nav-link.active {
  color: var(--primary-color);
  background: transparent;
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}

#helpTabs .nav-link i {
  margin-right: 0.5rem;
}

/* Responsividade do modal */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .help-content {
    max-height: 60vh;
  }
  
  #helpTabs .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  #helpTabs .nav-link i {
    margin-right: 0.25rem;
  }
  
  .feature-item {
    padding: 0.75rem;
  }
}

/* Ajustes para telas muito pequenas */
@media (max-width: 576px) {
  #helpTabs {
    flex-wrap: wrap;
  }
  
  #helpTabs .nav-item {
    flex: 1;
    min-width: 120px;
  }
  
  #helpTabs .nav-link {
    padding: 0.5rem;
    font-size: 0.8rem;
    text-align: center;
  }
  
  .help-section h6 {
    font-size: 0.95rem;
  }
  
  .help-section p, .help-section ul, .help-section ol {
    font-size: 0.9rem;
  }
}

/* Ocultar título "Administração" em telas grandes (desktop) */
@media (min-width: 769px) {
  .admin-page-title {
    display: none !important;
  }
}

/* Manter título "Administração" visível em telas pequenas (mobile) */
@media (max-width: 768px) {
  .admin-page-title {
    display: block !important;
  }
}

/* Logout button styles */
.btn-logout.mobile-only {
  display: none !important; /* Hide by default */
}

.nav-item.mt-auto {
  margin-top: auto !important;
  display: block !important;
}

@media (max-width: 768px) {
  .btn-logout.mobile-only {
    display: flex !important;
  }
  
  .nav-item.mt-auto {
    display: none !important;
  }
}

.header .btn-logout.mobile-only {
  background: none;
  border: none;
  color: white;
  padding: 0.5rem;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 769px) {
  .btn-logout.mobile-only {
    display: none !important;
  }
}

.nav-link[id*="logout"],
.btn-logout {
  display: flex !important;
}

.nav-item.mt-auto {
  margin-top: auto !important;
  display: block !important;
}

/* Location and Date field wrapper */
.location-date-wrapper {
  display: flex;
  gap: 0.5rem;
}

/* Make fields stack on mobile */
@media (max-width: 768px) {
  .location-date-wrapper select,
  .location-date-wrapper input {
    width: 100%;
  }
  
  .location-date-wrapper {
    flex-direction: column;
  }
}

/* For larger screens, display fields side by side */
@media (min-width: 769px) {
  .location-date-wrapper {
    flex-direction: row;
  }

  .location-date-wrapper select,
  .location-date-wrapper input {
    width: 50%;
  }
}

/* Ensure consistent spacing */
.location-date-wrapper .form-select,
.location-date-wrapper .form-control {
  margin-bottom: 0;
}

/* Add these styles for date inputs */
input[type="date"] {
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 8px;
  cursor: pointer;
}

input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  color: var(--text-color-primary);
}

/* Style for empty date inputs (showing placeholder) */
input[type="date"]:empty,
input[type="date"]:invalid {
  color: var(--text-color-secondary);
}

/* Adjust mobile styles */
@media (max-width: 768px) {
  input[type="date"] {
    min-height: 40px; /* Ensure good tap target size */
  }
  
  input[type="date"]::-webkit-calendar-picker-indicator {
    padding: 8px;
  }
}

/* Ensure date inputs show placeholder on mobile */
input[type="date"]::before {
  content: attr(placeholder);
  position: absolute;
  color: #6c757d;  
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

input[type="date"]:focus::before,
input[type="date"]:valid::before {
  display: none;
}

/* Ensure consistent date input appearance across devices */
@supports (-webkit-touch-callout: none) {
  input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    min-height: calc(1.5em + 0.75rem + 2px);
  }
}

/* Adjust date input padding for better mobile display */
@media (max-width: 768px) {
  input[type="date"] {
    padding: 0.375rem 0.75rem;
  }
  
  input[type="date"]::-webkit-calendar-picker-indicator {
    margin-left: auto;
  }
}

/* Main Content Styles */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: 0;
  padding: 2rem;
  padding-top: calc(var(--header-height) + 2rem);
  transition: all 0.3s ease;
  width: calc(100% - var(--sidebar-width)); 
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.main-content.expanded {
  margin-left: var(--sidebar-width-collapsed);
  width: calc(100% - var(--sidebar-width-collapsed));
}

@media (min-width: 1024px) {
  .main-content {
    margin-top: -32px;
  }
  
  .main-content.expanded {
    margin-top: -32px;
  }
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    margin-top: 0;
    padding: 0.5rem;
    padding-top: calc(var(--header-height) + 1rem);
    padding-bottom: 71px; 
    width: 100%;
  }
  
  .main-content.expanded {
    margin-left: 0;
    margin-top: 0;
    width: 100%;
  }

  .page-content {
    padding: 1rem;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .table-responsive {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .container {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    overflow-x: hidden;
  }
}

/* Fix mobile nav positioning */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  padding: 0.75rem;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for Chrome/Safari/Opera */
.mobile-nav::-webkit-scrollbar {
  display: none;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: var(--text-color-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 60px;
}

.mobile-nav-item i {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.mobile-nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
}

.mobile-nav-item:active {
  transform: scale(0.95);
}

.mobile-nav-item.active {
  color: var(--primary-color);
  background-color: rgba(0, 120, 212, 0.1);
}

.mobile-nav-item.active i {
  transform: translateY(-2px);
  color: var(--primary-color);
}

/* Remove the overflow button and menu */
.mobile-nav-overflow,
.mobile-nav-menu {
  display: none !important;
}

/* Sidebar visibility */
@media (max-width: 768px) {
  .sidebar {
    display: none !important; /* Hide sidebar completely on mobile */
  }
  
  .mobile-nav {
    display: flex;
  }
  
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  .main-content.expanded {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  /* Hide desktop-only menu toggle on mobile */
  .menu-toggle.desktop-only {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .mobile-nav {
    display: none;
  }
}

/* Update sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-right: 1px solid rgba(0, 120, 212, 0.1);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 10px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.welcome-message {
    padding: 1.5rem 1rem;
    color: var(--text-color-primary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid rgba(0, 120, 212, 0.08);
}

.welcome-message .avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
    border-radius: 12px;
    margin: 0 auto 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    color: white;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.15);
}

.welcome-message .username {
    font-weight: 600;
    color: var(--text-color-primary);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.welcome-message .user-role {
    color: var(--text-color-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    opacity: 0.8;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: var(--text-color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 12px;
    width: calc(100% - 30px);
    height: 44px;
    position: relative;
    overflow: hidden;
    gap: 15px;
    margin: 4px 0;
}

.nav-link:hover {
    background: rgba(0, 120, 212, 0.06);
    color: #0078d4;
    transform: translateX(4px);
}

.nav-link.active {
    background: #0078d4;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.2);
}

.nav-link i {
    font-size: 1.35rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    width: 24px;
    height: 24px;
}

.nav-link:hover i {
    transform: scale(1.1);
    color: #0078d4;
}

.nav-link.active i {
    color: white;
}

.nav-link span {
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-item {
    position: relative;
    width: 100%;
    padding: 0;
    margin: 4px 15px;
}

.nav-item.mt-auto {
    margin-top: auto;
    margin-bottom: 1rem;
    border-top: 1px solid rgba(0, 120, 212, 0.08);
    padding-top: 1rem;
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
    align-items: center;
}

.sidebar.collapsed .nav-link {
    width: 44px;
    padding: 0;
    justify-content: center;
}

.sidebar.collapsed .nav-item {
    width: 44px;
    display: flex;
    justify-content: center;
    margin: 4px 8px;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 120, 212, 0.2);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 120, 212, 0.3);
}

/* Add subtle hover animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.welcome-message .avatar:hover {
    animation: pulse 0.6s ease-in-out;
    box-shadow: 0 6px 16px rgba(0, 120, 212, 0.25);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .sidebar {
        background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
        border-right-color: rgba(255, 255, 255, 0.1);
    }

    .nav-link {
        color: #e0e0e0;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

    .welcome-message {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
}

/* Typography updates throughout */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 600;
  color: var(--text-color-primary);
}

.form-label {
  font-weight: 400;
  color: var(--text-color-secondary);
}

/* Card titles and headings */
.card-title, .modal-title {
  font-weight: 600;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Fix for collapsed sidebar mode */
.sidebar.collapsed .nav-link {
  padding: 0;
  justify-content: center;
}

/* Header adjustments */
.header {
  background: #0078d4; /* Primary blue */
  color: white;
  border-bottom: 1px solid #106ebe;
}

.header .menu-toggle,
.header .btn-logout {
  color: white;
}

.header-title {
  color: white;
  font-weight: 600;
}

.header .menu-toggle:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Update base form-control styles */
.form-control {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@media (max-width: 768px) {
  .row.mb-3.align-items-end > div {
    margin-bottom: 0.5rem;
    width: 100%;
  }

  .row.mb-3.align-items-end > div:last-child {
    margin-bottom: 0;
  }

  .row.mb-3.align-items-end .btn {
    width: 100%;
  }
}

/* Ensure proper spacing for filter rows */
.filter-row {
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .filter-row {
    margin: 0 0 1rem 0;
  }

  .filter-row > [class*='col-'] {
    padding: 0;
    margin-bottom: 0.5rem;
  }

  .filter-row > [class*='col-']:last-child {
    margin-bottom: 0;
  }
}

/* Spacing for mobile filters */
@media (max-width: 768px) {
  .d-lg-flex {
    gap: 1rem;
  }

  .d-lg-flex .flex-grow-1 {
    margin-bottom: 0.5rem;
  }

  .d-lg-flex .ms-lg-3 {
    display: flex;
    gap: 0.5rem;
  }

  /* Fix button spacing on mobile */
  .btn-group-mobile {
    display: flex;
    gap: 0.5rem;
    width: 100%;
  }

  .btn-group-mobile .btn {
    flex: 1;
  }

  /* Fix search and filter fields */
  .search-filter-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .search-filter-container .col-md-4,
  .search-filter-container .col-md-8 {
    width: 100%;
    padding: 0;
  }

  /* Improve spacing between filter elements */
  .row.mb-3 {
    margin: 0;
  }

  .row.mb-3 > [class*='col-'] {
    padding: 0;
    margin-bottom: 0.5rem;
  }

  /* Adjust spacing for date and location selectors */
  .location-date-wrapper {
    flex-direction: column;
    gap: 0.5rem;
  }

  .location-date-wrapper select,
  .location-date-wrapper input {
    width: 100%;
  }

  /* Fix button alignment */
  .d-flex.gap-2 {
    width: 100%;
  }

  .d-flex.gap-2 .btn {
    flex: 1;
  }

  /* Adjust page content padding */
  .page-content {
    padding: 1rem;
  }

  /* Fix form group spacing */
  .form-group {
    margin-bottom: 1rem;
  }

  /* Adjust table responsive padding */
  .table-responsive {
    padding: 0;
    margin: 0;
  }
}

.table td[data-label="Última Presença"],
.table td[data-label="Total de Presenças"],
.table td[data-label="Manhã"],
.table td[data-label="Tarde"],
.table td[data-label="Integral"],
.table td[data-label="Nome"],
.table td[data-label="Número do Cartão"],
.table td[data-label="Povoado"],
.table td[data-label="Local de Trabalho"] {
/*  text-align: center !important; */
}

@media screen and (max-width: 768px) {
  .table-responsive-stack td[data-label]::before {
    text-align: left !important;
  }
  
  .table-responsive-stack td {
    text-align: right !important;
  }
}

/* Add these styles for quantity columns */
.table td[data-label="Qtd. Solicitada"],
.table td[data-label="Qtd. Aprovada CT"] {
  text-align: center !important;
  font-weight: 500;
}

@media screen and (max-width: 768px) {
  .table-responsive-stack td[data-label="Qtd. Solicitada"]::before,
  .table-responsive-stack td[data-label="Qtd. Aprovada CT"]::before {
    text-align: left !important;
    font-weight: 600;
    color: var(--text-color-primary);
  }

  .table-responsive-stack td[data-label="Qtd. Solicitada"],
  .table-responsive-stack td[data-label="Qtd. Aprovada CT"] {
    text-align: right !important;
    font-weight: 500;
    color: var(--text-color-secondary);
  }
}

/* Expandable Row Styles */
.details-row {
  background-color: rgba(240, 247, 255, 0.5);
}

@media screen and (max-width: 768px) {
  .details-row {
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(240, 247, 255, 0.5);
  }

  .details-content {
    padding: 1rem;
    animation: fadeIn 0.3s ease-in-out;
    width: 100%;
  }

  .details-content .row {
    margin: 0;
    padding: 0;
  }

  .details-content .row > [class*='col-'] {
    padding: 0.5rem 0;
  }

  .details-content p {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    margin: 0;
  }

  .details-content p:last-child {
    border-bottom: none;
  }

  .details-content p strong {
    color: var(--text-color-primary);
    opacity: 0.8;
    font-size: 0.875rem;
    min-width: 40%;
    text-align: left;
  }

  .details-content a {
    word-break: break-all;
  }

  .table-responsive-stack tr {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
  }

  .table-responsive-stack td[data-label="Ações"] {
    background: rgba(0,0,0,0.02);
    justify-content: flex-end;
    padding: 0.75rem;
  }

  .table-responsive-stack td[data-label="Ações"] .btn-group {
    display: flex;
    gap: 0.5rem;
  }

  .table-responsive-stack td[data-label="Ações"] .btn {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
  }

  /* Improve spacing and readability */
  .details-content .col-md-6 {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }

  .details-content .col-md-6:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }

  /* Status badges in details */
  .details-content .badge {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }

  /* Links in details */
  .details-content a {
    color: var(--primary-color);
    text-decoration: none;
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
  }

  /* Adjust spacing for action buttons */
  .btn-group {
    gap: 0.5rem;
  }

  /* Improve visibility of expanded content */
  .details-row {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
  }

  /* Animation for expand/collapse */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .details-content .row .col-md-6 {
    margin-bottom: 1rem;
  }
  
  .details-content .row .col-md-6:last-child {
    margin-bottom: 0;
  }
}

.table-responsive-stack .form-select-sm {
    width: auto;
    min-width: 140px;
}

@media screen and (max-width: 768px) {
    .table-responsive-stack td[data-label="Status"],
    .table-responsive-stack td[data-label="Função"] {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.875rem 1rem;
    }

    .table-responsive-stack td[data-label="Status"]::before,
    .table-responsive-stack td[data-label="Função"]::before {
        content: attr(data-label);
        text-align: left !important;
        min-width: 40%;
        font-weight: 600;
        color: var(--text-color-primary);
    }
}

@media (max-width: 768px) {
  .nav-link,
  .btn,
  .form-control {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
}

.request-link-display {
    word-wrap: break-word; /* For older browsers */
    overflow-wrap: break-word; /* Standard property */
    word-break: break-all; /* Allows breaking in the middle of words if necessary */
    white-space: normal; /* Ensures that the text wraps normally */
    line-height: 1.4; /* Improves readability for wrapped links */
    padding: 0.25rem 0; /* Optional: add some padding if needed */
}

.notification-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius);
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  margin-bottom: 1rem;
}

.notification-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.notification-btn i {
  font-size: 1.2em;
}

.notification-btn.ct {
  background-color: #0078d4;
}

.notification-btn.sp {
  background-color: #107c10;
}

.notification-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.notification-btn:active:not(:disabled) {
  transform: translateY(0);
}

/* Additional status colors for badges */
.badge.bg-info {
  background-color: #17a2b8 !important;
}

.badge.bg-primary {
  background-color: #0078d4 !important;
}

.table-responsive-stack td[data-label="Status"] span.badge {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

.table-responsive-stack td[data-label="Email"] {
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 200px;
}

@media screen and (max-width: 768px) {
    .table-responsive-stack td[data-label="Email"] {
        text-align: left !important;
        max-width: none;
    }
    
    .table-responsive-stack td[data-label="Email"]::before {
        min-width: 35%;
    }
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite; /* Slightly faster animation */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Responsive table for maintenance */
@media screen and (max-width: 768px) {
  #manutencao-table thead {
    display: none; /* Oculta o cabeçalho da tabela em telas pequenas */
  }

  #manutencao-table, 
  #manutencao-table tbody, 
  #manutencao-table tr, 
  #manutencao-table td {
    display: block;
    width: 100%;
  }

  #manutencao-table tr {
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
  }

  #manutencao-table td {
    padding-left: 50%;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  #manutencao-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 45%;
    padding-left: 1rem;
    font-weight: bold;
    text-align: left;
  }

  #manutencao-table td:last-child {
    border-bottom: 0;
  }

  #manutencao-table td[data-label="Ações"] .btn-group {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }
}

.table-responsive {
    overflow-x: auto;
}

/* General styles for maintenance table */
#manutencao-table tbody td {
  vertical-align: middle;
}

.table-responsive {
    overflow-x: auto;
}

/* Rest of existing styles remain the same */
        .login-container {
            opacity: 1;
            transition: opacity 0.3s ease;
        }

        .login-container.fade-out {
            opacity: 0;
        }

        .main-content, .sidebar, .header {
            opacity: 1;
            transition: opacity 0.3s ease;
        }
        
        /* Ensure logout button is always visible */
        .nav-link[id*="logout"],
        .btn-logout {
            display: flex !important;
        }

        /* Ensure logout link in sidebar nav remains at bottom */
        .nav-item.mt-auto {
            margin-top: auto !important;
            display: block !important;
        }

        /* Mais Opções Submenu Styles */
        #mais-opcoes-container {
            position: relative;
        }

        #mais-opcoes-toggle {
            position: relative;
            justify-content: space-between;
        }

        .submenu-arrow {
            transition: transform 0.3s ease;
            font-size: 0.875rem;
            margin-left: auto;
        }

        #mais-opcoes-toggle.expanded .submenu-arrow {
            transform: rotate(180deg);
        }

        .submenu {
            display: none;
            position: absolute;
            top: 100%;
            left: 15px;
            right: 15px;
            z-index: 1000;
            background-color: white;
            border-radius: 8px;
            margin-top: 5px;
            padding: 5px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            border: 1px solid var(--border-color);
        }

        .submenu.expanded {
            display: block;
        }

        .submenu-link {
            display: flex;
            align-items: center;
            padding: 8px 15px;
            font-size: 0.875rem;
            color: var(--text-color-secondary);
            border-radius: 6px;
            margin: 2px 5px;
            height: 36px;
            text-decoration: none;
            transition: all 0.2s ease;
        }

        .submenu-link:hover {
            background-color: rgba(0, 120, 212, 0.1);
            color: var(--primary-color);
        }

        .submenu-link.active {
            background-color: var(--primary-color);
            color: white;
        }

        .submenu-link i {
            font-size: 1rem;
            margin-right: 10px;
        }

        /* Collapsed sidebar adjustments */
        .sidebar.collapsed #mais-opcoes-toggle .submenu-arrow,
        .sidebar.collapsed #mais-opcoes-toggle span {
            display: none;
        }

        .sidebar.collapsed .submenu {
            position: absolute;
            left: 100%;
            top: 0;
            background-color: white;
            border: 1px solid #ddd;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            min-width: 180px;
            z-index: 1000;
            margin: 0;
            padding: 8px 0;
            display: none;
        }

        .sidebar.collapsed .submenu.expanded {
            display: block;
        }

        .sidebar.collapsed .submenu-item {
            margin: 0;
        }

        .sidebar.collapsed .submenu-link {
            margin: 0;
            border-radius: 0;
            padding: 10px 15px;
            height: auto;
            white-space: nowrap;
        }

        .sidebar.collapsed .submenu-link span {
            display: inline;
        }

        /* Mobile adjustments */
        @media (max-width: 768px) {
            .submenu {
                margin: 0 10px;
            }
            
            .submenu-link {
                margin: 1px 3px;
                padding: 6px 12px;
                font-size: 0.8rem;
            }
        }

        /* Mobile Mais Opções Modal Styles */
        .mobile-mais-opcoes-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        .mobile-mais-opcoes-content {
            background-color: white;
            border-radius: 12px;
            width: 100%;
            max-width: 320px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            overflow: hidden;
        }

        .mobile-mais-opcoes-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid #eee;
            background-color: #f8f9fa;
        }

        .mobile-mais-opcoes-header h5 {
            margin: 0;
            font-weight: 600;
            color: var(--text-color-primary);
        }

        .mobile-mais-opcoes-header .btn-close {
            background: none;
            border: none;
            font-size: 1.25rem;
            color: var(--text-color-secondary);
            cursor: pointer;
            padding: 0.25rem;
            border-radius: 4px;
            transition: all 0.2s ease;
        }

        .mobile-mais-opcoes-header .btn-close:hover {
            background-color: rgba(0, 0, 0, 0.1);
            color: var(--text-color-primary);
        }

        .mobile-mais-opcoes-body {
            padding: 0.5rem;
        }

        .mobile-mais-opcoes-item {
            display: flex;
            align-items: center;
            padding: 0.875rem 1rem;
            color: var(--text-color-primary);
            text-decoration: none;
            border-radius: 8px;
            margin: 0.25rem 0;
            transition: all 0.2s ease;
            gap: 0.75rem;
        }

        .mobile-mais-opcoes-item:hover {
            background-color: rgba(0, 120, 212, 0.1);
            color: var(--primary-color);
        }

        .mobile-mais-opcoes-item:active {
            background-color: rgba(0, 120, 212, 0.2);
        }

        .mobile-mais-opcoes-item i {
            font-size: 1.125rem;
            width: 1.5rem;
            text-align: center;
        }

        .mobile-mais-opcoes-item span {
            font-weight: 500;
            font-size: 0.95rem;
        }

/* Estilos para as abas do estoque */
.estoque-tabs {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.estoque-tabs .nav-tabs {
  border-bottom: none;
  gap: 0.5rem;
}

.estoque-tabs .nav-link {
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: var(--text-color-secondary);
  background-color: var(--card-bg);
  transition: all 0.3s ease;
  margin-bottom: -1px;
}

.estoque-tabs .nav-link:hover {
  color: var(--primary-color);
  background-color: #f8f9fa;
  border-color: var(--primary-color);
}

.estoque-tabs .nav-link.active {
  color: var(--primary-color);
  background-color: var(--card-bg);
  border-color: var(--primary-color);
  border-bottom-color: var(--card-bg);
  font-weight: 600;
}

.estoque-tabs .nav-link i {
  margin-right: 0.5rem;
  font-size: 1.1em;
}

.tab-content {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  padding: 2rem;
}

.tab-pane {
  animation: fadeIn 0.3s ease-in-out;
}

.estoque-section {
  margin-bottom: 0;
}

.estoque-title {
  color: var(--text-color-primary);
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-color);
  display: flex;
  align-items: center;
}

.estoque-title i {
  color: var(--primary-color);
  margin-right: 0.75rem;
  font-size: 1.2em;
}

/* Responsividade para as abas */
@media (max-width: 768px) {
  .estoque-tabs .nav-tabs {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .estoque-tabs .nav-link {
    border-radius: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
    text-align: center;
  }
  
  .estoque-tabs .nav-link.active {
    border-bottom-color: var(--primary-color);
  }
  
  .tab-content {
    border-top: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
  }
  
  .estoque-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
}

/* Melhorias para os badges de saldo */
.saldo-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.saldo-zero {
  background-color: var(--danger-color);
  color: white;
}

.saldo-baixo {
  background-color: var(--warning-color);
  color: #333;
}

.saldo-positivo {
  background-color: var(--success-color);
  color: white;
}

/* Animação para transição entre abas */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilos para o seletor de estoque com ícones */
.estoque-selector {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow-sm);
}

.estoque-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.estoque-title {
  color: var(--text-color-primary);
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  font-size: 1.5rem;
}

.estoque-title i {
  color: var(--primary-color);
  margin-right: 0.75rem;
  font-size: 1.3em;
}

.estoque-icons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.estoque-icon-btn {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--card-bg);
}

.estoque-icon-btn:hover {
  border-color: var(--primary-color);
  background-color: rgba(0, 120, 212, 0.1);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.estoque-icon-btn.active {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--box-shadow);
}

.estoque-content {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow-sm);
}

.estoque-section {
  display: none;
  padding: 2rem;
  animation: fadeIn 0.3s ease-in-out;
}

.estoque-section.active {
  display: block;
}

/* Responsividade para o seletor de estoque */
@media (max-width: 768px) {
  .estoque-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .estoque-title {
    font-size: 1.25rem;
  }
  
  .estoque-icons {
    align-self: flex-end;
  }
  
  .estoque-icon-btn {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
  
  .estoque-section {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .estoque-selector {
    padding: 1rem;
  }
  
  .estoque-title {
    font-size: 1.1rem;
  }
  
  .estoque-icon-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .estoque-icons {
    gap: 0.25rem;
  }
}

/* Melhorias para os badges de saldo */
.saldo-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.saldo-zero {
  background-color: var(--danger-color);
  color: white;
}

.saldo-baixo {
  background-color: var(--warning-color);
  color: #333;
}

.saldo-positivo {
  background-color: var(--success-color);
  color: white;
}

/* Animação para transição entre seções */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Menu Toggle Button */
.menu-toggle {
  background: none;
  border: none;
  color: white;
  padding: 0.5rem;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  color: rgba(255, 255, 255, 0.9);
}

.menu-toggle:active {
  transform: scale(0.95);
}

.menu-toggle i {
  display: block;
  line-height: 1;
}

@media (max-width: 768px) {
  .menu-toggle {
    margin-right: 0.75rem;
    font-size: 1.25rem;
  }
}

/* Mobile header styles */
@media screen and (max-width: 768px) {
  .header {
    left: 0;
    padding: 0 1rem;
  }

  .header.expanded {
    left: 0;
  }

  .mobile-only {
    display: flex;
  }

  .desktop-only {
    display: none;
  }

  .header-left {
    justify-content: flex-start;
    position: relative;
    flex: 1;
  }

  .header-title {
    position: absolute;
    left: 55%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 1.1rem;
  }

  /* Style logout button */
  .btn-logout {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .btn-logout span {
    display: none; /* Hide text, show only icon */
  }
}

/* Botão de Ajuda na Tela de Login */
.login-help-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  pointer-events: auto;
}

.btn-help-login {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
  transition: all 0.3s ease;
  pointer-events: auto;
  position: relative;
  z-index: 10000;
}

.btn-help-login:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 120, 212, 0.4);
}

.btn-help-login:active {
  transform: translateY(0);
}

.btn-help-login i {
  font-size: 16px;
}

/* Responsividade do botão de ajuda na tela de login */
@media (max-width: 768px) {
  .login-help-button {
    bottom: 15px;
    right: 15px;
  }
  
  .btn-help-login {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .btn-help-login span {
    display: none; /* Esconde o texto em mobile, mostra só o ícone */
  }
  
  .btn-help-login {
    border-radius: 50%;
    width: 45px;
    height: 45px;
    justify-content: center;
  }
}

/* Estilos para os novos itens do modal */
.module-item {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--body-bg);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--info-color);
}

.module-item h6 {
  margin-bottom: 0.5rem;
  color: var(--info-color);
  display: flex;
  align-items: center;
}

.module-item p {
  margin-bottom: 0;
  color: var(--text-color-secondary);
  line-height: 1.6;
}

.tip-item {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--body-bg);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--warning-color);
}

.tip-item h6 {
  margin-bottom: 0.75rem;
  color: var(--warning-color);
  display: flex;
  align-items: center;
}

.tip-item ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.tip-item li {
  margin-bottom: 0.5rem;
  color: var(--text-color-secondary);
  line-height: 1.5;
}

/* Ajustes responsivos para os novos itens */
@media (max-width: 768px) {
  .module-item,
  .tip-item {
    padding: 0.75rem;
  }
  
  .module-item h6,
  .tip-item h6 {
    font-size: 0.95rem;
  }
  
  .module-item p,
  .tip-item li {
    font-size: 0.9rem;
  }
}

/* --- Estilo específico para a toolbar da Aprovação CT --- */
.aprovacao-ct-toolbar {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 16px 12px;
  margin-bottom: 24px;
  gap: 16px;
}
.aprovacao-ct-toolbar .form-control {
  min-width: 260px;
  font-size: 1.08em;
}
.aprovacao-ct-toolbar .btn {
  min-width: 140px;
  font-weight: 500;
}
@media (max-width: 768px) {
  .aprovacao-ct-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 6px;
    gap: 10px;
  }
  .aprovacao-ct-toolbar .btn,
  .aprovacao-ct-toolbar .form-control {
    min-width: 0;
    width: 100%;
  }
}

/* Responsividade para filtros e botões da tela Meus Pedidos */
@media (min-width: 992px) {
  .search-filter-container .row {
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
  }
  .search-filter-container .col-12.mb-2 {
    margin-bottom: 0 !important;
  }
  .btns-action-group {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }
  .btns-action-group .btn,
  .btns-action-group .btn-group {
    width: auto !important;
  }
  .search-filter-container .flex-fill {
    max-width: 180px;
    flex: 0 0 180px;
  }
  .search-filter-container .col-lg-9 {
    gap: 16px !important;
  }
  .btns-action-group {
    margin-left: 16px !important;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 100%;
  }
  .btns-action-group .btn,
  .btns-action-group .btn-group {
    max-width: 200px;
    width: 100%;
    box-sizing: border-box;
  }
  .btns-action-group .btn-group {
    min-width: 140px;
  }
  #novoPedido.btn {
    height: 48px;
    min-width: 140px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }
  .btns-action-group .btn {
    height: 48px;
    min-width: 140px;
    font-size: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }
}
@media (max-width: 991.98px) {
  .search-filter-container .row {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
  }
  .search-filter-container .col-12,
  .search-filter-container .col-12.mb-2 {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0.5rem !important;
  }
  .btns-action-group {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }
  .btns-action-group .btn,
  .btns-action-group .btn-group {
    width: 100% !important;
  }
  .search-filter-container .flex-fill {
    max-width: 100% !important;
    flex: 1 1 100%;
    width: 100%;
  }
  .search-filter-container select.form-select {
    width: 100%;
  }
}

/* Estilos para cabeçalhos de setor */
.setor-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 4px solid var(--primary-color);
}

.setor-header td {
  padding: 12px 16px !important;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.setor-header i {
  color: var(--primary-color);
  margin-right: 8px;
}

/* Hover effect para cabeçalhos de setor */
.setor-header:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

/* Responsividade para cabeçalhos de setor */
@media (max-width: 768px) {
  .setor-header td {
    padding: 10px 12px !important;
    font-size: 1rem;
    text-align: center;
  }
  
  .setor-header i {
    display: block;
    margin: 0 auto 4px auto;
    font-size: 1.2rem;
  }
}

/* Espaçamento entre setores */
.setor-header + tr.pedido-row {
  border-top: 2px solid #dee2e6;
}

/* Animação suave para transições */
.setor-header,
.pedido-row,
.details-row {
  transition: all 0.3s ease;
}

/* Garante alinhamento do botão de sair na sidebar recolhida */
.sidebar.collapsed .nav-item.mt-auto {
  width: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px 8px;
}

/* Sidebar recolhida: alinhamento perfeito do botão de sair */
.sidebar.collapsed .nav-item.mt-auto {
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 4px 8px !important;
  padding: 0 !important;
}
.sidebar.collapsed .nav-item.mt-auto .nav-link {
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0 !important;
}
.sidebar.collapsed .nav-item.mt-auto .nav-link span {
  display: none !important;
}

.btn-receber {
  margin-right: 0 !important;
}

/* --- AJUSTES DE RESPONSIVIDADE PARA O MODAL DE AJUDA DO SISTEMA --- */
#helpTabs .nav-link {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}

@media (max-width: 576px) {
  #helpTabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 2px;
  }
  #helpTabs .nav-item {
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 180px;
  }
  #helpTabs .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.5rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
  }
  .help-content {
    max-height: 55vh;
  }
}

@media (max-width: 400px) {
  #helpTabs .nav-item {
    min-width: 90px;
    max-width: 120px;
  }
  #helpTabs .nav-link {
    font-size: 0.75rem;
    padding: 0.4rem 0.2rem;
  }
}

/* Ajuste para evitar quebra feia de palavras nos títulos das abas */
#helpTabs .nav-link {
  hyphens: none;
}

/* Espaçamento extra para ícones e textos nas abas */
#helpTabs .nav-link i {
  margin-right: 0.3em;
}

/* Accordion FAQ para o modal de ajuda */
#helpAccordion .accordion-item {
  border: 1px solid #e0e7ef;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #f9fbfd;
}
#helpAccordion .accordion-header {
  border-radius: 8px;
}
#helpAccordion .accordion-button {
  background: #f1f5fb;
  color: #222;
  font-weight: 500;
  font-size: 1.08em;
  box-shadow: none;
  border-radius: 8px;
  transition: background 0.2s;
}
#helpAccordion .accordion-button:not(.collapsed) {
  background: #e0e7ef;
  color: #1a237e;
}
#helpAccordion .accordion-body {
  background: #fff;
  border-radius: 0 0 8px 8px;
  padding: 1.2em 1.5em;
}
@media (max-width: 576px) {
  #helpAccordion .accordion-body {
    padding: 1em 0.5em;
  }
  #helpAccordion .accordion-button {
    font-size: 0.98em;
    padding: 0.7em 0.7em;
  }
}

/* Ajuste responsivo para os botões de Exportar e Movimentações do Dia na tela de Estoque */
@media (max-width: 768px) {
  .estoque-btns-row {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  .estoque-btns-row > * {
    width: 100% !important;
    margin-bottom: 0 !important;
  }
}

@media (max-width: 768px) {
  .login-body {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

@media (max-width: 600px) {
  .floating-add-btn {
    bottom: 5.5rem !important;
  }
  
  .floating-unidade-btn {
    bottom: 85px;
    right: 12px;
    width: 52px;
    height: 52px;
    font-size: 19px;
  }
}

/* Ícone flutuante para troca de unidade */
.floating-unidade-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff, #0056b3);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  transition: all 0.3s ease;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
}

.floating-unidade-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
  background: linear-gradient(135deg, #0056b3, #004085);
}

.floating-unidade-btn:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.floating-unidade-btn i {
  transition: transform 0.3s ease;
}

.floating-unidade-btn:hover i {
  transform: rotate(180deg);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Responsividade para o ícone flutuante */
@media (max-width: 768px) {
  .floating-unidade-btn {
    bottom: 80px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .floating-unidade-btn {
    bottom: 75px;
    right: 10px;
    width: 48px;
    height: 48px;
    font-size: 16px;
  }
}

.header-unidade-setor {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, #e3f0fa 60%, #dbeafe 100%);
  border-radius: 999px;
  padding: 0.25rem 1rem 0.25rem 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: #323130;
  box-shadow: 0 1px 4px rgba(0,120,212,0.06);
  margin-left: 1rem;
}
.header-unidade-setor i {
  color: #1976d2;
  font-size: 1.2em;
  margin-right: 0.25rem;
}
@media (max-width: 768px) {
  .header-unidade-setor {
    font-size: 0.95rem;
    padding: 0.2rem 0.7rem 0.2rem 0.5rem;
    margin-left: 0.5rem;
  }
  .header-unidade-setor i {
    font-size: 1em;
  }
}

/* Estilos específicos para o painel de resumo de pedidos SP */
.unidade-section {
  margin-bottom: 2rem;
}

.unidade-title {
  color: var(--text-color-primary);
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.unidade-title i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

/* Cards de resumo por setor */
.unidade-section .card {
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow-sm);
}

.unidade-section .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
  border-color: var(--primary-color);
}

.unidade-section .card-body {
  padding: 1.5rem;
}

.unidade-section .card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color-primary);
  margin-bottom: 0.5rem;
}

.unidade-section .card-text {
  font-size: 0.875rem;
  color: var(--text-color-secondary);
  margin-bottom: 0;
}

.unidade-section .badge {
  font-size: 1.25rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
}

/* Responsividade para o painel de resumo */
@media (max-width: 768px) {
  .unidade-section {
    margin-bottom: 1.5rem;
  }
  
  .unidade-title {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .unidade-section .card-body {
    padding: 1rem;
  }
  
  .unidade-section .badge {
    font-size: 1rem;
    padding: 0.375rem 0.75rem;
  }
  
  .unidade-section .card-title {
    font-size: 0.9rem;
  }
  
  .unidade-section .card-text {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .unidade-section .col-md-6,
  .unidade-section .col-lg-4 {
    margin-bottom: 1rem;
  }
  
  .unidade-section .card {
    margin-bottom: 0;
  }
}

/* Estilos para o cabeçalho do resumo responsivo */
.resumo-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.resumo-header h3,
.resumo-header h5 {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.resumo-header .btn {
  flex-shrink: 0;
  width: auto;
  min-width: 180px;
}

@media (max-width: 768px) {
  .resumo-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .resumo-header h3,
  .resumo-header h5 {
    text-align: center;
    margin-bottom: 0.5rem;
  }
  .resumo-header .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .header-title {
    display: none !important;
  }
}

/* Additional button variants - Clean & Minimalist */
.btn-success {
  background-color: var(--success-color);
  color: white;
  border: 1px solid var(--success-color);
  font-weight: 400;
}

.btn-success:hover {
  background-color: #0e6b0e;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 6px rgba(16,124,16,0.15);
}

.btn-info {
  background-color: var(--info-color);
  color: white;
  border: 1px solid var(--info-color);
  font-weight: 400;
}

.btn-info:hover {
  background-color: #005a9e;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 6px rgba(0,120,212,0.15);
}

.btn-warning {
  background-color: var(--warning-color);
  color: #323130;
  border: 1px solid var(--warning-color);
  font-weight: 400;
}

.btn-warning:hover {
  background-color: #ff9500;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 6px rgba(255,170,68,0.15);
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--button-primary-bg);
  border: 1px solid var(--button-primary-bg);
  font-weight: 400;
}

.btn-outline-primary:hover {
  background-color: var(--button-primary-bg);
  color: white;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 6px rgba(0,120,212,0.15);
}

.btn-outline-secondary {
  background-color: transparent;
  color: var(--text-color-primary);
  border: 1px solid #e9ecef;
  font-weight: 400;
}

.btn-outline-secondary:hover {
  background-color: #f8f9fa;
  color: var(--text-color-primary);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

@media (min-width: 769px) {
  h3.mb-4.fw-bold.page-title-main {
    display: none !important;
  }
}

/* Padronização de altura dos botões do sistema */
.btn {
  height: 40px !important;
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* Ajustes específicos para botões pequenos em tabelas */
.btn-sm {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0.25rem 0.5rem !important;
}

/* Ajustes para botões grandes */
.btn-lg {
  height: 48px !important;
  min-height: 48px !important;
  padding: 0.75rem 1.5rem !important;
}

/* Ajustes para botões de dropdown */
.dropdown-toggle::after {
  margin-left: 0.5em;
  vertical-align: 0.15em;
}

/* Ajustes para botões em grupos */
.btn-group .btn {
  height: 40px !important;
  min-height: 40px !important;
}

/* Ajustes para botões de ação em tabelas */
.table-responsive-stack td[data-label="Ações"] .btn {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0.25rem 0.5rem !important;
}