/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #faf8f5;
  --card: #ffffff;
  --ink: #2d2a26;
  --muted: #6b6560;
  --faint: #8a847d;
  --line: #e8e2da;
  --accent: #8e4a63;
  --accent-dark: #74394f;
  --accent-soft: #f3e7ec;
  --mild: #5a7a50;
  --moderate: #a06020;
  --severe: #a03030;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 600; }

a { color: var(--accent); }

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 6.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(45, 42, 38, 0.05);
}

/* ---------- Формы ---------- */
label.field { display: block; margin-bottom: 1rem; }
label.field span { display: block; font-size: 0.95rem; color: var(--muted); margin-bottom: 0.35rem; }

input[type='email'], input[type='password'], input[type='text'], input[type='date'], select, textarea {
  width: 100%;
  font-size: 1.05rem;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.btn {
  display: inline-block;
  width: 100%;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
}
.btn { transition: background 0.15s ease, transform 0.1s ease; }
.btn:active { background: var(--accent-dark); transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn-secondary { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-small { width: auto; font-size: 0.95rem; padding: 0.45rem 0.9rem; border-radius: 9px; }

.error { color: var(--severe); font-size: 0.98rem; margin: 0.5rem 0; }
.notice { color: var(--muted); font-size: 0.98rem; margin: 0.5rem 0; }

/* ---------- Шапка и нижняя навигация приложения ---------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.app-header .brand { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.app-header button { background: none; border: none; color: var(--muted); font-size: 0.95rem; cursor: pointer; font-family: inherit; padding: 0.4rem; }

.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}
.tabbar a {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  padding: 0.55rem 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--faint);
  text-decoration: none;
  border-top: 3px solid transparent;
  margin-top: -1px;
}
.tabbar a.active { color: var(--accent); border-top-color: var(--accent); }
.tabbar a:active { transform: scale(0.94); }
.tab-icon { position: relative; display: inline-flex; }

/* ---------- Трекер ---------- */
.date-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.date-nav button {
  font-size: 1.6rem; line-height: 1;
  width: 48px; height: 48px;
  border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; color: var(--accent); cursor: pointer;
}
.date-nav button[disabled] { opacity: 0.3; }
.date-nav .label { font-family: Georgia, serif; font-size: 1.15rem; text-align: center; }

.cat-title {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); margin: 1.4rem 0 0.5rem; font-family: inherit; font-weight: 700;
}
.cat-title svg { color: var(--accent); opacity: 0.75; flex: none; }

.symptom-row {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.8rem 0.9rem; margin-bottom: 0.5rem;
  box-shadow: 0 1px 2px rgba(45, 42, 38, 0.04);
}
.symptom-row .top-line { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.symptom-row .name { font-size: 1.02rem; font-weight: 600; }
.symptom-row .desc { font-size: 0.88rem; color: var(--muted); margin: 0.15rem 0 0; }

.sev-buttons { display: flex; gap: 0.4rem; margin-top: 0.6rem; }
.sev-buttons button {
  flex: 1 1; display: flex; align-items: center; justify-content: center; gap: 0.35rem;
  font-size: 0.92rem; font-weight: 600; font-family: inherit;
  padding: 0.55rem 0.2rem; border-radius: 9px;
  border: 1.5px solid var(--line); background: #fff; color: var(--muted); cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.sev-buttons button svg { flex: none; }
/* Столбики окрашены своей степенью и в неактивном состоянии — шкала читается до нажатия */
.sev-buttons .sev-1 svg { color: var(--mild); }
.sev-buttons .sev-2 svg { color: var(--moderate); }
.sev-buttons .sev-3 svg { color: var(--severe); }
.sev-buttons button:active { transform: scale(0.96); }
.sev-buttons button.on-1 { background: #eaf1e7; border-color: var(--mild); color: var(--mild); }
.sev-buttons button.on-2 { background: #f7ecdd; border-color: var(--moderate); color: var(--moderate); }
.sev-buttons button.on-3 { background: #f7e3e3; border-color: var(--severe); color: var(--severe); }
.sev-buttons button.on-1, .sev-buttons button.on-2, .sev-buttons button.on-3 {
  animation: hc-pop 0.25s ease;
}

@keyframes hc-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .sev-buttons button.on-1, .sev-buttons button.on-2, .sev-buttons button.on-3 { animation: none; }
}

.note-row { display: flex; gap: 0.4rem; margin-top: 0.55rem; }
.note-row input { font-size: 0.95rem; padding: 0.5rem 0.7rem; }
.note-toggle { background: none; border: none; color: var(--accent); font-size: 0.9rem; cursor: pointer; padding: 0.4rem 0; font-family: inherit; white-space: nowrap; }

/* ---------- История ---------- */
.hist-row { margin-bottom: 0.9rem; }
.hist-row .line1 { display: flex; justify-content: space-between; font-size: 0.98rem; margin-bottom: 0.25rem; }
.hist-row .days { color: var(--muted); font-size: 0.92rem; }
.hist-bar { height: 10px; border-radius: 5px; background: #f0ebe4; overflow: hidden; }
.hist-bar > div {
  height: 100%; border-radius: 5px; background: var(--accent);
  transition: width 0.35s ease;
}
.sev-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 2px; vertical-align: baseline;
}

/* ---------- Разное ---------- */
.disclaimer {
  font-size: 0.85rem; color: var(--faint); line-height: 1.45;
  margin-top: 2rem; text-align: center;
}
.med-item { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.med-item .med-name { font-weight: 600; }
.med-item .med-dose { color: var(--muted); font-size: 0.92rem; }
.med-item button { background: none; border: none; color: var(--faint); font-size: 0.9rem; cursor: pointer; font-family: inherit; }

.seg { display: flex; gap: 0.4rem; margin: 0.6rem 0 1rem; }
.seg button {
  flex: 1 1; font-size: 0.98rem; font-weight: 600; font-family: inherit;
  padding: 0.65rem 0.2rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; color: var(--muted); cursor: pointer;
}
.seg button.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---------- Мультипрофили (Фаза 6) ---------- */
.greeting {
  max-width: 640px; margin: 0 auto; padding: 0.85rem 1.25rem 0;
  font-family: Georgia, 'Times New Roman', serif; font-size: 1.2rem; color: var(--ink);
}
.profile-chips {
  display: flex; gap: 0.5rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 0.6rem 1.25rem; max-width: 640px; margin: 0 auto;
  scrollbar-width: none;
}
.profile-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 1rem; font-family: inherit; font-weight: 600;
  padding: 0.35rem 0.9rem 0.35rem 0.4rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--muted);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.chip:active { transform: scale(0.96); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.add { color: var(--accent); border-style: dashed; padding: 0.45rem 1rem; }
.chip-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.8rem; font-weight: 700; line-height: 1;
}

.tab-dot {
  position: absolute; top: -2px; right: -5px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--severe);
  box-shadow: 0 0 0 2px #fff;
}

.empty-state { text-align: center; padding: 1.5rem 1.25rem; }
.empty-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 0.6rem;
}

/* автодополнение лекарств */
.suggest { position: relative; }
.suggest-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 18px rgba(45, 42, 38, 0.12); overflow: hidden;
}
.suggest-list button {
  display: block; width: 100%; text-align: left; font-family: inherit; font-size: 1rem;
  padding: 0.6rem 0.8rem; border: none; background: none; cursor: pointer;
}
.suggest-list button:hover { background: var(--accent-soft); }
.med-badge {
  font-size: 0.75rem; color: var(--mild); border: 1px solid var(--mild);
  border-radius: 6px; padding: 0.05rem 0.35rem; margin-left: 0.4rem; white-space: nowrap;
}

