/* ==========================================================================
   ЛИЧНЫЙ КАБИНЕТ — вкладка «Профиль»
   Ни одного нового цвета/шрифта/радиуса: всё через переменные дизайн-системы
   «Асфальт», объявленные в motogolova-weather.html. Классы .card,
   .section-title, .banner, .skeleton, .status переиспользуются как есть —
   здесь только то, чего в основном файле ещё не было.
   ========================================================================== */

.pf-stack{ display: flex; flex-direction: column; gap: 12px; }

/* ---------- Шапка профиля ---------- */
.pf-head{
  display: flex; align-items: center; gap: 14px;
}
.pf-avatar{
  width: 56px; height: 56px; min-width: 56px;
  border-radius: 50%;
  background: var(--asphalt-2);
  border: 1px solid var(--hairline);
  object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-2);
  overflow: hidden;
}
.pf-name{
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-0);
  line-height: 1.2;
}
.pf-username{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  margin-top: 3px;
}

/* ---------- Подписка ---------- */
.pf-plan{
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.pf-plan-label{ font-size: 12px; color: var(--text-2); }
.pf-plan-value{
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.pf-plan-value.free{ color: var(--text-1); }
.pf-plan-value.premium{ color: var(--accent); }
.pf-plan-until{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  margin-top: 4px;
}
.pf-chip{
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.pf-chip.free{ background: var(--asphalt-3); color: var(--text-1); }
.pf-chip.premium{ background: var(--accent-dim); color: var(--accent); }

/* Кнопка действия — та же геометрия, что у .route-build-btn */
.pf-btn{
  height: var(--touch);
  width: 100%;
  border: none;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--bg-page);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.pf-btn:hover:not(:disabled){ filter: brightness(1.08); }
.pf-btn:disabled{ opacity: 0.55; cursor: default; }
.pf-btn.ghost{
  background: var(--asphalt-2);
  border: 1px solid var(--hairline);
  color: var(--text-0);
}
.pf-btn.ghost:hover:not(:disabled){ background: var(--asphalt-3); filter: none; }
.pf-btn i{ font-size: 18px; }

/* ---------- Строка с переключателем ---------- */
.pf-row{
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  min-height: var(--touch);
}
.pf-row-text{ flex: 1; min-width: 0; }
.pf-row-title{ font-size: 14px; font-weight: 500; color: var(--text-0); }
.pf-row-sub{ font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }

.pf-toggle{
  position: relative;
  width: 50px; height: 28px; min-width: 50px;
  border-radius: 999px;
  background: var(--asphalt-3);
  border: 1px solid var(--hairline);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.pf-toggle::after{
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--text-1);
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1), background 0.2s ease;
}
.pf-toggle.on{ background: var(--accent-dim); border-color: var(--accent); }
.pf-toggle.on::after{ transform: translateX(22px); background: var(--accent); }
.pf-toggle:disabled{ opacity: 0.45; cursor: default; }
.pf-toggle.busy{ opacity: 0.6; cursor: progress; }

/* ---------- Настройки райдера ---------- */
.pf-speed{
  display: flex; align-items: center; gap: 10px;
}
.pf-speed input{
  flex: 1; min-width: 0;
  height: var(--touch);
  padding: 0 12px;
  background: var(--asphalt-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--text-0);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
}
.pf-speed input:focus{ border-color: var(--accent); }
.pf-speed .unit{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}
.pf-speed .pf-btn{ width: auto; padding: 0 18px; }

/* ---------- Скелетоны загрузки ---------- */
.pf-sk-line{ height: 12px; margin-bottom: 8px; }
.pf-sk-line.w40{ width: 40%; }
.pf-sk-line.w60{ width: 60%; }
.pf-sk-line.w80{ width: 80%; }
.pf-sk-avatar{ width: 56px; height: 56px; border-radius: 50%; }
.pf-sk-btn{ height: var(--touch); border-radius: var(--r-md); }

/* ---------- Экран входа ---------- */
.pf-login{
  text-align: center;
  padding: 8px 4px;
}
.pf-login i{
  font-size: 40px;
  color: var(--text-2);
  display: block;
  margin-bottom: 10px;
}
.pf-login-title{
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-0);
  margin-bottom: 6px;
}
.pf-login-text{
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.5;
  margin-bottom: 16px;
}
/* Контейнер под iframe виджета Telegram (запасной путь, если бот не настроен) */
#pf-tg-widget{ display: flex; justify-content: center; min-height: var(--touch); }

/* Кнопка входа — фирменный синий Telegram, чтобы читалась как «официальная».
   Это единственное место в приложении с не-акцентным цветом кнопки: человек
   ожидает увидеть здесь узнаваемый бренд, а не оранжевый акцент «Асфальта». */
.pf-btn-tg{
  background: #2AABEE;
  color: #FFFFFF;
}
.pf-btn-tg:hover:not(:disabled){ filter: brightness(1.08); }

/* ---------- Сохранённые точки ---------- */
.pf-loc-list{ display: flex; flex-direction: column; gap: 6px; }
.pf-loc{
  display: flex; align-items: center; gap: 10px;
  background: var(--asphalt-2);
  border-radius: var(--r-md);
  padding: 10px 12px;
  min-height: var(--touch);
}
.pf-loc i{ color: var(--accent); font-size: 18px; flex-shrink: 0; }
.pf-loc-info{ flex: 1; min-width: 0; }
.pf-loc-name{
  font-size: 14px; font-weight: 500; color: var(--text-0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-loc-coord{ font-family: var(--font-mono); font-size: 11px; color: var(--text-2); margin-top: 2px; }
.pf-loc-del{
  background: none; border: none; cursor: pointer;
  color: var(--text-2); padding: 8px; border-radius: 6px;
  font-size: 16px; line-height: 1;
}
.pf-loc-del:hover:not(:disabled){ color: var(--danger); background: var(--danger-dim); }
.pf-loc-del:disabled{ opacity: 0.4; cursor: default; }

/* Выбор точки из уже добавленных городов */
.pf-picker-overlay{
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 200;
}
.pf-picker{
  background: var(--asphalt-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  width: 100%; max-width: 420px;
  max-height: 70vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}

/* ---------- Ползунок порога ветра ---------- */
.pf-speed input[type="range"]{
  -webkit-appearance: none; appearance: none;
  height: 6px; padding: 0;
  background: var(--asphalt-3);
  border: none; border-radius: 999px;
  outline: none;
}
.pf-speed input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  border: 3px solid var(--asphalt-1);
}
.pf-speed input[type="range"]::-moz-range-thumb{
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  border: 3px solid var(--asphalt-1);
}
.pf-speed .unit{ min-width: 62px; text-align: right; }

/* ---------- Тихие часы ---------- */
.pf-quiet{ display: flex; align-items: center; gap: 8px; }
.pf-quiet input[type="time"]{
  flex: 1; min-width: 0;
  height: var(--touch);
  padding: 0 10px;
  background: var(--asphalt-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--text-0);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}
.pf-quiet input[type="time"]:focus{ border-color: var(--accent); }
.pf-quiet .pf-btn{ width: auto; padding: 0 16px; }

/* Спиннер ожидания подтверждения */
.pf-spinner{
  width: 34px; height: 34px;
  margin: 0 auto 12px;
  border: 3px solid var(--asphalt-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: pfSpin 0.9s linear infinite;
}
@keyframes pfSpin{ to{ transform: rotate(360deg); } }

.pf-footnote{
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.5;
  text-align: center;
}
.pf-footnote a{ color: var(--text-1); }
