/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #000;
  color: #fafafa;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: #fafafa; text-decoration: underline; }
a:hover { color: #fff; }
input::placeholder { color: #52525b; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

/* ===== LOGIN ===== */
.login-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: #000;
}
.login-card {
  background: #18181b; border: 1px solid #27272a; border-radius: 20px;
  padding: 48px 40px; width: 100%; max-width: 400px;
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo-img {
  height: 48px; margin-bottom: 16px;
}
.login-subtitle { color: #71717a; margin-top: 4px; font-size: 14px; }
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: #3f3f46; font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: #27272a;
}
.btn-social { margin-top: 8px; }
.btn-social i { font-size: 16px; }

/* OTP */
.otp-info { color: #a1a1aa; font-size: 14px; margin-bottom: 20px; line-height: 1.5; }
.otp-info strong { color: #fafafa; }
.otp-inputs { display: flex; gap: 8px; justify-content: center; }
.otp-box {
  width: 48px; height: 56px; border-radius: 12px;
  border: 1px solid #27272a; background: #09090b;
  color: #fafafa; font-family: inherit; font-size: 24px;
  font-weight: 700; text-align: center;
  transition: border-color 0.15s;
}
.otp-box:focus { outline: none; border-color: #fafafa; }
.otp-resend { text-align: center; margin-top: 16px; color: #52525b; font-size: 13px; }
.btn-link {
  background: none; border: none; color: #a1a1aa; font-family: inherit;
  font-size: 13px; cursor: pointer; text-align: center; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.btn-link:hover { color: #fafafa; }

/* ===== APP SHELL ===== */
.app-shell { display: flex; min-height: 100vh; }
.hidden { display: none !important; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 240px; background: #09090b; border-right: 1px solid #1a1a1e;
  display: flex; flex-direction: column; padding: 20px 12px;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 10;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; margin-bottom: 24px;
}
.sidebar-logo-img {
  height: 22px;
}
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; border: none;
  background: transparent; color: #71717a; cursor: pointer;
  font-size: 14px; font-family: inherit; width: 100%; text-align: left;
  transition: all 0.15s;
}
.nav-item:hover { background: #18181b; color: #a1a1aa; }
.nav-item.active { background: #ffffff10; color: #fff; font-weight: 600; }
.nav-item i { font-size: 18px; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto; background: #fff; color: #000;
  font-size: 11px; font-weight: 700; padding: 1px 7px;
  border-radius: 10px;
}
.sidebar-bottom { border-top: 1px solid #1a1a1e; padding-top: 12px; }

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1; margin-left: 240px; padding: 32px 40px;
  max-width: 1200px;
}
.page { display: none; }
.page.active { display: block; }

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 28px;
}
.page-title { font-size: 28px; font-weight: 800; }
.page-subtitle { color: #52525b; margin-top: 4px; }
.header-actions { display: flex; gap: 8px; align-items: center; }

/* ===== STATS ROW ===== */
.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: #18181b; border: 1px solid #27272a; border-radius: 16px;
  padding: 20px;
}
.stat-value { font-size: 32px; font-weight: 800; }
.stat-pof { color: #4ade80; }
.stat-label { font-size: 14px; font-weight: 600; color: #a1a1aa; margin-top: 4px; }
.stat-sub { font-size: 12px; color: #3f3f46; margin-top: 2px; }

/* ===== TODAY CARD ===== */
.today-card {
  background: #18181b; border: 2px solid #22c55e; border-radius: 16px;
  padding: 24px; position: relative; overflow: hidden;
}
.today-card::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 200px; height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(34,197,94,0.05) 100%);
  pointer-events: none;
}
.today-label {
  font-size: 11px; font-weight: 700; color: #4ade80;
  letter-spacing: 0.5px; display: flex; align-items: center; gap: 6px;
  margin-bottom: 8px;
}
.today-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.today-exercises { font-size: 13px; color: #71717a; margin-bottom: 16px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; border: none;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #d4d4d8; }
.btn-outline { background: transparent; color: #a1a1aa; border: 1px solid #27272a; }
.btn-outline:hover { background: #18181b; border-color: #3f3f46; color: #fafafa; }
.btn-danger-outline { background: transparent; color: #ef4444; border: 1px solid #27272a; }
.btn-danger-outline:hover { background: #ef444410; border-color: #ef4444; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid #27272a;
  background: #18181b; color: #71717a; display: flex;
  align-items: center; justify-content: center; cursor: pointer;
  font-size: 18px; transition: all 0.15s;
}
.btn-icon:hover { background: #27272a; color: #fafafa; }
.btn-dashed {
  width: 100%; padding: 14px; border-radius: 12px;
  border: 1px dashed #3f3f46; background: transparent;
  color: #a1a1aa; font-family: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 12px;
}
.btn-dashed:hover { border-color: #71717a; background: #ffffff05; color: #fafafa; }
.btn-icon-ghost {
  background: transparent; border: none; color: #3f3f46;
  cursor: pointer; font-size: 16px; padding: 6px;
  border-radius: 6px; transition: all 0.15s;
}
.btn-icon-ghost:hover { color: #a1a1aa; background: #18181b; }

/* ===== INPUTS ===== */
.input-label {
  display: block; font-size: 11px; font-weight: 700;
  color: #52525b; letter-spacing: 0.5px; margin-bottom: 6px; margin-top: 12px;
}
.input-label:first-child { margin-top: 0; }
.input {
  width: 100%; padding: 10px 14px; border-radius: 10px;
  border: 1px solid #27272a; background: #18181b;
  color: #fafafa; font-family: inherit; font-size: 14px;
  transition: border-color 0.15s;
}
.input:focus { outline: none; border-color: #3f3f46; }
.input:disabled { opacity: 0.4; cursor: not-allowed; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.select option { background: #18181b; color: #fafafa; }
.textarea { resize: vertical; min-height: 72px; }
input[type="date"] { color-scheme: dark; }

/* ===== CARDS ===== */
.card {
  background: #18181b; border: 1px solid #27272a; border-radius: 16px;
  padding: 20px;
}

/* ===== SECTION LABEL ===== */
.section-label {
  font-size: 11px; font-weight: 700; color: #3f3f46;
  letter-spacing: 1px; margin-bottom: 12px; margin-top: 8px;
}

/* ===== KANBAN BOARD ===== */
.kanban-board {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px; min-height: 400px;
}
.kanban-column {
  background: #0a0a0b; border: 1px solid #1a1a1e; border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column;
  min-height: 300px;
}
.kanban-column-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #1a1a1e;
}
.kanban-column-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase;
}
.kanban-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.kanban-dot-invited { background: #f59e0b; }
.kanban-dot-active { background: #22c55e; }
.kanban-dot-overdue { background: #ef4444; }
.kanban-dot-canceled { background: #52525b; }
.kanban-count {
  font-size: 11px; font-weight: 700; color: #52525b;
  background: #18181b; padding: 2px 8px; border-radius: 6px;
}
.kanban-cards { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.kanban-card {
  background: #18181b; border: 1px solid #27272a; border-radius: 12px;
  padding: 14px; cursor: pointer; transition: all 0.15s;
}
.kanban-card:hover { border-color: #3f3f46; transform: translateY(-1px); }
.kanban-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; min-width: 0; }
.kanban-card-top h4 { font-size: 14px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kanban-card-email { font-size: 12px; color: #52525b; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-card-meta { display: flex; gap: 12px; }
.kanban-card-meta span {
  font-size: 11px; color: #3f3f46; display: flex; align-items: center; gap: 4px;
}
.kanban-card-meta span i { font-size: 13px; }
.kanban-card-pending {
  border-style: dashed; border-color: #27272a;
}
.kanban-card-pending:hover { transform: none; border-color: #27272a; cursor: default; }
.kanban-card-canceled { opacity: 0.5; }
.kanban-card-canceled:hover { transform: none; cursor: default; }
.kanban-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.kanban-tag {
  font-size: 11px; color: #71717a; background: #27272a;
  padding: 3px 8px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 4px;
}
.kanban-tag i { font-size: 12px; }
.kanban-card-move { display: flex; gap: 2px; margin-left: auto; }
.kanban-move-btn {
  width: 24px; height: 24px; border-radius: 6px; border: none;
  background: transparent; color: #3f3f46; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all 0.12s;
}
.kanban-move-btn:hover { background: #27272a; color: #fafafa; }
.kanban-column-dragover { background: #18181b; border-color: #3f3f46; }
.kanban-card[draggable="true"] { cursor: grab; }
.kanban-card[draggable="true"]:active { cursor: grabbing; }
.kanban-empty {
  display: flex; align-items: center; justify-content: center;
  flex: 1; color: #27272a; font-size: 13px; text-align: center;
  padding: 20px;
}

/* ===== STUDENTS (legacy cards for detail) ===== */
.student-card {
  background: #18181b; border: 1px solid #27272a; border-radius: 16px;
  padding: 20px; cursor: pointer; transition: all 0.15s;
}
.student-card:hover { border-color: #3f3f46; transform: translateY(-1px); }
.student-card-top { display: flex; align-items: center; gap: 12px; }
.student-card-info { flex: 1; }
.student-card-info h4 { font-size: 15px; font-weight: 700; }
.student-card-stats {
  display: flex; gap: 20px; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid #27272a;
}
.student-stat { display: flex; flex-direction: column; }
.student-stat-value { font-size: 18px; font-weight: 800; }
.student-stat-label { font-size: 11px; color: #52525b; }

/* ===== AVATARS ===== */
.avatar {
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700;
  flex-shrink: 0;
  background: #27272a; color: #a1a1aa;
}
.avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.avatar-md { width: 44px; height: 44px; font-size: 15px; }
.avatar-xl { width: 96px; height: 96px; font-size: 36px; }
.avatar-pending {
  background: transparent; color: #3f3f46; font-size: 18px;
  border: 1px dashed #3f3f46;
}

/* ===== TABS ===== */
.tabs {
  display: flex; gap: 4px; margin-bottom: 24px;
  border-bottom: 1px solid #27272a; padding-bottom: 0;
}
.tab {
  padding: 10px 20px; border: none; background: transparent;
  color: #52525b; font-family: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent;
  transition: all 0.15s; margin-bottom: -1px;
}
.tab:hover { color: #a1a1aa; }
.tab.active { color: #fafafa; border-bottom-color: #fafafa; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== ROUTINES (assigned list) ===== */
.routines-assigned { display: flex; flex-direction: column; gap: 12px; }
.routine-card-assigned {
  background: #18181b; border: 1px solid #27272a; border-radius: 14px;
  padding: 16px 20px; display: flex; justify-content: space-between;
  align-items: center;
}
.routine-card-assigned h4 { font-size: 15px; font-weight: 700; }
.routine-card-assigned .routine-meta {
  display: flex; gap: 12px; margin-top: 4px;
}
.routine-card-assigned .routine-meta span {
  font-size: 12px; color: #52525b; display: flex; align-items: center; gap: 4px;
}
.routine-actions { display: flex; gap: 6px; }

/* ===== HISTORY LIST ===== */
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-card {
  background: #18181b; border: 1px solid #27272a; border-radius: 14px;
  padding: 16px 20px;
}
.history-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.history-card-header h4 { font-size: 15px; font-weight: 600; }
.history-card-header .history-date { font-size: 12px; color: #52525b; }
.history-card-stats { display: flex; gap: 16px; }
.history-card-stats span {
  font-size: 13px; color: #71717a;
  display: flex; align-items: center; gap: 4px;
}

/* ===== ANALYTICS ===== */
.analytics-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.analytics-card { min-height: 280px; }
.analytics-card h3 { margin-bottom: 0; font-size: 15px; font-weight: 600; color: #a1a1aa; }

/* POF Chart */
.pof-chart-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.period-pills { display: flex; gap: 4px; }
.period-pill {
  padding: 4px 10px; border-radius: 8px; border: none;
  background: transparent; color: #52525b; font-family: inherit;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.period-pill.active { background: #fff; color: #000; }
.period-pill:hover:not(.active) { color: #a1a1aa; }
.pof-svg-container { display: flex; justify-content: center; margin: 4px 0; }
.pof-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 12px; text-align: center;
}
.pof-stat-item { }
.pof-stat-label { font-size: 11px; color: #71717a; margin-bottom: 2px; }
.pof-stat-value { font-size: 15px; font-weight: 700; }
.pof-stat-value.positive { color: #4ade80; }
.pof-stat-value.negative { color: #ef4444; }

/* Frequency Calendar */
.freq-card h3 { margin-bottom: 8px; }
.cal-month-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-bottom: 14px;
}
.cal-arrow {
  width: 32px; height: 32px; border: none; background: transparent;
  color: #fafafa; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: all 0.15s;
}
.cal-arrow:hover { background: #27272a; }
.cal-arrow:disabled { color: #3f3f46; cursor: default; }
.cal-arrow:disabled:hover { background: transparent; }
.cal-month-label {
  font-size: 15px; font-weight: 600; min-width: 160px; text-align: center;
}
.cal-grid { }
.cal-week-row { display: flex; margin-bottom: 6px; }
.cal-cell-wrap { flex: 1; display: flex; justify-content: center; }
.cal-day-label {
  font-size: 11px; color: #52525b; font-weight: 600;
  text-align: center; margin-bottom: 4px;
  width: 40px;
}
.cal-cell {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500; color: #52525b;
  background: #18181b;
}
.cal-cell.has-workout { background: #3b82f6; color: #fff; }
.cal-cell.is-today { border: 1px solid #fff; }
.cal-cell.empty { background: transparent; }
.cal-footer {
  display: flex; justify-content: center; gap: 24px;
  margin-top: 12px; font-size: 13px; color: #71717a;
}
.cal-footer strong { font-weight: 700; color: #fafafa; }

/* ===== UPCOMING FEATURES ===== */
.upcoming-features {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.feature-card {
  background: #18181b; border: 1px solid #27272a; border-radius: 14px;
  padding: 16px; display: flex; align-items: center; justify-content: space-between;
}
.feature-card-info h4 { font-size: 14px; font-weight: 600; }
.feature-card-info span { font-size: 12px; color: #52525b; }
.vote-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 8px; border: 1px solid #27272a;
  background: transparent; color: #71717a; font-family: inherit;
  font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.vote-btn:hover { border-color: #3f3f46; color: #a1a1aa; }
.vote-btn.voted { background: #ef444420; border-color: #ef4444; color: #ef4444; }

/* ===== WORKOUTS LIST ===== */
.workouts-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.workout-card {
  background: #18181b; border: 1px solid #27272a; border-radius: 16px;
  padding: 20px; transition: all 0.15s;
}
.workout-card:hover { border-color: #3f3f46; }
.workout-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}
.workout-card-header h4 { font-size: 16px; font-weight: 700; }
.workout-card-day {
  font-size: 12px; color: #71717a; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.workout-card-exercises {
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 12px; border-top: 1px solid #27272a;
}
.workout-exercise-row {
  display: flex; justify-content: space-between; font-size: 13px;
}
.workout-exercise-row span:first-child { color: #a1a1aa; }
.workout-exercise-row span:last-child { color: #3f3f46; }
.workout-card-footer { display: flex; gap: 8px; margin-top: 14px; }

/* ===== EXERCISES GRID ===== */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: #18181b; border: 1px solid #27272a; border-radius: 12px;
  padding: 0 16px; margin-bottom: 16px;
}
.search-bar i { color: #3f3f46; font-size: 18px; }
.search-bar .input { border: none; background: transparent; padding: 12px 0; }
.exercise-categories {
  display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.category-pill {
  padding: 6px 16px; border-radius: 20px; border: 1px solid #27272a;
  background: transparent; color: #71717a; font-family: inherit;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.category-pill:hover { border-color: #3f3f46; color: #a1a1aa; }
.category-pill.active { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.exercises-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.exercise-card {
  background: #18181b; border: 1px solid #27272a; border-radius: 14px;
  padding: 16px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all 0.15s;
}
.exercise-card:hover { border-color: #3f3f46; transform: translateY(-1px); }
.exercise-card .badge-custom {
  margin-left: auto; font-size: 10px; font-weight: 700;
  color: #52525b; border: 1px solid #27272a;
  padding: 2px 8px; border-radius: 6px;
}
.exercise-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: #27272a; display: flex; align-items: center;
  justify-content: center; font-size: 22px; color: #52525b; flex-shrink: 0;
}
.exercise-card-info { flex: 1; }
.exercise-card-info h4 { font-size: 14px; font-weight: 600; }
.exercise-card-info span { font-size: 12px; color: #52525b; }

/* ===== PROFILE ===== */
.profile-card {
  background: #18181b; border: 1px solid #27272a; border-radius: 16px;
  padding: 24px; margin-bottom: 24px;
}
.profile-top {
  display: flex; align-items: center; gap: 20px;
}
.profile-info h2 { font-size: 22px; font-weight: 700; }
.profile-menu { display: flex; flex-direction: column; gap: 4px; }
.menu-section { margin-bottom: 8px; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 12px; border: none;
  background: transparent; color: #fafafa; cursor: pointer;
  font-size: 14px; font-family: inherit; width: 100%; text-align: left;
  transition: all 0.15s;
}
.menu-item:hover { background: #18181b; }
.menu-item i:first-child { font-size: 18px; color: #71717a; width: 20px; text-align: center; }
.menu-item span { flex: 1; }
.menu-arrow { color: #3f3f46; font-size: 16px; }
.menu-value { color: #52525b; font-size: 13px; margin-right: 4px; }
.menu-item.menu-danger { color: #ef4444; }
.menu-item.menu-danger i { color: #ef4444; }
.menu-item.menu-danger-subtle { color: #71717a; }
.menu-item.menu-danger-subtle i { color: #71717a; }
.menu-item.menu-danger-subtle:hover { color: #ef4444; }
.menu-item.menu-danger-subtle:hover i { color: #ef4444; }
.menu-toggle { cursor: default; }
.menu-toggle:hover { background: transparent; }
.menu-hint { color: #3f3f46; font-size: 12px; padding: 0 16px 8px 48px; }

/* Profile username */
.profile-username { color: #71717a; font-size: 14px; margin-bottom: 2px; }

/* Avatar wrapper */
.avatar-wrapper { position: relative; display: inline-block; }
.edit-avatar-section { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; }
.edit-avatar-wrapper { cursor: pointer; }
.avatar-edit-badge {
  position: absolute; bottom: 2px; right: 2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: #3f3f46; color: #fafafa;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; border: 2px solid #18181b;
}

/* Input with prefix */
.input-prefix-wrap { position: relative; }
.input-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #52525b; font-size: 14px; pointer-events: none;
}
.input-with-prefix { padding-left: 28px; }

/* Language selector */
.lang-options { display: flex; flex-direction: column; gap: 4px; }
.lang-option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 12px; border: none;
  background: transparent; color: #fafafa; cursor: pointer;
  font-size: 15px; font-family: inherit; width: 100%; text-align: left;
  transition: all 0.15s;
}
.lang-option:hover { background: #27272a; }
.lang-option.active { background: #ffffff08; }
.lang-flag { font-size: 24px; }
.lang-name { flex: 1; font-weight: 500; }
.lang-check { font-size: 18px; color: transparent; }
.lang-option.active .lang-check { color: #22c55e; }

/* Preferences */
.pref-item {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px;
}
.pref-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.rest-time-control {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.rest-time-value {
  font-size: 18px; font-weight: 700; min-width: 80px; text-align: center;
}

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #27272a; border-radius: 24px;
  transition: 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: #71717a; border-radius: 50%;
  transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: #22c55e; }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: #fff; }

/* ===== WEIGHT LIST ===== */
.weight-list { display: flex; flex-direction: column; gap: 8px; }
.weight-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #27272a;
}
.weight-row:last-child { border-bottom: none; }
.weight-row .weight-val { font-size: 18px; font-weight: 700; }
.weight-row .weight-date { font-size: 13px; color: #52525b; }

/* ===== SUPERSET ===== */
.ss-modal-subtitle { color: #a1a1aa; font-size: 14px; margin-bottom: 16px; line-height: 1.5; }
.ss-modal-subtitle strong { color: #a855f7; }
.ss-exercise-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; margin-bottom: 16px; }
.ss-ex-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; border: none;
  background: #09090b; color: #fafafa; cursor: pointer;
  font-family: inherit; font-size: 14px; width: 100%; text-align: left;
  transition: all 0.12s; border: 1px solid transparent;
}
.ss-ex-row:hover { background: #18181b; }
.ss-ex-row.ss-selected { background: rgba(168,85,247,0.08); border-color: rgba(168,85,247,0.25); }
.ss-ex-row.ss-disabled { opacity: 0.3; pointer-events: none; }
.ss-ex-row .exercise-icon { width: 36px; height: 36px; font-size: 16px; border-radius: 8px; }
.ss-ex-name { flex: 1; font-weight: 500; }
.ss-current-tag {
  font-size: 10px; font-weight: 700; color: #a855f7;
  background: rgba(168,85,247,0.12); padding: 2px 8px; border-radius: 4px;
}
.ss-checkbox {
  width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid #3f3f46;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s; color: transparent;
}
.ss-selected .ss-checkbox { background: #a855f7; border-color: #a855f7; color: #fff; }
.btn-superset { background: #a855f7; color: #fff; }
.btn-superset:hover { background: #9333ea; }
.btn-superset:disabled { opacity: 0.35; cursor: not-allowed; }

/* Superset visual grouping in routine editor */
.ss-banner {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px;
  background: rgba(168,85,247,0.06); margin-bottom: 4px;
  font-size: 12px; font-weight: 600; color: #a855f7;
}
.ss-banner i { font-size: 14px; }
.ss-divider {
  display: flex; align-items: center; justify-content: center;
  margin: -6px 0; z-index: 1;
  color: #a855f7; font-size: 12px;
}
.routine-exercise-card.in-superset {
  border-color: rgba(168,85,247,0.2);
}
.ss-action-btn {
  width: 28px; height: 28px; border-radius: 6px; border: none;
  background: #18181b; color: #52525b; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.15s;
}
.ss-action-btn:hover { background: #a855f720; color: #a855f7; }
.ss-action-btn.active { color: #a855f7; }

/* ===== EXERCISE SELECTOR ===== */
.selector-list { display: flex; flex-direction: column; gap: 4px; }
.selector-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px; border: none;
  background: transparent; color: #fafafa; cursor: pointer;
  font-family: inherit; font-size: 14px; width: 100%; text-align: left;
  transition: all 0.12s;
}
.selector-item:hover { background: #27272a; }
.selector-item .exercise-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; }
.selector-item-info { flex: 1; }
.selector-item-info h4 { font-size: 14px; font-weight: 600; }
.selector-item-info span { font-size: 12px; color: #52525b; }
.selector-item .badge-custom {
  font-size: 10px; font-weight: 700; color: #52525b;
  border: 1px solid #27272a; padding: 2px 8px; border-radius: 6px;
}
.selector-item-added {
  opacity: 0.35; pointer-events: none;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; backdrop-filter: blur(4px);
}
.modal-card {
  background: #18181b; border: 1px solid #27272a; border-radius: 20px;
  padding: 28px; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
}
.modal-card-lg { max-width: 640px; }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.modal-header h2 { font-size: 20px; font-weight: 700; }

/* ===== INVITE SUCCESS ===== */
.success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: #ffffff10; color: #fafafa;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin: 20px auto;
}
#inviteSuccess { text-align: center; padding: 20px 0; }
#inviteSuccess h3 { margin-top: 12px; font-size: 18px; }
#inviteSuccess p { margin-top: 8px; }

/* ===== INFO BOX ===== */
.info-box {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px; border-radius: 10px; background: #0a0a0b;
  font-size: 13px; color: #71717a; border: 1px solid #27272a;
}
.info-box i { color: #52525b; margin-top: 1px; }

/* ===== ASSIGN LIST ===== */
.assign-list { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; }
.assign-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 12px; border: 1px solid #27272a;
  background: #18181b; cursor: pointer; transition: all 0.15s;
}
.assign-row:hover { border-color: #3f3f46; }
.assign-row.assigned { background: #ffffff08; border-color: #3f3f46; }
.assign-check {
  width: 24px; height: 24px; border-radius: 8px;
  background: #27272a; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; transition: all 0.15s;
  color: transparent;
}
.assign-row.assigned .assign-check { background: #fff; color: #000; }
.assign-row-info { flex: 1; }
.assign-row-info strong { font-size: 14px; display: block; }
.assign-row-info span { font-size: 12px; color: #52525b; }

/* ===== ROUTINE FORM ===== */
.routine-form { max-height: 70vh; overflow-y: auto; padding-right: 4px; }
.day-selector { display: flex; gap: 6px; }
.day-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid #27272a;
  background: transparent; color: #52525b; font-family: inherit;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.day-btn:hover { border-color: #3f3f46; color: #a1a1aa; }
.day-btn.active { background: #fff; color: #000; border-color: #fff; }
.routine-exercises { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.empty-exercises {
  text-align: center; padding: 32px; color: #3f3f46;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.empty-exercises i { font-size: 32px; }
.routine-exercise-card {
  background: #0a0a0b; border: 1px solid #27272a; border-radius: 14px;
  overflow: hidden;
}
.routine-ex-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid #27272a;
}
.routine-ex-header .exercise-icon { width: 40px; height: 40px; font-size: 18px; }
.routine-ex-header h5 { flex: 1; font-size: 14px; font-weight: 600; }
.routine-ex-actions { display: flex; gap: 4px; }
.routine-ex-actions button {
  width: 28px; height: 28px; border-radius: 6px; border: none;
  background: #18181b; color: #52525b; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: all 0.15s;
}
.routine-ex-actions button:hover { background: #27272a; color: #fafafa; }
.routine-ex-actions button.delete-btn:hover { background: #ef4444; color: #fff; }
.routine-ex-notes { padding: 0 16px 8px; }
.notes-input {
  width: 100%; padding: 6px 10px; border-radius: 6px;
  border: 1px solid transparent; background: transparent;
  color: #71717a; font-family: inherit; font-size: 12px;
  transition: all 0.15s;
}
.notes-input:focus { outline: none; border-color: #27272a; background: #18181b; color: #fafafa; }
.notes-input::placeholder { color: #27272a; }
.set-table { width: 100%; }
.set-table-header {
  display: grid; grid-template-columns: 40px 1fr 1fr 48px 32px;
  gap: 10px;
  padding: 10px 16px; font-size: 10px; font-weight: 700;
  color: #3f3f46; letter-spacing: 0.5px;
}
.set-row {
  display: grid; grid-template-columns: 40px 1fr 1fr 48px 32px;
  gap: 10px;
  padding: 6px 16px; align-items: center;
}
.set-row span { font-size: 13px; font-weight: 700; color: #3f3f46; }
.set-row input {
  width: 100%; padding: 8px 10px; border-radius: 8px;
  border: 1px solid #27272a; background: #18181b;
  color: #fafafa; font-family: inherit; font-size: 14px;
  text-align: center;
}
.set-row input:focus { outline: none; border-color: #3f3f46; }
.failure-btn {
  width: 36px; height: 28px; border-radius: 6px; border: 1px solid #27272a;
  background: transparent; color: #3f3f46; font-family: inherit;
  font-size: 11px; font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.failure-btn.active { background: #f59e0b; color: #000; border-color: #f59e0b; }
.set-remove {
  width: 24px; height: 24px; border: none; background: transparent;
  color: #27272a; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: all 0.15s;
}
.set-remove:hover { color: #ef4444; }
.add-set-btn {
  width: 100%; padding: 8px; border: none;
  background: transparent; color: #71717a;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; border-top: 1px dashed #27272a;
  transition: background 0.15s;
}
.add-set-btn:hover { background: #ffffff05; color: #a1a1aa; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #fafafa; color: #000; padding: 12px 24px;
  border-radius: 12px; font-weight: 600; font-size: 14px;
  z-index: 200; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transition: opacity 0.3s, transform 0.3s;
}
.toast.hidden { opacity: 0; transform: translateX(-50%) translateY(10px); pointer-events: none; }

/* ===== TEXT UTILS ===== */
.text-muted { color: #52525b; font-size: 13px; }
.text-warning { color: #71717a; font-size: 12px; display: flex; align-items: center; gap: 4px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) {
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .analytics-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { width: 64px; padding: 12px 8px; }
  .sidebar-brand span, .nav-item span, .nav-badge { display: none; }
  .sidebar-brand { justify-content: center; }
  .nav-item { justify-content: center; padding: 12px; }
  .main-content { margin-left: 64px; padding: 20px; }
  .page-header { flex-direction: column; gap: 12px; }
}
