/* SupportTagIQ™ - ServiceNow Inspired Styling */

/* Bootstrap Icons Fallback - Ensure icons display properly */
.bi::before {
  display: inline-block;
  font-family: "bootstrap-icons" !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -.125em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure action buttons have proper spacing and visibility */
.btn-group .btn {
  border-radius: 0.375rem;
  margin-right: 0.25rem;
}

.btn-group .btn:last-child {
  margin-right: 0;
}

/* Icon fixes for action buttons */
.btn .bi {
  font-size: 0.875rem;
  line-height: 1;
}

:root {
  /* Professional Purple Gradient System */
  --primary: 255 63% 69%; /* #7B61FF - Bright violet primary */
  --primary-end: 260 100% 44%; /* #4A00E0 - Deep indigo end */
  --primary-hover: 250 72% 61%; /* #5C3DFF - Hover purple */
  
  /* Status Colors - Clean & Contextual */
  --success: 160 79% 39%; /* #00C896 - Teal green success */
  --warning: 36 89% 64%; /* #FFB74D - Readable amber */
  --danger: 4 70% 55%; /* #E53935 - Enterprise red */
  --info: 217 91% 60%; /* #2563EB - Clear blue links */
  
  /* Modern Neutrals */
  --light: 228 33% 97%; /* #F8F9FC - Softer off-white */
  --dark: 220 39% 18%; /* #1F2937 - Modern dark gray-blue */
  
  /* Sidebar System */
  --sidebar-width: 260px;
  --sidebar-bg: 220 39% 18%; /* #1F2937 - Modern enterprise dark */
  --sidebar-text: 220 9% 68%; /* #9CA3AF - Cool gray inactive */
  --sidebar-hover: 215 28% 17%; /* #1e293b - Hover state */
  --sidebar-active: 255 63% 69%; /* #7B61FF - Purple active */
  
  /* Content Areas */
  --content-bg: 228 33% 97%; /* #F8F9FC - Clean main background */
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --border-color: 220 13% 91%; /* #e2e8f0 - Subtle borders */
  
  /* Text Hierarchy */
  --text-primary: 217 33% 17%; /* #111827 - Near-black primary text */
  --text-secondary: 220 14% 46%; /* #6B7280 - Subtle gray secondary text */
}

/* Global Styles */
body {
  background-color: hsl(var(--content-bg));
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding-top: 70px; /* Add padding for fixed navbar */
}

/* Sidebar positioning */
.sidebar {
  top: 56px !important; /* Position below navbar */
  height: calc(100vh - 56px) !important;
}

/* Main content spacing */
.content-wrapper {
  margin-top: 20px;
}

/* Dashboard enhancements */
.dashboard-card {
  transition: all 0.3s ease;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
}

.dashboard-card a {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
}

/* Professional Purple Gradient Cards - Main Features */
.dashboard-card-ci,
.dashboard-card-change,
.dashboard-card-incident,
.dashboard-card-problem,
.dashboard-card-analytics,
.dashboard-card-ai,
.dashboard-card-org,
.dashboard-card-user,
.dashboard-card-asset,
.dashboard-card-service,
.dashboard-card-knowledge,
.dashboard-card-request,
.dashboard-card-catalog,
.dashboard-card-approval {
  background: linear-gradient(135deg, #7B61FF 0%, #4A00E0 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(123, 97, 255, 0.25) !important;
  transition: all 0.3s ease !important;
}

/* Success/Positive State Cards */
.dashboard-card-sla-performance,
.dashboard-card-healthy-systems,
.dashboard-card-completed-requests {
  background: linear-gradient(135deg, #00C896 0%, #00A578 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(0, 200, 150, 0.25) !important;
}

/* Warning/Attention Cards */
.dashboard-card-pending-approvals,
.dashboard-card-scheduled-maintenance {
  background: linear-gradient(135deg, #FFB74D 0%, #FF9800 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(255, 183, 77, 0.25) !important;
}

/* Critical/Error Cards */
.dashboard-card-critical-incidents,
.dashboard-card-sla-breaches {
  background: linear-gradient(135deg, #E53935 0%, #D32F2F 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.25) !important;
}

.dashboard-card-testimonial {
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%) !important;
  color: #ffffff !important;
}

/* Modern Gradient System */
.bg-gradient-primary {
  background: linear-gradient(135deg, #7B61FF 0%, #4A00E0 100%) !important;
  color: #ffffff !important;
}

.bg-gradient-success {
  background: linear-gradient(135deg, #00C896 0%, #00A578 100%) !important;
  color: #ffffff !important;
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #FFB74D 0%, #FF9800 100%) !important;
  color: #ffffff !important;
}

.bg-gradient-danger {
  background: linear-gradient(135deg, #E53935 0%, #D32F2F 100%) !important;
  color: #ffffff !important;
}

.bg-gradient-info {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
  color: #ffffff !important;
}

/* Professional Button System */
.btn-primary,
.btn-ci,
.btn-change,
.btn-incident,
.btn-problem {
  background: linear-gradient(135deg, #7B61FF 0%, #4A00E0 100%);
  border: none;
  color: #ffffff;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(123, 97, 255, 0.25);
}

.btn-primary:hover,
.btn-ci:hover,
.btn-change:hover,
.btn-incident:hover,
.btn-problem:hover {
  background: linear-gradient(135deg, #5C3DFF 0%, #3D1A78 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(123, 97, 255, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #00C896 0%, #00A578 100%);
  border: none;
  color: #ffffff;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 200, 150, 0.25);
}

.btn-success:hover {
  background: linear-gradient(135deg, #00A578 0%, #008A65 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0, 200, 150, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #FFB74D 0%, #FF9800 100%);
  border: none;
  color: #ffffff;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 183, 77, 0.25);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(255, 183, 77, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #E53935 0%, #D32F2F 100%);
  border: none;
  color: #ffffff;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.25);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(229, 57, 53, 0.4);
}

.dashboard-icon {
  opacity: 0.8;
}

/* Replace DataTables pagination with useful info */
.dataTables_paginate {
  display: none !important;
}

.dataTables_info {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  color: #495057;
  font-weight: 500;
  text-align: center;
  margin-top: 20px;
}

/* Professional card styling */
.card {
  border-radius: 10px;
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
  font-size: 14px;
  line-height: 1.5;
}

/* Layout */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background-color: hsl(var(--sidebar-bg));
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  background-color: hsl(var(--content-bg));
}

/* Sidebar Styling */
.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid hsl(var(--sidebar-hover));
}

.sidebar-header h4 {
  color: white;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.sidebar-content {
  flex: 1;
  padding: 1rem 0;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid hsl(var(--sidebar-hover));
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-header {
  color: hsl(var(--sidebar-text));
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: hsl(var(--sidebar-text));
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  opacity: 0.9;
}

.nav-link:hover {
  background-color: rgba(123, 97, 255, 0.1);
  color: white;
  text-decoration: none;
  opacity: 1;
  font-weight: 600;
  border-left: 3px solid hsl(var(--sidebar-active));
}

.nav-link.active {
  background-color: rgba(123, 97, 255, 0.1);
  border-left: 4px solid hsl(var(--sidebar-active));
  color: #000000;
  opacity: 1;
  font-weight: 600;
}

.nav-link.active i {
  color: #000000;
  opacity: 1;
}

.nav-link i {
  width: 20px;
  margin-right: 0.75rem;
  font-size: 1rem;
}

.user-info .avatar {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Top Navigation */
.navbar {
  box-shadow: var(--card-shadow);
  border-bottom: 1px solid hsl(var(--border-color));
}

.breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item a {
  color: hsl(var(--primary));
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

/* Cards */
.card {
  border: 1px solid hsl(var(--border-color));
  box-shadow: var(--card-shadow);
  border-radius: 8px;
}

.card-header {
  background-color: white;
  border-bottom: 1px solid hsl(var(--border-color));
  padding: 1rem 1.5rem;
}

.card-title {
  font-weight: 600;
  color: hsl(var(--dark));
  margin: 0;
}

/* Statistics Cards */
.stat-card {
  border: none;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

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

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

/* Tables */
.table {
  font-size: 0.875rem;
}

.table th {
  background-color: hsl(var(--light));
  border-bottom: 2px solid hsl(var(--border-color));
  font-weight: 600;
  color: hsl(var(--dark));
  padding: 0.75rem;
}

.table td {
  padding: 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid hsl(var(--border-color));
}

.table-hover tbody tr:hover {
  background-color: hsl(var(--light));
}

/* Badges */
.badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

/* Buttons */
.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background-color: hsl(210 100% 45%);
  border-color: hsl(210 100% 45%);
}

/* Forms */
.form-control, .form-select {
  border: 1px solid hsl(var(--border-color));
  border-radius: 6px;
  transition: border-color 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-label {
  font-weight: 500;
  color: hsl(var(--dark));
}

/* Login Page */
.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(210 100% 40%) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 450px;
}

.login-card h2 {
  color: hsl(var(--dark));
  font-weight: 600;
}

/* Activity Items */
.activity-item {
  display: flex;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid hsl(var(--border-color));
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 600;
  color: hsl(var(--dark));
  margin-bottom: 0.25rem;
}

.activity-description {
  color: hsl(var(--secondary));
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state i {
  opacity: 0.5;
}

.empty-state .btn,
.empty-state .btn-primary,
.empty-state .btn-warning {
  color: white !important;
  font-weight: 500;
  background-color: #0066cc !important;
  border-color: #0066cc !important;
}

.empty-state .btn:hover,
.empty-state .btn-primary:hover,
.empty-state .btn-warning:hover {
  background-color: #0052a3 !important;
  border-color: #0052a3 !important;
}

/* Dark mode styling */
html[data-theme="dark"] .empty-state .btn,
html[data-theme="dark"] .empty-state .btn-primary,
html[data-theme="dark"] .empty-state .btn-warning,
.dark-theme .empty-state .btn,
.dark-theme .empty-state .btn-primary,
.dark-theme .empty-state .btn-warning,
body.dark-theme .empty-state .btn,
body.dark-theme .empty-state .btn-primary,
body.dark-theme .empty-state .btn-warning {
  background-color: #14b8a6 !important;
  border-color: #14b8a6 !important;
  color: white !important;
}

html[data-theme="dark"] .empty-state .btn:hover,
html[data-theme="dark"] .empty-state .btn-primary:hover,
html[data-theme="dark"] .empty-state .btn-warning:hover,
.dark-theme .empty-state .btn:hover,
.dark-theme .empty-state .btn-primary:hover,
.dark-theme .empty-state .btn-warning:hover,
body.dark-theme .empty-state .btn:hover,
body.dark-theme .empty-state .btn-primary:hover,
body.dark-theme .empty-state .btn-warning:hover {
  background-color: #0f9887 !important;
  border-color: #0f9887 !important;
  color: white !important;
}

.empty-state p.text-dark {
  color: #333 !important;
}

html[data-theme="dark"] .empty-state p.text-dark,
.dark-theme .empty-state p.text-dark,
body.dark-theme .empty-state p.text-dark {
  color: #e5e7eb !important;
}

/* Info Items */
.info-item {
  margin-bottom: 0.75rem;
  color: hsl(var(--dark));
}

.info-item strong {
  color: hsl(var(--secondary));
}

/* Module List */
.module-list .badge {
  font-size: 0.75rem;
}

/* Avatar */
.avatar-sm {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pagination */
.pagination-sm .page-link {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .stat-card {
    margin-bottom: 1rem;
  }
  
  .btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .content-wrapper {
    padding: 1rem !important;
  }
  
  .card-header {
    padding: 0.75rem 1rem;
  }
  
  .table-responsive {
    font-size: 0.75rem;
  }
  
  .login-card {
    padding: 1.5rem;
    margin: 1rem;
  }
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: hsl(var(--sidebar-bg));
}

.sidebar::-webkit-scrollbar-thumb {
  background: hsl(var(--sidebar-hover));
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: hsl(210 11% 25%);
}

/* Modal Enhancements */
.modal-content {
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
  border-bottom: 1px solid hsl(var(--border-color));
  background-color: hsl(var(--light));
}

.modal-title {
  font-weight: 600;
  color: hsl(var(--dark));
}

/* Alert Enhancements */
.alert {
  border: none;
  border-radius: 6px;
  font-weight: 500;
}

/* Progress and Status Indicators */
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
}

.status-active {
  background-color: hsl(var(--success));
}

.status-inactive {
  background-color: hsl(var(--secondary));
}

.status-warning {
  background-color: hsl(var(--warning));
}

.status-danger {
  background-color: hsl(var(--danger));
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

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

/* Print Styles */
@media print {
  .sidebar,
  .navbar,
  .btn,
  .pagination {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
  }
  
  .card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }
}
