/* Custom styles for Helpdesk System */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  line-height: 1.6;
}

/* Navigation */
.navbar-brand {
  font-weight: 600;
  font-size: 1.5rem;
}

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

/* Forms */
.form-control {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Priority badges */
.priority-critical {
  background-color: var(--danger-color) !important;
}

.priority-high {
  background-color: var(--warning-color) !important;
  color: var(--dark-color) !important;
}

.priority-medium {
  background-color: var(--info-color) !important;
  color: var(--dark-color) !important;
}

.priority-low {
  background-color: var(--secondary-color) !important;
}


/* Status badges */
.status-new {
  background-color: #17a2b8 !important;
}

.status-open {
  background-color: #ffc107 !important;
  color: var(--dark-color) !important;
}

.status-in_progress {
  background-color: #fd7e14 !important;
}

.status-on_hold {
  background-color: #6f42c1 !important;
}

.status-resolved {
  background-color: var(--success-color) !important;
}

.status-closed {
  background-color: var(--secondary-color) !important;
}



/* Dashboard cards */
.dashboard-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border: none;
  backdrop-filter: blur(10px);
}

/* Tables */
.table {
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background-color: var(--light-color);
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
}

/* Ticket detail page */
.ticket-detail-card {
  border-left: 4px solid var(--primary-color);
}

.comment-bubble {
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  border-left: 3px solid var(--primary-color);
}

.comment-bubble.internal {
  background-color: #fff3cd;
  border-left-color: var(--warning-color);
}

/* File upload area */
.file-upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s ease;
}

.file-upload-area:hover {
  border-color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .btn {
    font-size: 0.875rem;
  }
}

/* Animation utilities */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* Loading spinner */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Alert improvements */
.alert {
  border-radius: 8px;
  border: none;
}

.alert-success {
  background-color: #d1e7dd;
  color: #0a3622;
}

.alert-danger {
  background-color: #f8d7da;
  color: #58151c;
}

.alert-warning {
  background-color: #fff3cd;
  color: #664d03;
}

.alert-info {
  background-color: #d1ecf1;
  color: #055160;
}

html, body {
  overflow-x: hidden;
}

.navbar-brand {
  max-width: 70vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-menu {
  max-width: 92vw;
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  main.container {
    margin-top: 1rem !important;
  }

  .navbar-brand {
    font-size: 1rem;
    max-width: 60vw;
  }

  .navbar .badge {
    font-size: 0.7rem;
  }

  .card-body {
    padding: 0.875rem;
  }

  .btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    white-space: normal;
  }

  .form-control,
  .form-select,
  textarea {
    font-size: 16px;
  }

  .notification-dropdown {
    width: 92vw !important;
    max-width: 92vw;
    right: 0;
    left: auto;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 600px;
  }
}

/* Mobile dashboard improvements */
@media (max-width: 768px) {
  .navbar .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .navbar-brand {
    font-size: 1rem !important;
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
  }

  main.container {
    margin-top: 1rem !important;
    padding-left: 10px;
    padding-right: 10px;
  }

  h1, h2, h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .card {
    border-radius: 10px;
    margin-bottom: 12px;
  }

  .card-body {
    padding: 0.9rem;
  }

  .dashboard-card .card-body,
  .stats-card .card-body,
  .metric-card .card-body {
    padding: 0.85rem 0.9rem;
  }

  .dashboard-card h3,
  .stats-card h3,
  .metric-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }

  .dashboard-card p,
  .stats-card p,
  .metric-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
  }

  .dashboard-card i,
  .stats-card i,
  .metric-card i {
    font-size: 1.6rem !important;
  }

  .row {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
  }
}

.floating-messages {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: min(92vw, 500px);
    pointer-events: none;
}

.login-alert {
    pointer-events: auto;
    margin-bottom: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

@media (max-width: 576px) {
    .floating-messages {
        top: 12px;
        width: calc(100vw - 24px);
    }

    .login-alert {
        font-size: 0.9rem;
    }
}


/* Theme toggle button */
.theme-toggle-btn {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Dark mode custom overrides */
[data-bs-theme="dark"] body {
    background-color: #121826;
    color: #e9ecef;
}

[data-bs-theme="dark"] .navbar.bg-primary {
    background-color: #0b1220 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .offcanvas,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .modal-content {
    background-color: #1b2433;
    color: #e9ecef;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: #1b2433;
    --bs-table-color: #e9ecef;    
    --bs-table-border-color: rgba(255,255,255,0.08);
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table thead,
[data-bs-theme="dark"] .table th {
    color: #f8f9fa !important;
    background-color: #243146 !important;
    border-color: rgba(255,255,255,0.08) !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] textarea {
    background-color: #0f1724;
    color: #f8f9fa;
    border-color: rgba(255,255,255,0.12);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] textarea:focus {
    background-color: #0f1724;
    color: #f8f9fa;
    border-color: #4dabf7;
    box-shadow: 0 0 0 0.2rem rgba(77, 171, 247, 0.2);
}

[data-bs-theme="dark"] .notification-item {
    border-bottom-color: rgba(255,255,255,0.08);
}

[data-bs-theme="dark"] .notification-item:hover {
    background-color: #243146;
}

[data-bs-theme="dark"] .notification-item-title {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .notification-item-message {
    color: #ced4da;
}

[data-bs-theme="dark"] .notification-item-time,
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .small.text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .alert {
    border-color: rgba(255,255,255,0.08);
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #1b2433;
    color: #e9ecef;
    border-color: rgba(255,255,255,0.08);
}

[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .dropdown-divider {
    border-color: rgba(255,255,255,0.08) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #243146 !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #f8f9fa !important;
}


/* Full page dark mode support */
[data-bs-theme="dark"] html,
[data-bs-theme="dark"] body {
    background-color: #121826 !important;
    color: #e9ecef !important;
}

[data-bs-theme="dark"] main,
[data-bs-theme="dark"] .container,
[data-bs-theme="dark"] .container-fluid,
[data-bs-theme="dark"] .content-wrapper,
[data-bs-theme="dark"] .page-wrapper,
[data-bs-theme="dark"] .dashboard-container {
    background-color: transparent !important;
    color: #e9ecef !important;
}

[data-bs-theme="dark"] .row,
[data-bs-theme="dark"] .col,
[data-bs-theme="dark"] [class*="col-"] {
    color: inherit;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6,
[data-bs-theme="dark"] label,
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] .page-title,
[data-bs-theme="dark"] .section-title {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] p,
[data-bs-theme="dark"] span,
[data-bs-theme="dark"] li,
[data-bs-theme="dark"] small,
[data-bs-theme="dark"] .text-body,
[data-bs-theme="dark"] .text-muted {
    color: #ced4da;
}

[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-body,
[data-bs-theme="dark"] .bg-light {
    background-color: #1b2433 !important;
}

[data-bs-theme="dark"] .dashboard-card,
[data-bs-theme="dark"] .stats-card,
[data-bs-theme="dark"] .metric-card,
[data-bs-theme="dark"] .ticket-card,
[data-bs-theme="dark"] .list-group,
[data-bs-theme="dark"] .accordion-item {
    background-color: #1b2433 !important;
    color: #e9ecef !important;
    border-color: rgba(255,255,255,0.08) !important;
}

[data-bs-theme="dark"] .table-responsive {
    background-color: #1b2433;
    border-radius: 10px;
}

[data-bs-theme="dark"] .breadcrumb,
[data-bs-theme="dark"] .pagination,
[data-bs-theme="dark"] .nav-tabs,
[data-bs-theme="dark"] .nav-pills {
    --bs-breadcrumb-divider-color: #adb5bd;
    color: #e9ecef;
}

[data-bs-theme="dark"] .dropdown-menu a,
[data-bs-theme="dark"] .nav-link,
[data-bs-theme="dark"] .navbar-brand {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .dropdown-item:hover {
    color: #ffffff !important;
    background-color: rgba(255,255,255,0.06);
}

/* Strong dark mode page background fix */
html[data-bs-theme="dark"] {
    background-color: #121826 !important;
}

html[data-bs-theme="dark"] body {
    background-color: #121826 !important;
    color: #e9ecef !important;
}

html[data-bs-theme="dark"] .app-main {
    background-color: #121826 !important;
    color: #e9ecef !important;
    min-height: calc(100vh - 80px);
}

html[data-bs-theme="dark"] .app-main.container,
html[data-bs-theme="dark"] .app-main.container-fluid {
    background-color: #121826 !important;
}

html[data-bs-theme="dark"] .app-main > .row,
html[data-bs-theme="dark"] .app-main > .col-12,
html[data-bs-theme="dark"] .app-main > div {
    background-color: transparent !important;
}

html[data-bs-theme="dark"] .bg-light,
html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .bg-body,
html[data-bs-theme="dark"] .bg-body-tertiary {
    background-color: #1b2433 !important;
}

html[data-bs-theme="dark"] .text-dark {
    color: #f8f9fa !important;
}

html[data-bs-theme="dark"] h1,
html[data-bs-theme="dark"] h2,
html[data-bs-theme="dark"] h3,
html[data-bs-theme="dark"] h4,
html[data-bs-theme="dark"] h5,
html[data-bs-theme="dark"] h6 {
    color: #f8f9fa !important;
}
html[data-bs-theme="dark"] {
    background-color: #121826 !important;
}

html[data-bs-theme="dark"] body {
    background-color: #121826 !important;
    color: #e9ecef !important;
}

html[data-bs-theme="dark"] .app-main {
    background-color: #121826 !important;
    color: #e9ecef !important;
    min-height: calc(100vh - 80px);
}

html[data-bs-theme="dark"] .app-main.container,
html[data-bs-theme="dark"] .app-main.container-fluid {
    background-color: #121826 !important;
}

html[data-bs-theme="dark"] .app-main > .row,
html[data-bs-theme="dark"] .app-main > .col-12,
html[data-bs-theme="dark"] .app-main > div {
    background-color: transparent !important;
}

html[data-bs-theme="dark"] .bg-light,
html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .bg-body,
html[data-bs-theme="dark"] .bg-body-tertiary {
    background-color: #1b2433 !important;
}

html[data-bs-theme="dark"] .text-dark {
    color: #f8f9fa !important;
}

html[data-bs-theme="dark"] h1,
html[data-bs-theme="dark"] h2,
html[data-bs-theme="dark"] h3,
html[data-bs-theme="dark"] h4,
html[data-bs-theme="dark"] h5,
html[data-bs-theme="dark"] h6 {
    color: #f8f9fa !important;
}

html[data-bs-theme="dark"] body,
html[data-bs-theme="dark"] main.app-main,
html[data-bs-theme="dark"] .app-main,
html[data-bs-theme="dark"] .container.app-main {
    background: #121826 !important;
}

/* =========================
   DARK MODE FIX - ALL TASK REPORT
   ========================= */

[data-bs-theme="dark"] .filter-card,
[data-bs-theme="dark"] .table-card,
[data-bs-theme="dark"] .stats-card,
[data-bs-theme="dark"] .card {
    background-color: #1f2633 !important;
    color: #e9eef5 !important;
    border-color: #2e3748 !important;
}

[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] .form-check-label,
[data-bs-theme="dark"] .dropdown-empty,
[data-bs-theme="dark"] small,
[data-bs-theme="dark"] .text-muted {
    color: #c7d0dd !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .dropdown-search-input {
    background-color: #111827 !important;
    color: #f3f4f6 !important;
    border: 1px solid #374151 !important;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] .dropdown-search-input::placeholder {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .project-dropdown {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
    border: 1px solid #374151 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}

[data-bs-theme="dark"] .project-dropdown .form-check,
[data-bs-theme="dark"] .project-dropdown .form-check-label,
[data-bs-theme="dark"] .project-dropdown .dropdown-item-option {
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .project-dropdown input[type="checkbox"] {
    background-color: #111827 !important;
    border-color: #6b7280 !important;
}

[data-bs-theme="dark"] .dropdown-search-box {
    background-color: #1f2937 !important;
    border-bottom: 1px solid #374151 !important;
}

[data-bs-theme="dark"] .dropdown-options {
    background-color: #1f2937 !important;
}

[data-bs-theme="dark"] .table {
    color: #e5e7eb !important;
}

[data-bs-theme="dark"] .table thead th {
    background-color: #273244 !important;
    color: #cbd5e1 !important;
    border-bottom: 1px solid #374151 !important;
}

[data-bs-theme="dark"] .table td {
    color: #e5e7eb !important;
    border-color: #374151 !important;
}

[data-bs-theme="dark"] .table tbody tr {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .table tbody tr:hover {
    background-color: #253041 !important;
}

[data-bs-theme="dark"] .task-title,
[data-bs-theme="dark"] .task-title:visited {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .task-title:hover {
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .task-desc {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .pagination .page-link {
    background-color: #1f2937 !important;
    color: #e5e7eb !important;
    border: 1px solid #374151 !important;
}

[data-bs-theme="dark"] .pagination .active .page-link {
    background-color: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}
/* </parameter> */