/* ================================================================
   EHSAN GROUP KZ — Design System v.13.0
   Modern Mobile-First • No-Zoom Fix • 2025
   Primary: #006b3e  Accent: #d4af37
   ================================================================ */

/* ── КРИТИЧЕСКИЙ FIX: запрет зума при фокусе на iOS ─────────── */
/* iOS зумит если font-size инпута < 16px. Устанавливаем 16px ВЕЗДЕ */
input, select, textarea, button {
  font-size: 16px !important;
  font-family: inherit;
}
/* После фокуса возвращаем визуальный размер через transform */
input:focus, select:focus, textarea:focus {
  font-size: 16px !important;
}

/* ── CSS Custom Properties ───────────────────────────────────── */
:root {
  --c-green:       #006b3e;
  --c-green-d:     #004f2d;
  --c-green-l:     #e8f5ee;
  --c-green-m:     #d1fae5;
  --c-gold:        #d4af37;
  --c-gold-d:      #b8960f;
  --c-gold-l:      #fef9e7;
  --c-red:         #ef4444;
  --c-orange:      #f97316;
  --c-yellow:      #f59e0b;
  --c-blue:        #3b82f6;
  --c-purple:      #8b5cf6;
  --c-text:        #0f172a;
  --c-text-2:      #475569;
  --c-text-3:      #94a3b8;
  --c-border:      #e2e8f0;
  --c-bg:          #f8fafc;
  --c-surface:     #ffffff;
  --c-surface-2:   #f1f5f9;

  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 15px rgba(0,0,0,.07), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl:  0 20px 25px rgba(0,0,0,.08), 0 10px 10px rgba(0,0,0,.04);

  --topbar-h:  56px;
  --tabbar-h:  68px;

  /* Анимации */
  --dur: 200ms;
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: system-ui, -apple-system, 'Inter', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Запрет пользовательского зума */
  touch-action: manipulation;
}

body.has-topbar { padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); }
body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }

/* iOS PWA safe-area support */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
}

/* Убираем лишние отступы у main-content на iOS */
.main-content {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

a { color: var(--c-green); text-decoration: none; transition: color var(--dur); }
a:hover { color: var(--c-green-d); }

img { max-width: 100%; display: block; }

/* Убрать синюю подсветку касания на мобилке */
* { -webkit-tap-highlight-color: transparent; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,107,62,.2); border-radius: 99px; }

/* ================================================================
   TOPBAR
   ================================================================ */
.ehsan-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  min-height: var(--topbar-h);
  height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  z-index: 100;
  display: flex;
  align-items: flex-end;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: 8px;
  gap: 10px;
  /* Glassmorphism */
  background: rgba(0,107,62,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.topbar-logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.5px;
  color: #fff;
  flex: 1;
  line-height: 1;
}
.topbar-logo .dot { color: var(--c-gold); }

.topbar-btn {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  border: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--dur);
  text-decoration: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.topbar-btn:hover, .topbar-btn:active {
  background: rgba(255,255,255,.22);
  color: #fff;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--c-red);
  border-radius: 50%;
  border: 2px solid var(--c-green);
}
.notif-cnt {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--c-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 1.5px solid #fff;
}

/* ================================================================
   BOTTOM TABBAR
   ================================================================ */
.ehsan-tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  min-height: var(--tabbar-h);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: flex-start;
  padding-top: 6px;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  cursor: pointer;
  text-decoration: none;
  color: var(--c-text-3);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2px;
  transition: color var(--dur);
  padding: 0;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.tab-item.active { color: var(--c-green); }
.tab-item .tab-icon {
  font-size: 22px;
  line-height: 1;
  transition: transform var(--dur);
}
.tab-item.active .tab-icon { transform: scale(1.1); }

/* SOS таб — специальный */
.tab-item.tab-sos {
  position: relative;
  flex: 0 0 72px;
  justify-content: flex-start;
  padding-top: 0;
}
.tab-sos-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-red), #dc2626);
  box-shadow: 0 4px 16px rgba(239,68,68,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  margin-top: -12px;
  border: 4px solid #fff;
  transition: transform var(--dur), box-shadow var(--dur);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tab-sos-btn:active {
  transform: scale(.94);
  box-shadow: 0 2px 8px rgba(239,68,68,.3);
}
.tab-sos-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--c-red);
  margin-top: 2px;
}

/* ================================================================
   DRAWER (боковое меню)
   ================================================================ */
.ehsan-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur);
}
.ehsan-drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.ehsan-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(320px, 85vw);
  z-index: 201;
  background: var(--c-surface);
  transform: translateX(-100%);
  transition: transform 280ms var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0 var(--r-xl) var(--r-xl) 0;
  box-shadow: var(--shadow-xl);
}
.ehsan-drawer.open { transform: translateX(0); }

.drawer-header {
  background: linear-gradient(145deg, var(--c-green), #008a4f);
  padding: 20px 20px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  color: #fff;
  flex-shrink: 0;
}
.drawer-avatar {
  width: 56px; height: 56px;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 10px;
  border: 2px solid rgba(255,255,255,.3);
  overflow: hidden;
}
.drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.drawer-name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px;
}
.drawer-role {
  font-size: 12px;
  color: rgba(255,255,255,.7);
  font-weight: 600;
}
.drawer-online {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #86efac;
  margin-top: 4px;
}
.drawer-online::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
}

.drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.drawer-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--c-text-3);
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 10px 10px 4px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  color: var(--c-text-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--dur), color var(--dur);
  cursor: pointer;
  margin-bottom: 2px;
}
.drawer-link:hover, .drawer-link:active { background: var(--c-green-l); color: var(--c-green); }
.drawer-link.active { background: var(--c-green-m); color: var(--c-green); }
.drawer-link-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.drawer-link-badge {
  margin-left: auto;
  background: var(--c-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
}

.drawer-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
}
.drawer-lang-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.lang-btn {
  flex: 1;
  padding: 8px;
  background: var(--c-surface-2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-2);
  cursor: pointer;
  transition: all var(--dur);
  text-align: center;
}
.lang-btn.active { background: var(--c-green); color: #fff; border-color: var(--c-green); }

/* ================================================================
   ФОРМЫ — NO-ZOOM (font-size: 16px везде)
   ================================================================ */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: 6px;
  letter-spacing: .1px;
}

/* Единый стиль для ВСЕХ инпутов — font-size: 16px критически важен */
.form-control,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="url"],
select,
textarea {
  width: 100%;
  font-size: 16px !important; /* КРИТИЧНО: iOS не зумит если >= 16px */
  font-family: inherit;
  font-weight: 400;
  line-height: 1.4;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--dur), box-shadow var(--dur);
  -webkit-appearance: none;
  appearance: none;
  display: block;
  /* Запрет зума через transform */
  transform-origin: left top;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--c-green);
  box-shadow: 0 0 0 3px rgba(0,107,62,.1);
  outline: none;
  /* НИКАКИХ изменений transform при фокусе */
}

textarea {
  resize: vertical;
  min-height: 88px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { opacity: .7; }

/* Input группа (с иконкой) */
.input-group { position: relative; }
.input-group .input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-3);
  font-size: 18px;
  pointer-events: none;
  z-index: 1;
}
.input-group input { padding-left: 40px; }
.input-group .input-icon-right {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-3);
  font-size: 18px;
  cursor: pointer;
  z-index: 1;
}
.input-group .input-icon-right + input { padding-right: 40px; }

/* Grid для форм */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ================================================================
   КНОПКИ
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }

.btn-primary { background: var(--c-green); color: #fff; }
.btn-primary:hover { background: var(--c-green-d); color: #fff; }

.btn-gold { background: var(--c-gold); color: #fff; }
.btn-gold:hover { background: var(--c-gold-d); color: #fff; }

.btn-danger { background: var(--c-red); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--c-green);
  border: 2px solid var(--c-green);
}
.btn-outline:hover { background: var(--c-green-l); color: var(--c-green); }

.btn-ghost {
  background: transparent;
  color: var(--c-text-2);
  border: 1.5px solid var(--c-border);
}
.btn-ghost:hover { background: var(--c-surface-2); }

.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: var(--r-lg); }
.btn-full { width: 100%; }

/* Ripple effect */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.2);
  opacity: 0;
  transition: opacity var(--dur);
}
.btn:active::after { opacity: 1; }

/* ================================================================
   КАРТОЧКИ
   ================================================================ */
.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-body { padding: 16px; }
.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  margin: 0;
}
.card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface-2);
}

/* Кликабельная карточка */
.card-clickable {
  cursor: pointer;
  transition: transform var(--dur), box-shadow var(--dur), border-color var(--dur);
}
.card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0,107,62,.2);
}
.card-clickable:active { transform: translateY(0) scale(.99); }

/* ================================================================
   БЕЙДЖИ / ЧИПЫ
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.badge-green  { background: #dcfce7; color: #166534; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-gold   { background: var(--c-gold-l); color: #78350f; }

/* ================================================================
   АЛЕРТЫ
   ================================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #f0fdf4; border-color: #86efac; color: #166534; }
.alert-error   { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info    { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }

/* ================================================================
   СТРАНИЦЫ ADMIN / ОБЩИЙ ОБЁРТОЧНЫЙ DIV
   ================================================================ */
.page-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 24px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.page-header-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-text);
  line-height: 1.2;
}
.page-header-sub {
  font-size: 13px;
  color: var(--c-text-3);
  margin-top: 2px;
}
.page-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--c-text-3);
  text-decoration: none;
  margin-bottom: 8px;
  font-weight: 500;
}
.page-back:hover { color: var(--c-green); }

/* ================================================================
   СПИСОК (универсальный)
   ================================================================ */
.list-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--c-border);
  text-decoration: none;
  color: var(--c-text);
  transition: background var(--dur);
  position: relative;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover, .list-item:active { background: var(--c-surface-2); }
.list-item-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--c-green-l);
}
.list-item-main { flex: 1; min-width: 0; }
.list-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-sub {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.list-item-arrow {
  color: var(--c-text-3);
  font-size: 18px;
}

/* ================================================================
   ПРОГРЕСС СБОРОВ
   ================================================================ */
.progress-bar {
  height: 6px;
  background: var(--c-border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--c-green), #22c55e);
  transition: width .6s var(--ease);
  min-width: 4px;
}
.progress-fill.gold { background: linear-gradient(90deg, var(--c-gold), #fbbf24); }
.progress-fill.full { background: linear-gradient(90deg, var(--c-gold), #fbbf24); }

/* ================================================================
   KPI / STAT КАРТОЧКИ
   ================================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 14px;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 11px; font-weight: 700; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--c-text); line-height: 1; }
.stat-sub   { font-size: 12px; color: var(--c-text-3); margin-top: 3px; }

/* ================================================================
   ФИЛЬТРЫ / ПОИСК
   ================================================================ */
.search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-3);
  font-size: 18px;
  pointer-events: none;
}
.search-input {
  padding-left: 40px !important;
  background: var(--c-surface) !important;
  border-color: var(--c-border) !important;
}
.search-input:focus { border-color: var(--c-green) !important; }
.search-clear {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-3);
  font-size: 18px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  margin-bottom: 14px;
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  color: var(--c-text-2);
  cursor: pointer;
  transition: all var(--dur);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover, .chip.active {
  background: var(--c-green);
  border-color: var(--c-green);
  color: #fff;
}

/* ================================================================
   ПАГИНАЦИЯ
   ================================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.page-btn {
  padding: 8px 16px;
  border-radius: var(--r-md);
  background: var(--c-green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--dur);
}
.page-btn:hover { background: var(--c-green-d); color: #fff; }
.page-info { font-size: 14px; color: var(--c-text-3); }

/* ================================================================
   SOS FAB
   ================================================================ */
.sos-fab {
  display: none; /* показывается через JS если не в таббаре */
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--c-red);
  color: #fff;
  font-size: 24px;
  border: none;
  box-shadow: 0 4px 20px rgba(239,68,68,.5);
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fab-pulse 3s infinite;
  -webkit-tap-highlight-color: transparent;
}
@keyframes fab-pulse {
  0%,100% { box-shadow: 0 4px 20px rgba(239,68,68,.5); }
  50%      { box-shadow: 0 4px 30px rgba(239,68,68,.8), 0 0 0 8px rgba(239,68,68,.15); }
}

/* ================================================================
   ТОСТЫ (уведомления)
   ================================================================ */
.toast-container {
  position: fixed;
  top: calc(var(--topbar-h) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(360px, calc(100vw - 32px));
}
.toast {
  background: #1e293b;
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in .3s var(--ease);
  pointer-events: all;
  width: 100%;
  line-height: 1.4;
}
.toast.removing { animation: toast-out .3s var(--ease) forwards; }
.toast-success { background: #166534; }
.toast-error   { background: #991b1b; }
.toast-warning { background: #854d0e; background: #92400e; }
.toast-info    { background: #1e40af; }
.toast-icon    { font-size: 18px; flex-shrink: 0; }
.toast-msg     { flex: 1; }
.toast-close   { background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; font-size: 16px; padding: 2px; margin-left: 4px; flex-shrink: 0; }

@keyframes toast-in  { from { opacity:0; transform: translateY(-12px) scale(.95); } to { opacity:1; transform:none; } }
@keyframes toast-out { from { opacity:1; transform:none; } to { opacity:0; transform: translateY(-8px); } }

/* ================================================================
   SOS МОДАЛ
   ================================================================ */
.sos-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.sos-modal-overlay.open { opacity: 1; pointer-events: all; }

.sos-modal {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  padding: 20px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  transform: translateY(40px);
  transition: transform .3s var(--ease);
  box-shadow: var(--shadow-xl);
}
.sos-modal-overlay.open .sos-modal { transform: translateY(0); }

.sos-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-red);
  text-align: center;
  margin-bottom: 6px;
}
.sos-modal-sub {
  font-size: 13px;
  color: var(--c-text-3);
  text-align: center;
  margin-bottom: 18px;
}
.sos-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.sos-type-btn {
  background: #fef2f2;
  border: 2px solid #fca5a5;
  border-radius: var(--r-md);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--dur);
  -webkit-tap-highlight-color: transparent;
}
.sos-type-btn:hover, .sos-type-btn.selected {
  background: var(--c-red);
  border-color: var(--c-red);
  color: #fff;
}
.sos-type-icon { font-size: 26px; }
.sos-type-label { font-size: 11px; font-weight: 700; color: #991b1b; text-align: center; }
.sos-type-btn.selected .sos-type-label { color: #fff; }
.sos-send-btn {
  width: 100%;
  padding: 14px;
  background: var(--c-red);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--dur);
  margin-bottom: 10px;
}
.sos-send-btn:hover { background: #dc2626; }
.sos-cancel-btn {
  width: 100%;
  padding: 11px;
  background: var(--c-surface-2);
  color: var(--c-text-2);
  border: none;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ================================================================
   СПИННЕР / СКЕЛЕТОН
   ================================================================ */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.spinner-sm { width: 20px; height: 20px; border-width: 2.5px; }
.spinner-lg { width: 48px; height: 48px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pulse animation for SOS sound button */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--c-text-3);
  font-size: 14px;
}

.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.5s infinite;
  border-radius: var(--r-sm);
}
@keyframes skeleton-shine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ================================================================
   АВТОРИЗАЦИЯ
   ================================================================ */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: linear-gradient(160deg, #f0fdf4 0%, #dcfce7 40%, #f0fdf4 100%);
}
.auth-card {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--c-border);
}
.auth-logo {
  text-align: center;
  font-size: 32px;
  font-weight: 900;
  color: var(--c-green);
  margin-bottom: 4px;
}
.auth-logo .dot { color: var(--c-gold); }
.auth-tagline {
  text-align: center;
  font-size: 13px;
  color: var(--c-text-3);
  margin-bottom: 24px;
}
.auth-title {
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  color: var(--c-text);
  margin-bottom: 6px;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--c-text-3);
  text-align: center;
  margin-bottom: 20px;
}

/* ================================================================
   ПУСТОЕ СОСТОЯНИЕ
   ================================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}
.empty-icon   { font-size: 56px; margin-bottom: 14px; opacity: .7; }
.empty-title  { font-size: 16px; font-weight: 700; color: var(--c-text-2); margin-bottom: 6px; }
.empty-text   { font-size: 14px; color: var(--c-text-3); margin-bottom: 16px; }

/* ================================================================
   ТАЙМЛАЙН
   ================================================================ */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 14px; padding-bottom: 16px; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 13px; top: 26px;
  width: 2px;
  bottom: 0;
  background: var(--c-border);
}
.tl-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--c-border);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-3);
  z-index: 1;
}
.tl-dot.done   { background: var(--c-green); color: #fff; }
.tl-dot.active { background: var(--c-gold); color: #fff; }
.tl-dot.error  { background: var(--c-red); color: #fff; }
.tl-content    { flex: 1; padding-top: 4px; }
.tl-title      { font-size: 14px; font-weight: 700; color: var(--c-text); }
.tl-time       { font-size: 12px; color: var(--c-text-3); margin-top: 1px; }
.tl-note       { font-size: 13px; color: var(--c-text-2); margin-top: 4px; font-style: italic; }

/* ================================================================
   ФИНАНСОВЫЕ КАРТОЧКИ
   ================================================================ */
.finance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-2);
}
.finance-row:last-child { border-bottom: none; }
.finance-row.total {
  font-weight: 800;
  color: var(--c-green);
  font-size: 16px;
  border-top: 2px solid var(--c-border);
  padding-top: 12px;
  margin-top: 4px;
}
.finance-row .value { font-weight: 700; color: var(--c-text); }
.finance-row.negative .value { color: var(--c-red); }
.finance-row.positive .value { color: var(--c-green); }

/* ================================================================
   ДИСТРИБЬЮЦИЯ (цветные бары)
   ================================================================ */
.dist-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dist-label { min-width: 100px; font-size: 13px; color: var(--c-text-2); }
.dist-bar-wrap { flex: 1; height: 8px; background: var(--c-surface-2); border-radius: 99px; overflow: hidden; }
.dist-bar { height: 100%; border-radius: 99px; transition: width .5s var(--ease); }
.dist-amount { min-width: 80px; text-align: right; font-size: 13px; font-weight: 700; color: var(--c-text); }

/* ================================================================
   ИНФО-СТРОКИ (key-value)
   ================================================================ */
.info-rows { display: flex; flex-direction: column; }
.info-row {
  display: grid;
  grid-template-columns: minmax(110px, 34%) minmax(0, 1fr);
  align-items: start;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--c-border);
  gap: 12px;
}
.info-row:last-child { border-bottom: none; }
.info-row-label { color: var(--c-text-3); font-size: 13px; line-height: 1.35; }
.info-row-value { font-weight: 700; color: var(--c-text); text-align: left; line-height: 1.45; overflow-wrap: anywhere; word-break: normal; }
.info-row-value a { color: var(--c-green); }
.patient-qr-card { width: fit-content; margin: 14px auto 0; padding: 10px; border: 1px solid var(--c-border); border-radius: 16px; background: #fff; text-align: center; }
.patient-qr-img { width: 132px; height: 132px; display: block; border-radius: 12px; }
.patient-qr-caption { font-size: 11px; color: var(--c-text-3); margin-top: 6px; }
@media (max-width: 420px) {
  .info-row { grid-template-columns: 1fr; gap: 3px; }
  .info-row-value { font-size: 15px; }
}

/* ================================================================
   УТИЛИТЫ
   ================================================================ */
.mono { font-family: 'SF Mono', 'Fira Code', monospace; }
.text-green { color: var(--c-green) !important; }
.text-red   { color: var(--c-red) !important; }
.text-gold  { color: var(--c-gold) !important; }
.text-muted { color: var(--c-text-3) !important; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.text-center { text-align: center; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12{ margin-top: 12px; }
.mt-16{ margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12{ margin-bottom: 12px; }
.mb-16{ margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }

/* Разделитель */
.divider { height: 1px; background: var(--c-border); margin: 12px 0; }
.divider-text {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--c-text-3); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  margin: 14px 0;
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--c-border);
}

/* Секция */
.section { margin-bottom: 20px; }
.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title-badge {
  font-size: 12px;
  background: var(--c-green);
  color: #fff;
  padding: 2px 10px;
  border-radius: 99px;
  font-weight: 700;
}
.section-link { font-size: 13px; color: var(--c-green); font-weight: 600; }

/* Flash messages */
.flash-success { background:#f0fdf4; border:1px solid #86efac; color:#166534; border-radius:var(--r-md); padding:10px 14px; font-size:14px; margin-bottom:12px; }
.flash-error   { background:#fef2f2; border:1px solid #fca5a5; color:#991b1b; border-radius:var(--r-md); padding:10px 14px; font-size:14px; margin-bottom:12px; }
.flash-warning { background:#fffbeb; border:1px solid #fde68a; color:#92400e; border-radius:var(--r-md); padding:10px 14px; font-size:14px; margin-bottom:12px; }
.flash-info    { background:#eff6ff; border:1px solid #93c5fd; color:#1e40af; border-radius:var(--r-md); padding:10px 14px; font-size:14px; margin-bottom:12px; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-box {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--c-border);
}
.modal-title { font-size: 18px; font-weight: 800; color: var(--c-text); margin-bottom: 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* Consent checkbox */
.check-label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--c-text-2); cursor: pointer; line-height: 1.5;
}
.check-label input[type="checkbox"] {
  width: 18px !important; height: 18px !important;
  min-width: 18px;
  border-radius: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: var(--c-green);
  flex-shrink: 0;
  margin-top: 1px !important;
  cursor: pointer;
}

/* ================================================================
   HOME HERO, NEWS, CONTENT ADMIN
   ================================================================ */
.page-wrap { max-width: 680px; margin: 0 auto; }

.hero {
  background: linear-gradient(160deg, #006b3e 0%, #008a4f 60%, #00a85c 100%);
  padding: 28px 20px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before,.hero::after{content:'';position:absolute;border-radius:50%;background:rgba(255,255,255,.05)}
.hero::before{top:-40px;right:-40px;width:220px;height:220px}.hero::after{bottom:-30px;left:-30px;width:160px;height:160px}
.hero-content{position:relative;z-index:1}.hero-logo{font-size:32px;font-weight:900;color:#fff;letter-spacing:-1px;margin-bottom:4px}.hero-logo .dot{color:var(--c-gold)}
.hero-tagline{font-size:14px;color:rgba(255,255,255,.8);margin-bottom:20px}.hero-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.hero-stats.compact{margin:16px 0;max-width:340px}
.hero-stat{background:rgba(255,255,255,.12);border-radius:12px;padding:12px;backdrop-filter:blur(4px);border:1px solid rgba(255,255,255,.15)}
.hero-stat-val{font-size:20px;font-weight:900;color:#fff;line-height:1;margin-bottom:3px}.hero-stat-lbl{font-size:11px;color:rgba(255,255,255,.75);font-weight:600}
.hero-cta{display:flex;gap:10px;margin-top:20px}.btn-hero-primary,.btn-hero-outline{padding:12px;border-radius:12px;font-weight:800;text-align:center;text-decoration:none;display:block;touch-action:manipulation;color:#fff}.btn-hero-primary{flex:2;background:var(--c-gold)}.btn-hero-outline{flex:1;background:rgba(255,255,255,.15);border:1.5px solid rgba(255,255,255,.4)}
.filters-wrap{padding:16px 16px 0}.patients-grid{padding:16px;display:grid;grid-template-columns:1fr;gap:14px}.patient-card{background:#fff;border-radius:16px;overflow:hidden;border:1px solid var(--c-border);box-shadow:var(--shadow-sm);transition:transform .2s,box-shadow .2s;text-decoration:none;color:inherit;display:block}.patient-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}.patient-card:active{transform:scale(.99)}.pc-photo,.pc-photo-ph{width:100%;height:180px}.pc-photo{object-fit:cover;background:var(--c-green-l)}.pc-photo-ph{background:linear-gradient(135deg,var(--c-green-l),var(--c-green-m));display:flex;align-items:center;justify-content:center;font-size:60px}.pc-body{padding:14px}.pc-badges{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:8px}.pc-name{font-size:16px;font-weight:800;color:var(--c-text);margin-bottom:4px;line-height:1.3}.pc-diag{font-size:13px;color:var(--c-text-3);margin-bottom:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.pc-city{font-size:12px;color:var(--c-text-3);margin-bottom:10px;display:flex;align-items:center;gap:4px}.pc-progress-bar{height:6px;background:var(--c-border);border-radius:99px;overflow:hidden;margin-bottom:6px}.pc-progress-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,var(--c-green),#22c55e);transition:width .6s ease;min-width:4px}.pc-progress-fill.full{background:linear-gradient(90deg,var(--c-gold),#fbbf24)}.pc-progress-info{display:flex;justify-content:space-between;align-items:center}.pc-collected{font-size:15px;font-weight:800;color:var(--c-green)}.pc-pct{font-size:12px;font-weight:700;color:var(--c-text-3)}.pc-target{font-size:12px;color:var(--c-text-3)}.pc-urgent{border-color:#fca5a5;box-shadow:0 0 0 2px rgba(239,68,68,.1)}.urgent-strip{background:var(--c-red);color:#fff;font-size:11px;font-weight:700;text-align:center;padding:4px;letter-spacing:.5px}

.home-hero-slider{position:relative;min-height:calc(100svh - var(--topbar-h));background:var(--c-green);overflow:hidden;color:#fff}.home-hero-track,.home-hero-slide{position:absolute;inset:0}.home-hero-slide{opacity:0;pointer-events:none;transition:opacity .45s ease}.home-hero-slide.active{opacity:1;pointer-events:auto}.home-hero-picture,.home-hero-picture img{position:absolute;inset:0;width:100%;height:100%}.home-hero-picture img{object-fit:cover}.home-hero-overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,48,28,.35),rgba(0,48,28,.72) 58%,rgba(0,48,28,.92))}.home-hero-content{position:relative;z-index:2;min-height:calc(100svh - var(--topbar-h));display:flex;flex-direction:column;justify-content:flex-end;padding:28px 20px 86px;max-width:760px;margin:0 auto}.home-hero-kicker{display:inline-flex;width:max-content;max-width:100%;padding:6px 10px;border-radius:var(--r-full);background:rgba(212,175,55,.22);border:1px solid rgba(212,175,55,.55);font-size:12px;font-weight:800;color:#fff;margin:12px 0}.home-hero-content h1{font-size:34px;line-height:1.05;letter-spacing:-1px;margin:0 0 12px;font-weight:950;color:#fff}.home-hero-content p{font-size:16px;color:rgba(255,255,255,.88);line-height:1.55;max-width:560px}.home-hero-btn{width:max-content;min-width:180px;margin-top:4px}.home-hero-dots{position:absolute;left:0;right:0;bottom:24px;z-index:4;display:flex;justify-content:center;gap:8px}.home-hero-dot{width:8px;height:8px;border-radius:var(--r-full);border:0;background:rgba(255,255,255,.45);padding:0;transition:width .2s,background .2s}.home-hero-dot.active{width:28px;background:var(--c-gold)}

.news-section{padding:18px 16px}.home-news-section{padding-top:10px}.news-section-title{display:flex;align-items:center;justify-content:space-between}.section-more{font-size:13px;font-weight:800;color:var(--c-green)}.news-grid{display:grid;grid-template-columns:1fr;gap:14px}.news-card{display:block;background:var(--c-surface);border:1px solid var(--c-border);border-radius:var(--r-lg);overflow:hidden;box-shadow:var(--shadow-sm);text-decoration:none;color:inherit;transition:transform .2s,box-shadow .2s}.news-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}.news-card-image{height:180px;background:linear-gradient(135deg,var(--c-green-l),var(--c-gold-l));display:flex;align-items:center;justify-content:center;color:var(--c-green);font-size:42px}.news-card-image img{width:100%;height:100%;object-fit:cover}.news-card-body{padding:14px}.news-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--c-text-3);font-size:12px;font-weight:700;margin-bottom:8px}.news-category{--cat-color:var(--c-green);display:inline-flex;align-items:center;padding:4px 8px;border-radius:var(--r-full);background:var(--c-green-l);color:var(--cat-color);font-size:11px;font-weight:900}.news-card h3{font-size:17px;line-height:1.25;color:var(--c-text);margin:0 0 7px;font-weight:900}.news-card p{font-size:13px;color:var(--c-text-2);line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.news-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;color:var(--c-text-3);font-size:12px}.news-source{padding:3px 7px;border-radius:var(--r-full);background:var(--c-gold-l);color:var(--c-gold-d);font-weight:800}.news-category-row{display:flex;gap:8px;overflow-x:auto;padding:0 16px 14px}.news-category-chip{white-space:nowrap;padding:9px 12px;border-radius:var(--r-full);background:#fff;border:1px solid var(--c-border);font-weight:800;color:var(--c-text-2);font-size:13px}.news-category-chip.active{background:var(--cat-color,var(--c-green));border-color:var(--cat-color,var(--c-green));color:#fff}.news-category-chip span{opacity:.75;margin-left:4px}.news-page-grid{padding:0 16px 16px}.news-detail{padding:16px}.back-link{display:inline-flex;margin-bottom:12px;font-weight:800}.news-detail-hero{border-radius:var(--r-xl);overflow:hidden;box-shadow:var(--shadow-lg);margin-bottom:14px;background:var(--c-green-l)}.news-detail-hero img{width:100%;max-height:420px;object-fit:cover}.news-detail-body{padding:18px}.news-detail h1{font-size:26px;line-height:1.15;letter-spacing:-.5px;margin:8px 0 10px;color:var(--c-text)}.news-lead{font-size:16px;color:var(--c-text-2);font-weight:650;margin-bottom:16px}.news-content{font-size:16px;line-height:1.75;color:var(--c-text);white-space:normal}.news-source-box{margin-top:18px;padding:12px;border-radius:var(--r-md);background:var(--c-surface-2);color:var(--c-text-2)}.news-share{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.news-share .btn{flex:1;min-width:110px;text-align:center}

.content-admin-list{display:flex;flex-direction:column}.content-admin-item{display:flex;gap:12px;align-items:center;padding:12px;border-bottom:1px solid var(--c-border)}.content-admin-item:last-child{border-bottom:0}.content-admin-item.is-muted{opacity:.58}.content-admin-preview{width:58px;height:58px;border-radius:var(--r-md);background:var(--c-green-l);display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;font-size:24px}.content-admin-preview img{width:100%;height:100%;object-fit:cover}.content-admin-main{min-width:0;flex:1}.content-admin-title{font-size:15px;font-weight:900;color:var(--c-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-admin-sub{font-size:12px;color:var(--c-text-3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.content-admin-meta{display:flex;gap:7px;flex-wrap:wrap;margin-top:6px;font-size:11px;color:var(--c-text-3);font-weight:700}.content-admin-actions{display:flex;gap:5px;flex-shrink:0}.content-edit-card{padding:16px}.form-grid-2,.content-upload-grid{display:grid;grid-template-columns:1fr;gap:12px}.content-image-preview{width:100%;height:150px;object-fit:cover;border-radius:var(--r-md);border:1px solid var(--c-border);margin-bottom:8px;background:var(--c-surface-2)}.content-image-preview.is-mobile{height:220px;object-fit:cover}.form-hint{font-size:12px;color:var(--c-text-3);margin-top:4px}.content-filter-card{padding:12px;margin-bottom:14px}

@media (min-width: 720px){.page-wrap{max-width:1100px}.patients-grid{grid-template-columns:repeat(3,1fr)}.news-grid{grid-template-columns:repeat(3,1fr)}.form-grid-2,.content-upload-grid{grid-template-columns:repeat(2,1fr)}.home-hero-content h1{font-size:54px}.home-hero-content{padding-left:36px;padding-right:36px}.home-hero-slider,.home-hero-content{min-height:620px}.news-detail h1{font-size:38px}.content-admin-preview{width:76px;height:76px}}
