/* Custom CSS for Petty Cash System */

/* Root Variables */
:root {
  --bobs-primary: #E31837;
  --bobs-secondary: #FDD900;
  --bobs-accent: #000000;
  
  --spoleto-primary: #8B4513;
  --spoleto-secondary: #DAA520;
  --spoleto-accent: #2F4F2F;
  
  --border-radius: 0.375rem;
  --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Brand Badges */
.badge-bobs {
  background-color: var(--bobs-primary) !important;
  color: white !important;
}

.badge-spoleto {
  background-color: var(--spoleto-primary) !important;
  color: white !important;
}

/* Card Enhancements */
.card {
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
  box-shadow: var(--box-shadow-lg);
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
}

/* Border Left Indicators */
.border-left-primary {
  border-left: 4px solid #0d6efd !important;
}

.border-left-success {
  border-left: 4px solid #198754 !important;
}

.border-left-info {
  border-left: 4px solid #0dcaf0 !important;
}

.border-left-warning {
  border-left: 4px solid #ffc107 !important;
}

.border-left-danger {
  border-left: 4px solid #dc3545 !important;
}

/* Table Enhancements */
.table {
  --bs-table-striped-bg: #f8f9fa;
}

.table-hover tbody tr:hover {
  background-color: #f5f5f5;
}

.table th {
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

/* Status Row Colors */
.table-warning {
  --bs-table-bg: #fff3cd;
  --bs-table-striped-bg: #ffecb5;
}

.table-success {
  --bs-table-bg: #d1e7dd;
  --bs-table-striped-bg: #c3e6cb;
}

.table-danger {
  --bs-table-bg: #f8d7da;
  --bs-table-striped-bg: #f5c2c7;
}

/* Button Enhancements */
.btn {
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Form Enhancements */
.form-control, .form-select {
  border-radius: var(--border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Avatar Styles */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.avatar-sm {
  width: 2rem;
  height: 2rem;
  font-size: 0.875rem;
}

.avatar-md {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
}

.avatar-lg {
  width: 3rem;
  height: 3rem;
  font-size: 1.125rem;
}

.avatar-initial {
  background-color: #6c757d;
  color: white;
  border-radius: 50%;
}

/* Sidebar Styles */
.sidebar {
  background-color: #f8f9fa;
  min-height: calc(100vh - 56px);
  border-right: 1px solid #dee2e6;
  position: fixed;
  top: 56px;
  left: 0;
  height: calc(100vh - 56px);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar .nav-link {
  color: #495057;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  margin: 0.125rem 0.5rem;
  transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
  background-color: #e9ecef;
  color: #0d6efd;
}

.sidebar .nav-link.active {
  background-color: #0d6efd;
  color: white;
}

.sidebar .nav-link i {
  width: 1.2rem;
  text-align: center;
}

/* Sidebar Widgets */
.sidebar-widget {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  padding: 1rem;
  margin: 1rem 0.5rem;
}

.widget-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.75rem;
}

/* Alert Enhancements */
.alert {
  border-radius: var(--border-radius);
  border: 1px solid transparent;
}

.alert-dismissible .btn-close {
  padding: 0.75rem 1rem;
}

/* Loading States */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* File Upload Styles */
.upload-area {
  border: 2px dashed #dee2e6;
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
  cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #0d6efd;
  background-color: #f8f9fa;
}

.upload-area.dragover {
  background-color: #e7f1ff;
}

.file-preview {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  padding: 0.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  margin-bottom: 0.5rem;
  background-color: white;
}

.file-item:last-child {
  margin-bottom: 0;
}

.file-item .file-icon {
  font-size: 1.5rem;
  margin-right: 0.75rem;
  color: #6c757d;
}

.file-item .file-info {
  flex-grow: 1;
}

.file-item .file-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.file-item .file-size {
  font-size: 0.875rem;
  color: #6c757d;
}

/* Timeline Styles */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #dee2e6;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-marker {
  position: absolute;
  left: -1rem;
  top: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #dee2e6;
}

.timeline-content {
  margin-left: 1rem;
}

.timeline-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #495057;
}

.timeline-description {
  font-size: 0.875rem;
  color: #6c757d;
  margin: 0;
}

/* Status Badges */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.25rem;
}

/* Currency Display */
.currency {
  font-family: 'Roboto Mono', monospace;
  font-weight: 600;
}

.currency.positive {
  color: #198754;
}

.currency.negative {
  color: #dc3545;
}

.currency.neutral {
  color: #6c757d;
}

/* Dashboard Stats */
.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.stat-card .stat-icon {
  font-size: 2rem;
  opacity: 0.8;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Mobile First Responsive Design */
/* Mobile devices (up to 576px) */
@media (max-width: 575.98px) {
  /* Layout adjustments */
  .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Sidebar optimization for mobile */
  .sidebar {
    position: fixed !important;
    top: 56px;
    left: -100%;
    width: 280px;
    height: calc(100vh - 56px);
    background-color: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease-in-out;
    z-index: 1040;
    overflow-y: auto;
  }
  
  .sidebar.show {
    left: 0;
  }
  
  .sidebar-overlay {
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: calc(100vh - 56px);
    background-color: rgba(0,0,0,0.5);
    z-index: 1030;
    display: none;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
  
  /* Main content adjustment */
  main {
    margin-left: 0 !important;
    padding: 1rem 0.5rem;
  }
  
  /* Cards optimization */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Buttons optimization - 44px minimum touch targets */
  .btn {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .btn-sm {
    font-size: 0.8rem;
    padding: 0.625rem 0.875rem;
    min-height: 40px;
  }
  
  .btn-xs {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    min-height: 36px;
  }
  
  .btn-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .btn-group {
    width: 100%;
  }
  
  .btn-group .btn {
    flex: 1;
  }
  
  /* Forms optimization */
  .form-control, .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
  }
  
  .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
  }
  
  /* Table optimization */
  .table-responsive {
    font-size: 0.75rem;
    border: none;
  }
  
  .table th, .table td {
    padding: 0.5rem 0.25rem;
    border-width: 1px;
  }
  
  .table th {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  /* Hide less important columns on mobile */
  .mobile-hide {
    display: none !important;
  }
  
  /* Modal optimization */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  /* Navigation optimization - 44px minimum touch targets */
  .navbar-brand {
    font-size: 1rem;
    min-height: 44px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* Hamburger button optimization */
  .navbar-toggler,
  #sidebarToggle {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .navbar-toggler-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  /* Dropdown items in navbar */
  .dropdown-item {
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* Stats cards optimization */
  .stat-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .stat-card .stat-value {
    font-size: 1.5rem;
  }
  
  /* Upload area optimization */
  .upload-area {
    padding: 1rem;
    font-size: 0.875rem;
  }
  
  /* Timeline optimization */
  .timeline {
    padding-left: 1rem;
  }
  
  .timeline-marker {
    left: -0.5rem;
    width: 0.5rem;
    height: 0.5rem;
  }
  
  /* Breadcrumb optimization */
  .breadcrumb {
    font-size: 0.875rem;
    padding: 0.5rem 0;
  }
  
  /* Alert optimization */
  .alert {
    padding: 0.75rem;
    font-size: 0.875rem;
  }
  
  /* Badge optimization */
  .badge {
    font-size: 0.7rem;
  }
}

/* Small tablets (576px to 767.98px) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .sidebar {
    min-height: auto;
  }
  
  .sidebar-widget {
    margin: 0.5rem;
  }
  
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  main {
    padding: 1rem;
  }
  
  .table-responsive {
    font-size: 0.875rem;
  }
  
  /* Cards in rows for tablets */
  .dashboard-cards .col-md-6 {
    margin-bottom: 1rem;
  }
}

/* Medium tablets (768px to 991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .sidebar {
    width: 200px;
  }
  
  .sidebar-widget {
    margin: 0.75rem 0.5rem;
    padding: 0.75rem;
  }
  
  main {
    margin-left: 200px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
  
  .nav-link,
  .sidebar .nav-link {
    min-height: 44px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
  }
  
  .dropdown-item {
    padding: 0.75rem 1rem;
    min-height: 44px;
  }
  
  /* Table action buttons */
  .table .btn {
    min-height: 36px;
    padding: 0.5rem 0.75rem;
  }
  
  /* Pagination links */
  .pagination .page-link {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
  }
  
  /* Remove hover effects on touch devices */
  .card:hover {
    box-shadow: var(--box-shadow);
  }
  
  .sidebar .nav-link:hover {
    background-color: transparent;
  }
  
  .table-hover tbody tr:hover {
    background-color: transparent;
  }
}

/* Responsive Tables */
@media (max-width: 575.98px) {
  .table-responsive-mobile {
    border: none;
  }
  
  .table-responsive-mobile .table {
    display: none;
  }
  
  .table-responsive-mobile .table-cards {
    display: block;
  }
}

/* Table Cards for Mobile */
.table-cards {
  display: none;
}

.table-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  padding: 1rem;
  box-shadow: var(--box-shadow);
}

.table-card-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

.table-card-title {
  font-weight: 600;
  color: #495057;
  margin: 0;
}

.table-card-badge {
  font-size: 0.75rem;
}

.table-card-body {
  display: grid;
  gap: 0.5rem;
}

.table-card-row {
  display: flex;
  justify-content: between;
  align-items: center;
  padding: 0.25rem 0;
}

.table-card-label {
  font-weight: 500;
  color: #6c757d;
  font-size: 0.875rem;
  min-width: 100px;
}

.table-card-value {
  flex: 1;
  text-align: right;
  font-size: 0.875rem;
}

.table-card-actions {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f8f9fa;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.table-card-actions .btn {
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
}

/* Enhanced Table Styles */
.table-responsive {
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.table-responsive .table {
  margin-bottom: 0;
}

.table thead th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #495057;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Sortable table headers */
.table thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease-in-out;
}

.table thead th.sortable:hover {
  background-color: #e9ecef;
}

.table thead th.sortable::after {
  content: '⇅';
  float: right;
  opacity: 0.5;
  font-size: 0.8rem;
}

.table thead th.sortable.sort-asc::after {
  content: '⇈';
  opacity: 1;
}

.table thead th.sortable.sort-desc::after {
  content: '⇊';
  opacity: 1;
}

/* Table row states */
.table tbody tr {
  transition: background-color 0.15s ease-in-out;
}

.table tbody tr.table-row-selected {
  background-color: #e7f1ff !important;
}

.table tbody tr.table-row-pending {
  background-color: #fff3cd;
}

.table tbody tr.table-row-approved {
  background-color: #d1e7dd;
}

.table tbody tr.table-row-rejected {
  background-color: #f8d7da;
}

/* Action buttons in tables */
.table .btn-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.table .btn-group-sm > .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.4;
}

/* Mobile optimizations for specific table elements */
@media (max-width: 575.98px) {
  .table-responsive {
    font-size: 0.8rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem 0.25rem;
    vertical-align: middle;
  }
  
  .table .btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
  
  /* Hide columns marked for mobile */
  .table th.d-none.d-md-table-cell,
  .table td.d-none.d-md-table-cell {
    display: none !important;
  }
  
  /* Compact action buttons */
  .table .btn-group {
    flex-wrap: nowrap;
  }
  
  .table .dropdown-menu {
    font-size: 0.8rem;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .card {
    border-width: 0.5px;
  }
  
  .table {
    border-width: 0.5px;
  }
}

/* Print Styles */
@media print {
  .sidebar,
  .navbar,
  .btn-toolbar,
  .pagination,
  .alert-dismissible .btn-close {
    display: none !important;
  }
  
  .card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  
  .table {
    font-size: 0.8rem;
  }
  
  .main {
    margin-left: 0 !important;
  }
}

/* Accessibility Enhancements */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Focus indicators */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border-width: 2px;
  }
  
  .table th {
    border-bottom-width: 3px;
  }
  
  .btn {
    border-width: 2px;
  }
}

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

/* Mobile-First Form Optimizations */
@media (max-width: 575.98px) {
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
    color: #495057;
  }
  
  .form-control,
  .form-select {
    font-size: 16px !important; /* Prevents iOS zoom */
    padding: 0.875rem;
    border-radius: var(--border-radius);
    border: 2px solid #dee2e6;
    transition: all 0.15s ease-in-out;
  }
  
  .form-control:focus,
  .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
  }
  
  .form-text {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: #6c757d;
  }
  
  /* Multi-column forms to single column on mobile */
  .row .col-md-6,
  .row .col-lg-6,
  .row .col-xl-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  /* Form buttons optimization */
  .form-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1rem 0;
    border-top: 1px solid #dee2e6;
    margin: 1rem -0.5rem 0;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
  }
  
  .form-actions .btn {
    flex: 1;
    max-width: 150px;
    padding: 0.875rem;
    font-weight: 600;
  }
  
  /* Input groups optimization */
  .input-group {
    flex-wrap: nowrap;
  }
  
  .input-group .form-control {
    min-width: 0;
  }
  
  .input-group-text {
    padding: 0.875rem;
    font-size: 16px;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
  }
  
  /* Checkbox and radio optimization */
  .form-check {
    padding-left: 2rem;
    margin-bottom: 1rem;
  }
  
  .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: -2rem;
    margin-top: 0.125rem;
  }
  
  .form-check-label {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-left: 0.5rem;
  }
  
  /* File input optimization */
  .form-control[type="file"] {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  /* Textarea optimization */
  textarea.form-control {
    min-height: 120px;
    resize: vertical;
  }
  
  /* Date/time inputs */
  input[type="date"],
  input[type="datetime-local"],
  input[type="time"] {
    font-size: 16px !important;
    padding: 0.875rem;
  }
  
  /* Form validation styles */
  .invalid-feedback {
    font-size: 0.8rem;
    margin-top: 0.5rem;
  }
  
  .form-control.is-invalid,
  .form-select.is-invalid {
    border-color: #dc3545;
    background-image: none;
  }
  
  .form-control.is-valid,
  .form-select.is-valid {
    border-color: #198754;
    background-image: none;
  }
  
  /* Progress indicators for multi-step forms */
  .form-progress {
    margin-bottom: 2rem;
  }
  
  .form-progress .progress {
    height: 6px;
  }
  
  .form-step-indicator {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  
  .form-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    background: #dee2e6;
    color: #6c757d;
  }
  
  .form-step.active {
    background: #0d6efd;
    color: white;
  }
  
  .form-step.completed {
    background: #198754;
    color: white;
  }
}

/* Tablet form optimizations */
@media (min-width: 576px) and (max-width: 767.98px) {
  .form-control,
  .form-select {
    padding: 0.75rem;
  }
  
  .form-actions {
    justify-content: flex-end;
  }
  
  .form-actions .btn {
    flex: 0 1 auto;
    min-width: 120px;
  }
}

/* Custom utility classes */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #198754 0%, #146c43 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e6ac00 100%);
}

.bg-gradient-danger {
  background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
}

/* ========================================
   FILE UPLOAD IMPROVEMENTS FOR MOBILE
======================================== */

/* Upload area styling */
.upload-area {
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 2rem 1rem;
}

.upload-area:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

.upload-area.dragover {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}

/* Mobile-optimized file upload buttons */
.upload-area .btn-group {
    gap: 0.5rem;
    flex-wrap: wrap;
}

.upload-area .btn-group .btn {
    min-width: 100px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-radius: 0.5rem;
}

/* Enhanced file preview */
.file-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.file-item:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.file-item .btn-outline-danger {
    border-color: transparent;
}

.file-item .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .upload-area {
        padding: 1.5rem 1rem;
        min-height: 120px;
    }
    
    .upload-area .btn-group {
        justify-content: center;
        width: 100%;
    }
    
    .upload-area .btn-group .btn {
        flex: 1;
        min-width: 90px;
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
    
    .file-item {
        padding: 1rem !important;
    }
    
    .file-item .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .upload-area .btn {
        min-height: 44px; /* iOS touch target minimum */
    }
    
    .file-item .btn-outline-danger {
        min-width: 44px;
        min-height: 44px;
        padding: 0.75rem;
    }
}

/* ============================================
   Global Loading Overlay
   ============================================ */
.global-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  backdrop-filter: blur(3px);
  overflow: hidden;
}

.global-loading.active {
  display: flex;
}

/* Prevent body scroll when loading is active */
body.loading-active {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

.loading-spinner {
  text-align: center;
  background: white;
  padding: 2rem 3rem;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.loading-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
}

.loading-text {
  color: #333;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
}

.loading-subtext {
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 0;
  max-width: 360px;
}

.loading-steps {
  margin-top: 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #495057;
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  background: #f8f9fa;
}

.loading-step i {
  color: var(--bs-primary);
}

/* Desktop Sidebar - Main Content Adjustment */
@media (min-width: 768px) {
  main.col-md-9 {
    margin-left: 25%;
  }
}

@media (min-width: 992px) {
  main.col-lg-10 {
    margin-left: 16.666667%;
  }
}
