/* Aviveil Calendar Redesign Styles
 * Minimal, practical, dark-first Apple Calendar style
 * Follows exact design tokens and component specs
 */

/* Top bar with h2, tabs, and action buttons */
.cal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cal-top-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cal-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cal-top-actions button {
  min-height: 44px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Green count chip for pending leave requests */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--g);
  color: #16171b;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
  line-height: 1.2;
}

/* Calendar Card Container (Section 2.2: --p, 1px --ln, radius 14, overflow hidden) */
.cal-card,
.cal-container {
  background: var(--p);
  border: 1px solid var(--ln);
  border-radius: 14px;
  overflow: hidden;
  box-sizing: border-box;
}

/* Calendar Header (padding 14px 16px, bottom border, space-between, wrap) */
.cal-header,
.cal-controls {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ln);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}

.cal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Date Badge (44px wide, 1px --ln, radius 8; top strip = month abbr 9px uppercase --mu on --p2; below = day number 16px weight 500) */
.cal-date-badge {
  width: 44px;
  border: 1px solid var(--ln);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: var(--p);
  user-select: none;
}

.cal-date-badge-top {
  background: var(--p2);
  color: var(--mu);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 0;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

.cal-date-badge-num {
  font-size: 16px;
  font-weight: 500;
  color: var(--tx);
  padding: 2px 0 3px;
  line-height: 1.2;
}

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

.cal-header-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--tx);
  line-height: 1.3;
}

.cal-header-subtitle {
  font-size: 12px;
  color: var(--mu);
  line-height: 1.3;
  margin-top: 2px;
}

.cal-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Nav & View segmented controls */
.cal-seg-group {
  display: inline-flex;
  background: var(--p);
  border: 1px solid var(--ln);
  border-radius: 8px;
  overflow: hidden;
  padding: 2px;
  gap: 2px;
}

.cal-seg-btn {
  background: transparent;
  color: var(--mu);
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cal-seg-btn:hover {
  color: var(--tx);
}

.cal-seg-btn.active,
.cal-seg-btn.on {
  background: var(--p2);
  color: var(--tx);
}

/* Layers Row (padding 10px 16px, bottom border, 13px, muted label, checkboxes with accent --a) */
.cal-layers-row,
.cal-layers-bar {
  padding: 10px 16px;
  border-bottom: 1px solid var(--ln);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: transparent;
  margin: 0;
  border-radius: 0;
}

.cal-layers-label {
  color: var(--mu);
  font-size: 13px;
}

.cal-layer-check,
.cal-layer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--tx);
  cursor: pointer;
  user-select: none;
}

.cal-layer-check input[type="checkbox"],
.cal-layer-chip input[type="checkbox"] {
  accent-color: var(--a);
  margin: 0;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.layer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.layer-dot.dot-event { background: #8fb8e8; }
.layer-dot.dot-wedding { background: #e6a3d1; }
.layer-dot.dot-leave { background: #9a9eab; }
.layer-dot.dot-task { background: var(--b); }

/* Weekday header row (7 columns, Monday first, 12px, --mu, centred, background --p2, bottom border) */
.cal-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--p2);
  border-bottom: 1px solid var(--ln);
}

.cal-weekday-cell {
  font-size: 12px;
  color: var(--mu);
  text-align: center;
  padding: 8px 4px;
  user-select: none;
  font-weight: 500;
}

.day-full {
  display: inline;
}

.day-short {
  display: none;
}

/* Month Grid (7 columns, Monday first) */
.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--p);
}

.cal-day-cell {
  min-height: 112px;
  padding: 6px;
  border-right: 1px solid var(--ln);
  border-bottom: 1px solid var(--ln);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.12s;
  position: relative;
  overflow: hidden;
}

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

.cal-day-cell:hover {
  background: var(--p2);
}

.cal-day-cell.selected {
  background: var(--p2);
}

.cal-day-cell.other-month {
  background: #0000001f;
}

[data-theme="light"] .cal-day-cell.other-month {
  background: rgba(0, 0, 0, 0.03);
}

.cal-day-cell.other-month .cal-day-num {
  opacity: 0.45;
}

.cal-day-num {
  font-size: 12px;
  color: var(--mu);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 2px;
  flex-shrink: 0;
  line-height: 1;
}

/* Today: circle filled --tx, number --bg, weight 600 */
.cal-day-cell.is-today .cal-day-num {
  background: var(--tx);
  color: var(--bg);
  font-weight: 600;
}

/* Chips in cells (up to 3 chips, single line ellipsis, time on right opacity .7 no shrink) */
.cal-cell-chips,
.cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow: hidden;
}

.cal-chip,
.cal-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  line-height: 1.35;
  padding: 2px 6px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  text-decoration: none;
  user-select: none;
  box-shadow: none;
}

.cal-chip-title,
.cal-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.cal-chip-time {
  opacity: 0.7;
  flex-shrink: 0;
  font-size: 10px;
}

/* Pending leave chip: dashed border, no background fill */
.cal-chip.is-dashed,
.cal-pill.is-dashed,
.cal-pill-dashed {
  background: transparent !important;
  border: 1px dashed color-mix(in srgb, #9a9eab 60%, transparent) !important;
  color: color-mix(in srgb, #9a9eab 75%, var(--tx)) !important;
}

.cal-more-items {
  font-size: 11px;
  color: var(--mu);
  padding-left: 4px;
  cursor: pointer;
  user-select: none;
  line-height: 1.3;
}

.cal-more-items:hover {
  color: var(--tx);
}

.cal-cell-dots {
  display: none;
}

/* Week View (same grid, one row, min-height 240px, all chips shown) */
.cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--p);
}

.cal-week-cell,
.cal-week-col {
  min-height: 240px;
  padding: 8px;
  border-right: 1px solid var(--ln);
  border-bottom: 1px solid var(--ln);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  box-sizing: border-box;
  border-radius: 0;
  background: var(--p);
}

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

.cal-week-cell:hover,
.cal-week-col:hover,
.cal-week-cell.selected {
  background: var(--p2);
}

.cal-week-cell {
  min-width: 0;
  overflow: hidden;
}

.cal-week-cell.is-today .cal-day-num,
.cal-week-col.is-today .cal-day-num {
  background: var(--tx);
  color: var(--bg);
  font-weight: 600;
}

/* Day View Timeline */
.cal-day-view-container {
  padding: 16px;
  padding-bottom: 24px;
  min-width: 0;
  box-sizing: border-box;
}

.tl-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tl-s {
  font-size: 13px;
  color: var(--mu);
  min-width: 0;
}

.tl-h button.pr {
  min-height: 44px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
}

.tl-ad {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.3;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  user-select: none;
}

.tl-chip-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-chip-meta {
  opacity: 0.72;
  font-size: 11px;
  flex-shrink: 0;
}

.tl-chip.is-dashed {
  background: transparent !important;
  border: 1px dashed color-mix(in srgb, #9a9eab 60%, transparent) !important;
  color: color-mix(in srgb, #9a9eab 75%, var(--tx)) !important;
}

.tl {
  position: relative;
  margin-left: 46px;
  margin-top: 6px;
  border-bottom: 1px solid var(--ln);
  box-sizing: border-box;
}

.tl-r {
  height: 46px;
  border-top: 1px solid var(--ln);
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.12s;
}

.tl-r:hover {
  background: var(--p2);
}

.tl-r span {
  position: absolute;
  left: -46px;
  top: -7px;
  width: 40px;
  text-align: right;
  font-size: 11px;
  line-height: 1;
  color: var(--mu);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  user-select: none;
}

.tl-e {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--p2);
  background: color-mix(in srgb, var(--c) 18%, var(--p2));
  border-left: 3px solid var(--c);
  color: var(--tx);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  user-select: none;
  transition: filter 0.12s;
}

.tl-e:hover {
  filter: brightness(1.06);
}

.tl-e b {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-e em {
  font-style: normal;
  font-size: 11px;
  line-height: 1.25;
  color: var(--mu);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-e.sm {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
}

.tl-e.sm b {
  font-size: 12px;
  flex: 1;
  min-width: 0;
}

.tl-e.sm em {
  flex-shrink: 0;
  font-size: 10.5px;
}

.tl-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--r);
  z-index: 3;
  pointer-events: none;
}

.tl-now::before {
  content: '';
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--r);
}

.cal-list-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--mu);
  font-size: 13px;
}

/* Glass Modal Overlay & Panel (Section 2.3 & 2.4: 380px max, 24px radius, blur 30px, shadow 0 24px 60px) */
.cal-modal-overlay {
  position: fixed;
  inset: 0;
  background: #000a;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 2000;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

.cal-glass-panel {
  width: 100%;
  max-width: 380px;
  max-height: calc(92vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(92dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(40, 42, 48, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 24px 60px #000a;
  box-sizing: border-box;
}

[data-theme="light"] .cal-glass-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
}

.cal-glass-cell {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

[data-theme="light"] .cal-glass-cell {
  background: rgba(0, 0, 0, 0.04);
}

.cal-glass-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--tx);
  font-size: 15px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.cal-glass-input::placeholder {
  color: var(--mu);
}

/* Event Title + Date Block with 4px left bar */
.cal-event-title-date-block {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}

.cal-event-color-bar-left {
  width: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.cal-event-title-date-cells {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.cal-event-title-cell {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 10px 14px;
}

[data-theme="light"] .cal-event-title-cell {
  background: rgba(0, 0, 0, 0.04);
}

.cal-event-title-input {
  width: 100%;
  font-size: 20px;
  font-weight: 500;
  background: transparent;
  border: none;
  outline: none;
  color: var(--tx);
  padding: 0;
}

.cal-event-title-input::placeholder {
  color: var(--mu);
}

.cal-date-rows-cell {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 4px 14px;
}

[data-theme="light"] .cal-date-rows-cell {
  background: rgba(0, 0, 0, 0.04);
}

.cal-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

[data-theme="light"] .cal-modal-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cal-modal-row:last-child {
  border-bottom: none;
}

.cal-modal-row label {
  color: var(--tx);
  margin: 0;
  font-size: 14px;
}

.cal-modal-row-control {
  background: transparent;
  border: none;
  outline: none;
  color: var(--tx);
  font-size: 14px;
  text-align: right;
  cursor: pointer;
}

.cal-modal-row-control input[type="checkbox"] {
  accent-color: var(--a);
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.cal-modal-row-control select {
  background: transparent;
  border: none;
  color: var(--tx);
  outline: none;
  font-size: 14px;
  padding: 0;
  cursor: pointer;
  text-align: right;
}

.cal-modal-row-control input[type="date"],
.cal-modal-row-control input[type="datetime-local"] {
  background: transparent;
  border: none;
  color: var(--tx);
  outline: none;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-align: right;
  padding: 0;
}

.cal-modal-row-dt {
  gap: 6px 10px;
  flex-wrap: wrap;
}

.cl-dt {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.cl-dt input[type="date"],
.cl-dt input[type="time"] {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ln);
  border-radius: 6px;
  color: var(--tx);
  font-size: 13px;
  font-family: inherit;
  padding: 4px 6px;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
  box-sizing: border-box;
  outline: none;
}

[data-theme="light"] .cl-dt input[type="date"],
[data-theme="light"] .cl-dt input[type="time"] {
  background: rgba(0, 0, 0, 0.04);
}

.cal-modal-row-du {
  gap: 8px;
  flex-wrap: wrap;
}

.cl-du {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}

.cl-du button {
  background: transparent;
  border: 1px solid var(--ln);
  border-radius: 6px;
  color: var(--mu);
  font-size: 12px;
  padding: 4px 8px;
  min-height: 28px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.cl-du button:hover {
  color: var(--tx);
  border-color: var(--mu);
}

.cl-du button.on {
  background: var(--a);
  border-color: var(--a);
  color: #241d2e;
  font-weight: 500;
}

[data-theme="light"] .cl-du button.on {
  color: #ffffff;
}

/* Invitees */
.cal-invitees-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.cal-invitee-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 3px 8px 3px 4px;
  font-size: 13px;
  color: var(--tx);
}

[data-theme="light"] .cal-invitee-pill {
  background: rgba(0, 0, 0, 0.06);
}

.cal-invitee-remove {
  background: transparent;
  border: none;
  color: var(--mu);
  font-size: 15px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.cal-invitee-remove:hover {
  color: var(--r);
}

/* 8 Palette Swatches (Section 0.3 & 2.3: 26x26 circles, 9px gap, double ring on selected) */
.cal-swatches-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.cal-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: transform 0.1s, box-shadow 0.1s;
}

.cal-swatch:hover {
  transform: scale(1.1);
}

.cal-swatch.selected {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--swatch-color);
}

/* Glass Modal Textarea */
.cal-glass-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--tx);
  font-size: 14px;
  resize: none;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.4;
  padding: 0;
  margin: 0;
}

.cal-glass-textarea::placeholder {
  color: var(--mu);
}

/* Modal Footer */
.cal-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.cal-modal-footer button {
  min-height: 44px;
  padding: 8px 16px;
  box-sizing: border-box;
}

.cal-modal-footer .cal-btn-delete {
  margin-right: auto;
  color: var(--r);
  border: 1px solid var(--ln);
  background: transparent;
  border-radius: 8px;
  padding: 8px 14px;
  min-height: 44px;
}

.cal-modal-footer .cal-btn-delete:hover {
  background: rgba(234, 181, 192, 0.15);
}

/* Leave Requests Tab */
.leave-requests-header {
  padding: 16px;
  border-bottom: 1px solid var(--ln);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.leave-request-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ln);
}

.leave-req-bar {
  width: 3px;
  align-self: stretch;
  background: #9a9eab;
  border-radius: 2px;
  flex-shrink: 0;
}

.leave-req-avatar {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.leave-req-info {
  flex: 1;
  min-width: 0;
}

.leave-req-user {
  font-size: 14px;
  font-weight: 500;
  color: var(--tx);
}

.leave-req-meta {
  font-size: 12px;
  color: var(--mu);
  margin-top: 2px;
}

.leave-req-why {
  font-size: 13px;
  color: var(--tx);
  margin-top: 4px;
  line-height: 1.4;
}

.leave-req-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.leave-req-actions button {
  min-height: 44px;
  padding: 8px 14px;
  box-sizing: border-box;
}

/* Leave History Table */
.leave-history-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ln);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.leave-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.leave-history-table th {
  background: var(--p2);
  color: var(--mu);
  font-weight: 400;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
}

.leave-history-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--ln);
  color: var(--tx);
}

.leave-status-pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.leave-status-pill.pending,
.status-badge.pending {
  border: 1px solid var(--y);
  color: var(--y);
  background: transparent;
}

.leave-status-pill.approved,
.status-badge.approved {
  border: 1px solid var(--g);
  color: var(--g);
  background: transparent;
}

.leave-status-pill.rejected,
.status-badge.declined {
  border: 1px solid var(--r);
  color: var(--r);
  background: transparent;
}

.cal-cancel-btn {
  background: transparent;
  border: none;
  color: var(--r);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  text-decoration: underline;
}

/* Approvers Modal */
.cal-approver-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .cal-approver-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cal-approver-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Responsive Breakpoint (<= 820px per spec) */
@media (max-width: 820px) {
  .cal-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .cal-top-left {
    justify-content: space-between;
    width: 100%;
  }
  .cal-top-actions {
    width: 100%;
  }
  .cal-top-actions button {
    flex: 1;
    min-height: 44px;
    justify-content: center;
  }
  .cal-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .cal-header-left {
    width: 100%;
  }
  .cal-header-right {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }
  .cal-seg-group {
    flex: 1;
    display: flex;
    justify-content: center;
  }
  .cal-seg-btn {
    flex: 1;
    min-height: 40px;
    padding: 6px 4px;
    text-align: center;
    justify-content: center;
  }
  .day-full {
    display: none;
  }
  .day-short {
    display: inline;
  }
  .cal-day-cell {
    min-height: 54px;
    padding: 4px;
    align-items: center;
  }
  .cal-day-num {
    margin-bottom: 0;
  }
  .cal-cell-chips {
    display: none;
  }
  .cal-cell-dots {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 4px;
    flex-wrap: wrap;
  }
  .cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .cal-week-cell .cal-cell-chips {
    display: flex;
  }
  .cal-day-view-container {
    padding: 12px;
    padding-bottom: 24px;
  }
  .tl {
    margin-left: 42px;
  }
  .tl-r span {
    left: -44px;
    width: 38px;
    font-size: 10.5px;
  }
  .tl-chip {
    min-height: 44px;
  }
  .cl-dt input[type="date"],
  .cl-dt input[type="time"] {
    min-height: 44px;
    padding: 6px 8px;
  }
  .cl-du button {
    min-width: 44px;
    min-height: 44px;
    padding: 6px 10px;
  }
}
