/* ============================================
   Bureaucracy.es Client Dashboard
   Design system adapted from BabelLexi/Metronic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Primary palette — Bureaucracy teal/blue */
  --bl-primary: #1B84FF;
  --bl-primary-light: #5EA3FF;
  --bl-primary-dark: #0D6EE1;
  --bl-primary-bg: rgba(27, 132, 255, 0.08);

  /* Secondary palette */
  --bl-secondary: #1B2559;
  --bl-secondary-light: #2D3B80;

  /* Accent colors */
  --bl-success: #17C653;
  --bl-success-bg: rgba(23, 198, 83, 0.08);
  --bl-warning: #F6B100;
  --bl-warning-bg: rgba(246, 177, 0, 0.08);
  --bl-danger: #F8285A;
  --bl-danger-bg: rgba(248, 40, 90, 0.08);
  --bl-info: #7239EA;
  --bl-info-bg: rgba(114, 57, 234, 0.08);

  /* Neutrals */
  --bl-bg: #F5F8FA;
  --bl-bg-card: #FFFFFF;
  --bl-border: #E4E6EF;
  --bl-text-primary: #181C32;
  --bl-text-secondary: #7E8299;
  --bl-text-muted: #A1A5B7;

  /* Sidebar */
  --bl-sidebar-bg: #1E1E2D;
  --bl-sidebar-hover: #2A2A3C;
  --bl-sidebar-active: var(--bl-primary);
  --bl-sidebar-text: #9899AC;
  --bl-sidebar-text-active: #FFFFFF;
  --bl-sidebar-width: 265px;

  /* Header */
  --bl-header-height: 65px;

  /* Transitions */
  --bl-transition: all 0.3s ease;

  /* Shadows */
  --bl-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --bl-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --bl-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);

  /* Border radius */
  --bl-radius: 0.625rem;
  --bl-radius-lg: 0.875rem;
}

/* ============ Reset & Base ============ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.dashboard-new-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bl-bg);
  color: var(--bl-text-primary);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

/* ============ Layout ============ */
.dn-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ============ Sidebar ============ */
.dn-sidebar {
  width: var(--bl-sidebar-width);
  background: var(--bl-sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--bl-transition);
  overflow: hidden;
}

.dn-sidebar-header {
  height: var(--bl-header-height);
  display: flex;
  align-items: center;
  padding: 0 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.dn-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dn-sidebar-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.dn-sidebar-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dn-sidebar-logo-text {
  font-size: 17px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.3px;
}

.dn-sidebar-logo-text span {
  color: var(--bl-primary-light);
}

.dn-sidebar-menu {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.dn-sidebar-menu::-webkit-scrollbar {
  width: 3px;
}

.dn-sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.dn-menu-section {
  padding: 0 20px;
  margin-bottom: 20px;
}

.dn-menu-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--bl-sidebar-text);
  padding: 0 12px;
  margin-bottom: 8px;
  opacity: 0.5;
}

.dn-menu-item {
  margin-bottom: 2px;
}

.dn-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--bl-sidebar-text);
  transition: var(--bl-transition);
  font-size: 13px;
  font-weight: 500;
  position: relative;
}

.dn-menu-link:hover {
  background: var(--bl-sidebar-hover);
  color: var(--bl-sidebar-text-active);
}

.dn-menu-link.active {
  background: var(--bl-primary);
  color: white;
}

.dn-menu-link.active .dn-menu-icon {
  color: white;
  opacity: 1;
}

.dn-menu-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  flex-shrink: 0;
}

.dn-menu-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dn-menu-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.4;
}

.dn-menu-badge.primary {
  background: var(--bl-primary-bg);
  color: var(--bl-primary);
}

.dn-menu-badge.success {
  background: var(--bl-success-bg);
  color: var(--bl-success);
}

.dn-menu-badge.warning {
  background: var(--bl-warning-bg);
  color: var(--bl-warning);
}

.dn-sidebar-footer {
  padding: 20px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.dn-sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dn-sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.dn-sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dn-sidebar-user-avatar-fallback {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bl-primary), var(--bl-info));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.dn-sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.dn-sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dn-sidebar-user-role {
  font-size: 11px;
  color: var(--bl-sidebar-text);
}

/* ============ Main Content ============ */
.dn-main {
  flex: 1;
  margin-left: var(--bl-sidebar-width);
  transition: var(--bl-transition);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============ Header ============ */
.dn-header {
  height: var(--bl-header-height);
  background: var(--bl-bg-card);
  border-bottom: 1px solid var(--bl-border);
  display: flex;
  align-items: center;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 90;
  gap: 20px;
}

.dn-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dn-mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--bl-text-secondary);
}

.dn-mobile-toggle:hover {
  background: var(--bl-bg);
}

.dn-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.dn-breadcrumb-item {
  color: var(--bl-text-muted);
}

.dn-breadcrumb-item.active {
  color: var(--bl-text-primary);
  font-weight: 500;
}

.dn-breadcrumb-sep {
  color: var(--bl-text-muted);
  font-size: 11px;
}

.dn-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.dn-header-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--bl-text-secondary);
  position: relative;
  transition: var(--bl-transition);
}

.dn-header-btn:hover {
  background: var(--bl-bg);
  color: var(--bl-primary);
}

.dn-header-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.dn-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--bl-transition);
}

.dn-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dn-header-avatar:hover {
  transform: scale(1.05);
}

.dn-header-avatar-fallback {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bl-primary), var(--bl-info));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

/* Avatar dropdown menu */
.dn-avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bl-bg-card);
  border: 1px solid var(--bl-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 200;
  overflow: hidden;
}

.dn-avatar-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dn-avatar-menu-header {
  padding: 12px 14px;
}

.dn-avatar-menu-divider {
  height: 1px;
  background: var(--bl-border);
}

.dn-avatar-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bl-text-secondary);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
}

.dn-avatar-menu-item:hover {
  background: var(--bl-bg);
  color: var(--bl-text-primary);
}

.dn-avatar-menu-logout:hover {
  color: #ef4444;
}

/* ============ Content Area ============ */
.dn-content {
  flex: 1;
  padding: 30px;
}

.dn-page-title {
  margin-bottom: 30px;
}

.dn-page-title h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--bl-text-primary);
  margin-bottom: 4px;
}

.dn-page-title p {
  font-size: 13px;
  color: var(--bl-text-secondary);
}

/* ============ Stats Cards ============ */
.dn-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.dn-stat-card {
  background: var(--bl-bg-card);
  border-radius: var(--bl-radius-lg);
  padding: 24px;
  border: 1px solid var(--bl-border);
  transition: var(--bl-transition);
  position: relative;
  overflow: hidden;
}

.dn-stat-card:hover {
  box-shadow: var(--bl-shadow-md);
  transform: translateY(-2px);
}

.dn-stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.05;
  transform: translate(30%, -30%);
}

.dn-stat-card.blue::after {
  background: var(--bl-primary);
}

.dn-stat-card.purple::after {
  background: var(--bl-info);
}

.dn-stat-card.green::after {
  background: var(--bl-success);
}

.dn-stat-card.orange::after {
  background: var(--bl-warning);
}

.dn-stat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dn-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dn-stat-icon.blue {
  background: var(--bl-primary-bg);
  color: var(--bl-primary);
}

.dn-stat-icon.purple {
  background: var(--bl-info-bg);
  color: var(--bl-info);
}

.dn-stat-icon.green {
  background: var(--bl-success-bg);
  color: var(--bl-success);
}

.dn-stat-icon.orange {
  background: var(--bl-warning-bg);
  color: var(--bl-warning);
}

.dn-stat-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.dn-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--bl-text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.dn-stat-label {
  font-size: 13px;
  color: var(--bl-text-secondary);
  font-weight: 500;
}

/* ============ Cards ============ */
.dn-card {
  background: var(--bl-bg-card);
  border-radius: var(--bl-radius-lg);
  border: 1px solid var(--bl-border);
  margin-bottom: 20px;
}

.dn-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--bl-border);
}

.dn-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--bl-text-primary);
}

.dn-card-subtitle {
  font-size: 12px;
  color: var(--bl-text-secondary);
  margin-top: 2px;
}

.dn-card-body {
  padding: 24px;
}

.dn-card-body.flush {
  padding: 0;
}

/* ============ Badges ============ */
.dn-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.dn-badge-blue {
  background: var(--bl-primary-bg);
  color: var(--bl-primary);
}

.dn-badge-purple {
  background: var(--bl-info-bg);
  color: var(--bl-info);
}

.dn-badge-green {
  background: var(--bl-success-bg);
  color: var(--bl-success);
}

.dn-badge-orange {
  background: var(--bl-warning-bg);
  color: var(--bl-warning);
}

.dn-badge-red {
  background: var(--bl-danger-bg);
  color: var(--bl-danger);
}

/* ============ Progress Bar ============ */
.dn-progress {
  height: 6px;
  background: var(--bl-bg);
  border-radius: 100px;
  overflow: hidden;
  width: 100%;
}

.dn-progress-bar {
  height: 100%;
  border-radius: 100px;
  transition: width 0.6s ease;
}

.dn-progress-bar.blue {
  background: var(--bl-primary);
}

.dn-progress-bar.purple {
  background: var(--bl-info);
}

.dn-progress-bar.green {
  background: var(--bl-success);
}

.dn-progress-bar.orange {
  background: var(--bl-warning);
}

/* ============ Grid Layouts ============ */
.dn-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.dn-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ============ Case Manager Card ============ */
.dn-cm-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 10px;
  transition: var(--bl-transition);
}

.dn-cm-avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--bl-shadow-sm);
}

.dn-cm-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dn-cm-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--bl-text-primary);
}

.dn-cm-role {
  font-size: 12px;
  color: var(--bl-text-muted);
  margin-top: 2px;
}

.dn-cm-contact {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dn-cm-contact a {
  font-size: 12px;
  color: var(--bl-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.dn-cm-contact svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ============ Task Sections (Grouped + Expandable) ============ */
.dn-task-section {
  margin-bottom: 8px;
}

.dn-task-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  cursor: pointer;
  user-select: none;
}

.dn-task-section-toggle {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bl-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--bl-transition);
}

.dn-task-section-toggle svg {
  width: 14px;
  height: 14px;
  stroke: var(--bl-text-muted);
  fill: none;
  stroke-width: 2;
  transition: transform 0.3s ease;
}

.dn-task-section.open .dn-task-section-toggle svg {
  transform: rotate(90deg);
}

.dn-task-section.open .dn-task-section-toggle {
  background: var(--bl-primary-bg);
}

.dn-task-section.open .dn-task-section-toggle svg {
  stroke: var(--bl-primary);
}

.dn-task-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--bl-text-primary);
  flex: 1;
}

.dn-task-section-count {
  font-size: 12px;
  color: var(--bl-text-muted);
  font-weight: 500;
}

.dn-task-section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.dn-task-section.open .dn-task-section-body {
  max-height: 5000px;
}

/* Task List */
.dn-task-list {
  display: flex;
  flex-direction: column;
}

.dn-task-item {
  border-bottom: 1px solid var(--bl-border);
}

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

.dn-task-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--bl-transition);
}

.dn-task-row:hover {
  background: var(--bl-bg);
}

.dn-task-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--bl-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--bl-transition);
}

.dn-task-check.done {
  background: var(--bl-success);
  border-color: var(--bl-success);
  color: white;
}

.dn-task-check.done svg {
  width: 12px;
  height: 12px;
  stroke: white;
  fill: none;
  stroke-width: 3;
}

.dn-task-check.current {
  border-color: var(--bl-primary);
  background: var(--bl-primary-bg);
}

.dn-task-info {
  flex: 1;
  min-width: 0;
}

.dn-task-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--bl-text-primary);
}

.dn-task-name.done {
  color: var(--bl-text-muted);
  text-decoration: line-through;
}

.dn-task-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.dn-task-chevron svg {
  width: 18px;
  height: 18px;
  stroke: var(--bl-text-muted);
  fill: none;
  stroke-width: 2;
}

.dn-task-item.expanded .dn-task-chevron {
  transform: rotate(180deg);
}

/* Expandable detail panel */
.dn-task-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.dn-task-item.expanded .dn-task-detail {
  max-height: 2000px;
  overflow-y: auto;
}

.dn-task-detail-inner {
  padding: 4px 8px 18px 50px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dn-task-detail-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--bl-text-primary);
  padding: 16px 18px;
  background: var(--bl-bg);
  border-radius: 8px;
  border-left: 3px solid var(--bl-primary);
  max-height: 200px;
  overflow-y: auto;
}

/* ── Normalize HTML inside task descriptions ── */
.dn-task-detail-desc p {
  margin: 0 0 10px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--bl-text-primary);
}
.dn-task-detail-desc p:last-child { margin-bottom: 0; }

.dn-task-detail-desc h1,
.dn-task-detail-desc h2,
.dn-task-detail-desc h3,
.dn-task-detail-desc h4,
.dn-task-detail-desc h5,
.dn-task-detail-desc h6 {
  margin: 0 0 8px 0;
  font-weight: 600;
  color: var(--bl-text-primary);
  line-height: 1.4;
}
.dn-task-detail-desc h1 { font-size: 17px; }
.dn-task-detail-desc h2 { font-size: 16px; }
.dn-task-detail-desc h3 { font-size: 15px; }
.dn-task-detail-desc h4,
.dn-task-detail-desc h5,
.dn-task-detail-desc h6 { font-size: 13px; }

.dn-task-detail-desc ul,
.dn-task-detail-desc ol {
  margin: 0 0 10px 0;
  padding-left: 22px;
  list-style-position: outside;
}
.dn-task-detail-desc ul {
  list-style-type: disc;
}
.dn-task-detail-desc ol {
  list-style-type: decimal;
}
.dn-task-detail-desc li {
  display: list-item;
  font-size: 13px;
  line-height: 1.7;
  color: var(--bl-text-primary);
  margin-bottom: 4px;
}
.dn-task-detail-desc li:last-child { margin-bottom: 0; }

.dn-task-detail-desc a {
  color: var(--bl-primary);
  text-decoration: none;
  font-weight: 500;
}
.dn-task-detail-desc a:hover { text-decoration: underline; }

.dn-task-detail-desc strong,
.dn-task-detail-desc b {
  font-weight: 600;
  color: var(--bl-text-primary);
}

.dn-task-detail-desc img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 8px 0;
}

.dn-task-detail-video {
  margin-top: 4px;
  max-width: 480px;
}

.dn-task-detail-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dn-task-detail-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bl-text-muted);
  font-weight: 600;
}

.dn-task-detail-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--bl-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dn-task-detail-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.dn-task-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dn-task-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bl-success);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: var(--bl-transition);
  margin-left: auto;
}

.dn-task-open-btn:hover {
  background: #13a847;
  transform: translateY(-1px);
}

.dn-task-open-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.dn-task-part {
  font-size: 11px;
  color: var(--bl-text-muted);
  margin-top: 1px;
}

/* ============ Activity List ============ */
.dn-activity-list {
  list-style: none;
}

.dn-activity-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  position: relative;
}

.dn-activity-item:not(:last-child) {
  border-bottom: 1px solid var(--bl-border);
}

.dn-activity-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}

.dn-activity-dot svg {
  width: 13px;
  height: 13px;
}

.dn-activity-content {
  flex: 1;
  min-width: 0;
}

.dn-activity-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--bl-text-primary);
  line-height: 1.4;
}

.dn-activity-text strong {
  font-weight: 600;
}

.dn-activity-time {
  font-size: 11px;
  color: var(--bl-text-muted);
  margin-top: 1px;
}

.dn-activity-detail {
  font-size: 11px;
  color: var(--bl-text-secondary);
  margin-top: 2px;
  line-height: 1.3;
}

.dn-activity-detail strong {
  font-weight: 600;
  color: var(--bl-text-primary);
}

.dn-activity-detail em {
  font-style: italic;
  color: var(--bl-text-muted);
}

@media (max-width: 768px) {
  .dn-activity-half {
    width: 100% !important;
  }
}

/* ============ Current Task Highlight ============ */
.dn-current-task {
  background: linear-gradient(135deg, var(--bl-primary), var(--bl-primary-dark));
  border-radius: var(--bl-radius-lg);
  padding: 28px;
  color: white;
  position: relative;
  overflow: hidden;
}

.dn-current-task::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.dn-current-task-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 8px;
  font-weight: 600;
}

.dn-current-task-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.dn-current-task-desc {
  font-size: 13px;
  opacity: 0.8;
  line-height: 1.5;
}

.dn-current-task-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 20px;
  background: var(--bl-primary);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  transition: var(--bl-transition);
  text-decoration: none;
  cursor: pointer;
}

.dn-current-task-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.dn-current-task-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ============ Document Card ============ */
.dn-doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.12s;
}

.dn-doc-row:hover {
  background: var(--bl-bg);
}

.dn-doc-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.dn-doc-icon.pdf {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.dn-doc-icon.jpg,
.dn-doc-icon.jpeg,
.dn-doc-icon.png,
.dn-doc-icon.webp {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.dn-doc-icon.doc,
.dn-doc-icon.docx {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.dn-doc-icon.xls,
.dn-doc-icon.xlsx {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.dn-doc-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--bl-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

a.dn-doc-link {
  display: block;
  text-decoration: none;
  color: var(--bl-text-primary);
  transition: color 0.12s;
}

a.dn-doc-link:hover {
  color: var(--bl-primary);
  text-decoration: underline;
}

.dn-doc-meta {
  font-size: 11px;
  color: var(--bl-text-muted);
  margin-top: 1px;
}

.dn-badge-red {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.dn-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--bl-primary);
  background: rgba(59, 130, 246, 0.06);
  color: var(--bl-primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.dn-upload-btn:hover {
  background: var(--bl-primary);
  color: white;
}

.dn-comment-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--bl-border);
  background: white;
  color: var(--bl-text-muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.dn-comment-toggle:hover {
  border-color: var(--bl-primary);
  color: var(--bl-primary);
  background: rgba(59, 130, 246, 0.04);
}

.dn-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--bl-border);
  background: white;
  color: var(--bl-text-muted);
  cursor: pointer;
  transition: all 0.12s;
  flex-shrink: 0;
}

.dn-delete-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

.dn-upload-item {
  border-radius: 8px;
  overflow: hidden;
}

.dn-delete-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 8px;
  animation: fadeIn 0.15s ease;
}

.dn-confirm-cancel {
  padding: 4px 12px;
  border: 1px solid var(--bl-border);
  border-radius: 5px;
  background: white;
  color: var(--bl-text-primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.dn-confirm-cancel:hover {
  background: var(--bl-bg);
}

.dn-confirm-delete {
  padding: 4px 12px;
  border: none;
  border-radius: 5px;
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.dn-confirm-delete:hover {
  background: #dc2626;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ============ Timeline ============ */
.dn-tl-track {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  padding: 12px 20px 8px;
  gap: 0;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--bl-border) transparent;
}

.dn-tl-track::-webkit-scrollbar {
  height: 4px;
}

.dn-tl-track::-webkit-scrollbar-track {
  background: transparent;
}

.dn-tl-track::-webkit-scrollbar-thumb {
  background: var(--bl-border);
  border-radius: 4px;
}

.dn-tl-step {
  flex: 1 0 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  min-width: 90px;
  padding: 0 4px;
}

/* Connector line between dots */
.dn-tl-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--bl-border);
  z-index: 0;
}

.dn-tl-step.done:not(:last-child)::after {
  background: #22c55e;
}

.dn-tl-step.current:not(:last-child)::after {
  background: linear-gradient(90deg, var(--bl-primary) 0%, var(--bl-border) 100%);
}

.dn-tl-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  z-index: 1;
  flex-shrink: 0;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.dn-tl-dot.done {
  background: #22c55e;
  color: white;
}

.dn-tl-dot.current {
  background: var(--bl-primary);
  color: white;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  animation: tlPulse 2s infinite;
}

.dn-tl-dot.future {
  background: var(--bl-bg);
  color: var(--bl-text-muted);
  border: 2px solid var(--bl-border);
}

.dn-tl-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@keyframes tlPulse {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.08);
  }
}

.dn-tl-active {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  background: var(--bl-primary);
  padding: 1px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
  white-space: nowrap;
}

.dn-tl-label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 3px;
}

.dn-tl-label.done {
  color: var(--bl-text-primary);
}

.dn-tl-label.current {
  color: var(--bl-primary);
}

.dn-tl-label.future {
  color: var(--bl-text-muted);
}

.dn-tl-date {
  font-size: 9px;
  color: #22c55e;
  font-weight: 600;
}

.dn-tl-note {
  font-size: 9px;
  color: var(--bl-text-secondary);
  background: rgba(59, 130, 246, 0.05);
  border-left: 2px solid var(--bl-primary);
  padding: 3px 6px;
  border-radius: 0 4px 4px 0;
  margin-top: 4px;
  text-align: left;
  line-height: 1.3;
  max-width: 120px;
}

.dn-tl-date-input {
  width: 100%;
  max-width: 110px;
  font-size: 9px;
  padding: 3px 4px;
  border-radius: 5px;
  border: 1.5px solid var(--bl-primary);
  outline: none;
}

.dn-tl-action-btn {
  padding: 3px 10px;
  border-radius: 6px;
  border: 1.5px solid #22c55e;
  background: white;
  color: #22c55e;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.15s;
  white-space: nowrap;
}

.dn-tl-action-btn:hover {
  background: #22c55e;
  color: white;
}

@media (max-width: 768px) {
  .dn-tl-track {
    flex-direction: column;
    padding: 8px 20px 12px;
    gap: 0;
    overflow-x: visible;
  }

  .dn-tl-step {
    flex: none;
    min-width: 0;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    padding: 0;
    padding-left: 44px;
    padding-bottom: 24px;
    position: relative;
  }

  /* Vertical connector line */
  .dn-tl-step:not(:last-child)::after {
    top: 28px;
    left: 13px;
    right: auto;
    width: 2px;
    height: calc(100% - 28px);
    bottom: auto;
  }

  /* Position dot on the left rail */
  .dn-tl-dot {
    position: absolute;
    left: 0;
    top: 0;
    margin-bottom: 0;
  }

  .dn-tl-active {
    display: inline-block;
    margin-bottom: 2px;
  }

  .dn-tl-content {
    align-items: flex-start;
  }

  .dn-tl-label {
    font-size: 12px;
    margin-bottom: 2px;
  }

  .dn-tl-date {
    font-size: 10px;
  }

  .dn-tl-note {
    max-width: 100%;
  }

  .dn-tl-date-input {
    max-width: 160px;
  }
}

/* ============ Info Row ============ */
.dn-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dn-info-item {
  padding: 12px 16px;
  background: var(--bl-bg);
  border-radius: 8px;
}

.dn-info-label {
  font-size: 11px;
  color: var(--bl-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-weight: 600;
}

.dn-info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--bl-text-primary);
}

/* ============ Services ============ */
.dn-svc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid var(--bl-border);
}

.dn-svc-row:last-child {
  border-bottom: none;
}

.dn-svc-row:hover {
  background: var(--bl-bg);
}

.dn-svc-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bl-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dn-svc-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--bl-text-primary);
  line-height: 1.3;
}

.dn-svc-desc {
  font-size: 12px;
  color: var(--bl-text-secondary);
  line-height: 1.45;
}

/* Cards instead of one-line rows: each partner has room to say what you get. */
.dn-svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.dn-svc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--bl-border);
  border-radius: 12px;
  background: var(--bl-bg-card);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.dn-svc-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.dn-svc-card:focus-visible {
  outline: 2px solid var(--bl-primary);
  outline-offset: 2px;
}

.dn-svc-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dn-svc-card .dn-svc-icon {
  width: 38px;
  height: 38px;
  font-size: 19px;
}

.dn-svc-card .dn-svc-title {
  font-size: 14px;
  font-weight: 700;
}

.dn-svc-provider {
  font-size: 11.5px;
  color: var(--bl-text-muted);
  line-height: 1.3;
}

.dn-svc-inc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dn-svc-inc li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--bl-text-secondary);
}

.dn-svc-inc svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.dn-svc-perk {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #15803d;
  font-size: 11.5px;
  font-weight: 600;
}

.dn-svc-more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bl-primary);
}

/* ============ Footer ============ */
.dn-footer {
  padding: 20px 30px;
  text-align: center;
  font-size: 12px;
  color: var(--bl-text-muted);
  border-top: 1px solid var(--bl-border);
}

/* ============ Overlay (Mobile) ============ */
.dn-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99;
}

.dn-overlay.active {
  display: block;
}

/* ============ Responsive ============ */
@media (max-width: 1200px) {
  .dn-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .dn-grid-2 {
    grid-template-columns: 1fr;
  }

  .dn-ai-card {
    margin-bottom: 20px !important;
  }

  #aiMessages {
    max-height: 350px !important;
    min-height: 100px !important;
  }
}

@media (max-width: 992px) {
  .dn-sidebar {
    transform: translateX(-100%);
  }

  .dn-sidebar.active {
    transform: translateX(0);
  }

  .dn-main {
    margin-left: 0;
  }

  .dn-mobile-toggle {
    display: flex;
  }

  .dn-grid-3 {
    grid-template-columns: 1fr;
  }

  .dn-task-detail-inner {
    padding-left: 16px !important;
  }

  .dn-task-detail-desc {
    max-height: 150px;
  }

  .dn-task-detail-video {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .dn-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .dn-content {
    padding: 16px 12px;
  }

  .dn-header {
    padding: 0 12px;
  }

  .dn-info-grid {
    grid-template-columns: 1fr;
  }

  .dn-stat-card {
    padding: 14px;
  }

  .dn-stat-value {
    font-size: 18px;
  }

  .dn-card-header {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .dn-card-body {
    padding: 14px 16px;
  }

  .dn-current-task {
    padding: 18px;
  }

  .dn-current-task-name {
    font-size: 16px;
  }

  /* AI card mobile */
  #aiMessages {
    max-height: 300px !important;
    min-height: 80px !important;
  }

  .dn-ai-msg-bubble {
    max-width: 92%;
    font-size: 12.5px;
    padding: 8px 12px;
  }

  .dn-ai-msg-avatar {
    width: 24px;
    height: 24px;
  }

  #aiChatInput {
    font-size: 14px !important;
  }

  .dn-ai-card .dn-card-header {
    flex-direction: row;
    align-items: center;
  }

  /* Task rows mobile */
  .dn-task-row {
    padding: 10px 4px;
    gap: 10px;
  }

  .dn-task-row .dn-task-name {
    font-size: 13px;
  }

  .dn-task-detail-inner {
    padding-left: 10px !important;
    padding-right: 4px !important;
  }

  .dn-task-detail-desc {
    font-size: 12px;
    padding: 10px 12px;
  }

  /* CM card mobile */
  .dn-cm-card {
    flex-direction: column;
    text-align: center;
  }

  .dn-cm-contact {
    justify-content: center;
  }

  .dn-cm-contact a {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .dn-stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .dn-stat-card {
    padding: 12px 10px;
  }

  .dn-stat-value {
    font-size: 16px;
  }

  .dn-stat-label {
    font-size: 11px;
  }

  .dn-content {
    padding: 12px 8px;
  }

  .dn-header {
    padding: 0 8px;
    height: 50px;
  }

  .dn-header-title {
    font-size: 16px;
  }

  .dn-card {
    border-radius: 10px;
  }

  .dn-card-header,
  .dn-card-body {
    padding: 12px;
  }

  #aiMessages {
    max-height: 250px !important;
  }

  .dn-task-section-title {
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* ============ AI Assistant Card ============ */
.dn-ai-card {
  border-color: rgba(183, 82, 255, 0.15);
  background: var(--bl-bg-card);
}

.dn-ai-msg {
  display: flex;
  gap: 10px;
  animation: aiFadeIn 0.3s ease;
}

.dn-ai-msg-user {
  flex-direction: row-reverse;
}

.dn-ai-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(183, 82, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dn-ai-msg-bubble {
  font-size: 13px;
  line-height: 1.65;
  color: var(--bl-text-primary);
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 85%;
  word-break: break-word;
}

.dn-ai-msg-bot .dn-ai-msg-bubble {
  background: var(--bl-bg);
  border: 1px solid var(--bl-border);
}

.dn-ai-msg-user .dn-ai-msg-bubble {
  background: linear-gradient(135deg, #2c3136, #1a1d20);
  color: white;
  border-radius: 12px 12px 4px 12px;
}

.dn-ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dn-ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b752ff;
  animation: aiDot 1.2s infinite;
}

.dn-ai-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.dn-ai-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes aiDot {

  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  40% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes aiFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#aiInputCard:focus-within {
  box-shadow: 0 0 0 2px rgba(183, 82, 255, 0.15);
  border-color: rgba(183, 82, 255, 0.3);
}

#aiSendBtn:not(:disabled):hover {
  background: linear-gradient(135deg, #b752ff, #7400d6) !important;
  transform: scale(1.1);
}

/* ============ Scrollbar ============ */
body.dashboard-new-body ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

body.dashboard-new-body ::-webkit-scrollbar-track {
  background: transparent;
}

body.dashboard-new-body ::-webkit-scrollbar-thumb {
  background: var(--bl-border);
  border-radius: 10px;
}

body.dashboard-new-body ::-webkit-scrollbar-thumb:hover {
  background: var(--bl-text-muted);
}

/* ============ Animations ============ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dn-animate {
  animation: fadeInUp 0.5s ease forwards;
}

.dn-animate-delay-1 {
  animation-delay: 0.1s;
  opacity: 0;
}

.dn-animate-delay-2 {
  animation-delay: 0.2s;
  opacity: 0;
}

.dn-animate-delay-3 {
  animation-delay: 0.3s;
  opacity: 0;
}

.dn-animate-delay-4 {
  animation-delay: 0.4s;
  opacity: 0;
}

/* ============ Current Task Card (redesign) ============ */
#current_task_card .ctc {
  position: relative;
  background: var(--bl-bg-card);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius-lg);
  overflow: hidden;
  margin-bottom: 0;
  box-shadow: 0 1px 2px rgba(24, 28, 50, 0.04);
}

#current_task_card .ctc-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--bl-primary), var(--bl-info));
}

#current_task_card .ctc-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 24px 16px;
}

#current_task_card .ctc-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--bl-primary-bg);
  color: var(--bl-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

#current_task_card .ctc-icon svg {
  width: 22px;
  height: 22px;
}

#current_task_card .ctc-head-text {
  flex: 1;
  min-width: 0;
}

#current_task_card .ctc-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bl-primary);
  margin-bottom: 3px;
}

#current_task_card .ctc-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--bl-text-primary);
  line-height: 1.35;
}

#current_task_card .ctc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 100px;
  background: var(--bl-primary-bg);
  color: var(--bl-primary);
  font-size: 11px;
  font-weight: 700;
}

#current_task_card .ctc-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bl-primary);
  animation: ctc-pulse 2s infinite;
}

@keyframes ctc-pulse {
  0% { box-shadow: 0 0 0 0 rgba(27, 132, 255, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(27, 132, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(27, 132, 255, 0); }
}

#current_task_card .ctc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 4px 82px;
}

#current_task_card .ctc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bl-bg);
  color: var(--bl-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

#current_task_card .ctc-meta-item svg {
  width: 13px;
  height: 13px;
}

#current_task_card .ctc-body {
  padding: 16px 24px 24px;
}

#current_task_card .ctc-body > *:first-child {
  margin-top: 0;
}

/* Empty state */
#current_task_card .ctc-empty-state {
  text-align: center;
  padding: 44px 24px;
}

#current_task_card .ctc-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--bl-success-bg);
  color: var(--bl-success);
  display: flex;
  align-items: center;
  justify-content: center;
}

#current_task_card .ctc-empty-icon svg {
  width: 30px;
  height: 30px;
}

#current_task_card .ctc-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--bl-text-primary);
}

#current_task_card .ctc-empty-sub {
  font-size: 12.5px;
  color: var(--bl-text-muted);
  margin-top: 5px;
}

@media screen and (max-width: 600px) {
  #current_task_card .ctc-meta {
    padding-left: 24px;
  }
}

/* Place Current Task first (left); card sizes to its own content */
#current_task_card {
  order: -1;
}

/* Show the full task description — only grows when the content needs it, no scroll when it fits */
#current_task_card .dn-task-detail-desc {
  max-height: none;
  overflow-y: visible;
}

/* ============ Case Manager meetings card ============ */
.dn-cm-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.dn-cm-stat {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  background: var(--bl-bg);
}
.dn-cm-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--bl-text-primary);
  line-height: 1.1;
}
.dn-cm-stat-num.is-remaining {
  color: var(--bl-success);
}
.dn-cm-stat-num.is-none {
  color: var(--bl-warning);
}
.dn-cm-stat-lbl {
  font-size: 11px;
  color: var(--bl-text-muted);
  margin-top: 4px;
}
.dn-cm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.dn-cm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--bl-transition);
}
.dn-cm-btn svg {
  width: 16px;
  height: 16px;
}
.dn-cm-btn--primary {
  background: var(--bl-primary);
  color: #fff;
}
.dn-cm-btn--primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.dn-cm-btn--secondary {
  background: var(--bl-bg);
  color: var(--bl-text-primary);
  border: 1px solid var(--bl-border);
}
.dn-cm-btn--secondary:hover {
  background: var(--bl-border);
}