/* ════════════════════════════════════════════════════════════════
   PURTA CALENDAR MODULE — calendar.css
   100% Theme-Derived · Zero Hardcoded Colors
   ════════════════════════════════════════════════════════════════ */

/* ── Full-Screen Separate Screen Overlay ── */
.cal-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  /* Slide-in from bottom animation */
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.28s ease;
  pointer-events: none;
}

.cal-screen-overlay.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ── Overlay Header Bar ── */
.cal-screen-topbar {
  background: var(--purta-header-gradient);
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.cal-screen-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cal-screen-topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.cal-screen-topbar-title i {
  font-size: 15px;
  opacity: 0.9;
}

.cal-screen-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-close-btn {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s;
}

.cal-close-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ── Wrapper (fills the overlay, below topbar) ── */
.cal-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  background: var(--bg-main);
  padding: 5px;
  box-sizing: border-box;
  min-height: 0;
  animation: cal-fadein 0.2s ease both;
}

@keyframes cal-fadein {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* ── Toolbar ── */
.cal-toolbar {
  background: var(--purta-header-gradient);
  color: #fff;
  border-radius: 8px 8px 0 0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.cal-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cal-mod-icon {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
}

.cal-toolbar-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cal-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* View Switch Tabs */
.cal-view-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  padding: 2px;
  gap: 1px;
}

.cal-view-tab {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.cal-view-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.cal-view-tab.active {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.cal-toolbar-btn {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.cal-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

.cal-toolbar-btn-primary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  font-weight: 700;
  border: none;
}

.cal-toolbar-btn-primary:hover {
  background: #fff;
}

/* ── Nav Strip ── */
.cal-nav-strip {
  background: var(--purta-card-bg);
  border-left: 1px solid var(--purta-border);
  border-right: 1px solid var(--purta-border);
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 10px;
}

.cal-nav-left,
.cal-nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-nav-btn {
  background: var(--light-color);
  border: 1px solid var(--purta-border);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 12px;
  cursor: pointer;
  color: var(--purta-text-main);
  font-weight: 600;
  transition: all 0.15s;
}

.cal-nav-btn:hover {
  background: var(--inverse-color);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.cal-current-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--purta-text-main);
  min-width: 200px;
  text-align: center;
  letter-spacing: -0.01em;
}

.cal-today-btn {
  background: var(--primary-color);
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.cal-today-btn:hover {
  opacity: 0.88;
}

/* ── Body Frame ── */
.cal-body-frame {
  flex: 1;
  min-height: 0;
  background: var(--purta-card-bg);
  border: 1px solid var(--purta-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cal-view-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-color: var(--primary-color) #f1f1f1;
  scrollbar-width: thin;
}

.cal-view-panel::-webkit-scrollbar {
  width: 5px;
}

.cal-view-panel::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.cal-view-panel::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.cal-view-panel::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

/* ── MONTH VIEW ── */
.cal-month-grid {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cal-month-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--light-color);
  border-bottom: 1px solid var(--purta-border);
}

.cal-month-dow {
  text-align: center;
  padding: 5px 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--purta-text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cal-month-dow.sun {
  color: var(--primary-color);
}

.cal-month-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
}

.cal-month-cell {
  border-right: 1px solid var(--purta-border);
  border-bottom: 1px solid var(--purta-border);
  min-height: 90px;
  padding: 5px;
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
  overflow: hidden;
}

.cal-month-cell:nth-child(7n) {
  border-right: none;
}

.cal-month-cell:hover {
  background: var(--inverse-color);
}

.cal-month-cell.other-month .cal-day-num {
  color: var(--purta-text-muted);
  opacity: 0.45;
}

.cal-month-cell.today {
  background: var(--inverse-color);
}

.cal-month-cell.today .cal-day-num {
  background: var(--primary-color);
  color: #fff;
}

.cal-month-cell.selected {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}

.cal-day-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--purta-text-main);
  margin-bottom: 3px;
  flex-shrink: 0;
  transition: all 0.15s;
}

.cal-month-cell.sun .cal-day-num {
  color: var(--primary-color);
}

.cal-cell-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

/* ── Event Pills ── */
.cal-event-pill {
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity 0.12s;
}

.cal-event-pill:hover {
  opacity: 0.82;
}

.cal-event-work {
  background: var(--primary-color);
  color: #fff;
}

.cal-event-meeting {
  background: var(--primary-dark);
  color: #fff;
}

.cal-event-holiday {
  background: var(--light-color);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.cal-event-personal {
  background: var(--inverse-color);
  color: var(--primary-dark);
  border: 1px solid var(--purta-border);
}

.cal-event-reminder {
  background: var(--purta-card-bg);
  border: 1px dashed var(--primary-color);
  color: var(--primary-color);
}

.cal-more-link {
  font-size: 10px;
  color: var(--primary-color);
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
}

/* ── WEEK VIEW ── */
.cal-week-grid {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cal-week-header {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  background: var(--light-color);
  border-bottom: 2px solid var(--purta-border);
  flex-shrink: 0;
}


.cal-week-day-col {
  padding: 6px 4px;
  text-align: center;
  border-left: 1px solid var(--purta-border);
  cursor: pointer;
}

.cal-week-day-col:hover {
  background: var(--inverse-color);
}

.cal-week-day-col.today .cal-week-day-num {
  background: var(--primary-color);
  color: #fff;
}

.cal-week-day-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--purta-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cal-week-day-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin: 2px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--purta-text-main);
  transition: all 0.15s;
}

.cal-week-body {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  flex: 1;
  overflow-y: auto;
  scrollbar-color: var(--primary-color) #f1f1f1;
  scrollbar-width: thin;
}

.cal-week-body::-webkit-scrollbar {
  width: 5px;
}

.cal-week-body::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.cal-time-gutter {
  position: sticky;
  top: 0;
  z-index: 2;
}

.cal-hour-label {
  height: 52px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 4px 6px 0;
  font-size: 10px;
  color: var(--purta-text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--purta-border);
  box-sizing: border-box;
}

.cal-week-col {
  border-left: 1px solid var(--purta-border);
  position: relative;
  cursor: pointer;
}

.cal-week-col:hover {
  background: var(--inverse-color);
}

.cal-hour-slot {
  height: 52px;
  border-bottom: 1px solid var(--purta-border);
  position: relative;
  box-sizing: border-box;
}

.cal-hour-slot.half-hour {
  border-bottom: 1px dashed var(--purta-border);
  height: 26px;
}

.cal-week-event {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
  transition: opacity 0.12s, box-shadow 0.12s;
}

.cal-week-event:hover {
  opacity: 0.88;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ── DAY VIEW ── */
.cal-day-grid {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cal-day-header-bar {
  background: var(--light-color);
  border-bottom: 2px solid var(--purta-border);
  padding: 10px 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-day-header-num {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--purta-primary-gradient);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 4px 10px -2px var(--primary-color);
}

.cal-day-header-info {
  display: flex;
  flex-direction: column;
}

.cal-day-header-dow {
  font-size: 17px;
  font-weight: 700;
  color: var(--purta-text-main);
}

.cal-day-header-full {
  font-size: 12px;
  color: var(--purta-text-muted);
}

.cal-day-body {
  display: grid;
  grid-template-columns: 56px 1fr;
  flex: 1;
  overflow-y: auto;
  scrollbar-color: var(--primary-color) #f1f1f1;
  scrollbar-width: thin;
}

.cal-day-body::-webkit-scrollbar {
  width: 5px;
}

.cal-day-body::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.cal-day-col {
  border-left: 1px solid var(--purta-border);
  position: relative;
  cursor: pointer;
}

.cal-day-col:hover {
  background: var(--inverse-color);
}

/* ── AGENDA VIEW ── */
.cal-agenda-wrapper {
  padding: 14px;
}

.cal-agenda-day {
  margin-bottom: 16px;
}

.cal-agenda-day-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.cal-agenda-day-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--light-color);
  border: 1px solid var(--purta-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--purta-text-main);
  flex-shrink: 0;
}

.cal-agenda-day-num.today {
  background: var(--primary-color);
  color: #fff;
  border: none;
  box-shadow: 0 3px 8px -2px var(--primary-color);
}

.cal-agenda-day-label {
  display: flex;
  flex-direction: column;
}

.cal-agenda-day-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--purta-text-main);
}

.cal-agenda-day-date {
  font-size: 11px;
  color: var(--purta-text-muted);
}

.cal-agenda-events {
  margin-left: 48px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cal-agenda-event {
  background: var(--purta-card-bg);
  border: 1px solid var(--purta-border);
  border-left: 3px solid var(--primary-color);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cal-agenda-event:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateX(2px);
}

.cal-agenda-event.meeting {
  border-left-color: var(--primary-dark);
}

.cal-agenda-event.holiday {
  border-left-color: var(--primary-color);
  background: var(--inverse-color);
}

.cal-agenda-event.personal {
  border-left-color: var(--purta-text-muted);
}

.cal-agenda-event.reminder {
  border-left-color: var(--primary-color);
  border-style: dashed solid;
}

.cal-agenda-event-time {
  font-size: 11px;
  color: var(--purta-text-muted);
  font-weight: 600;
  min-width: 60px;
  white-space: nowrap;
}

.cal-agenda-event-info {
  flex: 1;
}

.cal-agenda-event-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--purta-text-main);
}

.cal-agenda-event-desc {
  font-size: 11px;
  color: var(--purta-text-muted);
  margin-top: 1px;
}

.cal-agenda-event-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--light-color);
  color: var(--primary-color);
  font-weight: 700;
  border: 1px solid var(--purta-border);
  white-space: nowrap;
}

.cal-agenda-no-events {
  margin-left: 48px;
  font-size: 12px;
  color: var(--purta-text-muted);
  padding: 4px 0;
  font-style: italic;
}

/* ── Mini Calendar Sidebar ── */
.cal-with-mini {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.cal-mini-sidebar {
  width: 210px;
  flex-shrink: 0;
  border-right: 1px solid var(--purta-border);
  background: var(--purta-card-bg);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  /* No sidebar scrollbar — only main view panel scrolls */
}

.cal-main-area {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cal-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cal-mini-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--purta-text-main);
}

.cal-mini-nav {
  background: none;
  border: none;
  color: var(--purta-text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 11px;
  transition: all 0.12s;
}

.cal-mini-nav:hover {
  background: var(--inverse-color);
  color: var(--primary-color);
}

.cal-mini-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.cal-mini-dow {
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--purta-text-muted);
  text-transform: uppercase;
  padding: 2px 0;
}

.cal-mini-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.cal-mini-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--purta-text-main);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.12s;
}

.cal-mini-cell:hover {
  background: var(--inverse-color);
  color: var(--primary-color);
}

.cal-mini-cell.other-month {
  color: var(--purta-text-muted);
  opacity: 0.4;
}

.cal-mini-cell.today {
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
}

.cal-mini-cell.selected {
  outline: 2px solid var(--primary-color);
  outline-offset: -1px;
}

.cal-mini-cell.has-events {
  position: relative;
}

.cal-mini-cell.has-events::after {
  content: '';
  position: absolute;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-color);
}

/* ── Filter Sidebar ── */
.cal-filter-box {
  border-top: 1px solid var(--purta-border);
  padding-top: 10px;
}

.cal-filter-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--purta-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.cal-filter-item {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  cursor: pointer;
}

.cal-filter-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}

.cal-filter-item label {
  font-size: 11px;
  color: var(--purta-text-main);
  cursor: pointer;
  font-weight: 500;
}

.cal-filter-item input[type="checkbox"] {
  display: none;
}

.cal-filter-dot.active {
  opacity: 1;
}

.cal-filter-dot.inactive {
  opacity: 0.35;
}

.dot-work {
  background: var(--primary-color);
}

.dot-meeting {
  background: var(--primary-dark);
}

.dot-holiday {
  background: var(--light-color);
  border: 1px solid var(--primary-color);
}

.dot-personal {
  background: var(--purta-text-muted);
}

.dot-reminder {
  border: 2px dashed var(--primary-color);
  background: transparent;
}

/* ── Event Modal Custom Form Styles ── */
#calEventModalOverlay .modern-ledger-modal {
  max-width: 540px;
  width: 95%;
  max-height: 92vh;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
}

#calEventModalOverlay .modern-modal-body,
.cal-modal-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  max-height: calc(92vh - 110px);
  overflow-y: auto !important;
  overflow-x: visible !important;
}

#calEventModalOverlay .modern-modal-footer {
  border-top: 1px solid var(--purta-border);
  background: var(--purta-card-bg);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  border-radius: 0 0 9px 9px;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

#calEventModalOverlay .bot-calendar-popover,
#calEventModalOverlay .bot-time-popover,
#calEventModalOverlay .bot-select-popover {
  z-index: 99999 !important;
}

#calReminderPopover,
#calRepeatPopover {
  bottom: calc(100% + 4px) !important;
  top: auto !important;
}

.cal-modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cal-modal-row.full {
  grid-template-columns: 1fr;
}

.cal-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cal-form-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--purta-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-form-input,
.cal-form-select,
.cal-form-textarea {
  background: var(--purta-card-bg);
  border: 1.5px solid var(--purta-border);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--purta-text-main);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  box-sizing: border-box;
}

.cal-form-input:focus,
.cal-form-select:focus,
.cal-form-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--inverse-color);
}

.cal-form-textarea {
  resize: vertical;
  min-height: 60px;
}

.cal-type-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cal-type-option {
  flex: 1;
  min-width: 70px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1.5px solid var(--purta-border);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--purta-text-muted);
  background: var(--purta-card-bg);
}

.cal-type-option:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.cal-type-option.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.cal-modal-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--purta-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Current Time Line ── */
.cal-time-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
  z-index: 5;
  pointer-events: none;
}

.cal-time-now-dot {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 0 3px var(--inverse-color);
}

/* ── Stats Strip (Day/Week) ── */
.cal-stats-strip {
  display: flex;
  gap: 8px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--purta-border);
  background: var(--light-color);
  flex-shrink: 0;
  overflow-x: auto;
}

.cal-stat-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--purta-card-bg);
  border: 1px solid var(--purta-border);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--purta-text-main);
  white-space: nowrap;
  flex-shrink: 0;
}

.cal-stat-chip i {
  color: var(--primary-color);
  font-size: 11px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .cal-mini-sidebar {
    display: none;
  }

  .cal-month-cell {
    min-height: 55px;
  }
}