/* ERPDocs Professional Theme - Document Management Design System */

/* ========================================
   COLOR PALETTE
   Primary: Slate Blue (#475569)
   Secondary: Deep Navy (#1e293b)
   Accent: Teal (#0891b2)
   Success: Forest Green (#059669)
   Warning: Amber (#d97706)
   Danger: Crimson (#dc2626)
   ======================================== */

/* ========================================
   BOOTSTRAP OVERRIDES - Apply Professional Theme
   ======================================== */

/* Override Bootstrap's default blue primary buttons */
.btn-primary {
  background: #0891b2 !important;
  border-color: #0891b2 !important;
  color: white !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background: #0e7490 !important;
  border-color: #0e7490 !important;
  color: white !important;
}

.btn-outline-primary {
  color: #0891b2 !important;
  border-color: #0891b2 !important;
  background: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
  background: #0891b2 !important;
  border-color: #0891b2 !important;
  color: white !important;
}

/* Override link buttons */
a.btn-primary {
  background: #0891b2 !important;
  border-color: #0891b2 !important;
  color: white !important;
}

a.btn-primary:hover {
  background: #0e7490 !important;
  border-color: #0e7490 !important;
}

/* Override focus states */
.btn-primary:focus-visible,
.btn-outline-primary:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(8, 145, 178, 0.25) !important;
}

/* Override active/checked states */
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary {
  background: #0e7490 !important;
  border-color: #0e7490 !important;
}

/* Override disabled states */
.btn-primary:disabled,
.btn-primary.disabled {
  background: #94a3b8 !important;
  border-color: #94a3b8 !important;
}

/* Override text-primary color */
.text-primary {
  color: #0891b2 !important;
}

/* Override bg-primary color */
.bg-primary {
  background-color: #0891b2 !important;
}

/* Override border-primary color */
.border-primary {
  border-color: #0891b2 !important;
}

/* Override alert-primary */
.alert-primary {
  background-color: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #075985 !important;
}

/* Override badge-primary */
.badge.bg-primary {
  background-color: #0891b2 !important;
}

/* Navigation Links - Professional Theme */
.nav-link {
  color: #64748b !important;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: #0891b2 !important;
}

.nav-link.active {
  color: #0891b2 !important;
  background-color: rgba(8, 145, 178, 0.1) !important;
  border-radius: 6px;
}

/* ========================================
   PAGE HEADERS
   ======================================== */
.page-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: 12px;
  padding: 2rem;
  color: white;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.15);
  border-left: 4px solid #0891b2;
}

.page-header-compact {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 8px;
  padding: 0.875rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid #bae6fd;
  border-left: 3px solid #0891b2;
}

.page-header h1, .page-header h2, .page-header h3 {
  color: white;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.page-header p {
  opacity: 0.9;
  margin-bottom: 0;
  color: #cbd5e1;
}

/* ========================================
   SECTION CARDS
   ======================================== */
.section-card {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  margin-bottom: 1.5rem;
  background: white;
}

.section-card .card-body {
  padding: 1.5rem;
}

/* ========================================
   STATUS BADGES
   ======================================== */
.status-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-completed {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.status-processing {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.status-pending {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.status-failed {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ========================================
   PROFESSIONAL BADGES
   ======================================== */
.badge-gradient-purple,
.badge-professional-primary {
  background: #475569;
  color: white;
  border: none;
}

.badge-gradient-pink,
.badge-professional-accent {
  background: #0891b2;
  color: white;
  border: none;
}

.badge-gradient-blue,
.badge-professional-info {
  background: #0284c7;
  color: white;
  border: none;
}

.badge-gradient-green,
.badge-professional-success {
  background: #059669;
  color: white;
  border: none;
}

/* ========================================
   HOVER EFFECTS
   ======================================== */
.hover-lift {
  transition: all 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.hover-slide {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.hover-slide:hover {
  transform: translateX(4px);
  border-left-color: #0891b2;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  background-color: #f8fafc;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-modern {
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.btn-modern:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,.12);
}

.btn-gradient-purple,
.btn-professional-primary {
  background: #475569;
  color: white;
  border: none;
}

.btn-gradient-purple:hover,
.btn-professional-primary:hover {
  background: #334155;
  color: white;
}

.btn-professional-accent {
  background: #0891b2;
  color: white;
  border: none;
}

.btn-professional-accent:hover {
  background: #0e7490;
  color: white;
}

/* ========================================
   FORM INPUTS
   ======================================== */
.input-modern {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 10px 16px;
  transition: all 0.2s ease;
}

.input-modern:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
  outline: none;
}

/* ========================================
   EMPTY STATES
   ======================================== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px dashed #cbd5e1;
}

.empty-state i {
  font-size: 3.5rem;
  color: #94a3b8;
  margin-bottom: 1rem;
  display: block;
}

.empty-state h4, .empty-state h5 {
  color: #475569;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.empty-state p {
  color: #64748b;
  margin-bottom: 0;
}

/* ========================================
   ICON CONTAINERS
   ======================================== */
.icon-gradient-circle,
.icon-professional-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.icon-gradient-square,
.icon-professional-square {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.icon-professional-accent {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

/* ========================================
   TABLES
   ======================================== */
.table-modern {
  border-collapse: separate;
  border-spacing: 0;
}

.table-modern thead th {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 600;
  color: #334155;
  padding: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-modern tbody tr {
  transition: all 0.15s ease;
  border-bottom: 1px solid #f1f5f9;
}

.table-modern tbody tr:hover {
  background-color: #f8fafc;
  transform: translateX(2px);
}

.table-modern tbody td {
  padding: 1rem;
  color: #475569;
}

/* ========================================
   CARDS
   ======================================== */
.card-modern {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: all 0.2s ease;
  background: white;
}

.card-modern:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.card-clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border-color: #0891b2;
}

/* ========================================
   SEARCH BARS
   ======================================== */
.search-box-modern {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 10px 16px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: white;
}

.search-box-modern:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
  outline: none;
}

/* ========================================
   TIMELINE
   ======================================== */
.timeline-modern {
  position: relative;
  padding-left: 2rem;
}

.timeline-modern::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #cbd5e1;
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 3px solid #0891b2;
  z-index: 1;
}

/* ========================================
   STATS CARDS
   ======================================== */
.stat-card {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid #e2e8f0;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border-color: #cbd5e1;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.stat-card .stat-label {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* ========================================
   UPLOAD ZONE
   ======================================== */
.upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 2rem;
  background: #f8fafc;
  transition: all 0.2s ease;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: #0891b2;
  background: #f0f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.1);
}

.upload-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  margin: 0 auto 1rem;
}

/* ========================================
   QUICK FILTERS
   ======================================== */
.quick-filter-btn {
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
  background: white;
  color: #475569;
}

.quick-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border-color: #0891b2;
  color: #0891b2;
}

.quick-filter-btn.active {
  background: #0891b2;
  color: white;
  border-color: #0891b2;
}

/* ========================================
   DOCUMENT CARDS
   ======================================== */
.doc-card {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  background: white;
}

.doc-card:hover {
  transform: translateX(4px);
  border-left-color: #0891b2;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  background-color: #f8fafc;
}

/* ========================================
   RESPONSIVE
   ======================================== */
#rightbar .btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
}

#rightbar .btn:active {
  transform: translateY(0) scale(1);
}

@media (max-width: 768px) {
  .page-header h2 {
    font-size: 1.5rem;
  }
  
  .stat-card {
    margin-bottom: 1rem;
  }
  
  .empty-state {
    padding: 2rem 1rem;
  }
  
  .empty-state i {
    font-size: 2.5rem;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.slide-in {
  animation: slideIn 0.3s ease-in-out;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-gradient-purple,
.text-professional-primary {
  color: #1e293b;
  font-weight: 600;
}

.text-professional-accent {
  color: #0891b2;
  font-weight: 600;
}

.bg-gradient-purple,
.bg-professional-primary {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.bg-gradient-pink,
.bg-professional-accent {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

.bg-gradient-blue,
.bg-professional-info {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.bg-gradient-green,
.bg-professional-success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.shadow-modern {
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.shadow-modern-lg {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.rounded-modern {
  border-radius: 12px;
}

.rounded-modern-sm {
  border-radius: 8px;
}

.rounded-modern-lg {
  border-radius: 16px;
}

/* ========================================
   PROFESSIONAL ACCENTS
   ======================================== */
.border-accent {
  border-left: 4px solid #0891b2 !important;
}

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

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

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

/* ========================================
   SEARCH BOX
   ======================================== */
.search-box {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 10px 16px;
  transition: all 0.2s ease;
  background: white;
}

.search-box:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
  outline: none;
}
