/* Additional styles for the enhanced UI */

/* Dashboard Enhancements */
/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.dashboard-title {
  display: flex;
  flex-direction: column;
}

.dashboard-date {
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: -5px;
}

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

/* Premium Button */
.premium-btn {
  background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.premium-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Cancel button styling */
.cancel-btn {
  background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
  padding: 8px 16px;
  font-size: 0.9rem;
  margin: 0 3px;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.cancel-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* Disabled field styles */
input.disabled-field {
  background-color: #f8f8f8;
  color: #aaa;
  cursor: not-allowed;
  border: 1px solid #ddd;
  opacity: 0.8;
}

input.disabled-field::placeholder {
  color: #ccc;
}

/* Row hover effects with slightly more responsiveness */
.data-table tbody tr {
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.data-table tbody tr:hover {
  background-color: #f8f9fb;
  transform: translateY(-3px) scale(1.005);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  z-index: 5;
}

/* Slick button styles */
.action-btn {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: none;
  color: #495057;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.action-btn:active {
  transform: translateY(1px);
}

.refresh-btn {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: white;
}

.refresh-btn:hover {
  background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
}

.export-btn {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

/* KPI Container */
.kpi-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 35px;
}

.kpi-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.kpi-group h3 {
  margin-bottom: 5px;
  padding-left: 10px;
  border-left: 4px solid #4776E6;
}

.kpi-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* Enhanced Stat Cards */
.stat-progress {
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  width: 0%;
  transition: width 1s ease-out;
}

/* Visualization Container */
.visualization-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 25px;
  margin-bottom: 35px;
}

.export-btn {
  color: white;
}

.export-btn:hover {
  background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
}

/* Dashboard Panels */
.dashboard-panel {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 350px;
}


.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.panel-counter {
  background-color: #f0f2f5;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.9rem;
  color: #555;
}

.panel-filter select {
  background-color: #f0f2f5;
  border: none;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
  outline: none;
}

/* Enhanced Department Breakdown */
.department-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: 300px;
}

.dept-card {
  background: linear-gradient(to right, #f8f9fb, #ffffff);
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid #007bff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dept-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dept-info {
  flex: 1;
}

.dept-progress {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  height: 6px;
  background-color: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
  flex: 1;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4776E6 0%, #8E54E9 100%);
  border-radius: 3px;
  transition: width 1s ease-out;
}

.progress-text {
  font-size: 0.8rem;
  color: #6c757d;
  width: 80px;
  text-align: right;
}

/* Enhanced Activity Feed */
.recent-activity {
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  max-height: 300px;
}

.activity-item {
  display: flex;
  gap: 15px;
  padding: 12px;
  border-radius: 8px;
  background-color: #f8f9fb;
  transition: transform 0.2s ease;
}

.activity-item:hover {
  transform: translateY(-2px);
  background-color: #f0f4f8;
}

.activity-item.billed-activity {
  border-left: 3px solid #28a745;
}

.activity-item.pending-activity {
  border-left: 3px solid #ffc107;
}

.activity-icon {
  background-color: #e7f5ff;
  border-radius: 50%;
  height: 40px;
  width: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
}

.billed-activity .activity-icon {
  background-color: rgba(40, 167, 69, 0.15);
}

.pending-activity .activity-icon {
  background-color: rgba(255, 193, 7, 0.15);
}

.dept-badge {
  display: inline-block;
  background: #e9ecef;
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 0.75rem;
  color: #495057;
}

.invoice-badge {
  display: inline-block;
  background: rgba(0, 123, 255, 0.1);
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 0.75rem;
  color: #007bff;
  margin-left: 5px;
}

.activity-date {
  color: #6c757d;
  font-size: 0.8rem;
  margin: 0 5px;
}

.no-data-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #6c757d;
  text-align: center;
}

.no-data-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  opacity: 0.5;
}

/* Action Cards */
.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.action-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.action-icon {
  background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
  color: white;
  height: 50px;
  width: 50px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
}

.action-info {
  flex: 1;
}

.action-info h4 {
  margin: 0 0 5px 0;
  color: #2c3e50;
}

.action-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #6c757d;
}


.action-card-btn {
  background-color: transparent;
  color: #4776E6;
  border: 1px solid #4776E6;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.action-card-btn:hover {
  background-color: #4776E6;
  color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .dashboard-actions {
    width: 100%;
    justify-content: center;
  }
  
  .kpi-cards {
    grid-template-columns: 1fr;
  }
  
  .visualization-container {
    grid-template-columns: 1fr;
  }
  
  .action-cards {
    grid-template-columns: 1fr;
  }
  
  /* Responsive tabs for mobile */
  .tabs {
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start;
    padding-bottom: 15px;
  }
  
  .tab-button {
    flex: 0 0 auto;
    font-size: 0.85rem;
    padding: 10px 16px;
  }
}

/* Status styling */
.data-table tbody tr[data-status="Active"]:hover {
  border-left-color: #218838;
}

.data-table tbody tr[data-billing="Billed"]:hover {
  border-left-color: #0069d9;
}

/* No results animation */
.no-data-message {
  animation: fadeIn 0.5s ease;
}

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

/* Enhanced required field styling */
.required-field:focus {
  background-color: #f0fff0;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

/* Enhanced sort indicators */
.data-table th {
  position: relative;
  cursor: pointer;
  user-select: none;
  padding-right: 20px !important; /* Space for sort indicator */
}

.data-table th:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.data-table th::after {
  content: "⇵";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.3;
  font-size: 12px;
}

.data-table th.sorted-asc::after,
.data-table th.sorted-desc::after {
  opacity: 1;
}

.data-table th.sorted-asc::after {
  content: "▲";
}

.data-table th.sorted-desc::after {
  content: "▼";
}

/* Highlight sorted column */
.report-table th.sorted-asc,
.report-table th.sorted-desc {
  background-color: rgba(0, 123, 255, 0.1);
}

/* Clean scrollbars for table wrapper */
.table-wrapper::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

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

/* Sticky Tab Navigation */
.tabs {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #f0f2f5;
  padding: 10px 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  margin-top: -20px; /* Offset the body padding */
  margin-left: -20px;
  margin-right: -20px;
  padding-left: 20px;
  padding-right: 20px;
  width: calc(100% + 40px);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Enhanced shadow effect when scrolled */
body.scrolled .tabs {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  background-color: rgba(240, 242, 245, 0.97);
}

/* Add some space after the sticky tabs */
.tab-content {
  margin-top: 20px;
  position: relative;
  z-index: 10;
}

/* Enhanced tab button appearance for better visibility when sticky */
.scrolled .tab-button {
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.scrolled .tab-button.active {
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}
