/* ==========================================================================
   ZenFocus - Premium Glassmorphism Custom Select & DateTime Picker Suite
   Replaces archaic native browser dropdowns & stark white OS calendar popups
   with ultra-smooth, dark glassmorphism popovers with soft glowing borders.
   ========================================================================== */

/* Container and general resets inside picker */
.meta-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 9px !important;
  padding: 5px 9px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 10;
}

.meta-picker:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

.meta-picker.is-focused,
.meta-picker:focus-within,
.meta-picker.has-open-dropdown,
.meta-picker:has(.is-open),
.edit-field.has-open-dropdown,
.edit-field:has(.is-open) {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18) !important;
  z-index: 1000 !important;
  position: relative;
}

.custom-select-wrap.is-open,
.custom-datetime-wrap.is-open {
  position: relative;
  z-index: 1000 !important;
}

/* Completely suppress native datetime-local input and webkit calendar popup trigger */
.meta-picker input[type="datetime-local"],
.edit-field input[type="datetime-local"] {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  visibility: hidden !important;
}

.meta-picker input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.edit-field input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  display: none !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
}

/* Ensure edit modal permits popups to float outside */
.modal-container.edit-task-container {
  overflow: visible !important;
}
.edit-task-body {
  overflow: visible !important;
}

/* --------------------------------------------------------------------------
   1. CUSTOM SELECT DROPDOWN
   -------------------------------------------------------------------------- */
.custom-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.custom-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  user-select: none;
  transition: color 0.15s ease;
}

.custom-select-trigger:hover {
  color: #ffffff;
}

.custom-select-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.custom-select-arrow {
  width: 12px;
  height: 12px;
  color: #94a3b8;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
  flex-shrink: 0;
}

.custom-select-wrap.is-open .custom-select-arrow {
  transform: rotate(180deg);
  color: #38bdf8;
}

/* Floating Dropdown Menu Card */
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 175px;
  width: max-content;
  max-width: 270px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  box-shadow: 
    0 18px 45px -8px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 25px rgba(56, 189, 248, 0.12);
  padding: 5px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select-wrap.is-open .custom-select-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Dropdown Right Alignment if near screen edge */
.custom-select-dropdown.align-right {
  left: auto;
  right: 0;
}

/* Option Items */
.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.custom-select-option:hover {
  background: rgba(56, 189, 248, 0.14);
  color: #ffffff;
  transform: translateX(2px);
}

.custom-select-option.is-selected {
  background: rgba(99, 102, 241, 0.18);
  color: #38bdf8;
  font-weight: 600;
}

.custom-select-option .option-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-select-option .option-check {
  width: 14px;
  height: 14px;
  color: #38bdf8;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.custom-select-option.is-selected .option-check {
  opacity: 1;
}

/* Priority Indicator Glowing Dots */
.prio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.prio-dot.urgent {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.75);
}
.prio-dot.high {
  background: #f97316;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.75);
}
.prio-dot.normal {
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}
.prio-dot.low {
  background: #94a3b8;
  box-shadow: 0 0 6px rgba(148, 163, 184, 0.4);
}

/* --------------------------------------------------------------------------
   2. CUSTOM GLASSMORPHISM DATE & TIME PICKER
   -------------------------------------------------------------------------- */
.custom-datetime-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.custom-datetime-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  user-select: none;
  transition: color 0.15s ease;
}

.custom-datetime-trigger:hover {
  color: #ffffff;
}

.custom-datetime-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.custom-datetime-label.is-empty {
  color: #94a3b8;
}

.custom-datetime-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: none;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  margin-left: 2px;
  transition: all 0.15s ease;
}

.custom-datetime-clear-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  transform: scale(1.15);
}

/* Popover Card */
.custom-datetime-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 
    0 24px 60px -10px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 35px rgba(99, 102, 241, 0.2);
  padding: 14px 16px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-datetime-wrap.is-open .custom-datetime-popover {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.custom-datetime-popover.align-right {
  left: auto;
  right: 0;
}

/* Quick shortcut chips at top */
.dt-presets-bar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dt-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.dt-chip:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Calendar Header */
.dt-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dt-month-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.dt-nav-btns {
  display: flex;
  gap: 4px;
}

.dt-nav-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
}

.dt-nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Weekday Grid */
.dt-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}

/* Days Grid */
.dt-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.dt-day-cell {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  color: #cbd5e1;
  user-select: none;
  transition: all 0.15s ease;
}

.dt-day-cell:hover:not(.empty) {
  background: rgba(56, 189, 248, 0.18);
  color: #ffffff;
}

.dt-day-cell.other-month {
  color: #475569;
  opacity: 0.45;
}

.dt-day-cell.today {
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #38bdf8;
  font-weight: 700;
}

.dt-day-cell.selected {
  background: linear-gradient(135deg, #6366f1, #38bdf8) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

/* Time Row Section */
.dt-time-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.dt-time-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  user-select: none;
}

.dt-time-control {
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

/* --------------------------------------------------------------------------
   3. SELECTABLE TIME NUMBER BOXES & DROPDOWNS
   -------------------------------------------------------------------------- */
.dt-num-selector {
  position: relative;
}

/* Number Trigger Button (09, 59) */
.dt-num-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  min-width: 48px;
  padding: 0 7px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.dt-num-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.dt-num-selector.is-open .dt-num-btn {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25), 0 0 14px rgba(56, 189, 248, 0.35);
}

.dt-num-arrow {
  width: 10px;
  height: 10px;
  color: #94a3b8;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
  flex-shrink: 0;
}

.dt-num-selector.is-open .dt-num-arrow {
  transform: rotate(180deg);
  color: #38bdf8;
}

.dt-time-sep {
  color: #94a3b8;
  font-weight: 700;
  font-size: 15px;
  user-select: none;
  line-height: 1;
}

/* AM / PM Segmented Switch */
.dt-ampm-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  height: 32px;
  box-sizing: border-box;
}

.dt-ampm-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 0 8px;
  height: 26px;
  line-height: 26px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.dt-ampm-btn:hover:not(.active) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.dt-ampm-btn.active {
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.45);
}

/* Number Selection Dropdown Cards */
.dt-num-dropdown {
  position: absolute;
  bottom: calc(100% + 9px);
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 
    0 18px 45px -8px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 25px rgba(56, 189, 248, 0.18);
  padding: 10px;
  z-index: 10001;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dt-num-dropdown::after {
  content: '';
  position: absolute;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: rgba(15, 23, 42, 0.98);
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  transform: rotate(45deg);
}

.dt-num-selector.is-open .dt-num-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Hour dropdown positioning */
.dt-hour-dropdown {
  left: 0;
  width: 154px;
}
.dt-hour-dropdown::after {
  left: 20px;
}

/* Minute dropdown positioning */
.dt-min-dropdown {
  right: -58px;
  width: 224px;
}
.dt-min-dropdown::after {
  left: 82px;
}

/* Dropdown Header */
.dt-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dt-min-presets {
  display: flex;
  gap: 4px;
}

.dt-min-quick {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: none;
}

.dt-min-quick:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}

/* Number Grids */
.dt-num-grid {
  display: grid;
  gap: 4px;
}

.dt-hour-grid {
  grid-template-columns: repeat(3, 1fr);
}

.dt-min-grid {
  grid-template-columns: repeat(5, 1fr);
  max-height: 165px;
  overflow-y: auto;
  padding-right: 3px;
}

/* Sleek Scrollbar for Minute Grid */
.dt-min-grid::-webkit-scrollbar {
  width: 5px;
}
.dt-min-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}
.dt-min-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.dt-min-grid::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}

/* Number Items */
.dt-num-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 29px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.dt-num-item:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.45);
  color: #ffffff;
  transform: scale(1.06);
}

.dt-num-item.selected {
  background: linear-gradient(135deg, #6366f1, #38bdf8) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.45);
}

/* Popover Footer Buttons */
.dt-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 8px;
}

.dt-btn-clear {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  border-radius: 7px;
  font-size: 11.5px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dt-btn-clear:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.dt-btn-apply {
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  border: none;
  color: #ffffff;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 16px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all 0.15s ease;
}

.dt-btn-apply:hover {
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   4. CUSTOM GLASSMORPHISM RECURRENCE PICKER & BADGES
   -------------------------------------------------------------------------- */
.custom-recurrence-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.custom-recurrence-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  user-select: none;
  transition: color 0.15s ease;
}

.custom-recurrence-trigger:hover {
  color: #ffffff;
}

.custom-recurrence-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.custom-recurrence-label.is-none {
  color: #94a3b8;
}

.custom-recurrence-label.is-active {
  color: #38bdf8;
  font-weight: 600;
}

.recurrence-icon {
  width: 13px;
  height: 13px;
  color: inherit;
  flex-shrink: 0;
}

/* Recurrence Popover */
.custom-recurrence-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: 
    0 24px 60px -10px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 30px rgba(99, 102, 241, 0.2);
  padding: 14px 16px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-recurrence-wrap.is-open .custom-recurrence-popover {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.custom-recurrence-popover.align-right {
  left: auto;
  right: 0;
}

/* Header */
.rec-popover-header {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rec-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

/* Mode Selection Tabs (2x2 Grid) */
.rec-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.rec-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.rec-mode-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

.rec-mode-btn.active {
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  border-color: transparent;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.45);
}

/* Body */
.rec-body {
  min-height: 120px;
  margin-bottom: 12px;
}

.rec-hint-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.4;
}

.rec-hint-box strong {
  display: block;
  color: #f1f5f9;
  font-size: 12.5px;
  margin-bottom: 2px;
}

.rec-hint-box p {
  margin: 0;
  font-size: 11.5px;
}

.rec-hint-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.rec-hint-box.active {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
}

.rec-hint-box.active strong {
  color: #38bdf8;
}

/* Config Section for Weekly / Monthly */
.rec-config-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rec-section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rec-section-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.rec-quick-chips {
  display: flex;
  gap: 4px;
}

.rec-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rec-chip:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}

/* Weekdays Grid (7 pills) */
.rec-weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.rec-day-btn {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.rec-day-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.rec-day-btn.selected {
  background: linear-gradient(135deg, #6366f1, #38bdf8) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.45);
}

/* Month Grid (31 numbers in 7 columns) */
.rec-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
  padding-right: 2px;
}

.rec-month-grid::-webkit-scrollbar {
  width: 5px;
}
.rec-month-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}
.rec-month-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.rec-month-day-btn {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.rec-month-day-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

.rec-month-day-btn.selected {
  background: linear-gradient(135deg, #6366f1, #38bdf8) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.45);
}

/* Footer */
.rec-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rec-summary-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11.5px;
}

.rec-summary-label {
  color: #94a3b8;
}

.rec-summary-val {
  color: #38bdf8;
  font-weight: 700;
}

.rec-actions-btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Recurrence Badge on Task Cards */
.badge-recurrence {
  background: rgba(99, 102, 241, 0.18) !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  color: #a5b4fc !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge-recurrence svg {
  flex-shrink: 0;
  color: #818cf8;
}

/* ==========================================================================
   DEDICATED DATE PICKER & TIME PICKER STYLES
   ========================================================================== */

/* Date Picker Wrappers & Triggers */
.custom-date-wrap,
.custom-time-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.custom-date-wrap.is-open,
.custom-time-wrap.is-open {
  position: relative;
  z-index: 1000 !important;
}

.custom-date-trigger,
.custom-time-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  user-select: none;
}

.custom-date-label,
.custom-time-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.custom-date-label.is-empty,
.custom-time-label.is-empty {
  color: #94a3b8;
}

.custom-date-label.is-recurring {
  color: #c084fc !important;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 11px;
}

.custom-date-clear-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 9.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 2px;
}

.custom-date-clear-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

/* Date Popover */
.custom-date-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 290px;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 
    0 24px 60px -10px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 35px rgba(99, 102, 241, 0.2);
  padding: 14px 16px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-date-wrap.is-open .custom-date-popover {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.custom-date-popover.align-right {
  left: auto;
  right: 0;
}

.date-single-hint {
  background: rgba(56, 189, 248, 0.08);
  border: 1px dashed rgba(56, 189, 248, 0.25);
  border-radius: 7px;
  padding: 5px 8px;
  margin-bottom: 8px;
  font-size: 10.5px;
  color: #7dd3fc;
  line-height: 1.35;
}

/* Time Popover */
.custom-time-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 310px;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 
    0 24px 60px -10px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 35px rgba(56, 189, 248, 0.2);
  padding: 14px 16px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-time-wrap.is-open .custom-time-popover {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.custom-time-popover.align-right {
  left: auto;
  right: 0;
}

.time-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.time-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.time-header-title svg {
  color: #38bdf8;
}

/* Time Presets Bar */
.time-presets-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.time-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.time-chip:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Time Cols Container */
.time-cols-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 12px;
}

.time-col {
  flex: 1;
}

.time-col-title {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  text-align: center;
}

.time-col-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #64748b;
  padding-top: 32px;
}

/* Hours Grid */
.time-hours-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.time-num-btn {
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.time-num-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

.time-num-btn.selected {
  background: linear-gradient(135deg, #6366f1, #38bdf8) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.45);
}

/* Minutes Section */
.time-mins-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-bottom: 5px;
}

.time-min-quick-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 5px;
  color: #7dd3fc;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 0;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.time-min-quick-btn:hover {
  background: rgba(56, 189, 248, 0.3);
  color: #ffffff;
}

.time-mins-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  max-height: 100px;
  overflow-y: auto;
  padding-right: 2px;
}

.time-mins-grid::-webkit-scrollbar {
  width: 4px;
}
.time-mins-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}
.time-mins-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.time-min-num-btn {
  height: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.time-min-num-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.35);
  color: #ffffff;
}

.time-min-num-btn.selected {
  background: linear-gradient(135deg, #6366f1, #38bdf8) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.45);
}

/* Time Popover Footer */
.time-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.time-preview-tag {
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
}

.preview-label {
  color: #94a3b8;
  margin-right: 4px;
}

.preview-val {
  color: #38bdf8;
  font-weight: 700;
}
