/* ============================================
   Modern Dashboard Design
   ============================================ */

:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --dark: #1f2937;
  --light: #f9fafb;
  --gray: #6b7280;
  --border: #e5e7eb;
}

/* ============================================
   Dashboard Page Title
   ============================================ */
.page-title {
  margin-bottom: 2rem;
  padding: 1.5rem 0;
}

.page-title h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.page-title p {
  color: var(--danger);
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}

/* ============================================
   Modern Card Widgets
   ============================================ */
.size-column {
  margin-bottom: 2rem;
}

.small-widget {
  background: white;
  border: none;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.small-widget:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 0 20px rgba(99, 102, 241, 0.1);
}

.small-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Widget Variants */
.small-widget.warning::before {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.small-widget.success::before {
  background: linear-gradient(90deg, var(--success), #34d399);
}

.small-widget.danger::before {
  background: linear-gradient(90deg, var(--danger), #f87171);
}

.small-widget.info::before {
  background: linear-gradient(90deg, var(--info), #60a5fa);
}

.small-widget.primary::before {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.small-widget .card-body {
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.small-widget .f-light {
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  display: block;
}

.small-widget h4 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
  letter-spacing: -1px;
}

/* Icon Container */
.small-widget .card-icon {
  width: 60px;
  height: 60px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.small-widget.warning .card-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.small-widget.success .card-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.small-widget.danger .card-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.small-widget.info .card-icon {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.small-widget.primary .card-icon {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

/* ============================================
   Header Cards with Icons (SVG)
   ============================================ */
.d-flex.align-items-end {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
  .page-title h3 {
    font-size: 1.5rem;
  }

  .small-widget {
    padding: 1rem;
  }

  .small-widget h4 {
    font-size: 1.5rem;
  }

  .small-widget .f-light {
    font-size: 0.75rem;
  }
}

/* ============================================
   Animation
   ============================================ */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.small-widget {
  animation: slideUp 0.4s ease-out;
}

.small-widget:nth-child(1) { animation-delay: 0.1s; }
.small-widget:nth-child(2) { animation-delay: 0.2s; }
.small-widget:nth-child(3) { animation-delay: 0.3s; }
.small-widget:nth-child(4) { animation-delay: 0.4s; }
.small-widget:nth-child(5) { animation-delay: 0.5s; }
.small-widget:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   General Page Background
   ============================================ */
.page-body {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  min-height: 100vh;
}

/* ============================================
   Section Headers
   ============================================ */
.blink_me {
  animation: blink 0s;
}

/* ============================================
   Container Adjustments
   ============================================ */
.container-fluid {
  padding: 1.5rem 1.5rem;
}

@media (max-width: 768px) {
  .container-fluid {
    padding: 1rem 1rem;
  }
}

/* ============================================
   Table Styling
   ============================================ */
.table-responsive {
  border-radius: 0.5rem;
  overflow: hidden;
}

table.display,
table.dataTable {
  width: 100% !important;
  border-collapse: collapse;
  background: #ffffff;
}

table.display thead,
table.dataTable thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

table.display thead th,
table.dataTable thead th {
  padding: 12px 15px !important;
  font-weight: 600;
  text-align: left;
  border: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

table.display tbody tr,
table.dataTable tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

table.display tbody tr:hover,
table.dataTable tbody tr:hover {
  background-color: #f9fafb;
}

table.display tbody tr:last-child,
table.dataTable tbody tr:last-child {
  border-bottom: none;
}

table.display tbody td,
table.dataTable tbody td {
  padding: 12px 15px !important;
  vertical-align: middle;
  font-size: 0.9rem;
  color: #374151;
}

table.display tbody td img,
table.dataTable tbody td img {
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Badge styling in tables */
table.display .badge,
table.dataTable .badge {
  padding: 0.4rem 0.8rem;
  border-radius: 0.25rem;
  font-weight: 500;
  font-size: 0.8rem;
}

table.display .badge-success,
table.dataTable .badge-success {
  background-color: #10b981;
  color: white;
}

table.display .badge-danger,
table.dataTable .badge-danger {
  background-color: #ef4444;
  color: white;
}

table.display .badge-info,
table.dataTable .badge-info {
  background-color: #3b82f6;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

table.display .badge-info:hover,
table.dataTable .badge-info:hover {
  background-color: #2563eb;
  text-decoration: none;
}

/* DataTables length and filter styling */
div.dataTables_wrapper div.dataTables_length,
div.dataTables_wrapper div.dataTables_filter {
  margin-bottom: 15px;
}

div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label {
  font-size: 0.9rem;
  color: #6b7280;
}

div.dataTables_wrapper div.dataTables_length select,
div.dataTables_wrapper div.dataTables_filter input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.9rem;
}

div.dataTables_wrapper div.dataTables_length select {
  width: 80px !important;
}

div.dataTables_wrapper div.dataTables_filter input {
  width: 250px;
}

/* DataTables pagination */
div.dataTables_wrapper div.dataTables_paginate {
  margin-top: 15px;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button {
  padding: 0.5rem 0.75rem;
  margin-left: 2px;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: #ffffff;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button:hover {
  background-color: #f3f4f6;
  border-color: #667eea;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button.current {
  background-color: #667eea;
  color: white;
  border-color: #667eea;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* DataTables info text */
div.dataTables_wrapper div.dataTables_info {
  font-size: 0.85rem;
  color: #6b7280;
  padding-top: 10px;
}

/* Empty table message */
table.display tbody td.dataTables_empty,
table.dataTable tbody td.dataTables_empty {
  text-align: center;
  padding: 30px 15px !important;
  color: #9ca3af;
  font-style: italic;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
  div.dataTables_wrapper div.dataTables_length select,
  div.dataTables_wrapper div.dataTables_filter input {
    display: block;
    width: 100% !important;
    margin-top: 5px;
  }

  div.dataTables_wrapper div.dataTables_length label,
  div.dataTables_wrapper div.dataTables_filter label {
    display: block;
  }

  table.display thead th,
  table.dataTable thead th {
    padding: 8px 10px !important;
    font-size: 0.75rem;
  }

  table.display tbody td,
  table.dataTable tbody td {
    padding: 8px 10px !important;
    font-size: 0.8rem;
  }
}

