/* ===== Карманный ветеринар PRO — Премиальный стиль (Claymorphism & Glassmorphism) ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&family=Nunito:wght@300;400;500;600;700&display=swap');

:root {
  --text: #33291F; 
  --muted: #8A7B6A; 
  --line: #EADFC9;
  --line-light: #F4EFE6;
  --brand: #E46F28; 
  --brand-dark: #C25615; 
  --brand-soft: #FDF1E7;
  --green: #3CA66F; 
  --green-dark: #2F8357;
  --green-soft: #EBF8F1;
  --orange: #E18534; 
  --orange-soft: #FEF3E9;
  --red: #E25B5B; 
  --red-dark: #BE4343;
  --red-soft: #FDF1F0;
  --blue: #4D8CE4;
  --blue-soft: #EEF4FD;
  --soft: #FAF5EB; 
  --soft2: #ECE2D0; 
  --white: #FFFFFF;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --radius: 20px; 
  --radius-sm: 10px;
  --shadow-sm: 0 2px 4px rgba(51,41,31,.04);
  --shadow: 0 6px 16px rgba(51,41,31,.06), 0 2px 4px rgba(51,41,31,.03);
  --shadow-clay: 0 6px 0 var(--line), 0 8px 16px rgba(51,41,31,.06);
  --shadow-clay-brand: 0 4px 0 var(--brand-dark), 0 6px 12px rgba(228,111,40,.15);
  --shadow-clay-green: 0 4px 0 var(--green-dark), 0 6px 12px rgba(60,166,111,.15);
  --shadow-clay-red: 0 4px 0 var(--red-dark), 0 6px 12px rgba(226,91,91,.15);
  --transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text); 
  background-color: var(--soft);
  line-height: 1.6; 
  font-size: 16px;
  padding-bottom: 40px;
  min-height: 100vh;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  background-color: var(--soft);
  background-image: 
    radial-gradient(at 0% 0%, hsla(28,100%,74%,0.4) 0px, transparent 50%),
    radial-gradient(at 100% 0%, hsla(189,100%,56%,0.2) 0px, transparent 50%),
    radial-gradient(at 100% 100%, hsla(355,100%,93%,0.5) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(340,100%,76%,0.3) 0px, transparent 50%),
    linear-gradient(rgba(250,245,235,.6), rgba(250,245,235,.6)),
    url("../img/bg.jpg");
  background-size: cover, cover, cover, cover, auto, 160px;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--brand-dark); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--soft); border-radius: 99px; }
::-webkit-scrollbar-thumb { background: var(--soft2); border-radius: 99px; border: 2px solid var(--soft); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ===== Кнопки в стиле Claymorphism ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 2px solid var(--line);
  background: var(--white); color: var(--text); font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 0 var(--line), 0 4px 8px rgba(51,41,31,.05);
  transition: var(--transition);
  position: relative;
}
.btn:hover { background: var(--line-light); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn-primary { 
  background: var(--brand); 
  border-color: var(--brand-dark); 
  color: #fff; 
  box-shadow: var(--shadow-clay-brand);
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { box-shadow: 0 1px 0 var(--brand-dark); }
.btn-danger { 
  background: var(--red-soft); 
  border-color: var(--red-dark); 
  color: var(--red-dark); 
  box-shadow: var(--shadow-clay-red);
}
.btn-danger:hover { background: var(--red-dark); color: #fff; }
.btn-danger:active { box-shadow: 0 1px 0 var(--red-dark); }
.btn-lg { padding: 16px 30px; font-size: 17px; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; box-shadow: 0 3px 0 var(--line); }
.btn-sm:active { box-shadow: 0 1px 0 var(--line); }
.btn-block { width: 100%; display: flex; }
.btn:disabled { opacity: .5; cursor: default; pointer-events: none; }

/* ===== Бейджи ===== */
.badge { 
  display: inline-flex; 
  align-items: center; 
  gap: 4px;
  padding: 4px 12px; 
  border-radius: 999px; 
  font-size: 12.5px; 
  font-weight: 700; 
  border: 1px solid transparent;
}
.badge.blue { background: var(--brand-soft); color: var(--brand-dark); border-color: #F8D8BF; }
.badge.green { background: var(--green-soft); color: var(--green-dark); border-color: #C3E7D3; }
.badge.orange { background: var(--orange-soft); color: var(--orange); border-color: #FBD4B4; }
.badge.red { background: var(--red-soft); color: var(--red-dark); border-color: #F7D2CE; }

/* ===== Лендинг ===== */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; color: var(--text); }
.brand img { width: 38px; height: 38px; border-radius: 12px; border: 2px solid var(--line); box-shadow: var(--shadow-sm); }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; padding: 60px 0 80px; }
.hero h1 { font-size: 52px; line-height: 1.1; letter-spacing: -.02em; font-weight: 900; text-shadow: 0 2px 6px rgba(255,255,255,0.9), 0 0 12px rgba(255,255,255,0.9); }
.hero h1 em { font-style: normal; color: var(--brand); text-shadow: 2px 2px 0 var(--brand-soft), 0 2px 6px rgba(255,255,255,0.9); }
.hero p.lead { margin: 24px 0 36px; font-size: 20px; color: var(--text); max-width: 44ch; font-weight: 700; text-shadow: 0 1px 4px rgba(255,255,255,0.9), 0 0 8px rgba(255,255,255,0.9); }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-note { margin-top: 20px; font-size: 14px; color: var(--text); font-weight: 700; text-shadow: 0 1px 4px rgba(255,255,255,0.9); }
.section { padding: 80px 0; }
.section.alt { background: rgba(236, 226, 208, 0.3); backdrop-filter: blur(4px); border-y: 2px solid var(--line); }
.section h2 { font-size: 36px; letter-spacing: -.015em; margin-bottom: 12px; font-weight: 900; text-shadow: 0 2px 6px rgba(255,255,255,0.9), 0 0 12px rgba(255,255,255,0.9); }
.section .sub { color: var(--text); font-size: 18px; margin-bottom: 48px; max-width: 60ch; font-weight: 700; text-shadow: 0 1px 4px rgba(255,255,255,0.9), 0 0 8px rgba(255,255,255,0.9); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-clay); transition: var(--transition);
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 10px 0 var(--line), 0 12px 24px rgba(51,41,31,.08); }
.feature .ic { width: 54px; height: 54px; border-radius: 16px; background: var(--brand-soft); border: 2px solid #FAD5B8; display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 18px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; font-weight: 800; }
.feature p { font-size: 15px; color: var(--muted); font-weight: 500; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-clay); }
.step .num { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); border: 2px solid var(--brand-dark); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 18px; }
.step h3 { font-size: 18px; margin-bottom: 8px; font-weight: 800; }
.step p { font-size: 15px; color: var(--muted); font-weight: 500; }
.cta-band { background: var(--brand); border: 3px solid var(--brand-dark); border-radius: 24px; padding: 48px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; box-shadow: 0 10px 0 var(--brand-dark), 0 12px 24px rgba(228,111,40,.2); }
.cta-band h2 { font-size: 32px; }
.cta-band .btn { background: #fff; color: var(--brand); border-color: var(--line); box-shadow: 0 4px 0 var(--line); }
.cta-band .btn:hover { background: var(--brand-soft); }
.foot { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 40px 0; text-align: center; color: var(--text); font-size: 14px; border-top: 1px solid var(--glass-border); text-shadow: 0 1px 4px rgba(255,255,255,0.9); margin-top: 80px; font-weight: 500; }

/* ===== Приложение ===== */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 2px solid var(--line); }
.topbar-in { max-width: 980px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--white); border: 2px solid var(--line); font-size: 14px; font-weight: 700; cursor: pointer; transition: var(--transition); box-shadow: var(--shadow-sm); }
.chip:hover { background: var(--line-light); transform: translateY(-1px); }
.tabs { display: flex; gap: 6px; background: var(--soft2); padding: 6px; border-radius: 16px; margin: 24px auto 12px; max-width: 720px; overflow-x: auto; scrollbar-width: none; border: 2px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1; border: none; background: transparent; padding: 10px 8px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; transition: var(--transition); }
.tabs button.on { background: var(--white); color: var(--text); box-shadow: var(--shadow); border: 1px solid var(--line); }
.view { max-width: 760px; margin: 0 auto; padding: 12px 20px 90px; }

/* Карточка в стиле Glassmorphism */
.card { 
  background: var(--glass-bg); 
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); 
  border-radius: var(--radius); 
  box-shadow: var(--glass-shadow); 
  padding: 24px; 
  margin-bottom: 24px; 
  transition: var(--transition);
}
.card h3 { font-size: 19px; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 800; border-bottom: 2px solid var(--line-light); padding-bottom: 8px; }
.hint { font-size: 13.5px; color: var(--muted); font-weight: 500; }

/* Формы */
label.f { display: block; margin-bottom: 16px; font-size: 13.5px; font-weight: 700; color: var(--text); }
label.f input, label.f select, label.f textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--white); font-size: 15px;
  transition: var(--transition);
}
label.f textarea { min-height: 96px; resize: vertical; }
label.f input:focus, label.f select:focus, label.f textarea:focus { 
  border-color: var(--brand); 
  box-shadow: 0 0 0 4px var(--brand-soft);
  background: var(--white);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-err { color: var(--red-dark); font-size: 14px; font-weight: 700; margin: 8px 0; min-height: 18px; }

/* Авторизация */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--brand-soft); border-right: 3px solid var(--line); display: flex; flex-direction: column; justify-content: center; padding: 64px; }
.auth-side img { max-width: 440px; margin: 36px auto 0; filter: drop-shadow(0 8px 24px rgba(228,111,40,.08)); }
.auth-side h2 { font-size: 36px; line-height: 1.15; color: var(--text); }
.auth-side p { color: var(--muted); margin-top: 14px; max-width: 38ch; font-size: 18px; font-weight: 500; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.tab-bar { 
  position: fixed; bottom: 0; left: 0; width: 100%; 
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--glass-border); 
  display: flex; justify-content: space-around; padding: 12px 0; padding-bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 99;
}
.auth-card { width: 100%; max-width: 400px; background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-clay); }
.auth-card .brand { margin-bottom: 30px; }
.auth-tabs { display: flex; gap: 6px; background: var(--soft2); padding: 5px; border-radius: 12px; margin-bottom: 24px; border: 2px solid var(--line); }
.auth-tabs button { flex: 1; border: none; background: transparent; padding: 10px; border-radius: 8px; font-weight: 700; color: var(--muted); transition: var(--transition); }
.auth-tabs button.on { background: var(--white); color: var(--text); box-shadow: var(--shadow); }

/* Сегодня */
.greet { margin: 14px 0 4px; font-size: 28px; font-weight: 900; letter-spacing: -.02em; text-shadow: 0 2px 6px rgba(255,255,255,0.9), 0 0 12px rgba(255,255,255,0.8); }
.greet-sub { color: var(--text); font-size: 15px; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; text-shadow: 0 1px 4px rgba(255,255,255,0.9), 0 0 8px rgba(255,255,255,0.8); }
.feed-row { display: flex; align-items: center; gap: 16px; padding: 14px 6px; border-bottom: 2px solid var(--line-light); }
.feed-row:last-of-type { border-bottom: none; }
.feed-row input[type=checkbox] { 
  width: 24px; height: 24px; accent-color: var(--green); flex-shrink: 0; 
  cursor: pointer; border: 2px solid var(--line); border-radius: 6px; 
}
.feed-row .t { font-weight: 800; min-width: 60px; font-size: 16px; color: var(--text); }
.feed-row .lbl { font-weight: 600; font-size: 15px; }
.feed-row.done .lbl { color: var(--muted); text-decoration: line-through; }
.tip { display: flex; gap: 16px; padding: 14px 0; border-bottom: 2px solid var(--line-light); }
.tip:last-child { border-bottom: none; }
.tip .tip-i { font-size: 24px; flex-shrink: 0; width: 44px; height: 44px; background: var(--brand-soft); border-radius: 12px; display: flex; align-items: center; justify-content: center; border: 1px solid #FED8BC; }
.tip b { display: block; font-size: 15.5px; font-weight: 800; margin-bottom: 2px; }
.tip span { font-size: 14px; color: var(--muted); font-weight: 500; }

/* Статистика */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { background: var(--brand-soft); border: 2px solid #FDD7BB; border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: 24px; color: var(--brand-dark); font-weight: 800; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin-top: 4px; display: block; }

/* Здоровье и триаж */
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; font-size: 15px; font-weight: 600; cursor: pointer; border-radius: 8px; transition: var(--transition); }
.check-row:hover { background: var(--red-soft); }
.check-row input { width: 20px; height: 20px; accent-color: var(--red); flex-shrink: 0; cursor: pointer; }
.result { border-radius: var(--radius); padding: 20px; margin-top: 20px; border: 2px solid transparent; box-shadow: var(--shadow); }
.result.green { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); }
.result.orange { background: var(--orange-soft); border-color: var(--orange); color: var(--brand-dark); }
.result.red { background: var(--red-soft); border-color: var(--red); color: var(--red-dark); }
.result b { display: block; font-size: 18px; margin-bottom: 8px; font-weight: 800; }
.result p { font-size: 15px; font-weight: 600; }
.result ul { margin: 12px 0 0 20px; font-size: 14px; font-weight: 500; }
.result li { margin-bottom: 4px; }

/* Persistent AI Чат */
.chat { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; padding: 8px 4px 16px; border-bottom: 2px solid var(--line-light); margin-bottom: 14px; }
.msg { max-width: 80%; padding: 12px 16px; border-radius: 16px; font-size: 15px; font-weight: 500; line-height: 1.5; white-space: pre-wrap; box-shadow: var(--shadow-sm); position: relative; animation: slideIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.msg.user { 
  align-self: flex-end; 
  background: var(--brand); 
  color: #fff; 
  border-bottom-right-radius: 4px; 
  border: 2px solid var(--brand-dark);
  box-shadow: 0 3px 0 var(--brand-dark);
}
.msg.bot { 
  align-self: flex-start; 
  background: var(--white); 
  color: var(--text);
  border: 2px solid var(--line);
  border-bottom-left-radius: 4px; 
  box-shadow: 0 3px 0 var(--line);
}
.chat-in { display: flex; gap: 10px; }
.chat-in input { flex: 1; padding: 12px 16px; border: 2px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; transition: var(--transition); }
.chat-in input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* Quick prompts in chat */
.chat-prompts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chat-prompts button { background: var(--white); border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--muted); box-shadow: var(--shadow-sm); transition: var(--transition); }
.chat-prompts button:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.chat-prompts button:active { transform: translateY(1px); }

/* Typing indicator */
.typing-dots { display: inline-flex; align-items: center; gap: 4px; padding: 12px 18px; background: var(--white); border: 2px solid var(--line); border-radius: 16px; border-bottom-left-radius: 4px; box-shadow: 0 3px 0 var(--line); width: fit-content; align-self: flex-start; animation: slideIn 0.2s ease-out; }
.typing-dots span { width: 7px; height: 7px; background: var(--muted); border-radius: 50%; display: inline-block; animation: typing 1.4s infinite both; }
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1.1); opacity: 1; } }

/* Медкарта / Ветеринарный паспорт */
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 2px solid var(--line-light); font-size: 15px; font-weight: 600; }
.kv:last-child { border-bottom: none; }
.kv .del { border: none; background: none; color: var(--muted); font-size: 18px; padding: 2px 8px; transition: var(--transition); font-weight: 700; }
.kv .del:hover { color: var(--red-dark); transform: scale(1.1); }
.chart-box { width: 100%; overflow: hidden; padding: 10px 0; background: var(--white); border-radius: var(--radius-sm); }
.chart-box svg { width: 100%; height: auto; }

/* Вакцинная печать (Passport Stamps) */
.stamp-card {
  position: relative;
  overflow: hidden;
}
.stamp-card::before {
  content: "PASSPORT";
  position: absolute;
  top: 8px; right: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; font-weight: 800;
  color: var(--muted); opacity: 0.25;
  letter-spacing: 0.2em;
}

/* Напоминания */
.reminder-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 6px; border-bottom: 2px solid var(--line-light); }
.reminder-row:last-child { border-bottom: none; }
.reminder-row .info { display: flex; flex-direction: column; gap: 2px; }
.reminder-row .title { font-weight: 700; font-size: 15.5px; }
.reminder-row .time-days { font-size: 13px; color: var(--muted); font-weight: 600; }
.reminder-row .actions { display: flex; align-items: center; gap: 12px; }

/* Switch Toggle widget */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--soft2); border: 2px solid var(--line); border-radius: 34px; transition: .3s; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; border-radius: 50%; transition: .3s; box-shadow: var(--shadow-sm); }
input:checked + .slider { background-color: var(--green); border-color: var(--green-dark); }
input:checked + .slider:before { transform: translateX(20px); }

/* Кольцевой SVG-прогресс кормлений */
.progress-container { display: flex; align-items: center; gap: 20px; }
.progress-svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.progress-bg { fill: none; stroke: var(--soft2); stroke-width: 8; }
.progress-bar { fill: none; stroke: var(--brand); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 226; stroke-dashoffset: 226; transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.progress-text { display: flex; flex-direction: column; }
.progress-text h4 { font-size: 20px; font-weight: 800; }
.progress-text p { font-size: 14px; color: var(--muted); font-weight: 600; }

/* Профиль */
.pet-hero { display: flex; align-items: center; gap: 20px; }
.pet-ava { width: 84px; height: 84px; border-radius: 50%; background: var(--brand-soft); border: 3px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 40px; overflow: hidden; flex-shrink: 0; box-shadow: var(--shadow); }
.pet-ava img { width: 100%; height: 100%; object-fit: cover; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pet-switch { display: flex; gap: 8px; flex-wrap: wrap; }
.pet-switch .chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); box-shadow: 0 0 0 2px var(--brand-dark); }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); font-size: 15px; font-weight: 600; }
.empty img { width: 220px; margin: 0 auto 16px; opacity: .85; }
.hidden { display: none !important; }
.foot-app { text-align: center; color: var(--muted); font-size: 13px; padding: 24px; font-weight: 600; border-top: 2px solid var(--line-light); margin-top: 40px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); border: 2px solid #231C15; color: #fff; padding: 12px 24px; border-radius: 12px; font-size: 14.5px; font-weight: 700; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,0.15); animation: toastIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes toastIn { from { bottom: 0; opacity: 0; } to { bottom: 24px; opacity: 1; } }

/* ===== Адаптив ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 30px 0 60px; text-align: center; }
  .hero h1 { font-size: 40px; }
  .hero p.lead { margin: 20px auto 30px; }
  .hero-cta { justify-content: center; }
  .features, .steps { grid-template-columns: 1fr; gap: 20px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 620px) {
  .grid2, .grid3, .stats { grid-template-columns: 1fr; gap: 12px; }
  .tabs { margin: 16px 12px 6px; }
  .greet { font-size: 24px; }
  .cta-band { padding: 36px 20px; text-align: center; justify-content: center; }
  .cta-band h2 { font-size: 26px; }
  .progress-container { flex-direction: column; text-align: center; gap: 10px; }
}

/* Фирменные заголовки */
h1, .section h2, .cta-band h2, .auth-side h2, .greet {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase; letter-spacing: .02em; font-weight: 800;
}
.brand { text-transform: uppercase; letter-spacing: .04em; font-family: "Montserrat", sans-serif; }
.brand small { display: block; text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--muted); font-weight: 700; margin-top: -2px; }

/* ===== Чат и Сообщество ===== */
.sub-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.sub-tabs .chip { cursor: pointer; padding: 8px 16px; border-radius: 20px; font-weight: 700; border: 2px solid var(--line); background: var(--white); font-size: 14px; transition: var(--transition); }
.sub-tabs .chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); box-shadow: var(--shadow-sm); }

.chat-global-msg { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 16px; margin-bottom: 12px; max-width: 85%; border: 2px solid var(--line); line-height: 1.4; position: relative; }
.chat-global-msg.other { background: var(--white); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-global-msg.user { background: var(--brand-soft); align-self: flex-end; border-color: var(--brand); border-bottom-right-radius: 4px; }
.chat-global-msg .meta { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 4px; font-weight: 700; }
.chat-global-msg.other .meta { color: var(--brand-dark); }
.chat-global-msg.user .meta { color: var(--text); justify-content: flex-end; }
.chat-global-msg .pet-tag { font-size: 11px; padding: 1px 6px; border-radius: 8px; background: var(--soft2); border: 1px solid var(--line-light); color: var(--text); }
.chat-global-msg .time { font-size: 10.5px; color: var(--muted); align-self: flex-end; margin-top: 4px; }
.chat-global-msg .content { font-size: 14.5px; word-break: break-word; }

/* ===== Gamification & Motion ===== */
.motion-slide-up {
  animation: motionSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes motionSlideUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.motion-scale {
  animation: motionScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes motionScale {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.xp-float {
  position: absolute;
  color: var(--brand);
  font-weight: 900;
  font-size: 20px;
  pointer-events: none;
  animation: xpFloatAnim 1s ease-out forwards;
  z-index: 100;
  text-shadow: 0 2px 4px rgba(255,255,255,0.8);
}
@keyframes xpFloatAnim {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-40px) scale(1.2); }
}

.level-badge {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
  border: 2px solid #FFF;
}
.level-badge i { font-style: normal; font-size: 16px; }

.xp-bar-container {
  width: 100%;
  height: 12px;
  background: var(--line);
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, #FF9E5E 100%);
  border-radius: 999px;
  width: 0%;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* VIP Share Card */
.share-card-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; animation: fadeIn 0.3s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

.vip-card {
  width: 340px;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 24px;
  padding: 30px 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(255,255,255,0.2);
  text-align: center;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transform: scale(0.9);
  animation: vipPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.vip-card::before {
  content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.8), transparent 30%);
  animation: spinLight 4s linear infinite;
  z-index: -1; pointer-events: none;
}
@keyframes spinLight { 100% { transform: rotate(360deg); } }
@keyframes vipPop { to { transform: scale(1); } }

.vip-card .v-ava {
  width: 100px; height: 100px; border-radius: 50%;
  margin: 0 auto 16px; border: 4px solid #fff;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  background: var(--brand-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; overflow: hidden;
}
.vip-card .v-ava img { width: 100%; height: 100%; object-fit: cover; }
.vip-card .v-name { font-size: 26px; font-weight: 900; margin-bottom: 4px; }
.vip-card .v-breed { font-size: 14px; color: #555; font-weight: 700; margin-bottom: 16px; }
.vip-card .v-stats { display: flex; justify-content: space-around; background: rgba(255,255,255,0.6); padding: 12px; border-radius: 16px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.4); }
.vip-card .v-stat b { display: block; font-size: 20px; font-weight: 900; color: var(--brand); }
.vip-card .v-stat span { font-size: 11px; text-transform: uppercase; font-weight: 700; color: #666; }
.vip-card-close { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.5); border: none; width: 32px; height: 32px; border-radius: 50%; font-weight: 900; cursor: pointer; }


/* ===== v2.0: тёмная тема ===== */
html[data-theme="dark"] {
  --text: #EDE6DB;
  --muted: #A99C8A;
  --line: #3A342B;
  --line-light: #2E2921;
  --brand: #E98A4B;
  --brand-dark: #F0A368;
  --brand-soft: #3A2B1E;
  --soft: #171310;
  --soft2: #241F19;
  --white: #201B15;
  --green: #5CC08D;
  --red: #E87878;
  --blue: #74A5EE;
  --glass-bg: rgba(32, 27, 21, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-clay: 0 6px 0 rgba(0, 0, 0, 0.45), 0 10px 20px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] body {
  background: var(--soft);
  color: var(--text);
}
html[data-theme="dark"] body::before {
  background-image: linear-gradient(rgba(23, 19, 16, 0.93), rgba(23, 19, 16, 0.93)), url("../img/bg.jpg");
  background-size: auto, 160px;
  background-repeat: repeat, repeat;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: var(--soft2);
  color: var(--text);
  border-color: var(--line);
}
html[data-theme="dark"] img { filter: brightness(0.95); }

/* ===== v2.0: печать медкарты ===== */
@media print {
  .topbar, .tabs, .foot-app, form, button, .sub-tabs, #forbSearch, .toast, .chip { display: none !important; }
  body { padding-bottom: 0 !important; background: #fff !important; color: #000 !important; }
  body::before { display: none !important; }
  .card { box-shadow: none !important; border: 1px solid #bbb !important; page-break-inside: avoid; }
}

/* ===== v2.0: мелочи ===== */
.themeBtn { min-width: 40px; }
.dm-conv { border-bottom: 1px solid var(--line-light); padding: 10px 0; }
.dm-conv:hover { background: var(--brand-soft); border-radius: 10px; }

/* ===== v2.0: тёмная тема ===== */
html[data-theme="dark"] {
  --text: #EDE6DB;
  --muted: #A99C8A;
  --line: #3A342B;
  --line-light: #2E2921;
  --brand: #E98A4B;
  --brand-dark: #F0A368;
  --brand-soft: #3A2B1E;
  --soft: #171310;
  --soft2: #241F19;
  --white: #201B15;
  --green: #5CC08D;
  --green-soft: #1E3328;
  --red: #E87878;
  --red-soft: #3A2222;
  --blue: #74A5EE;
  --blue-soft: #1E2A3E;
  --orange-soft: #3A2B1E;
}
html[data-theme="dark"] body { background: #12100D; color: var(--text); }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: var(--soft2);
  color: var(--text);
  border-color: var(--line);
}
html[data-theme="dark"] .card { box-shadow: none; }
html[data-theme="dark"] img { opacity: 0.92; }

.themeBtn { min-width: 40px; }

/* ===== v2.0: печать медкарты ===== */
@media print {
  .topbar, .tabs, .bottom-nav, .fab, .btn, form, .themeBtn, .sub-tabs { display: none !important; }
  body { background: #fff !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
}
