:root {
  color-scheme: dark;
  --bg: #120f1e;
  --bg-secondary: #1d1731;
  --panel-border: rgba(255, 255, 255, 0.18);
  --text: #f6f2ff;
  --muted: #b9b1d7;
  --accent: #9b8cff;
  --accent-soft: rgba(155, 140, 255, 0.22);
  --danger: #ff8ba7;
  --shadow: 0 28px 80px rgba(9, 7, 18, 0.45);
  --blur: blur(24px);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --success: #79e3b0;
  --success-soft: rgba(121, 227, 176, 0.22);
  --warn: #ffc87c;
  --warn-soft: rgba(255, 200, 124, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(120, 100, 255, 0.25), transparent 36%),
    radial-gradient(circle at 85% 15%, rgba(109, 162, 255, 0.16), transparent 24%),
    linear-gradient(145deg, var(--bg), var(--bg-secondary));
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

/* ═══════ TAB BAR ═══════ */

.tab-bar {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  margin-bottom: 24px;
  width: fit-content;
}

.tab-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 260ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.tab-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(158, 146, 255, 0.92), rgba(115, 102, 232, 0.92));
  opacity: 0;
  transition: opacity 260ms ease;
}

.tab-button.active {
  color: var(--text);
}

.tab-button.active::before {
  opacity: 1;
}

.tab-button:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.tab-button span {
  position: relative;
  z-index: 1;
}

.tab-icon {
  font-size: 1.1rem;
}

.tab-content {
  display: none;
  animation: tabFadeIn 300ms ease;
  padding-bottom: 100px;
}

.tab-content.active {
  display: block;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════ PAGE SHELL ═══════ */

.page-shell {
  position: relative;
  padding: 32px;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.45;
  pointer-events: none;
}

.ambient-left {
  width: 300px;
  height: 300px;
  background: rgba(148, 130, 255, 0.24);
  top: 80px;
  left: -60px;
}

.ambient-right {
  width: 380px;
  height: 380px;
  background: rgba(95, 158, 255, 0.18);
  right: -90px;
  bottom: 90px;
}

.glass-panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

/* ═══════ HERO ═══════ */

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
}

.hero h1,
.section-header h2 {
  margin: 0;
  font-weight: 600;
}

.hero-copy {
  margin: 10px 0 0;
  max-width: 540px;
  color: var(--muted);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

/* ═══════ BUTTONS ═══════ */

.primary-button,
.secondary-button,
.icon-button,
.action-button {
  border-radius: 999px;
  padding: 12px 18px;
  transition: transform 160ms ease, background 160ms ease;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.action-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  color: var(--text);
  background: linear-gradient(135deg, rgba(158, 146, 255, 0.92), rgba(115, 102, 232, 0.92));
}

.secondary-button,
.icon-button,
.action-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.full-width {
  width: 100%;
}

/* ═══════ PLANNER DASHBOARD ═══════ */

.dashboard {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.todo-panel,
.archive-panel,
.calendar-panel {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.todo-panel,
.calendar-panel {
  min-height: 420px;
}

.archive-panel {
  grid-column: 1;
}

.calendar-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.todo-list,
.archive-list {
  display: grid;
  gap: 12px;
}

.todo-card {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.todo-summary,
.todo-title-row,
.progress-header,
.modal-header,
.calendar-controls,
.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.todo-summary {
  align-items: center;
}

.todo-summary-main {
  min-width: 0;
  flex: 1 1 auto;
}

.todo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.todo-title {
  margin: 0;
  font-size: 1.05rem;
}

.todo-meta,
.todo-note,
.empty-state,
.progress-note time {
  color: var(--muted);
}

.todo-meta {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.todo-note {
  margin: 0;
  line-height: 1.5;
}

.importance-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.importance-high {
  background: rgba(255, 117, 153, 0.26);
  border-color: rgba(255, 170, 193, 0.34);
  color: #ffd9e3;
}

.importance-medium {
  background: rgba(155, 140, 255, 0.26);
  border-color: rgba(190, 179, 255, 0.3);
  color: #efeaff;
}

.importance-low {
  background: rgba(121, 227, 176, 0.2);
  border-color: rgba(176, 255, 218, 0.28);
  color: #d8ffef;
}

.details-button {
  color: #e9e4ff;
}

.todo-card .action-button {
  padding: 10px 14px;
}

.todo-details {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-area {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-form {
  display: grid;
  gap: 14px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stack-form span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

/* ═══════ FORM INPUTS / SELECTS ═══════ */

input,
textarea,
select {
  width: 100%;
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(182, 171, 255, 0.76);
  box-shadow: 0 0 0 4px rgba(155, 140, 255, 0.12);
}

select option {
  color: #221b35;
  background: #f4efff;
}

.progress-notes {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.progress-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.progress-note p {
  margin: 0 0 8px;
}

/* ═══════ CALENDAR / AGENDA ═══════ */

.calendar-toolbar {
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.calendar-toolbar input[type="date"] {
  width: auto;
  min-width: 200px;
}

.agenda-shell {
  position: relative;
}

.agenda-scroll {
  max-height: 780px;
  overflow-y: auto;
  padding-right: 8px;
}

.agenda-timeline {
  position: relative;
  min-height: 1920px;
}

.agenda-row {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  min-height: 80px;
}

.agenda-hour {
  padding-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.agenda-slot {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  margin-left: 12px;
  cursor: pointer;
  background: transparent;
}

.agenda-slot:hover {
  background: rgba(255, 255, 255, 0.04);
}

.agenda-slot-half {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px dashed rgba(255, 255, 255, 0.07);
}

.agenda-events-layer {
  position: absolute;
  top: 0;
  left: 90px;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.agenda-event-card,
.agenda-deadline-card {
  position: absolute;
  left: 16px;
  right: 12px;
  border-radius: 16px;
  padding: 10px 12px;
  color: var(--text);
  overflow: hidden;
  pointer-events: auto;
}

.agenda-event-card {
  background: rgba(143, 124, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.agenda-deadline-card {
  background: rgba(255, 139, 167, 0.16);
  border: 1px solid rgba(255, 184, 200, 0.14);
}

.agenda-event-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.agenda-event-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.agenda-event-time,
.agenda-event-description {
  margin: 6px 0 0;
  color: rgba(246, 242, 255, 0.82);
  font-size: 0.82rem;
  line-height: 1.35;
}

.agenda-delete-button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 999px;
  padding: 0;
  color: var(--text);
  background: rgba(14, 12, 24, 0.28);
}

.agenda-selection-preview {
  position: absolute;
  left: 16px;
  right: 12px;
  border-radius: 16px;
  background: rgba(155, 140, 255, 0.18);
  border: 1px solid rgba(199, 189, 255, 0.42);
  pointer-events: none;
}

/* ═══════ MODALS ═══════ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 6, 12, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.modal-card {
  width: min(560px, 100%);
  max-height: min(92vh, 900px);
  padding: 20px;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

.close-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.modal-header {
  flex: 0 0 auto;
}

.stack-form {
  min-height: 0;
  flex: 1 1 auto;
}

.modal-form-body {
  overflow-y: auto;
  min-height: 0;
  padding-right: 6px;
  display: grid;
  gap: 14px;
}

.modal-form-footer {
  position: sticky;
  bottom: 0;
  padding-top: 14px;
  background: linear-gradient(180deg, rgba(30, 25, 47, 0), rgba(30, 25, 47, 0.92) 35%);
}

.empty-state {
  padding: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
}

/* ═══════ HABITS DASHBOARD ═══════ */

.habits-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.habits-overview-panel,
.habits-grid-panel,
.habits-streaks-panel {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.habits-overview-panel {
  grid-column: 1 / -1;
}

.habits-grid-panel {
  grid-column: 1 / -1;
}

.habits-streaks-panel {
  grid-column: 1 / -1;
}

/* Stats cards row */
.habits-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  transition: transform 200ms ease, border-color 200ms ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(155, 140, 255, 0.3);
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #c9bfff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.88rem;
}

/* 7-day habit grid */
.habits-grid {
  display: grid;
  gap: 14px;
}

.habit-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 200ms ease;
}

.habit-row:hover {
  border-color: rgba(155, 140, 255, 0.22);
}

.habit-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.habit-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  flex-shrink: 0;
}

.habit-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.habit-freq {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.habit-days {
  display: flex;
  gap: 8px;
}

.habit-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.habit-day-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.habit-day-cell {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  position: relative;
  overflow: hidden;
}

.habit-day-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 200ms ease;
}

.habit-day-cell:hover {
  border-color: rgba(155, 140, 255, 0.4);
  transform: scale(1.08);
}

.habit-day-cell.checked {
  border-color: transparent;
}

.habit-day-cell.checked::before {
  opacity: 1;
}

.habit-day-cell.checked::after {
  content: "✓";
  position: relative;
  z-index: 1;
  font-weight: 700;
  color: #fff;
  font-size: 0.88rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.habit-day-cell.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(155, 140, 255, 0.15);
}

.habit-delete-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 999px;
  padding: 0;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.habit-delete-btn:hover {
  color: var(--danger);
  background: rgba(255, 139, 167, 0.12);
  border-color: rgba(255, 139, 167, 0.2);
}

/* Streaks */
.habits-streaks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.streak-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 200ms ease, border-color 200ms ease;
}

.streak-card:hover {
  transform: translateY(-2px);
  border-color: rgba(155, 140, 255, 0.22);
}

.streak-icon {
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  flex-shrink: 0;
}

.streak-info {
  min-width: 0;
}

.streak-name {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.streak-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.streak-value.fire {
  background: linear-gradient(135deg, #ff8f5e, #ffc75e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.streak-value.cold {
  color: var(--muted);
}

.streak-days {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}

/* ═══════ NOTES DASHBOARD ═══════ */

.notes-dashboard {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

.notes-sidebar {
  border-radius: var(--radius-xl);
  padding: 24px;
  position: sticky;
  top: 32px;
  align-self: flex-start;
}

.notes-main-panel {
  border-radius: var(--radius-xl);
  padding: 24px;
  min-height: 420px;
}

.categories-list {
  display: grid;
  gap: 4px;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.category-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.category-item.active {
  background: rgba(155, 140, 255, 0.15);
  color: var(--text);
  border-color: rgba(155, 140, 255, 0.25);
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.category-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-count {
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.category-delete-btn {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: none;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 200ms ease;
}

.category-item:hover .category-delete-btn {
  opacity: 1;
}

.category-delete-btn:hover {
  color: var(--danger);
  background: rgba(255, 139, 167, 0.12);
}

/* Notes grid */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.note-card {
  padding: 0;
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  display: flex;
  flex-direction: column;
}

.note-card:hover {
  transform: translateY(-3px);
  border-color: rgba(155, 140, 255, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.note-card-color-bar {
  height: 5px;
  width: 100%;
  flex-shrink: 0;
}

.note-card-body {
  padding: 18px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.note-card-content {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}

.note-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.note-card-category {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

.note-card-date {
  font-size: 0.78rem;
  color: var(--muted);
}

.note-card-footer {
  display: flex;
  gap: 6px;
  padding: 0 16px 14px;
}

.note-action-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  transition: all 180ms ease;
}

.note-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  transform: translateY(-1px);
}

.note-action-btn.note-edit-btn:hover {
  background: rgba(155, 140, 255, 0.15);
  border-color: rgba(155, 140, 255, 0.3);
  color: var(--accent);
}

.note-action-btn.note-move-btn:hover {
  background: rgba(121, 227, 176, 0.12);
  border-color: rgba(121, 227, 176, 0.25);
  color: var(--success);
}

.note-action-btn.note-delete-btn:hover {
  background: rgba(255, 139, 167, 0.12);
  border-color: rgba(255, 139, 167, 0.25);
  color: var(--danger);
}

/* Move dropdown */
.note-move-dropdown {
  position: relative;
}

.note-move-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 6px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(30, 25, 50, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  z-index: 10;
  display: grid;
  gap: 2px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.note-move-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  text-align: left;
  transition: background 160ms ease;
  border: none;
}

.note-move-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.note-move-option .category-dot {
  width: 8px;
  height: 8px;
}

.danger-button {
  color: var(--danger);
}

/* ═══════ TIMER DASHBOARD ═══════ */

.timer-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.timer-display-panel,
.timer-queue-panel {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.timer-display-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 420px;
  position: relative;
  overflow: hidden;
}

/* When timer is embedded in dashboard, reduce size */
.dash-timer-panel .timer-display-panel {
  min-height: auto;
  padding: 24px;
  overflow: visible;
}

.dash-timer-panel .timer-countdown {
  font-size: 3.5rem;
}

.timer-countdown {
  font-size: 5.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
  line-height: 1;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 2;
  transition: transform 200ms ease;
}

.timer-countdown.pulse {
  animation: timerPulse 600ms ease;
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.timer-cycle-label {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
  position: relative;
  z-index: 2;
}

.timer-cycle-indicator {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.timer-cycle-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 300ms ease;
}

.timer-cycle-dot.done {
  background: var(--success);
  border-color: var(--success);
  box-shadow: 0 0 8px rgba(121, 227, 176, 0.35);
}

.timer-cycle-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(155, 140, 255, 0.5);
  transform: scale(1.3);
}

.timer-controls {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 5;
}

.timer-control-btn {
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.timer-control-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

.timer-start-btn {
  background: linear-gradient(135deg, rgba(121, 227, 176, 0.85), rgba(90, 200, 150, 0.85));
  color: #0d1f17;
}

.timer-start-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(121, 227, 176, 0.3);
}

.timer-pause-btn {
  background: rgba(255, 200, 124, 0.2);
  color: var(--warn);
  border: 1px solid rgba(255, 200, 124, 0.25);
}

.timer-pause-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(255, 200, 124, 0.3);
}

.timer-reset-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.timer-reset-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

/* Progress ring */
.timer-progress-ring {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
  opacity: 0.2;
}

.timer-progress-ring svg {
  width: 320px;
  height: 320px;
}

.timer-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 4;
}

.timer-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 1s linear;
}

/* Queue panel */
.timer-queue-panel {
  display: flex;
  flex-direction: column;
}

.timer-queue-list {
  display: grid;
  gap: 8px;
  flex: 1;
  margin-bottom: 16px;
  overflow-y: auto;
  max-height: 300px;
}

.timer-queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 200ms ease;
}

.timer-queue-item:hover {
  border-color: rgba(155, 140, 255, 0.22);
}

.timer-queue-item.active {
  border-color: var(--accent);
  background: rgba(155, 140, 255, 0.08);
}

.timer-queue-item.done {
  opacity: 0.45;
}

.timer-queue-item.done .timer-queue-item-label {
  text-decoration: line-through;
}

.timer-queue-number {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.timer-queue-item.active .timer-queue-number {
  background: var(--accent);
  color: #120f1e;
}

.timer-queue-item.done .timer-queue-number {
  background: rgba(121, 227, 176, 0.2);
  color: var(--success);
}

.timer-queue-item-label {
  flex: 1;
  font-weight: 500;
  font-size: 0.95rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-queue-item-duration {
  font-size: 0.88rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.timer-queue-item-delete {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 999px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 200ms ease;
}

.timer-queue-item:hover .timer-queue-item-delete {
  opacity: 1;
}

.timer-queue-item-delete:hover {
  color: var(--danger);
  background: rgba(255, 139, 167, 0.12);
}

/* Queue actions */
.timer-queue-actions {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.timer-add-row {
  display: flex;
  gap: 8px;
}

.timer-minutes-input {
  width: 80px !important;
  flex: 0 0 80px;
  text-align: center;
}

.timer-label-input {
  flex: 1;
}

.timer-add-btn {
  padding: 12px 20px;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.timer-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.timer-preset-btn {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  transition: all 180ms ease;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.timer-preset-btn:hover {
  background: rgba(155, 140, 255, 0.12);
  border-color: rgba(155, 140, 255, 0.25);
  color: var(--text);
  transform: translateY(-1px);
}

/* Flash animation on cycle complete */
.timer-display-panel.flash {
  animation: timerFlash 800ms ease;
}

@keyframes timerFlash {
  0% { box-shadow: inset 0 0 0 0 rgba(155, 140, 255, 0); }
  50% { box-shadow: inset 0 0 60px 10px rgba(155, 140, 255, 0.15); }
  100% { box-shadow: inset 0 0 0 0 rgba(155, 140, 255, 0); }
}

/* ═══════ QUICK ADD FAB ═══════ */

.fab-container {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 12px;
}

.fab-trigger {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(158, 146, 255, 0.95), rgba(115, 102, 232, 0.95));
  border: none;
  color: white;
  box-shadow: 0 8px 32px rgba(115, 102, 232, 0.4);
  cursor: pointer;
  transition: all 260ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.fab-trigger:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(115, 102, 232, 0.5);
}

.fab-container.open .fab-trigger {
  background: linear-gradient(135deg, rgba(255, 117, 153, 0.9), rgba(220, 80, 120, 0.9));
  box-shadow: 0 8px 32px rgba(255, 117, 153, 0.35);
}

.fab-plus {
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.fab-container.open .fab-plus {
  transform: rotate(45deg);
}

.fab-menu {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.9);
  transition: all 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-container.open .fab-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.fab-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(24, 21, 46, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.fab-action:hover {
  border-color: rgba(155, 140, 255, 0.4);
  transform: translateX(4px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.fab-action-icon {
  font-size: 1.1rem;
}

.fab-action-label {
  font-weight: 600;
  font-size: 0.88rem;
}

/* ═══════ DASHBOARD ═══════ */

.dash-streak-pill {
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 140, 60, 0.2), rgba(255, 100, 50, 0.12));
  border: 1px solid rgba(255, 160, 80, 0.3);
  color: #ffc87c;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: dashStreakGlow 2s ease-in-out infinite alternate;
}

@keyframes dashStreakGlow {
  0% { box-shadow: 0 0 8px rgba(255, 160, 80, 0.1); }
  100% { box-shadow: 0 0 20px rgba(255, 160, 80, 0.2); }
}

.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.dash-stat-card {
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  cursor: pointer;
}

.dash-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(155, 140, 255, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.dash-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(155, 140, 255, 0.2), rgba(115, 102, 232, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.dash-stat-info {
  min-width: 0;
}

.dash-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #c9bfff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.dash-stat-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dash-panel {
  border-radius: var(--radius-xl);
  padding: 24px;
  min-height: 220px;
}

.dash-goto-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  transition: all 200ms ease;
  cursor: pointer;
}

.dash-goto-btn:hover {
  background: rgba(155, 140, 255, 0.12);
  border-color: rgba(155, 140, 255, 0.25);
  color: var(--text);
  transform: translateY(-1px);
}

.dash-list {
  display: grid;
  gap: 8px;
}

.dash-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 200ms ease;
}

.dash-item:hover {
  border-color: rgba(155, 140, 255, 0.2);
}

.dash-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.dash-item-info {
  flex: 1;
  min-width: 0;
}

.dash-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-item-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.dash-item-right {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dash-item-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.dash-habit-toggle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.dash-habit-toggle:hover {
  border-color: rgba(155, 140, 255, 0.4);
}

.dash-habit-toggle.checked {
  background: rgba(121, 227, 176, 0.2);
  border-color: var(--success);
  color: var(--success);
}

/* ═══════ SPORT DASHBOARD ═══════ */

.sport-sub-nav {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  margin-bottom: 24px;
  width: fit-content;
}

.sport-sub-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 260ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.sport-sub-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(158, 146, 255, 0.92), rgba(115, 102, 232, 0.92));
  opacity: 0;
  transition: opacity 260ms ease;
}

.sport-sub-btn.active {
  color: var(--text);
}

.sport-sub-btn.active::before {
  opacity: 1;
}

.sport-sub-btn:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.sport-sub-btn span {
  position: relative;
  z-index: 1;
}

.sport-view {
  display: none;
  animation: tabFadeIn 300ms ease;
}

.sport-view.active {
  display: block;
}

/* Sessions panel */
.sport-sessions-panel,
.sport-detail-panel,
.sport-stats-filters-panel,
.sport-volume-panel,
.sport-session-volumes-panel,
.sport-exercises-catalog-panel,
.sport-progression-header-panel,
.sport-progression-history-panel {
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
}

.sport-sessions-list {
  display: grid;
  gap: 12px;
}

.sport-session-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sport-session-card:hover {
  border-color: rgba(155, 140, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.sport-session-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(155, 140, 255, 0.25), rgba(115, 102, 232, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.sport-session-info {
  flex: 1;
  min-width: 0;
}

.sport-session-name {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.sport-session-meta {
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sport-session-volume {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  white-space: nowrap;
}

.sport-session-delete {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 999px;
  padding: 0;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.sport-session-card:hover .sport-session-delete {
  opacity: 1;
}

.sport-session-delete:hover {
  color: var(--danger);
  background: rgba(255, 139, 167, 0.12);
  border-color: rgba(255, 139, 167, 0.2);
}

/* Detail view */
.sport-detail-back-row {
  margin-bottom: 16px;
}

.sport-detail-date {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 6px 0 0;
}

.sport-exercises-list {
  display: grid;
  gap: 20px;
}

.sport-exercise-block {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sport-exercise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.sport-exercise-name {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sport-exercise-delete {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 999px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 200ms ease;
}

.sport-exercise-block:hover .sport-exercise-delete {
  opacity: 1;
}

.sport-exercise-delete:hover {
  color: var(--danger);
  background: rgba(255, 139, 167, 0.12);
}

/* Sets table */
.sport-sets-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.sport-sets-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sport-sets-table td {
  padding: 10px;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.sport-sets-table tr:last-child td {
  border-bottom: none;
}

.sport-set-number {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.sport-set-delete {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 999px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: none;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 200ms ease;
}

.sport-sets-table tr:hover .sport-set-delete {
  opacity: 1;
}

.sport-set-delete:hover {
  color: var(--danger);
  background: rgba(255, 139, 167, 0.12);
}

/* PR Badge */
.sport-pr-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 200, 124, 0.25), rgba(255, 170, 80, 0.15));
  border: 1px solid rgba(255, 200, 124, 0.35);
  color: #ffd480;
  animation: prPulse 600ms ease;
}

@keyframes prPulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* Add set form */
.sport-add-set-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sport-add-set-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sport-add-set-form label span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.sport-add-set-form input {
  width: 80px;
  padding: 10px 12px;
  text-align: center;
  font-size: 0.9rem;
}

.sport-add-set-form .sport-rpe-input {
  width: 60px;
}

.sport-add-set-btn {
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  background: linear-gradient(135deg, rgba(121, 227, 176, 0.85), rgba(90, 200, 150, 0.85));
  color: #0d1f17;
  transition: all 200ms ease;
  white-space: nowrap;
  height: fit-content;
}

.sport-add-set-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(121, 227, 176, 0.25);
}

/* 1RM display in exercise block */
.sport-exercise-1rm {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.sport-exercise-1rm strong {
  color: var(--accent);
  font-weight: 700;
}

/* Stats */
.sport-period-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sport-period-btn {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  transition: all 200ms ease;
}

.sport-period-btn:hover {
  background: rgba(155, 140, 255, 0.12);
  border-color: rgba(155, 140, 255, 0.25);
  color: var(--text);
}

.sport-period-btn.active {
  background: linear-gradient(135deg, rgba(158, 146, 255, 0.92), rgba(115, 102, 232, 0.92));
  border-color: transparent;
  color: var(--text);
}

.sport-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.sport-stats-grid .stat-card {
  border-radius: var(--radius-xl);
  padding: 24px;
}

/* Volume bars */
.sport-volume-bars {
  display: grid;
  gap: 12px;
}

.sport-volume-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 12px;
  align-items: center;
}

.sport-volume-name {
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sport-volume-bar-track {
  height: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}

.sport-volume-bar-fill {
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(155, 140, 255, 0.7), rgba(115, 102, 232, 0.9));
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 4px;
}

.sport-volume-value {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 70px;
  text-align: right;
}

/* Session volumes list */
.sport-session-volumes {
  display: grid;
  gap: 10px;
}

.sport-session-vol-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sport-session-vol-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.sport-session-vol-date {
  font-size: 0.82rem;
  color: var(--muted);
}

.sport-session-vol-value {
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* Exercise catalog */
.sport-exercise-catalog {
  display: grid;
  gap: 12px;
}

.sport-catalog-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sport-catalog-card:hover {
  border-color: rgba(155, 140, 255, 0.3);
  transform: translateY(-2px);
}

.sport-catalog-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.sport-catalog-info {
  flex: 1;
  min-width: 0;
}

.sport-catalog-name {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.sport-catalog-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.sport-catalog-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.sport-catalog-1rm {
  font-size: 0.85rem;
  color: var(--muted);
}

.sport-catalog-1rm strong {
  color: var(--accent);
}

/* Level badge */
.sport-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.sport-level-badge.level-1 { background: rgba(180, 180, 180, 0.12); border-color: rgba(180, 180, 180, 0.2); }
.sport-level-badge.level-2 { background: rgba(121, 227, 176, 0.12); border-color: rgba(121, 227, 176, 0.25); color: var(--success); }
.sport-level-badge.level-3 { background: rgba(255, 140, 60, 0.12); border-color: rgba(255, 140, 60, 0.25); color: #ffaa5e; }
.sport-level-badge.level-4 { background: rgba(155, 140, 255, 0.15); border-color: rgba(155, 140, 255, 0.3); color: var(--accent); }
.sport-level-badge.level-5 { background: rgba(255, 200, 50, 0.15); border-color: rgba(255, 200, 50, 0.3); color: #ffd455; }
.sport-level-badge.level-6 { background: rgba(255, 100, 150, 0.15); border-color: rgba(255, 100, 150, 0.3); color: #ff8ab0; }
.sport-level-badge.level-7 { background: linear-gradient(135deg, rgba(100, 200, 255, 0.15), rgba(180, 120, 255, 0.15)); border-color: rgba(150, 170, 255, 0.4); color: #b0d0ff; }

/* Level display for progression view */
.sport-level-display {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.sport-xp-bar {
  width: 160px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sport-xp-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #c9bfff);
  transition: width 600ms ease;
}

.sport-xp-text {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Progression view */
.sport-progression-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.sport-progression-records {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.sport-record-card {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  min-width: 100px;
}

.sport-record-value {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #c9bfff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.sport-record-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Progression history */
.sport-progression-history {
  display: grid;
  gap: 14px;
}

.sport-history-session {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sport-history-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.sport-history-session-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.sport-history-session-date {
  font-size: 0.82rem;
  color: var(--muted);
}

.sport-history-session-volume {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

.sport-history-sets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sport-history-set {
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.sport-history-set.pr {
  background: rgba(255, 200, 124, 0.12);
  border-color: rgba(255, 200, 124, 0.25);
  color: #ffd480;
}

/* ═══════ AUTH SCREEN ═══════ */

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(120, 100, 255, 0.25), transparent 36%),
    radial-gradient(circle at 85% 15%, rgba(109, 162, 255, 0.16), transparent 24%),
    linear-gradient(145deg, var(--bg), var(--bg-secondary));
}

.auth-card {
  width: min(440px, 100%);
  padding: 40px 36px;
  border-radius: var(--radius-xl);
  text-align: center;
  animation: authFadeIn 500ms ease;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-logo {
  font-size: 3rem;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent), #c9bfff, #7cb8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: authLogoSpin 4s linear infinite;
}

@keyframes authLogoSpin {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(30deg); }
}

.auth-title {
  margin: 0 0 6px;
  font-size: 2rem;
  font-weight: 700;
}

.auth-subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  background: transparent;
  transition: all 260ms ease;
  cursor: pointer;
  border: none;
}

.auth-tab.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(158, 146, 255, 0.92), rgba(115, 102, 232, 0.92));
}

.auth-tab:hover:not(.active) {
  color: var(--text);
}

.auth-form {
  display: grid;
  gap: 16px;
  text-align: left;
}

.auth-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.auth-error {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 139, 167, 0.12);
  border: 1px solid rgba(255, 139, 167, 0.25);
  color: var(--danger);
  font-size: 0.88rem;
  text-align: center;
}

.auth-submit {
  margin-top: 4px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
}

/* ═══════ USER INDICATOR ═══════ */

.nav-spacer {
  flex: 1;
}

.user-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #120f1e;
  flex-shrink: 0;
}

.user-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms ease;
}

.logout-btn:hover {
  color: var(--danger);
  background: rgba(255, 139, 167, 0.12);
}

/* ═══════ CUSTOM SELECT ═══════ */

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: left;
}

.custom-select-trigger:hover {
  border-color: rgba(155, 140, 255, 0.4);
}

.custom-select.open .custom-select-trigger {
  border-color: rgba(182, 171, 255, 0.76);
  box-shadow: 0 0 0 4px rgba(155, 140, 255, 0.12);
}

.custom-select-arrow {
  font-size: 0.85rem;
  color: var(--muted);
  transition: transform 200ms ease;
}

.custom-select.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 6px;
  border-radius: 16px;
  background: rgba(24, 20, 44, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(155, 140, 255, 0.08);
  z-index: 50;
  display: none;
  animation: csDropIn 180ms cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 220px;
  overflow-y: auto;
}

.custom-select.open .custom-select-dropdown {
  display: block;
}

@keyframes csDropIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.custom-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text);
  transition: all 160ms ease;
}

.custom-select-option:hover {
  background: rgba(155, 140, 255, 0.12);
}

.custom-select-option.selected {
  background: rgba(155, 140, 255, 0.18);
  font-weight: 600;
}

.custom-select-option.selected::after {
  content: "✓";
  margin-left: auto;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.cs-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ═══════ SOCIAL TAB ═══════ */

.social-sub-nav {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  margin-bottom: 24px;
  width: fit-content;
}

.social-sub-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 260ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.social-sub-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(158, 146, 255, 0.92), rgba(115, 102, 232, 0.92));
  opacity: 0;
  transition: opacity 260ms ease;
}

.social-sub-btn.active {
  color: var(--text);
}

.social-sub-btn.active::before {
  opacity: 1;
}

.social-sub-btn:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.social-sub-btn span {
  position: relative;
  z-index: 1;
}

.social-view {
  display: none;
  animation: tabFadeIn 300ms ease;
}

.social-view.active {
  display: block;
}

.social-add-panel,
.social-requests-panel,
.social-friends-panel,
.social-leaderboard-panel {
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
}

.social-add-form {
  display: flex;
  gap: 10px;
}

.social-add-form input {
  flex: 1;
}

.social-add-feedback {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  text-align: center;
}

.social-add-feedback.success {
  background: rgba(121, 227, 176, 0.12);
  border: 1px solid rgba(121, 227, 176, 0.25);
  color: var(--success);
}

.social-add-feedback.error {
  background: rgba(255, 139, 167, 0.12);
  border: 1px solid rgba(255, 139, 167, 0.25);
  color: var(--danger);
}

/* Friends & requests lists */
.social-friends-list,
.social-requests-list {
  display: grid;
  gap: 10px;
}

.social-friend-card,
.social-request-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 200ms ease;
}

.social-friend-card:hover,
.social-request-card:hover {
  border-color: rgba(155, 140, 255, 0.22);
}

.social-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #120f1e;
  flex-shrink: 0;
}

.social-friend-info {
  flex: 1;
  min-width: 0;
}

.social-friend-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.social-friend-username {
  font-size: 0.82rem;
  color: var(--muted);
}

.social-friend-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.social-action-btn {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  cursor: pointer;
  transition: all 180ms ease;
}

.social-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  transform: translateY(-1px);
}

.social-action-btn.accept {
  background: rgba(121, 227, 176, 0.15);
  border-color: rgba(121, 227, 176, 0.25);
  color: var(--success);
}

.social-action-btn.accept:hover {
  background: rgba(121, 227, 176, 0.25);
}

.social-action-btn.reject {
  color: var(--danger);
}

.social-action-btn.reject:hover {
  background: rgba(255, 139, 167, 0.12);
  border-color: rgba(255, 139, 167, 0.25);
}

.social-action-btn.partner-btn {
  background: linear-gradient(135deg, rgba(155, 140, 255, 0.2), rgba(124, 184, 255, 0.15));
  border-color: rgba(155, 140, 255, 0.3);
  color: var(--accent);
}

.social-action-btn.partner-btn:hover {
  background: linear-gradient(135deg, rgba(155, 140, 255, 0.3), rgba(124, 184, 255, 0.25));
}

.social-partner-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 200, 50, 0.2), rgba(255, 170, 80, 0.15));
  border: 1px solid rgba(255, 200, 50, 0.3);
  color: #ffd455;
}

/* Partner view */
.partner-empty {
  text-align: center;
  padding: 60px 24px;
}

.partner-empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.partner-empty h2 {
  margin: 0 0 8px;
}

.partner-empty p {
  color: var(--muted);
  max-width: 400px;
  margin: 0 auto;
}

.partner-dashboard {
  display: grid;
  gap: 24px;
}

.partner-header-card {
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.partner-header-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 200, 50, 0.06), rgba(155, 140, 255, 0.04));
  pointer-events: none;
}

.partner-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: #120f1e;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.partner-info {
  position: relative;
  z-index: 1;
  flex: 1;
}

.partner-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.partner-username {
  color: var(--muted);
  font-size: 0.9rem;
}

.partner-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.partner-stat-card {
  border-radius: var(--radius-xl);
  padding: 22px;
}

.partner-stat-title {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.partner-stat-value {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #c9bfff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.partner-stat-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Leaderboard */
.social-leaderboard-list {
  display: grid;
  gap: 10px;
}

.leaderboard-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 200ms ease;
}

.leaderboard-card:hover {
  border-color: rgba(155, 140, 255, 0.22);
  transform: translateY(-2px);
}

.leaderboard-card.is-me {
  border-color: rgba(155, 140, 255, 0.3);
  background: rgba(155, 140, 255, 0.06);
}

.leaderboard-rank {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.leaderboard-rank.rank-1 {
  background: linear-gradient(135deg, rgba(255, 200, 50, 0.3), rgba(255, 170, 80, 0.2));
  color: #ffd455;
  box-shadow: 0 0 12px rgba(255, 200, 50, 0.2);
}

.leaderboard-rank.rank-2 {
  background: rgba(200, 200, 210, 0.15);
  color: #d0d0d8;
}

.leaderboard-rank.rank-3 {
  background: rgba(205, 127, 50, 0.15);
  color: #e8a060;
}

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

.leaderboard-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.leaderboard-stats {
  display: flex;
  gap: 16px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.leaderboard-stat {
  font-size: 0.78rem;
  color: var(--muted);
}

.leaderboard-stat strong {
  color: var(--text);
  font-weight: 600;
}

.leaderboard-score {
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #c9bfff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: right;
  min-width: 50px;
}

/* ═══════ RESPONSIVE ═══════ */

@media (max-width: 1080px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .archive-panel,
  .calendar-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .habits-dashboard {
    grid-template-columns: 1fr;
  }

  .notes-dashboard {
    grid-template-columns: 1fr;
  }

  .notes-sidebar {
    position: static;
  }

  .timer-dashboard {
    grid-template-columns: 1fr;
  }

  .sport-volume-row {
    grid-template-columns: 120px 1fr auto;
  }

  .sport-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 18px;
  }

  .hero,
  .section-header,
  .todo-summary,
  .calendar-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .agenda-row {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .agenda-events-layer {
    left: 70px;
  }

  .modal-card {
    width: 100%;
    max-height: 94vh;
  }

  .habit-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .habit-days {
    gap: 6px;
    flex-wrap: wrap;
  }

  .habit-day-cell {
    width: 34px;
    height: 34px;
  }

  .tab-bar {
    width: 100%;
  }

  .tab-button {
    flex: 1;
    justify-content: center;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .timer-countdown {
    font-size: 3.5rem;
  }

  .timer-progress-ring svg {
    width: 220px;
    height: 220px;
  }

  .timer-add-row {
    flex-direction: column;
  }

  .timer-minutes-input {
    width: 100% !important;
    flex: auto;
  }

  .sport-sub-nav {
    width: 100%;
  }

  .sport-sub-btn {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .sport-volume-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .sport-add-set-form {
    flex-direction: column;
    align-items: stretch;
  }

  .sport-add-set-form input {
    width: 100%;
  }

  .sport-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sport-progression-header {
    flex-direction: column;
  }

  .sport-session-card {
    flex-wrap: wrap;
  }

  .dash-stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .dash-stat-card {
    padding: 16px;
  }

  .dash-stat-value {
    font-size: 1.4rem;
  }
}

/* ═══════ DASHBOARD TIMER (FULL INLINE) ═══════ */

.dash-timer-panel {
  border-radius: var(--radius-xl);
  padding: 24px;
  grid-column: 1 / -1;
}

.dash-timer-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  margin-top: 12px;
}

.timer-queue-panel-inline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ═══════ NOTE EXPORT (per-note) ═══════ */

.note-export-dropdown {
  position: relative;
}

.note-export-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 150px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(24, 20, 44, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(155, 140, 255, 0.08);
  z-index: 50;
  animation: csDropIn 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

.note-export-dropdown.open .note-export-menu {
  display: block;
}

.note-export-btn {
  font-size: 0.82rem !important;
}

/* ═══════ EXPORT DROPDOWN (bulk - kept for fallback) ═══════ */

.export-dropdown {
  position: relative;
}

.export-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(24, 20, 44, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(155, 140, 255, 0.08);
  z-index: 50;
  animation: csDropIn 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

.export-dropdown.open .export-menu {
  display: block;
}

.export-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  border: none;
  transition: all 160ms ease;
  text-align: left;
  font-family: inherit;
}

.export-option:hover {
  background: rgba(155, 140, 255, 0.12);
}

/* ═══════ PARTNER DETAIL SECTIONS ═══════ */

.partner-detail-section {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.partner-detail-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.partner-habit-status {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  flex-shrink: 0;
}

.partner-habit-status.done {
  background: rgba(121, 227, 176, 0.15);
  border-color: rgba(121, 227, 176, 0.3);
  color: var(--success);
}

.partner-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.partner-note-card {
  border-radius: var(--radius-lg);
  background: rgba(17, 15, 31, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: all 200ms ease;
}

.partner-note-card:hover {
  border-color: rgba(155, 140, 255, 0.22);
}

@media (max-width: 600px) {
  .dash-timer-widget {
    flex-direction: column;
    text-align: center;
  }

  .dash-timer-controls {
    justify-content: center;
  }

  .dash-timer-layout {
    grid-template-columns: 1fr;
  }

  .partner-notes-grid {
    grid-template-columns: 1fr;
  }
}
