/* ==========================================================================
   CHECKLIST & WEDDING TIMELINE PLANNER STYLES (MOBILE-INSPIRED UX & CHARTS)
   ========================================================================== */

/* ==========================================================================
   1. TOP ANALYTICS & VISUAL PROGRESS DASHBOARD
   ========================================================================== */
.checklist-analytics-card {
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: var(--radius-lg, 16px);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1100px) {
  .checklist-analytics-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.25rem;
  }
}

/* 1.1 Circular Donut Chart */
.donut-chart-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-right: 1.5rem;
  border-right: 1px solid #F1F5F9;
}

@media (max-width: 1100px) {
  .donut-chart-section {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 1.25rem;
  }
}

.donut-chart-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-svg {
  transform: rotate(-90deg);
  width: 140px;
  height: 140px;
  overflow: visible;
}

.donut-bg {
  fill: none;
  stroke: #F1F5F9;
  stroke-width: 13;
}

.donut-segment {
  fill: none;
  stroke-width: 13;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s cubic-bezier(0.16, 1, 0.3, 1), stroke-dashoffset 0.8s ease;
}

.donut-completed {
  stroke: #10B981;
}

.donut-pending {
  stroke: #F59E0B;
}

.donut-overdue {
  stroke: #EF4444;
}

.donut-center-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.donut-percentage {
  font-size: 26px;
  font-weight: 800;
  color: #0F172A;
  font-family: var(--font-heading, inherit);
  line-height: 1;
}

.donut-sublabel {
  font-size: 11.5px;
  color: #64748B;
  font-weight: 600;
  margin-top: 4px;
}

/* Donut Legend */
.donut-legend-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1rem;
  width: 100%;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #475569;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm, 6px);
  background: #F8FAFC;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
  user-select: none;
}

.donut-legend-item:hover {
  background: #EDF2F7;
  transform: translateX(2px);
}

.donut-legend-item.active-filter {
  background: #E2E8F0;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #CBD5E1;
}

.donut-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 0.5rem;
  display: inline-block;
}

.donut-legend-dot.dot-completed { background: #10B981; }
.donut-legend-dot.dot-pending { background: #F59E0B; }
.donut-legend-dot.dot-overdue { background: #EF4444; }

.donut-legend-name {
  flex: 1;
}

.donut-legend-val {
  font-weight: 700;
  color: #1E293B;
}

.donut-legend-pct {
  font-weight: 500;
  color: #64748B;
  font-size: 11px;
}

/* 1.2 Category Progress Bars Mini-Grid */
.category-progress-section {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.category-progress-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  width: 100%;
}

.category-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  min-width: 0;
}

.category-progress-header h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
}

.category-progress-hint {
  font-size: 11.5px;
  color: var(--text-muted, #64748B);
}

.category-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  min-width: 0;
  width: 100%;
}

.cat-progress-card {
  background: #F8FAFC;
  border: 1px solid #EDF2F7;
  border-radius: var(--radius-md, 10px);
  padding: 0.8rem 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  user-select: none;
}

.cat-progress-card:hover {
  background: #FFFFFF;
  border-color: var(--primary-gold, #D4AF37);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cat-progress-card.is-selected {
  background: #FFFDF9;
  border-color: var(--primary-gold, #D4AF37);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}

.cat-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cat-progress-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 12.5px;
  font-weight: 600;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-progress-icon {
  font-size: 1.05rem;
}

.cat-progress-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-progress-count {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.cat-progress-bar-wrap {
  width: 100%;
  height: 5px;
  background: #E2E8F0;
  border-radius: var(--radius-full, 9999px);
  overflow: hidden;
}

.cat-progress-bar {
  height: 100%;
  border-radius: var(--radius-full, 9999px);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. MULTI-DIMENSIONAL FILTERING
   ========================================================================== */
.filter-controls-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  max-width: 100%;
}

.filter-row-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.filter-row-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Timeline Category Filter Tabs */
.timeline-tabs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: thin;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.timeline-tab {
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-full, 9999px);
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-subtle, #E2E8F0);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted, #64748B);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast, 0.15s ease);
}

.timeline-tab:hover {
  border-color: var(--primary-gold, #D4AF37);
  color: var(--text-main, #1E293B);
  background: #FFFDF9;
}

.timeline-tab.active {
  background: linear-gradient(135deg, var(--burgundy, #7B1113), var(--rose-gold-dark, #A24857));
  color: #FFFFFF;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(123, 17, 19, 0.25);
}

/* Category Segmented Tabs */
.category-tabs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: thin;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.category-tab {
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-full, 9999px);
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-subtle, #E2E8F0);
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast, 0.15s ease);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.category-tab:hover {
  border-color: var(--rose-gold, #C58B89);
  color: var(--text-main, #1E293B);
  background: #FFFDF9;
}

.category-tab.active {
  background: #1E293B;
  color: #FFFFFF;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.25);
}

/* ==========================================================================
   3. TOOLBAR & QUICK CONTROLS
   ========================================================================== */
.checklist-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-subtle, #E2E8F0);
  border-radius: var(--radius-md, 10px);
  padding: 0.75rem 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.search-input-wrapper {
  position: relative;
  flex: 1 1 180px;
  min-width: 0;
}

.search-input-wrapper input {
  padding-left: 2.3rem;
  padding-right: 2rem;
  height: 38px;
  font-size: 13px;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle, #94A3B8);
  font-size: 13px;
}

.search-clear-btn {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
}

.search-clear-btn:hover {
  color: #334155;
}

.toolbar-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toolbar-filter-group select {
  height: 38px;
  padding: 0.35rem 0.75rem;
  font-size: 12.5px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border-subtle, #E2E8F0);
  background: #FFF;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  color-scheme: light;
  -webkit-tap-highlight-color: transparent;
}

.toolbar-filter-group select:focus {
  border-color: var(--primary-gold, #D4AF37);
}

.toolbar-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toolbar-actions-group .btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
}

/* ==========================================================================
   4. CATEGORY-GROUPED ACCORDION CARDS
   ========================================================================== */
.checklist-accordions-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.category-accordion-card {
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--border-light, #E2E8F0);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: all var(--transition-fast, 0.15s ease);
}

.category-accordion-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.category-accordion-card.collapsed .category-accordion-body {
  display: none;
}

/* Accordion Header */
.category-accordion-header {
  padding: 1.1rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  user-select: none;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
  transition: background 0.2s ease;
}

.category-accordion-card.collapsed .category-accordion-header {
  border-bottom: none;
}

.category-accordion-header:hover {
  background: #FAF8F5;
}

.category-accordion-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

.category-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.category-header-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.category-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category-count-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full, 9999px);
  background: #F1F5F9;
  color: #475569;
}

.category-sub-progress-wrap {
  width: 140px;
  max-width: 100%;
  height: 5px;
  background: #E2E8F0;
  border-radius: var(--radius-full, 9999px);
  overflow: hidden;
}

.category-sub-progress-bar {
  height: 100%;
  border-radius: var(--radius-full, 9999px);
  transition: width 0.5s ease;
}

.category-accordion-header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.category-percent-text {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  min-width: 32px;
  text-align: right;
}

.btn-acc-batch-check {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-full, 9999px);
  padding: 0.25rem 0.65rem;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: all var(--transition-fast, 0.15s ease);
  line-height: 1;
  white-space: nowrap;
}

.btn-acc-batch-check:hover {
  background: #ECFDF5;
  border-color: #10B981;
  color: #047857;
  transform: scale(1.03);
}

.btn-acc-quick-add {
  background: rgba(212, 175, 55, 0.1);
  color: #927218;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-full, 9999px);
  width: 28px;
  height: 28px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast, 0.15s ease);
  line-height: 1;
}

.btn-acc-quick-add:hover {
  background: #FDF6E2;
  border-color: #B8972E;
  color: #785A0F;
  transform: scale(1.1);
}

.accordion-chevron {
  font-size: 16px;
  color: #64748B;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  line-height: 1;
}

.category-accordion-card.collapsed .accordion-chevron {
  transform: rotate(-90deg);
}

/* Accordion Body */
.category-accordion-body {
  padding: 1rem 1.25rem 1.25rem;
  background: #FAFAFA;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-task-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* ==========================================================================
   5. MOBILE-STYLE TACTILE TASK CARD
   ========================================================================== */
.mobile-task-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md, 10px);
  padding: 0.95rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 58px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  user-select: none;
}

.mobile-task-card:hover {
  transform: translateY(-1.5px);
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mobile-task-card.is-completed {
  background: #F8FAFC;
  border-color: #F1F5F9;
  opacity: 0.75;
}

.mobile-task-card.is-completed .task-card-title {
  text-decoration: line-through;
  color: #94A3B8;
}

/* Tactile Round Interactive Checkbox (48px Touch Target Area) */
.task-checkbox-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tactile-round-checkbox {
  width: 26px;
  height: 26px;
  border: 2px solid #CBD5E1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
}

.tactile-round-checkbox .check-icon {
  width: 14px;
  height: 14px;
  color: #FFFFFF;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}

.tactile-round-checkbox:hover {
  border-color: #10B981;
  transform: scale(1.1);
}

.tactile-round-checkbox.checked {
  background: #10B981;
  border-color: #10B981;
  transform: scale(1);
}

.tactile-round-checkbox.checked .check-icon {
  opacity: 1;
  transform: scale(1);
}

/* Task Card Body */
.task-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.task-card-title-row {
  display: flex;
  align-items: baseline;
}

.task-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  letter-spacing: -0.01em;
  line-height: 1.35;
  word-break: break-word;
}

.task-card-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 11.5px;
}

.task-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full, 9999px);
  font-weight: 600;
  line-height: 1.2;
  font-size: 11.5px;
  border: none;
}

/* Deadline Badges */
.deadline-overdue {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.deadline-today {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid rgba(180, 83, 9, 0.2);
}

.deadline-tomorrow {
  background: #FFEDD5;
  color: #C2410C;
  border: 1px solid rgba(194, 65, 12, 0.2);
}

.deadline-near {
  background: #FEF3C7;
  color: #B45309;
}

.deadline-month {
  background: #EFF6FF;
  color: #2563EB;
}

.deadline-normal {
  background: #F1F5F9;
  color: #475569;
}

.deadline-done {
  background: #ECFDF5;
  color: #059669;
}

.deadline-unset {
  background: #F1F5F9;
  color: #94A3B8;
  font-weight: 400;
}

.tag-timeline {
  background: #F1F5F9;
  color: #64748B;
  font-weight: 500;
}

/* Assignee Pills */
.btn-cycle-assignee {
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
}

.btn-cycle-assignee:hover {
  transform: scale(1.05);
}

.assignee-groom {
  background: #E0E7FF;
  color: #3730A3;
}

.assignee-bride {
  background: #FCE7F3;
  color: #9D174D;
}

.assignee-both {
  background: #FEF3C7;
  color: #92400E;
}

/* Priority Tags */
.tag-urgent {
  background: #FEE2E2;
  color: #DC2626;
  font-size: 11px;
  font-weight: 700;
}

.tag-important {
  background: #FEF3C7;
  color: #B45309;
  font-size: 11px;
  font-weight: 700;
}

/* Task Note */
.task-card-note {
  font-size: 12px;
  color: #64748B;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.task-card-note .note-icon {
  font-size: 11px;
}

/* Task Card Actions */
.task-card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.btn-micro-action {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  border: 1px solid transparent;
  color: #64748B;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast, 0.15s ease);
}

.btn-micro-action:hover {
  background: #F1F5F9;
  color: #1E293B;
  border-color: #E2E8F0;
}

.delete-task-btn:hover {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FECACA;
}

/* Inline Add Task Button at Bottom of Accordion */
.accordion-footer-add {
  margin-top: 0.35rem;
}

.btn-inline-add-task {
  width: 100%;
  padding: 0.75rem;
  border: 2px dashed #CBD5E1;
  background: #FFFFFF;
  border-radius: var(--radius-md, 10px);
  color: #64748B;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast, 0.15s ease);
}

.btn-inline-add-task:hover {
  background: #FFFDF9;
  border-color: var(--primary-gold, #D4AF37);
  color: #927218;
  transform: translateY(-1px);
}

/* Empty State */
.empty-state {
  background: #FFFFFF;
  border: 1px dashed var(--border-light, #CBD5E1);
  border-radius: var(--radius-lg, 16px);
  padding: 3rem 1.5rem;
  text-align: center;
  margin-top: 1rem;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: 13.5px;
  color: #64748B;
  max-width: 500px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
}

/* Responsive Rules */
@media (max-width: 640px) {
  .checklist-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input-wrapper {
    width: 100%;
  }
  .toolbar-filter-group {
    width: 100%;
  }
  .toolbar-filter-group select {
    flex: 1;
  }
  .toolbar-actions-group {
    width: 100%;
    justify-content: space-between;
  }
  .mobile-task-card {
    padding: 0.85rem 0.95rem;
    gap: 0.75rem;
  }
  .task-card-title {
    font-size: 13.5px;
  }
}
