/* ── Export Share Modal ─────────────────────────────────────────────────────── */
#export-modal {
  display: none;
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
  padding: 20px;
}
#export-modal.open { display: flex; }

.exp-box {
  background: linear-gradient(160deg, #1a1d24, #13151b);
  border: 1px solid rgba(155,143,255,0.2);
  border-radius: 28px;
  padding: 28px 24px;
  width: 100%; max-width: 420px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
}

.exp-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.exp-header-text { flex: 1; }
.exp-header-title {
  font-family: var(--font2); font-size: 18px; font-weight: 700; color: #fff;
}
.exp-header-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.exp-close-btn {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7); width: 32px; height: 32px; border-radius: 50%;
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.2s;
}
.exp-close-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }

.exp-cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.exp-cal-nav-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.exp-cal-nav-btn:hover { background: rgba(255,255,255,0.12); }
.exp-month-label { font-weight: 700; color: #fff; font-size: 15px; }

.exp-day-labels {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; margin-bottom: 4px;
}
.exp-day-label {
  text-align: center; font-size: 11px; font-weight: 700;
  color: #9B8FFF; padding: 4px 0;
}

#exp-grid {
  display: grid; grid-template-columns: repeat(7,1fr);
  gap: 2px; margin-bottom: 14px;
}
.exp-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 13px; cursor: pointer;
  transition: background 0.15s; user-select: none;
}
.exp-day.future { opacity: 0.25; cursor: default; pointer-events: none; }
.exp-day.today { border: 1px solid rgba(155,143,255,0.5); color: #9B8FFF; font-weight: 700; }
.exp-day.selected { background: #9B8FFF; color: #fff; font-weight: 700; border: none; }
.exp-day.in-range { background: rgba(155,143,255,0.2); }
.exp-day:not(.future):not(.selected):hover { background: rgba(155,143,255,0.15); }

#exp-hint {
  text-align: center; font-size: 13px; font-weight: 600;
  color: #9B8FFF; margin-bottom: 14px; min-height: 20px;
}

#exp-result {
  background: rgba(155,143,255,0.08);
  border: 1px solid rgba(155,143,255,0.25);
  border-radius: 14px; padding: 14px; margin-bottom: 14px;
}
.exp-result-label { font-size: 13px; font-weight: 700; color: #00C896; margin-bottom: 8px; }
#exp-url {
  font-size: 12px; color: #9B8FFF; word-break: break-all; margin-bottom: 10px;
}
.exp-result-btns { display: flex; gap: 8px; }
.exp-copy-btn {
  flex: 1; padding: 9px; background: transparent;
  border: 1px solid rgba(155,143,255,0.4); color: #9B8FFF;
  border-radius: 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background 0.2s;
}
.exp-copy-btn:hover { background: rgba(155,143,255,0.1); }
.exp-share-btn {
  flex: 1; padding: 9px; background: #9B8FFF; border: none; color: #fff;
  border-radius: 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background 0.2s;
}
.exp-share-btn:hover { background: #8070ee; }

#exp-error { color: #ef4444; font-size: 13px; margin-bottom: 10px; }

.exp-actions { display: flex; gap: 8px; }
.exp-cancel-btn {
  flex: 1; height: 44px; background: transparent;
  border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.7);
  border-radius: 14px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: border-color 0.2s;
}
.exp-cancel-btn:hover { border-color: rgba(255,255,255,0.25); }
.exp-create-btn {
  flex: 1; height: 44px; background: #9B8FFF; border: none; color: #fff;
  border-radius: 14px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background 0.2s;
}
.exp-create-btn:hover { background: #8070ee; }
.exp-create-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Export button in history header */
#history-export-btn {
  display: none;
  align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(155,143,255,0.15), rgba(155,143,255,0.08));
  border: 1px solid rgba(155,143,255,0.35); color: #9B8FFF;
  border-radius: 10px; padding: 8px 12px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all 0.2s; white-space: nowrap;
  flex-shrink: 0;
}
#history-export-btn:hover {
  background: rgba(155,143,255,0.2); border-color: rgba(155,143,255,0.55);
}

/* Force history header to always be single row — override inline flex-wrap */
#tab-history > div:first-child {
  flex-wrap: nowrap !important;
  align-items: center !important;
}
#tab-history > div:first-child > div {
  min-width: 0;
  flex: 1;
}
#tab-history > div:first-child > div h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
