/* Main styles */
:root {
  --primary-color: #3a7bd5;
  --primary-light: #e7f0ff;
  --primary-dark: #2d62aa;
  --secondary-color: #00d2ff;
  --accent-color: #ff6b6b;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --light-color: #f5f7fa;
  --dark-color: #2c3e50;
  --text-color: #333333;
  --text-muted: #6c757d;
  --border-color: #e6e9f0;
  --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  --transition-speed: 0.3s;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--light-color);
  color: var(--text-color);
  transition: background-color var(--transition-speed) ease;
}

main {
  flex: 1;
}

footer {
  margin-top: auto;
  background-color: white;
  border-top: 1px solid var(--border-color);
}

/* Custom styles for cards */
.card {
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  border: none;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  overflow: hidden;
}

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

.card-header {
  border-radius: 16px 16px 0 0 !important;
  border-bottom: 1px solid var(--border-color);
  padding: 20px 25px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 25px;
}

/* Stats cards */
.stats-card {
  position: relative;
  overflow: hidden;
}

.stats-card .icon-background {
  position: absolute;
  right: -20px;
  bottom: -20px;
  font-size: 8rem;
  opacity: 0.05;
  transform: rotate(-15deg);
}

.stats-card .card-body {
  position: relative;
  z-index: 1;
}

.stats-card:hover .icon-background {
  opacity: 0.08;
  transform: rotate(-5deg) scale(1.1);
  transition: all var(--transition-speed) ease;
}

/* Gradient backgrounds for cards */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.bg-gradient-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #27ae60 100%);
  color: white;
}

.bg-gradient-warning {
  background: linear-gradient(135deg, var(--warning-color) 0%, #f1c40f 100%);
  color: white;
}

.bg-gradient-danger {
  background: linear-gradient(135deg, var(--danger-color) 0%, #c0392b 100%);
  color: white;
}

/* Sidebar styles */
.sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border-right: 1px solid var(--border-color);
  min-height: calc(100vh - 56px);
  position: fixed;
  width: 280px;
  z-index: 100;
  padding-top: 20px;
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-speed) ease;
}

.sidebar-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 15px 20px;
  margin-bottom: 10px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 12px;
  margin: 5px 15px;
  transition: all var(--transition-speed) ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.sidebar-link:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background-color: var(--primary-light);
  z-index: -1;
  transition: width var(--transition-speed) ease;
  border-radius: 0 50px 50px 0;
}

.sidebar-link:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.sidebar-link:hover:before {
  width: 100%;
}

.sidebar-link.active {
  color: var(--primary-color);
  background-color: var(--primary-light);
  font-weight: 600;
}

.sidebar-link.active:before {
  width: 5px;
  background-color: var(--primary-color);
  border-radius: 0;
}

.sidebar-link i {
  margin-right: 15px;
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
  transition: transform var(--transition-speed) ease;
}

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

.sidebar-submenu {
  padding-left: 32px;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-speed) ease;
}

.sidebar-submenu.show {
  max-height: 500px;
}

.sidebar-submenu .sidebar-link {
  padding: 10px 15px;
  font-size: 0.9rem;
  margin: 2px 15px;
}

.sidebar-dropdown-toggle {
  cursor: pointer;
}

.sidebar-dropdown-toggle::after {
  content: '\\f107';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-left: auto;
  transition: transform var(--transition-speed);
}

.sidebar-dropdown-toggle.active::after {
  transform: rotate(180deg);
}

/* Content wrapper */
.content-wrapper {
  margin-left: 280px;
  padding: 30px;
  transition: margin-left var(--transition-speed) ease;
}

/* Custom buttons */
.btn {
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(58, 123, 213, 0.3);
}

.btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(58, 123, 213, 0.2);
}

/* Form controls */
.form-control, .form-select {
  border-radius: 10px;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-speed) ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(58, 123, 213, 0.15);
}

.form-label {
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--dark-color);
}

/* Tables */
.table {
  border-collapse: separate;
  border-spacing: 0 10px;
}

.table thead th {
  border-bottom: none;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  padding: 15px;
}

.table tbody tr {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  border-radius: 10px;
  transition: transform var(--transition-speed) ease;
}

.table tbody tr:hover {
  transform: translateY(-3px);
}

.table tbody td {
  background-color: white;
  padding: 15px;
  vertical-align: middle;
}

.table tbody td:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.table tbody td:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Progress bars */
.progress {
  height: 10px;
  border-radius: 5px;
  background-color: #e9ecef;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  transition: width 1s ease;
}

/* Badges */
.badge {
  padding: 8px 12px;
  font-weight: 500;
  border-radius: 8px;
}

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Responsive styles */
@media (max-width: 992px) {
  .sidebar {
    width: 80px;
    padding-top: 15px;
  }
  
  .sidebar-link span {
    display: none;
  }
  
  .sidebar-link i {
    margin-right: 0;
    font-size: 1.3rem;
  }
  
  .sidebar-heading {
    text-align: center;
    padding: 10px 5px;
  }
  
  .sidebar-dropdown-toggle::after {
    display: none;
  }
  
  .content-wrapper {
    margin-left: 80px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    position: relative;
    min-height: auto;
    box-shadow: none;
  }
  
  .sidebar-link span {
    display: inline;
  }
  
  .sidebar-link i {
    margin-right: 15px;
  }
  
  .content-wrapper {
    margin-left: 0;
    padding: 15px;
  }
  
  .card {
    margin-bottom: 20px;
  }
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

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

/* File upload styling */
.file-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  transition: all var(--transition-speed) ease;
  background-color: rgba(255, 255, 255, 0.5);
}

.file-upload-area:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.file-upload-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* Status indicators */
.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.status-completed {
  background-color: var(--success-color);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

.status-processing {
  background-color: var(--warning-color);
  box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
}

.status-pending {
  background-color: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.2);
}

.status-error {
  background-color: var(--danger-color);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* Navbar styling */
.navbar {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
}

.navbar-brand img {
  transition: transform var(--transition-speed) ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  padding: 8px 15px !important;
  border-radius: 8px;
  transition: all var(--transition-speed) ease;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

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

.navbar-dark .navbar-nav .nav-link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.15);
}

/* Footer styling */
footer {
  padding: 30px 0;
}

footer a {
  transition: color var(--transition-speed) ease;
}

footer a:hover {
  color: var(--primary-color) !important;
}

/* Document list styling */
.document-item {
  background-color: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  transition: all var(--transition-speed) ease;
  border-left: 4px solid transparent;
}

.document-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.document-item.uploaded {
  border-left-color: var(--success-color);
}

.document-item.pending {
  border-left-color: var(--warning-color);
}

.document-icon {
  font-size: 1.5rem;
  margin-right: 15px;
  color: var(--primary-color);
}

/* Step progress */
.step-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.step-progress:before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.step {
  position: relative;
  z-index: 2;
  text-align: center;
}

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: white;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  transition: all var(--transition-speed) ease;
}

.step.active .step-icon {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 0 0 5px rgba(58, 123, 213, 0.2);
}

.step.completed .step-icon {
  background-color: var(--success-color);
  border-color: var(--success-color);
  color: white;
}

.step-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.step.active .step-label {
  color: var(--primary-color);
  font-weight: 600;
}

.step.completed .step-label {
  color: var(--success-color);
}