/* ─── Reset & Base ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; touch-action: manipulation; }

:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --border: #e8e8e4;
  --text: #111111;
  --muted: #888888;
  --subtle: #f0f0ee;
  --primary: #111111;
  --primary-dark: #333333;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --transition: 0.18s ease;

  /* Area colours */
  --air-support:   #3b82f6;
  --articulation:  #10b981;
  --embouchure:    #f43f5e;
  --fingers:       #8b5cf6;
  --musicality:    #f59e0b;
}

html { font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ────────────────────────────────────────────────────────────────── */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Auth Page ─────────────────────────────────────────────────────────────── */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.auth-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--text);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo-icon svg { color: white; }

.auth-logo-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 36px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  background: var(--subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ─── Forms ─────────────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--card);
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.form-input::placeholder { color: #bbb; }

.form-error {
  color: #e11d48;
  font-size: 13px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #fff1f2;
  border-radius: var(--radius-sm);
  border: 1px solid #fecdd3;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--text);
  color: white;
  width: 100%;
}

.btn-primary:hover { background: #333; }
.btn-primary:active { transform: scale(0.99); }

.btn-sm {
  font-size: 13px;
  padding: 7px 14px;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--subtle); color: var(--text); }

.btn-danger {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 7px 12px;
}

.btn-danger:hover { color: #e11d48; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Header ────────────────────────────────────────────────────────────────── */

.app-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.header-logo-icon {
  width: 30px;
  height: 30px;
  background: var(--text);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.header-user {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}

/* ─── Dashboard ──────────────────────────────────────────────────────────────── */

.dashboard {
  padding: 40px 0 80px;
}

/* ─── Stats Row ──────────────────────────────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 0;
  margin-bottom: 0;
}

/* On mobile, restore spacing since stats-row is outside the grid */
@media (max-width: 680px) {
  .stats-row { margin-top: 0; margin-bottom: 20px; }
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.stat-card.streak { border-color: #fde68a; background: #fffbeb; }

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card.streak .stat-value { color: #d97706; }

.stat-unit {
  font-size: 13px;
  color: var(--muted);
}

/* ─── Grid Layout ────────────────────────────────────────────────────────────── */

.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.log-progress-grid {
  align-items: start;
}

.right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Stack stat cards vertically inside the right column on desktop */
.right-col .stats-row {
  grid-template-columns: 1fr;
  gap: 12px;
}

/* On mobile the grid collapses, so restore 3-wide stat cards */
@media (max-width: 680px) {
  .right-col .stats-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

/* ─── Cards ─────────────────────────────────────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 22px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header .fabian-ai-badge { margin-bottom: 0; }

.card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.card-body {
  padding: 20px 24px 24px;
}

/* ─── Log Form ──────────────────────────────────────────────────────────────── */

.date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.date-display {
  font-size: 14px;
  color: var(--muted);
}

.date-display strong {
  color: var(--text);
  font-weight: 600;
}

/* Minutes slider */

.minutes-display {
  text-align: center;
  margin-bottom: 10px;
}

.minutes-number {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
}

.minutes-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  margin-bottom: 20px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.1s;
}

.slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Area pills */

.area-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.area-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.area-pill {
  padding: 8px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.area-pill:hover { border-color: var(--text); color: var(--text); }

.area-pill.selected {
  color: white;
  border-color: transparent;
  background: #555;
}

/* Technique */
.area-pill[data-area="air-support"].selected   { background: var(--air-support); }
.area-pill[data-area="articulation"].selected  { background: var(--articulation); }
.area-pill[data-area="embouchure"].selected    { background: var(--embouchure); }
.area-pill[data-area="fingers"].selected       { background: var(--fingers); }
.area-pill[data-area="musicality"].selected    { background: var(--musicality); }
/* Concert */
.area-pill[data-area="performance"].selected        { background: #3b82f6; }
.area-pill[data-area="isolated-passages"].selected  { background: #10b981; }
.area-pill[data-area="mental-practice"].selected    { background: #f43f5e; }
.area-pill[data-area="singing"].selected            { background: #8b5cf6; }
.area-pill[data-area="general-technique"].selected  { background: #f59e0b; }
.area-pill[data-area="recording"].selected          { background: #06b6d4; }
/* Audition */
.area-pill[data-area="singing-excerpts"].selected   { background: #8b5cf6; }
.area-pill[data-area="full-mock-audition"].selected { background: #3b82f6; }

/* Notes */

.form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--card);
  resize: none;
  outline: none;
  transition: var(--transition);
  margin-bottom: 0;
  height: 52px;
}

.form-textarea:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(0,0,0,0.06); }
.form-textarea::placeholder { color: #bbb; }

.log-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Timeline Chart ─────────────────────────────────────────────────────────── */

.chart-section {
  margin-bottom: 20px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 0;
}

.chart-range-tabs {
  display: flex;
  gap: 2px;
  background: var(--subtle);
  border-radius: 7px;
  padding: 3px;
}

.chart-range-tab {
  padding: 5px 12px;
  border: none;
  background: transparent;
  border-radius: 5px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
}

.chart-range-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.chart-body {
  padding: 16px 24px 20px;
  position: relative;
}

.chart-wrap {
  position: relative;
}

.chart-bar {
  cursor: pointer;
  transition: opacity 0.1s;
}

.chart-bar:hover { opacity: 0.65 !important; }

.chart-tooltip-box {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
}

.chart-empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 32px 0;
}

/* ─── Progress Bars ──────────────────────────────────────────────────────────── */

.progress-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.progress-item { }

.progress-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.progress-area-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.area-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.progress-minutes {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.progress-bar-track {
  height: 6px;
  background: var(--subtle);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-empty {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 24px 0;
}

/* ─── Chat Page ──────────────────────────────────────────────────────────────── */

.chat-page {
  display: flex;
  flex-direction: column;
  padding: 24px 0 32px;
}

.chat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 600px;
  max-height: calc(100vh - 200px);
  overflow: hidden;
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 20px 8px;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 48px 24px;
  gap: 10px;
  color: var(--muted);
}

.chat-empty-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 4px;
}

.chat-empty-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.chat-empty-sub {
  font-size: 14px;
  max-width: 280px;
  line-height: 1.5;
}

.chat-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-bubble-row--user {
  justify-content: flex-end;
}

.chat-bubble-row--ai {
  justify-content: flex-start;
}

.chat-ai-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.chat-bubble {
  max-width: 72%;
  padding: 11px 15px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble--user {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble--ai {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-bubble--loading {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
}

.chat-bubble--loading span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: chatdot 1.2s ease-in-out infinite;
}

.chat-bubble--loading span:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble--loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatdot {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
  background: var(--card);
}

.chat-composer-input {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  line-height: 1.45;
  max-height: 140px;
  overflow-y: auto;
  transition: border-color 0.15s;
  touch-action: manipulation;
}

.chat-composer-input:focus {
  outline: none;
  border-color: var(--primary);
}

.chat-composer-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  touch-action: manipulation;
}

.chat-composer-send:hover { background: var(--primary-dark, #1d4ed8); }
.chat-composer-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── History ────────────────────────────────────────────────────────────────── */

.history-section {
  margin-top: 20px;
}

.history-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.history-empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.history-empty-sub {
  font-size: 14px;
}

.history-list {
  display: flex;
  flex-direction: column;
}

.history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--bg); }

.history-date {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 2px;
  min-width: 90px;
}

.history-main { }

.history-area {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 3px;
}

.history-notes {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.history-minutes {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.history-minutes span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* ─── Log Fields ─────────────────────────────────────────────────────────────── */

.log-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.log-field {}

.log-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.rating-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rating-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
}

.rating-btn:hover { border-color: #111; color: #111; }
.rating-btn.selected { background: #111; border-color: #111; color: #fff; }

/* ─── History fields ─────────────────────────────────────────────────────────── */

.history-area-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.history-rating {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.history-rating span {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}

.history-field {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.45;
}

.history-field-label {
  font-weight: 600;
  color: var(--text);
}

.history-view-all {
  padding: 12px 24px 16px;
  text-align: center;
}

.history-ai-feedback {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.history-ai-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 1px;
}

.history-ai-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── Leaderboard ────────────────────────────────────────────────────────────── */

.lb-section {
  margin-top: 20px;
  margin-bottom: 20px;
}

.lb-body {
  padding: 0 0 8px;
}

.lb-col-headers {
  display: grid;
  grid-template-columns: 40px 1fr 60px 60px 80px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr 60px 60px 80px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--bg); }

.lb-row.lb-you {
  background: #f8f7ff;
}

.lb-rank {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

.lb-gold   { color: #d97706; }
.lb-silver { color: #6b7280; }
.lb-bronze { color: #92400e; }

.lb-name {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-you-badge {
  font-size: 10px;
  font-weight: 600;
  background: #ede9fe;
  color: #7c3aed;
  padding: 2px 7px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lb-days {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.lb-streak {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.lb-streak-num {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.lb-streak-unit {
  font-size: 12px;
  color: var(--muted);
}

.lb-time {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.3px;
  text-align: right;
}

.lb-empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 28px 0;
}

@media (max-width: 600px) {
  .lb-col-headers { grid-template-columns: 32px 1fr 50px 50px; }
  .lb-col-time, .lb-time { display: none; }
  .lb-row { grid-template-columns: 32px 1fr 50px 50px; }
}

/* ─── Loading ────────────────────────────────────────────────────────────────── */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--muted);
  font-size: 14px;
  gap: 10px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 680px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 28px; }
  .main-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 36px 24px; }
  .history-item { grid-template-columns: 1fr auto; }
  .history-date { display: none; }
}

@media (max-width: 440px) {
  .stats-row { grid-template-columns: 1fr; }
  .header-user { display: none; }
}

/* ─── Nav Tabs ───────────────────────────────────────────────────────────────── */

.nav-tabs {
  display: flex;
  gap: 2px;
  background: var(--subtle);
  border-radius: 7px;
  padding: 3px;
}

.nav-tab {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

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

/* ─── Daily Hero ─────────────────────────────────────────────────────────────── */

.daily-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 20px;
  padding: 24px 28px;
}

.daily-hero-ring { flex-shrink: 0; }

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

.daily-hero-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 6px;
}

.daily-hero-msg {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.daily-hero-msg.done { color: #10b981; }

.daily-hero-bar-track {
  height: 8px;
  background: var(--subtle);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.daily-hero-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.daily-hero-sub {
  font-size: 13px;
  color: var(--muted);
}

@keyframes ring-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.ring-pulse { animation: ring-pulse 1.8s ease-in-out infinite; }

/* ─── Confetti ───────────────────────────────────────────────────────────────── */

.confetti-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -12px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0deg) scaleX(1); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg) scaleX(-1); opacity: 0; }
}

/* ─── Goal Picker: step indicators & daily goal input ───────────────────────── */

.goal-step-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  background: var(--subtle);
  border-radius: 20px;
  padding: 4px 12px;
  margin: 16px 0 4px;
}

.daily-goal-input-wrap {
  margin: 8px 0 0;
}

.daily-goal-number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.daily-goal-number span:first-child {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1;
}

.daily-goal-unit {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}

.daily-goal-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

/* ─── Event Banner ───────────────────────────────────────────────────────────── */

.event-banner {
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.event-banner:hover { opacity: 0.75; }

.event-banner-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
}

.event-banner-pip {
  width: 7px; height: 7px;
  background: #ef4444;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pip-pulse 2s ease-in-out infinite;
}

@keyframes pip-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.event-banner-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ef4444;
  flex-shrink: 0;
}

.event-banner-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-banner-days {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 12px;
}

.event-banner-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ─── Event Modal ────────────────────────────────────────────────────────────── */

.event-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 24px;
}

.event-modal-overlay.event-modal-show { opacity: 1; }

.event-modal-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 440px;
  padding: 28px;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.25s ease;
}

.event-modal-body {
  padding: 28px;
}

.event-modal-overlay.event-modal-show .event-modal-card { transform: translateY(0); }

.event-modal-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.event-modal-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.event-modal-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  margin: 6px 0 6px;
  line-height: 1.2;
}

.event-modal-date {
  font-size: 13px;
  color: var(--muted);
}

/* ─── Notification Bell ──────────────────────────────────────────────────────── */

.notif-wrapper { position: relative; }

.notif-btn {
  width: 32px; height: 32px;
  border: none; background: transparent;
  color: var(--muted); cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); padding: 0; position: relative;
}

.notif-btn:hover { background: var(--subtle); color: var(--text); }

.notif-badge {
  position: absolute; top: 2px; right: 2px;
  width: 8px; height: 8px;
  background: #ef4444; border-radius: 50%;
  border: 1.5px solid var(--bg);
  font-size: 0;
}

/* ─── Notification Panel ─────────────────────────────────────────────────────── */

.notif-panel {
  position: fixed;
  width: 300px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 1000;
  overflow: hidden;
}

.notif-panel-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.notif-item:last-child { border-bottom: none; }

.notif-dot {
  width: 8px; height: 8px;
  background: #ef4444; border-radius: 50%;
  flex-shrink: 0;
}

.notif-item-content { flex: 1; min-width: 0; }

.notif-item-title {
  font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.notif-item-sub { font-size: 12px; color: var(--muted); }

.notif-dismiss {
  border: none; background: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 0 4px;
  line-height: 1; flex-shrink: 0;
}

.notif-dismiss:hover { color: var(--text); }

.notif-empty {
  padding: 20px 16px;
  font-size: 13px; color: var(--muted); text-align: center;
}

/* ─── Event Popup ────────────────────────────────────────────────────────────── */

.event-popup {
  position: fixed;
  top: 24px; left: 24px;
  width: 300px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  z-index: 1001;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  transform: translateX(calc(-100% - 24px));
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.event-popup.event-popup-show {
  transform: translateX(0);
  opacity: 1;
}

.event-popup-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.event-popup-body { flex: 1; min-width: 0; }

.event-popup-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--muted); margin-bottom: 3px;
}

.event-popup-title {
  font-size: 14px; font-weight: 700;
  color: var(--text); line-height: 1.3;
  margin-bottom: 4px;
}

.event-popup-days {
  font-size: 12px; color: #3b82f6;
  font-weight: 600; margin-bottom: 6px;
}

.event-popup-link {
  font-size: 12px; font-weight: 600;
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
}

.event-popup-link:hover { border-color: var(--text); }

.event-popup-close {
  position: absolute; top: 8px; right: 8px;
  border: none; background: none; color: var(--muted);
  font-size: 18px; cursor: pointer; line-height: 1;
  padding: 2px 6px; border-radius: 4px;
}

.event-popup-close:hover { background: var(--subtle); color: var(--text); }

/* ─── Feedback Modal ─────────────────────────────────────────────────────────── */

.feedback-modal-card {
  min-height: 220px;
  display: flex; flex-direction: column;
  gap: 16px; text-align: center;
  align-items: center;
}

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

.feedback-avatar {
  width: 48px; height: 48px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
}

.feedback-modal-name {
  font-size: 15px; font-weight: 700; color: var(--text);
}

.feedback-modal-sub {
  font-size: 11px; color: var(--muted);
}

.feedback-modal-loading {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 100%;
}

.feedback-spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: #111;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn { from { transform: translate(-50%,-50%) scale(0.5); opacity: 0; } to { transform: translate(-50%,-50%) scale(1); opacity: 1; } }

.feedback-loading-text { font-size: 13px; color: var(--muted); }

.feedback-progress {
  width: 100%; height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 4px;
}

.feedback-progress-bar {
  height: 100%; background: #111; width: 0%; transition: width 0.3s linear; border-radius: 4px;
}

.feedback-progress-label {
  font-size: 11px; color: var(--muted); margin-top: 2px;
}

.feedback-subtitles {
  font-size: 15px; line-height: 1.8; color: var(--muted);
  text-align: center; max-width: 380px;
  padding: 4px 0;
}

.sub-word {
  color: var(--muted);
  transition: color 0.15s ease;
  display: inline;
}

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

.feedback-play-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #3b82f6; color: #fff; border: none;
  border-radius: 24px; padding: 10px 24px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.2s;
}
.feedback-play-btn:hover { background: #2563eb; }
.feedback-play-btn:disabled { background: var(--border); color: var(--text-muted); cursor: default; }

/* ─── Settings Button ────────────────────────────────────────────────────────── */

.settings-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  padding: 0;
}

.settings-btn:hover { background: var(--subtle); color: var(--text); }

/* ─── Goal Picker ────────────────────────────────────────────────────────────── */

.goal-picker-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.goal-picker-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  text-align: center;
}

.goal-picker-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 24px 0 8px;
}

.goal-picker-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

.goal-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goal-option {
  width: 100%;
  padding: 16px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  font-family: inherit;
}

.goal-option:hover { border-color: var(--text); background: var(--subtle); }

.goal-option.selected { border-color: var(--text); background: var(--subtle); }

.goal-option-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.goal-option-desc {
  font-size: 13px;
  color: var(--muted);
}

/* ─── Community Feed ─────────────────────────────────────────────────────────── */

.community-feed {
  margin-bottom: 40px;
}

.community-feed .card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease;
}

.feed-item:last-child { border-bottom: none; }

.feed-item-new {
  background: #f0fdf4;
  border-radius: var(--radius-sm);
  padding-left: 8px;
  padding-right: 8px;
}

.feed-avatar {
  width: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}

.feed-content {
  flex: 1;
  min-width: 0;
}

.feed-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.feed-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.feed-time {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.feed-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
}

.feed-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.feed-notes {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  font-style: italic;
}

.feed-fields {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feed-field {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.feed-field-label {
  font-weight: 600;
  color: var(--text);
}

.feed-ai-summary {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  padding: 7px 10px;
  background: var(--subtle);
  border-radius: 8px;
}

.feed-ai-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 1px;
}

.feed-ai-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-line;
}

.feed-empty {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 24px 0;
}

/* ─── Circle Points Toast & Confetti ─────────────────────────────────────────── */

.circle-points-toast {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 14px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50px;
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  opacity: 0;
  transform: scale(0.7) translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 3px 14px rgba(16,185,129,0.4);
}

.circle-points-toast-show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.circle-points-num {
  font-weight: 800;
  font-size: 14px;
}

.points-confetti-dot {
  position: absolute;
  top: -8px;
  pointer-events: none;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(260px) rotate(720deg); opacity: 0; }
}

/* ─── Fabian AI Badge ─────────────────────────────────────────────────────────── */

.fabian-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  background: var(--subtle);
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.fabian-ai-gem { font-size: 13px; line-height: 1; }

.btn-with-cost { position: relative; }

.btn-cost {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e5e5e5;
  color: #333;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1.3;
  pointer-events: none;
}

.inspiration-btn { position: relative; }

.inspiration-btn .btn-cost {
  top: -5px;
  right: -5px;
  background: #e5e5e5;
  color: #333;
}

.fabian-ai-badge-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* ─── AI Credits Badge ────────────────────────────────────────────────────────── */

.ai-credits-badge {
  position: fixed;
  top: 70px;
  right: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  z-index: 90;
  text-align: center;
}

.ai-credits-top {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.ai-credits-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 768px) {
  .ai-credits-badge { top: auto; bottom: 16px; right: 12px; }
}

/* ─── Practice Inspiration Hub ────────────────────────────────────────────────── */

.inspiration-hub { padding: 18px; }

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

.inspiration-header .fabian-ai-badge { margin-bottom: 0; }

.inspiration-title {
  font-size: 14px;
  font-weight: 700;
}

.inspiration-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inspiration-btn {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.inspiration-btn:hover { background: var(--subtle); }
.inspiration-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.inspiration-result { margin-top: 14px; }

.inspiration-loading {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.inspiration-text {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-line;
}

.inspiration-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
}

.inspiration-video {
  margin-top: 14px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}

.inspiration-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}

.inspiration-video-title {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  padding: 0 2px;
}

.feed-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

/* ─── History Profile ─────────────────────────────────────────────────────────── */

/* ─── Funnel Stats ────────────────────────────────────────────────────────────── */

.funnel-steps { display: flex; flex-direction: column; gap: 12px; }

.funnel-step-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}

.funnel-step-label { font-size: 13px; font-weight: 500; flex: 1; }
.funnel-step-value { font-size: 14px; font-weight: 700; min-width: 36px; text-align: right; }
.funnel-step-rate { font-size: 12px; color: var(--muted); min-width: 48px; text-align: right; }

.funnel-bar-track {
  height: 6px; background: var(--border); border-radius: 4px; overflow: hidden;
}

.funnel-bar-fill {
  height: 100%; border-radius: 4px; transition: width 0.5s ease;
}

/* ─── Games Card ──────────────────────────────────────────────────────────────── */

.games-card { padding: 16px; }
.games-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.games-title { font-size: 14px; font-weight: 700; }
.games-month { font-size: 10px; font-weight: 600; color: #dc2626; background: #fef2f2; padding: 2px 8px; border-radius: 50px; }
.games-sub { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.games-section { margin-bottom: 8px; }
.games-section:last-child { margin-bottom: 0; }
.games-section-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 3px; }
.games-row { display: flex; align-items: center; padding: 3px 0; font-size: 12px; gap: 8px; }
.games-row > span:first-child { flex: 1; }
.games-pts { font-weight: 700; color: var(--text); white-space: nowrap; }
.games-go { font-size: 10px; font-weight: 600; color: #3b82f6; cursor: pointer; white-space: nowrap; text-decoration: none; }

/* ─── Weekly Summary Card ─────────────────────────────────────────────────────── */

.ws-card { padding: 20px; margin-bottom: 16px; }
.ws-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ws-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.ws-title { font-size: 15px; font-weight: 700; }
.ws-week { font-size: 12px; color: var(--muted); }
.ws-text { font-size: 14px; line-height: 1.7; white-space: pre-line; color: var(--text); }
.ws-video { margin-top: 14px; border-radius: 10px; overflow: hidden; position: relative; padding-bottom: 56.25%; height: 0; }
.ws-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; border-radius: 10px; }
.ws-video-title { font-size: 11px; color: var(--muted); margin-top: 6px; position: absolute; bottom: -20px; }
.ws-recommended { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 14px; }

.history-ai-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  margin-top: 8px;
  font-family: inherit;
  transition: var(--transition);
}
.history-ai-toggle:hover { background: var(--subtle); color: var(--text); }

.streak-rewards { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.streak-next { font-size: 10px; color: var(--muted); }
.streak-hit { font-size: 10px; color: #10b981; font-weight: 600; }
.streak-5 { background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important; border-color: #a7f3d0 !important; }
.streak-10 { background: linear-gradient(135deg, #ede9fe, #ddd6fe) !important; border-color: #c4b5fd !important; }
.streak-30 { background: linear-gradient(135deg, #fef3c7, #fde68a) !important; border-color: #fcd34d !important; }

/* ─── Workflow Visualization ──────────────────────────────────────────────────── */

.workflow-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.workflow-step {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.workflow-trigger {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.workflow-action {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.workflow-remove {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.workflow-arrow {
  font-size: 16px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 768px) {
  .workflow-flow { flex-direction: column; align-items: flex-start; }
  .workflow-arrow { transform: rotate(90deg); }
}

.live-dot-wrap { display: flex; align-items: center; gap: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: live-blink 1.5s ease-in-out infinite; }
.live-count { font-size: 18px; font-weight: 700; }
@keyframes live-blink { 0%,100%{opacity:1}50%{opacity:.4} }

/* ─── Onboarding Tour ─────────────────────────────────────────────────────────── */

.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.tour-overlay-fade { opacity: 0; }

.tour-start-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: auto;
}

.tour-start-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.3);
}

.tour-start-title {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.tour-start-btn {
  background: #fff;
  color: #111;
  border: none;
  padding: 12px 32px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.tour-start-btn:hover { background: #e5e5e5; }

.tour-start-skip {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  cursor: pointer;
}

.tour-start-skip:hover { color: #fff; }

.tour-sound-badge {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 50px;
  backdrop-filter: blur(8px);
  animation: tour-sound-pulse 2s ease-in-out infinite;
}

@keyframes tour-sound-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.tour-spotlight {
  position: relative;
  z-index: 10001;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.78), 0 0 40px rgba(0,0,0,0.5);
  transition: box-shadow 0.4s ease;
}

/* ─── Admin Dashboard ─────────────────────────────────────────────────────────── */

.admin-layout {
  display: flex;
  min-height: calc(100vh - 56px);
  max-width: 1200px;
  margin: 0 auto;
}

.admin-sidebar {
  width: 200px;
  flex-shrink: 0;
  padding: 24px 12px;
  border-right: 1px solid var(--border);
}

.admin-nav { display: flex; flex-direction: column; gap: 4px; }

.admin-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  border: none;
  background: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
}

.admin-nav-item:hover { background: var(--subtle); color: var(--text); }
.admin-nav-item.active { background: var(--subtle); color: var(--text); font-weight: 600; }

.admin-content {
  flex: 1;
  padding: 24px 32px;
  min-width: 0;
}

.admin-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.admin-section-title { font-size: 14px; font-weight: 600; padding: 16px 16px 8px; }

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.admin-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.admin-stat-value { font-size: 28px; font-weight: 700; color: var(--text); }
.admin-stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.admin-table-wrap { overflow-x: auto; }

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

.admin-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table tr:hover { background: var(--subtle); }

.admin-delete-btn {
  background: none;
  border: none;
  color: #e53e3e;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.admin-delete-btn:hover { background: #fed7d7; }

.admin-activity-list { max-height: 400px; overflow-y: auto; }

.admin-activity-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.admin-activity-date { color: var(--muted); min-width: 100px; }
.admin-activity-min { color: var(--muted); min-width: 60px; text-align: right; }

@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 12px; }
  .admin-nav { flex-direction: row; gap: 6px; overflow-x: auto; }
  .admin-nav-item { white-space: nowrap; }
  .admin-content { padding: 16px; }
}

/* ────────────────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 8px; }
  .header-logo { font-size: 12px; flex: 1; }
  .header-user { display: none; }
  .header-right { order: 2; }
  .nav-tabs { order: 3; width: 100%; justify-content: center; }
  .nav-tab { flex: 1; text-align: center; font-size: 13px; padding: 7px 8px; }
}

/* ─── PRO Voice Call — App-native UI ───────────────────────────────────────── */

/* ── Idle state: same card language as the rest of the app ────────────── */
.pro-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 20px 60px;
}
.pro-card {
  max-width: 480px;
  width: 100%;
  padding: 32px 28px 28px;
  text-align: center;
}
.pro-card .fabian-ai-badge { margin: 0 auto 24px; }
.pro-avatar-ring {
  position: relative;
  width: 112px; height: 112px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pro-avatar-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.pro-avatar-ring::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  opacity: 0.5;
}
.pro-avatar-img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.pro-heading {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  margin: 0 0 8px;
}
.pro-sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 auto 24px;
  max-width: 340px;
}
.pro-start-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px 28px !important;
  font-size: 14px;
}
.pro-hint {
  margin: 18px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.pro-note {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
  display: inline-block;
  border: 1px solid var(--border);
}
.pro-note-error { background: #fdf1f1; color: #a03030; border-color: #f2caca; }
.pro-note-ended { background: var(--subtle, #f3f3f0); color: var(--muted); }

/* ── Active / connecting — fullscreen light takeover ─────────────────── */
.pro-call-room {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-family: inherit;
  animation: pro-room-in 0.35s cubic-bezier(0.2, 0, 0, 1);
  overflow: hidden;
}
@keyframes pro-room-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pro-call-close {
  position: absolute;
  top: 24px; left: 24px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.pro-call-close:hover {
  color: var(--text);
  border-color: var(--text);
}

.pro-call-timer {
  position: absolute;
  top: 28px; right: 28px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.pro-call-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.pro-call-avatar {
  position: relative;
  width: 180px; height: 180px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pro-call-avatar-img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}
.pro-call-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  pointer-events: none;
  opacity: 0.7;
}
.pro-call-ring-1 { inset: -16px; }
.pro-call-ring-2 { inset: -36px; opacity: 0.45; }
.pro-call-ring-3 { inset: -60px; opacity: 0.25; }

.pro-call-avatar-connecting .pro-call-ring {
  animation: pro-ring-pulse 2s ease-in-out infinite;
}
.pro-call-avatar-connecting .pro-call-ring-2 { animation-delay: 0.3s; }
.pro-call-avatar-connecting .pro-call-ring-3 { animation-delay: 0.6s; }

.pro-call-avatar-speaking .pro-call-ring {
  animation: pro-ring-pulse 1.3s ease-in-out infinite;
  border-color: var(--text);
}
.pro-call-avatar-speaking .pro-call-ring-1 { animation-delay: 0s; }
.pro-call-avatar-speaking .pro-call-ring-2 { animation-delay: 0.2s; opacity: 0.35; }
.pro-call-avatar-speaking .pro-call-ring-3 { animation-delay: 0.4s; opacity: 0.2; }
@keyframes pro-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%      { transform: scale(1.08); opacity: 0.2; }
}

.pro-call-label {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  margin: 0;
}
.pro-call-status-text {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.5px;
  min-height: 16px;
}

.pro-call-wrap-notice {
  position: absolute;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #b45309;
}
.pro-wrap-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #d97706;
  animation: pro-wrap-blink 1s ease-in-out infinite;
}
@keyframes pro-wrap-blink {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

.pro-hangup-btn {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--text);
  border: none;
  color: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s;
  animation: pro-hangup-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.2s;
}
.pro-hangup-btn:hover {
  transform: translateX(-50%) scale(1.06);
  background: #000;
}
.pro-hangup-btn:active { transform: translateX(-50%) scale(0.96); }
@keyframes pro-hangup-in {
  from { opacity: 0; transform: translateX(-50%) translateY(14px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 640px) {
  .pro-card { padding: 28px 22px 24px; }
  .pro-heading { font-size: 22px; }
  .pro-avatar-ring { width: 96px; height: 96px; }
  .pro-call-avatar { width: 140px; height: 140px; }
  .pro-call-ring-3 { inset: -44px; }
  .pro-call-ring-2 { inset: -28px; }
  .pro-call-ring-1 { inset: -14px; }
  .pro-call-timer { top: 18px; right: 18px; }
  .pro-call-close { top: 18px; left: 18px; }
  .pro-hangup-btn { bottom: 40px; width: 56px; height: 56px; }
}

/* ── Inline video player that appears during the final minute ────────── */
.pro-video-wrap {
  margin-top: 40px;
  max-width: 520px;
  width: min(520px, calc(100vw - 48px));
  animation: pro-video-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes pro-video-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.pro-video-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  text-align: center;
}
.pro-video-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  text-align: center;
}
.pro-video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.15);
}
.pro-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* When the video appears, the hangup button conflicts with bottom space —
   push it lower and let the call stage scroll. */
.pro-call-room:has(.pro-video-wrap) {
  justify-content: flex-start;
  padding: 80px 24px 120px;
  overflow-y: auto;
}
.pro-call-room:has(.pro-video-wrap) .pro-call-stage {
  margin-top: 40px;
}

/* Recent recommended video on the PRO idle card (last 12h from last call) */
.pro-recent-video {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.pro-recent-video-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.pro-recent-video-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

/* ── Bullet-summary popup during PRO call (top-right, 15s, no stacking) ─ */
.pro-summary-popup {
  position: absolute;
  top: 88px;
  right: 28px;
  max-width: 320px;
  min-width: 260px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px 18px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.22), 0 8px 24px -12px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateX(32px) scale(0.96);
  transition: opacity 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 10;
}
.pro-summary-popup-in {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.pro-summary-popup-out {
  opacity: 0 !important;
  transform: translateX(32px) scale(0.96) !important;
}
.pro-summary-popup-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.pro-summary-popup-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pro-summary-popup-bullets li {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  padding-left: 16px;
  position: relative;
  font-weight: 500;
}
.pro-summary-popup-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
}

/* On mobile the call view is tall and narrow — there's no room in the
 * top-right for a floating popup without it overlapping the Fabian avatar.
 * Anchor the popup to the bottom instead, just above the hangup button. */
@media (max-width: 640px) {
  .pro-summary-popup {
    top: auto;
    bottom: 140px;
    right: 16px;
    left: 16px;
    max-width: none;
    min-width: 0;
    transform: translateY(16px) scale(0.98);
  }
  .pro-summary-popup-in {
    transform: translateY(0) scale(1);
  }
  .pro-summary-popup-out {
    transform: translateY(16px) scale(0.98) !important;
  }
}

/* ── Recent call takeaways list on PRO idle card (12h persistence) ───── */
.pro-recent-summaries {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.pro-recent-summaries-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.pro-summary-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pro-summary-item {
  padding: 14px 16px;
  background: var(--subtle, #f3f3f0);
  border-radius: 12px;
}
.pro-summary-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.1px;
}
.pro-summary-item-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pro-summary-item-bullets li {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  padding-left: 14px;
  position: relative;
}
.pro-summary-item-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
}

/* ─── PWA Standalone Mode ─────────────────────────────────────────────────── */
/* When added to home screen: no logo, tabs sit at the top with safe-area
   padding for the notch, small utility bar below for notif/settings/signout */

body.pwa {
  padding-top: env(safe-area-inset-top);
}

.pwa-header {
  padding-top: 0;
}
.pwa-header .container {
  padding: 0;
}
.pwa-tabs {
  display: flex;
  justify-content: center;
  padding: 8px 12px 0;
}
.pwa-tabs .nav-tabs {
  width: 100%;
  justify-content: center;
}
.pwa-tabs .nav-tab {
  flex: 1;
  text-align: center;
  font-size: 12px;
  padding: 7px 6px;
}
.pwa-utils {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 6px 12px 8px;
  border-bottom: 1px solid var(--border);
}
.pwa-notif-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-notif-btn svg {
  width: 16px;
  height: 16px;
}
.pwa-settings-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-settings-btn svg {
  width: 16px;
  height: 16px;
}
.pwa-signout-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}
.pwa-signout-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

/* In PWA mode the notif badge is smaller to fit the compact buttons */
.pwa-notif-btn .notif-badge {
  font-size: 9px;
  padding: 1px 4px;
  top: -2px;
  right: -2px;
}

/* PRO tab cost badge */
.nav-tab-pro {
  position: relative;
}
.nav-tab-pro .btn-cost {
  position: absolute;
  top: -6px;
  right: -6px;
}

/* Focus area editor */
.area-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.area-edit-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.area-edit-btn:hover {
  background: var(--subtle, #f3f3f0);
}
