/* Личный кабинет Flash (my.flashvpn.it). Только светлая тема (решение владельца 01.12.2026) — цвета светлой темы
   приложения и писем. Шрифты — те же файлы, что у сайта (/fonts отдаёт тот же сервер). Без внешних запросов. */
@font-face {
  font-family: 'Unbounded';
  src: url('/fonts/Unbounded.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('/fonts/Onest.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #f5f5f2;
  --fg: #0d0d0e;
  /* #5f5f64 на #e9e9e5 — контраст 5,3:1 (на фоне — 5,9:1) */
  --muted: #5f5f64;
  --card: #e9e9e5;
  --line: rgba(0, 0, 0, 0.12);
  --active: #dcdcd7;
  --accent: #ff6a2b;
  --on-accent: #0b0b0c;
  /* Оранжевый текст на светлом фоне не читается — для ссылок темнее */
  --link: #b3410f;
  --ok: #1f9d64;
  --danger: #a61b1b;
  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --text: 'Onest', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.45 var(--text);
}
a { color: var(--link); }
a:hover { color: #8a300a; }
h1, h2, h3 { margin: 0; }
h1 { font: 600 28px/1.2 var(--display); }
h2 { font: 600 20px/1.3 var(--text); }
p { margin: 0; }
[hidden] { display: none !important; }

button, .button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font: 500 16px/1 var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
button:disabled { opacity: 0.55; cursor: default; }
button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}
.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.primary:hover { color: var(--on-accent); background: #ff7d45; }
.ghost { min-height: 44px; padding: 0 14px; }
.danger { color: var(--danger); border-color: rgba(166, 27, 27, 0.45); font-weight: 600; }
.link-button { border: 0; padding: 0; min-height: 44px; color: var(--muted); }

input {
  min-height: 52px;
  width: 100%;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--fg);
  font: 400 16px/1 var(--text);
}
input::placeholder { color: #6b6b70; }
input.code { font: 500 24px/1 var(--mono); letter-spacing: 6px; }
label { display: flex; flex-direction: column; gap: 8px; font-weight: 500; }

/* Шапка */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
}
.logo { font: 800 22px/1 var(--display); letter-spacing: -0.03em; }
.top-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Меню и содержимое: меню слева, на телефоне — строкой сверху */
.layout {
  display: flex; flex-wrap: wrap; gap: 32px;
  max-width: 1160px; margin: 0 auto; padding: 32px 24px 64px;
}
.nav { flex: 1 1 200px; max-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.nav button {
  justify-content: flex-start; border: 0; min-height: 44px; padding: 0 14px; border-radius: 10px;
  color: var(--muted); font-weight: 400;
}
.nav button[aria-current='page'] { background: var(--active); color: var(--fg); font-weight: 600; }
.view { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

/* Вход — по центру */
.login { max-width: 440px; margin: 24px auto; display: flex; flex-direction: column; gap: 18px; width: 100%; }
.login .link-button { align-self: flex-start; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.waiting { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; background: var(--card); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

/* Карточки и строки */
.card { border-radius: 18px; background: var(--card); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card.outline { background: transparent; border: 1px solid var(--line); }
.card.dashed { background: transparent; border: 1px dashed rgba(0, 0, 0, 0.25); }
.list { border-radius: 18px; background: var(--card); overflow: hidden; }
.row-item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
}
.row-item:last-child { border-bottom: 0; }
.row-item .main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-item .grow { flex: 1 1 100%; }
.row-item .title { font-weight: 600; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: var(--mono); overflow-wrap: anywhere; }
.big { font: 600 32px/1.15 var(--display); }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.status::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status.on::before { background: var(--ok); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline-form > label { flex: 1 1 220px; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tile {
  min-height: 92px; border-radius: 16px; background: var(--card); padding: 18px;
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--fg);
}
a.tile:hover { color: var(--fg); background: var(--active); }
.price { font: 600 26px/1.2 var(--display); }
.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card); }
.segmented button { min-height: 40px; border: 0; padding: 0 14px; border-radius: 9px; }
.segmented button[aria-pressed='true'] { background: #fff; font-weight: 600; }
.table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 14px 16px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
.head-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }

/* Сообщение внизу */
.note {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px));
  padding: 14px 18px; border-radius: 14px; background: var(--fg); color: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); z-index: 10;
}
.note.error { background: var(--danger); color: #fff; }

/* Телефон: меню — прокручиваемая строка */
@media (max-width: 720px) {
  .top { padding: 10px 16px; }
  .who { display: none; }
  .layout { padding: 0 16px 48px; gap: 16px; }
  .nav {
    flex: 1 1 100%; max-width: none; flex-direction: row; overflow-x: auto;
    padding: 12px 0; border-bottom: 1px solid var(--line); scrollbar-width: none;
  }
  .nav button { flex: none; border-radius: 20px; background: var(--card); color: var(--fg); min-height: 40px; }
  .nav button[aria-current='page'] { background: var(--fg); color: var(--bg); }
  .view { flex-basis: 100%; }
  h1 { font-size: 24px; }
  .big { font-size: 26px; }
  .card { padding: 20px; }
}
