/* ==========================================================================
   JIRA v1 ENTERPRISE STYLESHEET
   Clean, modern, accessible enterprise SaaS design
   ========================================================================== */

:root {
  --primary: #0052cc;
  --primary-hover: #0065ff;
  --primary-subtle: #eff6ff;
  --primary-gradient: linear-gradient(135deg, #0052cc 0%, #2563eb 100%);
  --secondary: #64748b;
  --sidebar-bg: #090e1d;
  --sidebar-hover: #162039;
  --sidebar-active: #0052cc;
  --sidebar-text: #94a3b8;
  --sidebar-text-hover: #ffffff;
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --border-color-hover: #cbd5e1;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --accent-cyan: #0284c7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;
  --accent-violet: #8b5cf6;
  --badge-todo: #f1f5f9;
  --badge-progress: #e0f2fe;
  --badge-review: #ede9fe;
  --badge-testing: #fef3c7;
  --badge-success: #dcfce7;
  --badge-danger: #fee2e2;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.07), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 10px 25px -4px rgba(15, 23, 42, 0.1), 0 6px 10px -4px rgba(15, 23, 42, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-page);
  color: var(--text-dark);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  letter-spacing: -0.011em;
}

/* --- APP LAYOUT --- */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
}

/* Sidebar */
.app-sidebar {
  width: 250px;
  height: 100vh;
  max-height: 100vh;
  position: sticky;
  top: 0;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  z-index: 1040;
}

.sidebar-header {
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-logo span {
  color: #38bdf8;
}

.sidebar-nav {
  padding: 0.75rem 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #475569 #0f172a;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: #0f172a;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background-color: #475569;
  border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background-color: #64748b;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 0.6rem 1.25rem 0.35rem 1.25rem;
  margin-top: 0.4rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  margin: 0.15rem 0.65rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: 8px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}

.sidebar-nav-item.active {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 82, 204, 0.35);
}

.sidebar-nav-item.active i {
  color: #ffffff;
}

.sidebar-nav-item i {
  font-size: 0.95rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav-item .badge {
  flex-shrink: 0;
}

/* Finance Overview Submenu & High-Contrast Module Names */
.finance-hover-group {
  position: relative;
}

.finance-hover-group .flyout-caret {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  font-size: 0.75rem;
  opacity: 0.75;
}

.finance-hover-group:hover .flyout-caret,
.finance-hover-group:focus-within .flyout-caret,
.finance-hover-group.is-open .flyout-caret {
  transform: rotate(90deg);
  opacity: 1;
}

.sidebar-nav-item.active .flyout-caret {
  color: #ffffff !important;
  opacity: 0.95 !important;
}

/* Light Theme Submenu Container & High-Contrast Items */
:root:not([data-bs-theme="dark"]) .app-sidebar .finance-hover-group .sidebar-hover-menu,
[data-bs-theme="light"] .app-sidebar .finance-hover-group .sidebar-hover-menu {
  display: none;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 3px solid #0052cc !important;
  border-radius: 10px !important;
  margin: 0.3rem 0.65rem 0.5rem 1.15rem !important;
  padding: 0.4rem 0.25rem !important;
  box-shadow: 0 4px 14px rgba(0, 82, 204, 0.08) !important;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-hover-menu .sidebar-sub-item,
[data-bs-theme="light"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item {
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  padding: 0.45rem 0.75rem !important;
  margin: 0.15rem 0.3rem !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  text-decoration: none !important;
  transition: all 0.18s ease !important;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-hover-menu .sidebar-sub-item i,
[data-bs-theme="light"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item i {
  color: #0052cc !important;
  font-size: 0.9rem !important;
  width: 1.25rem !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-hover-menu .sidebar-sub-item:hover,
[data-bs-theme="light"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item:hover {
  background-color: #e2e8f0 !important;
  color: #0052cc !important;
  transform: translateX(3px) !important;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-hover-menu .sidebar-sub-item:hover i,
[data-bs-theme="light"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item:hover i {
  color: #0052cc !important;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-hover-menu .sidebar-sub-item.active,
[data-bs-theme="light"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item.active {
  background: linear-gradient(135deg, #0052cc 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(0, 82, 204, 0.35) !important;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-hover-menu .sidebar-sub-item.active i,
[data-bs-theme="light"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item.active i {
  color: #ffffff !important;
}

/* Dark Theme Submenu Container & Bright Items */
[data-bs-theme="dark"] .app-sidebar .finance-hover-group .sidebar-hover-menu {
  display: none;
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-left: 3px solid #38bdf8 !important;
  border-radius: 10px !important;
  margin: 0.3rem 0.65rem 0.5rem 1.15rem !important;
  padding: 0.4rem 0.25rem !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55) !important;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item {
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  color: #f1f5f9 !important;
  padding: 0.45rem 0.75rem !important;
  margin: 0.15rem 0.3rem !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  text-decoration: none !important;
  transition: all 0.18s ease !important;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item i {
  color: #38bdf8 !important;
  font-size: 0.9rem !important;
  width: 1.25rem !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item:hover {
  background-color: rgba(56, 189, 248, 0.15) !important;
  color: #ffffff !important;
  transform: translateX(3px) !important;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item:hover i {
  color: #7dd3fc !important;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item.active {
  background: linear-gradient(135deg, #0052cc 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(0, 82, 204, 0.45) !important;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-hover-menu .sidebar-sub-item.active i {
  color: #ffffff !important;
}

/* Display Transitions */
.finance-hover-group:hover .sidebar-hover-menu,
.finance-hover-group:focus-within .sidebar-hover-menu,
.finance-hover-group.is-open .sidebar-hover-menu {
  display: block !important;
  animation: sidebarSubmenuFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sidebarSubmenuFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background-color: var(--sidebar-bg);
}

.user-mini-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #334155;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  overflow: hidden;
  flex-shrink: 0;
}

/* Main Area */
.app-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
}

/* Header */
.app-header {
  height: 64px;
  background-color: #ffffff;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.header-search {
  width: 360px;
}

.header-search .form-control {
  font-size: 0.84rem;
  border-radius: 8px;
  padding-left: 2.2rem;
  padding-right: 3.5rem;
  background-color: #f4f6fb;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-search .form-control:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.12);
}

.search-shortcut-badge {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 5px;
  pointer-events: none;
}

.search-icon-wrapper {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Content */
.app-content {
  padding: 1.75rem;
  flex-grow: 1;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Cards & Components */
.card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  background-color: var(--card-bg);
  margin-bottom: 1.5rem;
  min-width: 0;
}

[class*="col-"] {
  min-width: 0;
}

.card-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: 1.25rem;
}

/* KPI Cards */
.kpi-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
  min-height: 90px;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #0052cc, #38bdf8);
  opacity: 0.9;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.kpi-card > div:first-child {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
}

.kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.kpi-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

/* Badges & Status Labels (Requirement 3: Readable Dark/Black Status Text) */
.badge {
  font-weight: 600;
  padding: 0.32em 0.85em;
  font-size: 0.73rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.35;
  transition: all 0.15s ease;
}

.badge-todo,
.badge-to_do,
.badge-not_run,
.badge-archived {
  background-color: #e2e8f0 !important;
  color: #111827 !important;
  --bs-badge-color: #111827;
  border: 1px solid #cbd5e1;
}

.badge-progress,
.badge-in_progress,
.badge-completed {
  background-color: #dbeafe !important;
  color: #111827 !important;
  --bs-badge-color: #111827;
  border: 1px solid #bfdbfe;
}

.badge-dev-complete,
.badge-development_complete,
.badge-partially_paid {
  background-color: #cffafe !important;
  color: #111827 !important;
  --bs-badge-color: #111827;
  border: 1px solid #a5f3fc;
}

.badge-testing,
.badge-pending,
.badge-blocked {
  background-color: #ffedd5 !important;
  color: #111827 !important;
  --bs-badge-color: #111827;
  border: 1px solid #fed7aa;
}

.badge-test-passed,
.badge-test_passed,
.badge-qa-passed,
.badge-qa_passed,
.badge-done,
.badge-active,
.badge-pass,
.badge-passed,
.badge-paid {
  background-color: #dcfce7 !important;
  color: #111827 !important;
  --bs-badge-color: #111827;
  border: 1px solid #bbf7d0;
}

.badge-test-failed,
.badge-test_failed,
.badge-qa-failed,
.badge-qa_failed,
.badge-fail,
.badge-failed,
.badge-overdue {
  background-color: #fee2e2 !important;
  color: #111827 !important;
  --bs-badge-color: #111827;
  border: 1px solid #fecaca;
}

.badge-qa {
  background-color: #f3e8ff !important;
  color: #111827 !important;
  --bs-badge-color: #111827;
  border: 1px solid #e9d5ff;
}

.badge.bg-warning,
.badge.bg-info,
.badge.bg-light,
.badge[class*="-subtle"] {
  color: #111827 !important;
  --bs-badge-color: #111827;
}

.priority-low { color: #059669; }
.priority-medium { color: #d97706; }
.priority-high { color: #ea580c; }
.priority-critical { color: #dc2626; font-weight: 700; }

/* Tables */
.table {
  font-size: 0.85rem;
  margin-bottom: 0;
}

.table th {
  font-weight: 600;
  color: #475569;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

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

.table-responsive {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  border-radius: 8px;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

/* Project Module Horizontal Scrollable Navigation Tabs */
.project-nav-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 2px;
}

.project-nav-tabs::-webkit-scrollbar {
  height: 5px;
}

.project-nav-tabs::-webkit-scrollbar-track {
  background: #f8fafc;
}

.project-nav-tabs::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.project-nav-tabs .nav-item {
  flex-shrink: 0;
}

/* Task Assignment Table Layout & Alignments */
.task-assignment-table {
  min-width: 1440px;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.task-assignment-table th,
.task-assignment-table td {
  vertical-align: middle;
  padding: 0.65rem 0.75rem;
}

.task-assignment-table .col-key {
  width: 105px;
  white-space: nowrap;
}

.task-assignment-table .col-summary {
  width: 240px;
  min-width: 200px;
}

.task-assignment-table .col-type {
  width: 90px;
  white-space: nowrap;
}

.task-assignment-table .col-project {
  width: 85px;
  white-space: nowrap;
}

.task-assignment-table .col-team-lead {
  width: 135px;
}

.task-assignment-table .col-assignee,
.task-assignment-table .col-dev {
  width: 135px;
}

.task-assignment-table .col-tester {
  width: 135px;
}

.task-assignment-table .col-qa {
  width: 135px;
}

.task-assignment-table .col-assigned-by {
  width: 125px;
}

.task-assignment-table .col-priority {
  width: 95px;
  white-space: nowrap;
}

.task-assignment-table .col-status {
  width: 125px;
  white-space: nowrap;
}

.task-assignment-table .col-created {
  width: 105px;
  white-space: nowrap;
}

.task-assignment-table .col-due {
  width: 105px;
  white-space: nowrap;
}

.task-assignment-table .col-actions {
  width: 185px;
  min-width: 185px;
  white-space: nowrap;
  text-align: right;
}

.task-member-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.task-member-pill .member-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 500;
}

.cell-truncate-sm {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-truncate-md {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-truncate-lg {
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   TASK ASSIGNMENT MODERN REDESIGN (MATCHING OFFICIAL DESIGN)
   ========================================================================== */

.task-assignment-view-wrapper {
  animation: fadeInContent 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-assignment-header {
  margin-bottom: 1.5rem;
}

.task-title-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background-color: #e0f2fe;
  color: #0052cc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.task-meta-line {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.task-meta-line .meta-divider {
  color: #cbd5e1;
  margin: 0 0.5rem;
}

/* 5 Metric / KPI Cards Row */
.metric-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
  .metric-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .metric-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .metric-cards-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  height: 100%;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -2px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.metric-card.active-metric {
  border-color: #0052cc;
  box-shadow: 0 0 0 1px #0052cc, 0 4px 12px rgba(0, 82, 204, 0.12);
}

.metric-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.metric-card:hover .metric-icon-box {
  transform: scale(1.08);
}

.metric-details {
  flex-grow: 1;
  min-width: 0;
}

.metric-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Filter Container Card */
.filter-container-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  margin-bottom: 1.5rem;
}

.filter-container-card .form-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.filter-container-card .form-select,
.filter-container-card .form-control {
  border-radius: 8px;
  border-color: #e2e8f0;
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
  transition: all 0.15s ease;
}

.filter-container-card .form-select:focus,
.filter-container-card .form-control:focus {
  border-color: #0052cc;
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.12);
}

.search-box-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  pointer-events: none;
}

/* Modern Tasks Table Card */
.task-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.task-modern-table {
  min-width: 1380px;
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.col-task-key { width: 95px; white-space: nowrap; }
.col-task-summary { width: 220px; }
.col-task-project { width: 115px; }
.col-task-dev { width: 140px; }
.col-task-tester { width: 140px; }
.col-task-qa { width: 140px; }
.col-task-assigner { width: 165px; }
.col-task-priority { width: 105px; text-align: center; }
.col-task-status { width: 115px; text-align: center; }
.col-task-due { width: 105px; text-align: center; }
.col-task-actions { width: 120px; text-align: right; white-space: nowrap; }

.task-modern-table thead th {
  background-color: #ffffff;
  border-bottom: 1px solid #edf2f7;
  padding: 0.95rem 1rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.task-modern-table tbody tr {
  transition: background-color 0.15s ease;
}

.task-modern-table tbody tr:hover {
  background-color: #f8fafc;
}

.task-modern-table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.84rem;
}

.task-key-link {
  font-weight: 700;
  color: #0052cc;
  text-decoration: none;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.task-key-link:hover {
  color: #0065ff;
  text-decoration: underline;
}

.task-summary-text {
  font-weight: 500;
  color: #1e293b;
  display: block;
}

/* Avatar Circles with Initials */
.avatar-initials-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.68rem;
  color: #ffffff;
  flex-shrink: 0;
  text-transform: uppercase;
}

.avatar-dev {
  background-color: #10b981;
}

.avatar-tester {
  background-color: #8b5cf6;
}

.avatar-qa {
  background-color: #6366f1;
}

.avatar-assigner {
  background-color: #1e293b;
}

/* Status Pill Badges (Exact design colors from image) */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.22rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.status-pill-todo {
  background-color: #e0f2fe;
  color: #0369a1;
}

.status-pill-inprogress {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.status-pill-devcomplete {
  background-color: #ede9fe;
  color: #6d28d9;
}

.status-pill-testing {
  background-color: #f3e8ff;
  color: #7e22ce;
}

.status-pill-qa {
  background-color: #ccfbf1;
  color: #0f766e;
}

.status-pill-qapassed {
  background-color: #d1fae5;
  color: #047857;
}

.status-pill-done {
  background-color: #064e3b;
  color: #ffffff;
}

/* Priority Pill Badges (Exact design colors from image) */
.priority-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.22rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.priority-pill-low {
  background-color: #dcfce7;
  color: #15803d;
}

.priority-pill-medium {
  background-color: #fef3c7;
  color: #b45309;
}

.priority-pill-high {
  background-color: #fee2e2;
  color: #b91c1c;
}

.priority-pill-critical {
  background-color: #fecaca;
  color: #991b1b;
  font-weight: 700;
}

/* Action View Button */
.btn-task-view {
  background-color: #0052cc;
  color: #ffffff !important;
  border: none;
  border-radius: 999px;
  padding: 0.32rem 0.95rem;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 82, 204, 0.25);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-task-view:hover {
  background-color: #0065ff;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 82, 204, 0.35);
}

.btn-task-view:active {
  transform: translateY(0);
}

/* Sticky Modal Footer for New Task */
.modal-footer-sticky {
  position: sticky;
  bottom: 0;
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  z-index: 1050;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.btn-modal-cancel {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.4rem;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.btn-modal-cancel:hover {
  background-color: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.btn-modal-submit {
  background-color: #0052cc;
  border: 1px solid #0052cc;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.6rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 82, 204, 0.25);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-modal-submit:hover {
  background-color: #0065ff;
  border-color: #0065ff;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 82, 204, 0.35);
}

.btn-modal-submit:active {
  transform: translateY(0);
}

/* ==========================================================================
   OFFICIAL JIRA v1 CREATE NEW TASK & ASSIGN TEAM MODAL STYLES
   Matches media_1792518634980_393cf9af.png & media_1792518683926_627376d5.png
   ========================================================================== */

#createTaskModal .modal-dialog-scrollable {
  max-height: calc(100vh - 2rem);
}

#createTaskModal .modal-content {
  border: none;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
}

#createTaskModal .modal-body {
  flex: 1 1 auto;
  overflow-y: auto !important;
  max-height: calc(100vh - 190px);
}

#createTaskModal .modal-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 1.1rem 1.5rem;
  background-color: #ffffff;
  flex-shrink: 0;
}

.modal-title-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-title-icon-box i {
  color: #0052cc;
  font-size: 1.15rem;
}

#createTaskModal .form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

#createTaskModal .form-select,
#createTaskModal .form-control {
  font-size: 0.84rem;
  border-color: #cbd5e1;
  border-radius: 6px;
  padding: 0.48rem 0.75rem;
  color: #0f172a;
  background-color: #ffffff;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#createTaskModal .form-select:focus,
#createTaskModal .form-control:focus {
  border-color: #0052cc;
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.15);
  outline: none;
}

/* Team Member Assignment Card */
.modal-assignment-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease;
}

.modal-assignment-card:hover {
  border-color: #cbd5e1 !important;
}

/* Audit Strip */
.modal-audit-strip {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
}

/* Custom Split Footer */
.modal-footer-custom-split {
  flex-shrink: 0;
  margin-top: auto;
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 0.9rem 1.5rem;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Left Cancel Button (Slate Grey #64748b) */
.btn-modal-cancel-slate {
  background-color: #64748b;
  border: 1px solid #64748b;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.48rem 1.4rem;
  border-radius: 6px;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-modal-cancel-slate:hover {
  background-color: #475569;
  border-color: #475569;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(100, 116, 139, 0.25);
}

.btn-modal-cancel-slate:active {
  transform: translateY(1px);
}

/* Right Reset Button (White with subtle border) */
.btn-modal-reset {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569 !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.48rem 1.25rem;
  border-radius: 6px;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-modal-reset:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b !important;
}

.btn-modal-reset:active {
  background-color: #e2e8f0;
}

/* Right Save Task Button (Solid Blue #0052cc) */
.btn-modal-save {
  background-color: #0052cc;
  border: 1px solid #0052cc;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.48rem 1.6rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 82, 204, 0.25);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-modal-save:hover {
  background-color: #0065ff;
  border-color: #0065ff;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 82, 204, 0.35);
}

.btn-modal-save:active {
  transform: translateY(0);
}

/* Kanban Board Styles (Jira-Style Modern UI) */
.kanban-page-wrapper {
  min-width: 0;
  max-width: 100%;
}

.kanban-nav-tabs .kanban-nav-link {
  color: #475569;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.kanban-nav-tabs .kanban-nav-link:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.kanban-nav-tabs .kanban-nav-link.active {
  color: var(--primary);
  background-color: #eff6ff;
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.kanban-search-form {
  width: 240px;
}

.kanban-search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.8rem;
  pointer-events: none;
}

.kanban-avatar-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.kanban-avatar-pill {
  height: 30px;
  padding: 0 0.65rem;
  border-radius: 999px;
  background-color: #f1f5f9;
  color: #334155;
  border: 2px solid #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 0 0 1px #cbd5e1;
  transition: all 0.15s ease;
}

.kanban-avatar-pill:hover,
.kanban-avatar-pill.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.3);
}

.kanban-member-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #334155;
  color: #ffffff;
  border: 2px solid #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 0 0 1px #cbd5e1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kanban-member-avatar:hover {
  transform: translateY(-1px);
  color: #ffffff;
}

.kanban-member-avatar.active {
  background-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.kanban-avatar-unassigned {
  background-color: #f8fafc;
  color: #64748b;
}

.kanban-avatar-unassigned:hover {
  color: #0f172a;
}

.kanban-board-container {
  display: flex;
  gap: 0.875rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 1.25rem;
  align-items: flex-start;
  min-height: calc(100vh - 280px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

.kanban-board-container::-webkit-scrollbar {
  height: 8px;
}

.kanban-board-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.kanban-board-container::-webkit-scrollbar-thumb {
  background-color: #94a3b8;
  border-radius: 4px;
}

.kanban-swimlane-container {
  min-height: 200px;
}

.kanban-column {
  flex: 0 0 288px;
  width: 288px;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 250px);
}

.kanban-column-header {
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  background-color: #f1f5f9;
  border-radius: 8px 8px 0 0;
}

.kanban-col-title {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kanban-cards {
  padding: 0.65rem;
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 78px;
  scrollbar-width: thin;
}

.kanban-cards.drag-over {
  background-color: #e0f2fe;
  border-radius: 6px;
}

.kanban-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kanban-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.kanban-card.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.kanban-card-key {
  font-weight: 700;
  font-size: 0.74rem;
  color: #475569;
  text-decoration: none;
}

.kanban-card-key:hover {
  color: var(--primary);
  text-decoration: underline;
}

.kanban-card-title {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-dark);
  display: block;
  word-break: break-word;
}

.kanban-card-title:hover {
  color: var(--primary);
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.kanban-due-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background-color: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.kanban-due-badge.overdue {
  background-color: #fee2e2;
  color: #111827;
  border-color: #fecaca;
}

.kanban-inline-trigger-btn {
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
}

.kanban-inline-trigger-btn:hover {
  background-color: #e2e8f0;
  color: #0f172a !important;
}

.kanban-empty-column {
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.5);
}

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background-color: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.calendar-header-day {
  background-color: #f8fafc;
  padding: 0.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.calendar-cell {
  background-color: #ffffff;
  min-height: 78px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
}

.calendar-cell.other-month {
  background-color: #f8fafc;
  opacity: 0.5;
}

.calendar-cell.is-today {
  background-color: #eff6ff;
}

.calendar-cell-date {
  font-weight: 600;
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
}

.calendar-event-pill {
  color: #0f172a !important;
  font-size: 0.7rem;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  display: block;
}

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

.empty-state-icon {
  font-size: 2.5rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 1.25rem auto;
}

/* Buttons */
.btn {
  font-weight: 600;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 9px;
  white-space: nowrap;
  padding: 0.46rem 0.95rem;
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.18s ease,
              background-color 0.18s ease,
              border-color 0.18s ease;
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-primary {
  background: var(--primary-gradient);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 82, 204, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0065ff 0%, #1d4ed8 100%);
  box-shadow: 0 4px 14px rgba(0, 82, 204, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-sm {
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  border-radius: 7px;
}

/* Forms */
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.form-control, .form-select {
  font-size: 0.85rem;
  border-color: #cbd5e1;
  border-radius: 9px;
  padding: 0.48rem 0.8rem;
  color: var(--text-dark);
  background-color: var(--card-bg);
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px rgba(0, 82, 204, 0.16);
}

.form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

/* Modals & Dropdowns */
.modal-dialog {
  max-width: min(600px, calc(100vw - 2rem));
  margin: 1.75rem auto;
}

.modal-dialog.modal-lg {
  max-width: min(880px, calc(100vw - 2rem));
}

.modal-dialog.modal-xl {
  max-width: min(1140px, calc(100vw - 2rem));
}

.dropdown-menu {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  font-size: 0.85rem;
  padding: 0.5rem 0;
  z-index: 1060;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -260px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
    z-index: 1050;
  }
  .app-sidebar.show {
    left: 0;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
  }
  .sidebar-overlay.show {
    display: block;
  }
  .app-content {
    padding: 1.25rem 1rem;
  }
  .header-search {
    width: 200px;
  }
}

@media (max-width: 576px) {
  .app-header {
    padding: 0 1rem;
  }
  .kpi-value {
    font-size: 1.35rem;
  }
  .kpi-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
  .app-content {
    padding: 1rem 0.75rem;
  }
}

/* ==========================================================================
   ENTERPRISE DARK THEME STYLES
   ========================================================================== */

[data-bs-theme="dark"] {
  --bg-page: #0f172a;
  --card-bg: #1e293b;
  --border-color: #334155;
  --text-dark: #f8fafc;
  --text-muted: #94a3b8;
  --primary-subtle: #1e3a8a;
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

[data-bs-theme="dark"] body {
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .app-main {
  background-color: #0f172a !important;
}

[data-bs-theme="dark"] .app-header {
  background-color: #1e293b !important;
  border-bottom: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .card {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .card-header {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .card-footer {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

[data-bs-theme="dark"] .table {
  color: #f8fafc !important;
  border-color: #334155 !important;
}

[data-bs-theme="dark"] .table thead th {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

[data-bs-theme="dark"] .table-light {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
  background-color: #273549 !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #1e293b !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .bg-white {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .bg-light {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .text-dark {
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .list-group-item {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .modal-content {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

[data-bs-theme="dark"] .dropdown-menu {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

[data-bs-theme="dark"] .dropdown-item {
  color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .dropdown-item:hover {
  background-color: #273549 !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .kpi-card {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

[data-bs-theme="dark"] .calendar-grid {
  border-color: #334155 !important;
  background-color: #334155 !important;
}

[data-bs-theme="dark"] .calendar-header-day {
  background-color: #1e293b !important;
  color: #94a3b8 !important;
}

[data-bs-theme="dark"] .calendar-cell {
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .calendar-cell.other-month {
  background-color: #1e293b !important;
  opacity: 0.4 !important;
}

[data-bs-theme="dark"] .calendar-cell.is-today {
  background-color: #1e3a8a !important;
}

[data-bs-theme="dark"] .calendar-cell-date {
  color: #94a3b8 !important;
}

[data-bs-theme="dark"] .calendar-event-pill {
  color: #0f172a !important;
  border-width: 1px !important;
}

.day-add-btn:hover {
  opacity: 1 !important;
  color: #0052cc !important;
}




/* ==========================================================================
   TASKPANDA MODERN UI/UX REFRESH & MICRO-INTERACTIONS
   Fluid Card Elevation, Glassmorphic Toasts, Dropdowns & Modal Animations
   ========================================================================== */

/* --- Page Content Reveal --- */
.app-content {
  animation: appContentReveal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes appContentReveal {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Card & KPI Elevation Micro-interactions --- */
.card,
.kpi-card {
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease !important;
  border-radius: 10px;
}

.card:hover,
.kpi-card:hover {
  transform: translateY(-3px) scale(1.003);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.08), 0 6px 12px -4px rgba(0, 0, 0, 0.03) !important;
}

[data-bs-theme="dark"] .card:hover,
[data-bs-theme="dark"] .kpi-card:hover {
  box-shadow: 0 14px 32px -6px rgba(0, 0, 0, 0.45), 0 6px 14px -4px rgba(0, 0, 0, 0.3) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

/* KPI Icon Spring Micro-animation */
.kpi-icon {
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.24s ease !important;
}

.kpi-card:hover .kpi-icon {
  transform: scale(1.12) rotate(3deg);
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.18);
}

/* --- Table Micro-interactions --- */
.table-hover tbody tr {
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 82, 204, 0.04) !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
  background-color: rgba(56, 189, 248, 0.07) !important;
}

/* --- Fluid Dropdown Menus --- */
.dropdown-menu {
  border-radius: 12px !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.05) !important;
  padding: 0.5rem !important;
}

.dropdown-menu.show {
  animation: dropdownSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownSlideIn {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-item {
  border-radius: 8px !important;
  padding: 0.5rem 0.85rem !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  transition: background-color 0.15s ease, transform 0.15s ease, color 0.15s ease !important;
}

.dropdown-item:hover {
  transform: translateX(3px) !important;
}

/* --- Apple/Stripe-Style Fluid Modals --- */
.modal-backdrop.show {
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  background-color: rgba(15, 23, 42, 0.6) !important;
}

.modal.fade .modal-dialog {
  transform: scale(0.95) translateY(-14px) !important;
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease !important;
}

.modal.show .modal-dialog {
  transform: scale(1) translateY(0) !important;
  opacity: 1 !important;
}

.modal-content {
  border-radius: 14px !important;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.28) !important;
  border: 1px solid var(--border-color) !important;
}

/* --- Modern Glassmorphic Toast Notifications --- */
.toast-container {
  z-index: 1200 !important;
  max-width: 420px;
}

.modern-toast {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.06) !important;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.75rem;
  color: #0f172a !important;
  animation: toastSlideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-bs-theme="dark"] .modern-toast {
  background: rgba(19, 29, 51, 0.94) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  box-shadow: 0 18px 40px -6px rgba(0, 0, 0, 0.5) !important;
}

@keyframes toastSlideInUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .toast-progress-track {
  background: rgba(255, 255, 255, 0.05);
}

.toast-progress-bar {
  height: 100%;
  width: 100%;
  animation: toastProgressBar linear forwards;
}

.modern-toast:hover .toast-progress-bar {
  animation-play-state: paused;
}

@keyframes toastProgressBar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* --- Theme Toggle Button Micro-interactions --- */
.theme-toggle-btn {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.2s ease,
              border-color 0.2s ease !important;
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
}

.theme-toggle-btn:active {
  transform: scale(0.94);
}

.theme-toggle-btn i {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle-btn.rotating i {
  transform: rotate(360deg);
}

/* --- Buttons & Inputs Micro-interactions --- */
.btn {
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.18s ease,
              background-color 0.18s ease,
              border-color 0.18s ease !important;
  border-radius: 8px;
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-primary:hover {
  box-shadow: 0 4px 14px rgba(0, 82, 204, 0.35);
}

.form-control,
.form-select {
  border-radius: 8px !important;
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.2s ease !important;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.16) !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22) !important;
}

/* --- Accessibility & Reduced Motion Override --- */
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover,
  .kpi-card:hover,
  .kpi-card:hover .kpi-icon,
  .btn:active,
  .dropdown-item:hover,
  .theme-toggle-btn:hover {
    transform: none !important;
  }
}

/* Online Presence Pulse Indicator */
.online-indicator-dot {
  width: 9px;
  height: 9px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px #090e1d;
  position: absolute;
  bottom: 0;
  right: 0;
  animation: pulseGreen 2.5s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7), 0 0 0 2px #090e1d; }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0), 0 0 0 2px #090e1d; }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0), 0 0 0 2px #090e1d; }
}


/* ==========================================================================
   TASKPANDA OFFICIAL LOGO & FAVICON INTEGRATION (REQUIREMENT 7)
   ========================================================================== */
.taskpanda-brand-logo {
  display: inline-block;
  max-height: 38px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.taskpanda-brand-logo:hover {
  transform: scale(1.02);
}

/* Light Theme: show dark-text logo, hide dark version */
:root:not([data-bs-theme="dark"]) .taskpanda-logo-light,
[data-bs-theme="light"] .taskpanda-logo-light {
  display: inline-block !important;
}

:root:not([data-bs-theme="dark"]) .taskpanda-logo-dark,
[data-bs-theme="light"] .taskpanda-logo-dark {
  display: none !important;
}

/* Dark Theme: show white-text logo, hide light version */
[data-bs-theme="dark"] .taskpanda-logo-light {
  display: none !important;
}

[data-bs-theme="dark"] .taskpanda-logo-dark {
  display: inline-block !important;
}

/* ==========================================================================
   ADJUSTABLE SIDEBAR & THEME SYSTEM (REQUIREMENT 5 & 6)
   ========================================================================== */
.app-sidebar {
  width: 250px;
  min-width: 180px;
  max-width: 440px;
  height: 100vh;
  max-height: 100vh;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
  z-index: 1040;
  transition: width 0.05s ease-out;
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  z-index: 1050;
  background-color: transparent;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-resizer:hover,
.sidebar-resizer.resizing {
  background-color: #0d6efd !important;
  box-shadow: 0 0 10px rgba(13, 110, 253, 0.6);
}

/* LIGHT THEME SIDEBAR */
:root:not([data-bs-theme="dark"]) .app-sidebar,
[data-bs-theme="light"] .app-sidebar {
  background-color: #ffffff !important;
  color: #334155 !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-header,
[data-bs-theme="light"] .app-sidebar .sidebar-header {
  border-bottom: 1px solid #f1f5f9;
  background-color: #ffffff;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-section-title,
[data-bs-theme="light"] .app-sidebar .sidebar-section-title {
  color: #94a3b8 !important;
  font-weight: 700;
  letter-spacing: 0.04em;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-nav-item,
[data-bs-theme="light"] .app-sidebar .sidebar-nav-item {
  color: #475569 !important;
  border-radius: 8px;
  font-weight: 500;
  margin: 0.15rem 0.65rem;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-nav-item i,
[data-bs-theme="light"] .app-sidebar .sidebar-nav-item i {
  color: #64748b;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-nav-item:hover,
[data-bs-theme="light"] .app-sidebar .sidebar-nav-item:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-nav-item:hover i,
[data-bs-theme="light"] .app-sidebar .sidebar-nav-item:hover i {
  color: #0284c7;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-nav-item.active,
[data-bs-theme="light"] .app-sidebar .sidebar-nav-item.active {
  background: linear-gradient(135deg, #0052cc 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-left: none !important;
  box-shadow: 0 4px 16px rgba(0, 82, 204, 0.38) !important;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-nav-item.active i,
[data-bs-theme="light"] .app-sidebar .sidebar-nav-item.active i {
  color: #ffffff !important;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .sidebar-footer,
[data-bs-theme="light"] .app-sidebar .sidebar-footer {
  border-top: 1px solid #f1f5f9;
  background-color: #f8fafc;
}

:root:not([data-bs-theme="dark"]) .app-sidebar .user-mini-card .text-white,
[data-bs-theme="light"] .app-sidebar .user-mini-card .text-white {
  color: #0f172a !important;
}

/* DARK THEME SIDEBAR */
[data-bs-theme="dark"] .app-sidebar {
  background-color: #090e1d !important;
  color: #94a3b8 !important;
  border-right: 1px solid #1e293b !important;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .app-sidebar .sidebar-header {
  border-bottom: 1px solid #1e293b;
  background-color: #090e1d;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-section-title {
  color: #64748b !important;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-nav-item {
  color: #94a3b8 !important;
  border-radius: 8px;
  margin: 0.15rem 0.65rem;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-nav-item i {
  color: #64748b;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-nav-item:hover {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-nav-item:hover i {
  color: #38bdf8;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-nav-item.active {
  background: linear-gradient(135deg, #0052cc 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-left: none !important;
  box-shadow: 0 4px 16px rgba(0, 82, 204, 0.45) !important;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-nav-item.active i {
  color: #ffffff !important;
}

[data-bs-theme="dark"] .app-sidebar .sidebar-footer {
  border-top: 1px solid #1e293b;
  background-color: #070b16;
}

[data-bs-theme="dark"] .app-sidebar .user-mini-card .text-white {
  color: #f8fafc !important;
}

/* ==========================================================================
   LETTER-BY-LETTER SEARCHABLE PROJECT FILTER (REQUIREMENT 2)
   ========================================================================== */
.searchable-project-filter {
  position: relative;
}

.project-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 1060;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.project-opt-item {
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.project-opt-item:hover {
  background-color: #f8fafc;
}

.project-opt-item.active {
  background-color: #eff6ff !important;
  color: #0284c7 !important;
  font-weight: 600;
}

[data-bs-theme="dark"] .project-search-dropdown {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .project-opt-item {
  background-color: #0f172a;
  color: #f1f5f9;
  border-bottom-color: #1e293b;
}

[data-bs-theme="dark"] .project-opt-item:hover {
  background-color: #1e293b;
}

[data-bs-theme="dark"] .project-opt-item.active {
  background-color: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
}

/* ==========================================================================
   MODERN CALENDAR UI & UX STYLING (REQUIREMENT 4)
   ========================================================================== */
.calendar-card {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background-color: var(--border-color, #e2e8f0);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
}

.calendar-header-day {
  background-color: #f8fafc;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.calendar-cell {
  background-color: #ffffff;
  min-height: 78px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.calendar-cell:hover {
  background-color: #fcfdfe;
}

.calendar-cell.other-month {
  background-color: #f8fafc;
  opacity: 0.45;
}

.calendar-cell.is-today {
  background-color: #f0f7ff;
}

.calendar-cell-date {
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-day-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 600;
  color: #334155;
  transition: all 0.2s ease;
}

.calendar-cell.is-today .calendar-day-circle {
  background: linear-gradient(135deg, #0d6efd, #0284c7);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.35);
}

.day-add-btn {
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd !important;
}

.calendar-cell:hover .day-add-btn {
  opacity: 1;
}

.day-add-btn:hover {
  transform: scale(1.15);
  background: #0d6efd;
  color: #ffffff !important;
}

.calendar-event-pill {
  color: #0f172a !important;
  font-size: 0.73rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none !important;
  display: block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.calendar-event-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

/* Dark mode for calendar */
[data-bs-theme="dark"] .calendar-grid {
  border-color: #1e293b !important;
  background-color: #1e293b !important;
}
[data-bs-theme="dark"] .calendar-header-day {
  background-color: #131c31 !important;
  color: #94a3b8 !important;
  border-color: #1e293b !important;
}
[data-bs-theme="dark"] .calendar-cell {
  background-color: #0f172a !important;
  color: #f8fafc !important;
}
[data-bs-theme="dark"] .calendar-cell:hover {
  background-color: #152238 !important;
}
[data-bs-theme="dark"] .calendar-cell.other-month {
  background-color: #0a0f1d !important;
  opacity: 0.35;
}
[data-bs-theme="dark"] .calendar-cell.is-today {
  background-color: #132442 !important;
}
[data-bs-theme="dark"] .calendar-day-circle {
  color: #f1f5f9;
}
[data-bs-theme="dark"] .calendar-cell.is-today .calendar-day-circle {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #ffffff;
}

/* Clickable KPI card styling */
.kpi-clickable-count {
  transition: transform 0.15s ease, color 0.15s ease;
}
.kpi-clickable-count:hover {
  transform: translateY(-2px);
  text-decoration: underline;
  opacity: 0.85;
}
