html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;

  /* === фон в стиле iOS 26 Light (V-Tag palette) === */
  background:
    radial-gradient(900px 700px at 25% 20%, rgba(0, 200, 255, 0.08), transparent 5%),   /* лёгкая голубая аура слева */
    radial-gradient(800px 600px at 80% 60%, rgba(0, 255, 200, 0.07), transparent 5%),   /* мягкий бирюзовый свет справа */
    linear-gradient(180deg, #f9fafc 0%, #f4f5f7 100%);                                   /* нейтральная база */
  
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color: #1c1c1e;

  /* лёгкое свечение как у VisionOS */
  box-shadow: inset 0 0 60px rgba(255,255,255,0.25);
  padding-bottom: 80px;
  transition: background 0.4s ease, color 0.3s ease;
}


#content {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  max-width: 420px;   /* ~ iPhone 14 Pro Max */
  margin: 0 auto;     /* по центру */
  width: 100%;        /* чтобы адаптировался под телефон */
  box-sizing: border-box;
}

.page {
    display: none;
}
.page.active {
    display: block;
    animation: slideIn 0.35s ease;
}

/* iOS-style card */
.smarttag-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 0.5px 0 rgba(0,0,0,0.1); /* iOS-style тонкая тень */
  overflow: hidden;
  margin: 12px;
}

/* header */
.smarttag-card .card-header {
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  font-size: 17px;
  font-weight: 600;
  padding: 14px 16px;
  color: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* body */
.smarttag-card .card-body {
  padding: 16px;
  font-size: 15px;
  color: #000;
}

/* info rows */
.smarttag-card .info-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.smarttag-card .info-block:last-child {
  border-bottom: none;
}

.smarttag-card .info-block span:first-child {
  font-weight: 500;
  color: #000;
}
.smarttag-card .info-block span:last-child {
  color: rgba(60,60,67,0.6); /* iOS серый */
}

/* ссылка внизу */
.smarttag-card .link {
  color: #007aff;
  font-size: 15px;
  padding: 14px 16px;
  display: block;
}

/* iOS кнопки */
.btn {
  border-radius: 999px !important;
  font-size: 16px;
  padding: 8px 18px;
  font-weight: 500;
  transition: transform 0.2s cubic-bezier(.2,.8,.4,1), background 0.25s ease;
}
.btn:active {
  transform: scale(0.97);
}

/* Основные системные */
.btn-primary {
  background: #007AFF;
  color: #fff;
  border: none;
}
.btn-success {
  background: #34C759;
  color: #fff;
  border: none;
}
.btn-danger {
  background: #FF3B30;
  color: #fff;
  border: none;
}
.btn-secondary {
  background: rgba(120,120,128,0.12);
  color: #007AFF;
  border: none;
}
.btn-secondary:active {
  background: rgba(120,120,128,0.20);
}



/* Консоль */
.console {
    background: rgba(28, 28, 30, 0.92);
    border-radius: 18px;
    backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e5e5ea;
    font-family: Menlo, monospace;
    font-size: 14px;
    padding: 14px;
    max-height: 280px;
    overflow-y: auto;
}
.console::-webkit-scrollbar {
    display: none;
}

/* Bottom Nav */
/* Bottom Nav — c safe-area */
/* Нижнее меню на всю ширину */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;            /* теперь тянется по всей ширине */
  right: 0;
  height: calc(70px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);

  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);

  display: flex;
  justify-content: space-around; /* равномерное распределение */
  align-items: flex-start;
  z-index: 1000;
}

.bottom-nav button {
    background: none;
    border: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    color: #8e8e93;
    transition: color 0.25s ease, transform 0.15s ease, opacity 0.15s ease;

    height: 70px; /* фиксируем высоту блока для центрирования */
    padding-top: 6px; /* иконка+текст будут ровно в центре */
}

.bottom-nav button i {
    font-size: 26px;
    margin-bottom: 3px;
    transition: transform 0.2s ease;
    color: #8E8E93;
}

.bottom-nav button.active {
  color: #007AFF;
  font-weight: 600;
}
.bottom-nav button.active i {
  color: #007AFF;
}

.bottom-nav button:active {
    opacity: 0.6;
    transform: scale(0.92);
}

/* Dots */
.dots-indicator .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 4px;
    background: #c7c7cc;
    transition: all 0.3s;
}
.dots-indicator .dot.active {
    background: #007aff;
    width: 20px;
    border-radius: 10px;
}

/* Settings */

/* overlay */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.0); /* изначально прозрачный */
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 1100;

  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, backdrop-filter .35s ease;
}

.settings-overlay.active {
  opacity: 1;
  pointer-events: auto;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* sheet */
.settings-panel {
  width: 100%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);

  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(.25, 1.1, .25, 1); /* пружинка */
}

.settings-overlay.active .settings-panel {
  transform: translateY(0);
}

.settings-panel .handle {
  width: 36px;
  height: 5px;
  background: #c7c7cc;
  border-radius: 3px;
  margin: 8px auto 16px;
}

/* list style */
.settings-list {
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  margin: 0 16px 24px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  font-size: 16px;
  border-bottom: 1px solid #e5e5ea;
}
.settings-item:last-child {
  border-bottom: none;
}

/* toggle */
.ios-switch {
  position: relative;
  width: 51px;
  height: 31px;
}
.ios-switch input { display: none; }
.ios-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #e5e5ea;
  border-radius: 34px;
  transition: background-color .3s;
}
.ios-switch .slider:before {
  position: absolute;
  content: "";
  height: 27px;
  width: 27px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform .3s;
}
.ios-switch input:checked + .slider {
  background-color: #34C759;
}
.ios-switch input:checked + .slider:before {
  transform: translateX(20px);
}


.py-4 {
    padding-top: 5rem !important;
    padding-bottom: 1.5rem !important;
}

.py-2 {
    padding-top: 3rem !important;
    padding-bottom: 1.5rem !important;
}


.py-1 {
    padding-top: 1rem !important;
    padding-bottom: 1.5rem !important;
}

/* Pull-to-refresh индикатор */
.pull-refresh {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -60px) scale(0.6);
  opacity: 0;
  width: 36px;
  height: 36px;
  border: 3px solid #007aff;
  border-top-color: transparent;
  border-radius: 50%;
  transition: transform .2s ease, opacity .2s ease, border-color .3s ease;
  z-index: 2000;
}



.pull-refresh.active {
  opacity: 1;
  border-color: #34c759 #34c759 #34c759 transparent; /* зелёный, как индикатор */
}
.pull-refresh.spin {
  animation: spin 1s linear infinite;
  transform: translate(-50%, 80px) scale(1); /* фиксируем ниже */
}
@keyframes spin {
  to { transform: translate(-50%, 80px) rotate(360deg) scale(1); }
}

@keyframes slideIn {
  from { opacity:0; transform: translateX(40px); }
  to   { opacity:1; transform: translateX(0); }
}
@keyframes slideOut {
  from { opacity:1; transform: translateX(0); }
  to   { opacity:0; transform: translateX(-40px); }
}

.badge {
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  line-height: 1.2;
    text-transform: uppercase;
  letter-spacing: .3px;
}
.badge-red   { background: #FF3B30; color: #fff; }
.badge-green { background: #34C759; color: #fff; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page.active {
  animation: fadeInUp .25s ease;
}



/* Заголовок */
.info-summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 0;
  color: #007aff;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.info-details summary::marker,
.info-details summary::-webkit-details-marker { display: none; }
.info-details[open] .info-summary { color: #34c759; }

/* Стрелка */
.info-summary .arrow {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.info-details[open] .info-summary .arrow {
  transform: rotate(225deg); /* вниз */
}

/* Контент */
.info-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}
.info-details[open] .info-content {
  max-height: 500px;
  opacity: 1;
}



.info-details summary::marker,
.info-details summary::-webkit-details-marker { display: none; }
.info-details[open] .info-summary { color: #34c759; }

/* Контейнер для анимации */
.info-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}
.info-details[open] .info-content {
  max-height: 500px; /* достаточно, чтобы влезли все строки */
  opacity: 1;
}

/* iOS settings list */
.settings-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 15px;
  border-bottom: 1px solid #e5e5ea;
}
.settings-item:last-child { border-bottom: none; }
.settings-item span:first-child { color:#000; font-weight:500; }
.settings-item span:last-child { color:#3c3c4399; font-weight:400; }

.settings-item .chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #c7c7cc;
  border-bottom: 2px solid #c7c7cc;
  transform: rotate(-45deg);
  margin-left: auto;
}

.profile-header {
  padding: 24px 16px 12px;
}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-bottom: 12px;
}
.profile-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 2px;
  color: #000;
}
.profile-username {
  font-size: 15px;
  color: #8e8e93;
  margin-bottom: 0;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #FF3B30; /* iOS красный */
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: none; /* по умолчанию скрыт */
  text-align: center;
}


.notif-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notif-item {
  display: flex;
  align-items: center; /* выравнивание по центру */
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.notif-icon {
  flex: 0 0 36px;
  height: 36px;
  width: 36px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 18px;
}

.notif-text {
  flex: 1; /* занимает всё доступное место */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.notif-title {
  font-weight: 600;
  font-size: 15px;
  color: #1c1c1e;
  margin-bottom: 2px;
}
.notif-sub {
  font-size: 13px;
  color: #6c6c70;
  line-height: 1.2;
}

.notif-time {
  font-size: 12px;
  color: #8e8e93;
  margin-left: 8px;
  white-space: nowrap; /* не переносится */
  align-self: flex-start; /* фикс — время у верхнего края */
}

/* iOS system colors */
.bg-primary {
  background-color: #007AFF !important; /* iOS blue */
}

.bg-success {
  background-color: #34C759 !important; /* iOS green */
}

.bg-danger {
  background-color: #FF3B30 !important; /* iOS red */
}

.bg-warning {
  background-color: #FF9500 !important; /* iOS orange */
}

.bg-secondary {
  background-color: #8E8E93 !important; /* iOS gray */
}

/* ===== iOS System Colors ===== */
:root {
  --ios-blue:    #007AFF;
  --ios-green:   #34C759;
  --ios-red:     #FF3B30;
  --ios-orange:  #FF9500;
  --ios-yellow:  #FFCC00;
  --ios-gray:    #8E8E93;
  --ios-bg:      #F2F2F7;
  --ios-card:    #FFFFFF;
  --ios-text:    #1C1C1E;
  --ios-subtext: #6C6C70;
}

/* ===== Background overrides ===== */
.bg-primary   { background-color: var(--ios-blue) !important; }
.bg-success   { background-color: var(--ios-green) !important; }
.bg-danger    { background-color: var(--ios-red) !important; }
.bg-warning   { background-color: var(--ios-orange) !important; }
.bg-secondary { background-color: var(--ios-gray) !important; }
.bg-light     { background-color: var(--ios-bg) !important; }
.bg-dark      { background-color: #000 !important; }

/* ===== Text overrides ===== */
.text-primary   { color: var(--ios-blue) !important; }
.text-success   { color: var(--ios-green) !important; }
.text-danger    { color: var(--ios-red) !important; }
.text-warning   { color: var(--ios-orange) !important; }
.text-secondary { color: var(--ios-gray) !important; }
.text-muted     { color: var(--ios-subtext) !important; }
.text-dark      { color: var(--ios-text) !important; }

/* ===== Buttons ===== */
.btn {
  border-radius: 999px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  padding: 8px 18px !important;
  transition: transform 0.15s cubic-bezier(.2,.8,.4,1), background .2s;
  border: none !important;
}
.btn:active {
  transform: scale(0.96);
}

.btn-primary   { background: var(--ios-blue);    color: #fff; }
.btn-success   { background: var(--ios-green);   color: #fff; }
.btn-danger    { background: var(--ios-red);     color: #fff; }
.btn-warning   { background: var(--ios-orange);  color: #fff; }
.btn-secondary { background: rgba(120,120,128,0.12); color: var(--ios-blue); }
.btn-secondary:active { background: rgba(120,120,128,0.2); }

/* ===== Badges ===== */
.badge {
  border-radius: 999px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 4px 10px !important;
  letter-spacing: .3px;
}
.bg-primary.badge   { background: var(--ios-blue) !important; color: #fff; }
.bg-success.badge   { background: var(--ios-green) !important; color: #fff; }
.bg-danger.badge    { background: var(--ios-red) !important; color: #fff; }
.bg-warning.badge   { background: var(--ios-orange) !important; color: #fff; }
.bg-secondary.badge { background: var(--ios-gray) !important; color: #fff; }

/* ===== Alerts ===== */
.alert {
  border-radius: 14px !important;
  padding: 14px 16px !important;
  font-size: 15px !important;
  border: none !important;
}
.alert-primary   { background: rgba(0,122,255,0.1); color: var(--ios-blue); }
.alert-success   { background: rgba(52,199,89,0.1); color: var(--ios-green); }
.alert-danger    { background: rgba(255,59,48,0.1); color: var(--ios-red); }
.alert-warning   { background: rgba(255,149,0,0.1); color: var(--ios-orange); }
.alert-secondary { background: rgba(142,142,147,0.1); color: var(--ios-gray); }

/* ===== Cards ===== */
.card {
  background: var(--ios-card) !important;
  border-radius: 20px !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.card-header {
  border-bottom: 1px solid rgba(0,0,0,0.05) !important;
  background: transparent !important;
  font-size: 17px !important;
  font-weight: 600 !important;
}
.card-body { padding: 20px !important; }

/* ===== Form inputs ===== */
.form-control {
  border-radius: 12px !important;
  border: 1px solid #E5E5EA !important;
  padding: 10px 14px !important;
  font-size: 16px !important;
}
.form-control:focus {
  border-color: var(--ios-blue) !important;
  box-shadow: 0 0 0 2px rgba(0,122,255,0.25) !important;
}

/* ===== Modals ===== */
.modal-content {
  border-radius: 24px !important;
  background: var(--ios-card) !important;
  border: none !important;
}
.modal-header, .modal-footer {
  border: none !important;
}

.notif-item {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid #e5e5ea;
}
.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-right: 12px;
  font-size: 18px;
}
.notif-text { flex: 1; }
.notif-title { font-weight: 600; font-size: 15px; }
.notif-sub { font-size: 13px; color: #6c6c70; }
.notif-time { font-size: 12px; color: #8e8e93; white-space: nowrap; }

/* Общий контейнер */
#app-preloader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg,#f5f6fa,#e9ebf1,#f5f6fa);
  background-size: 400% 400%;
  animation: gradientMove 12s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  transition: opacity .6s ease;
}
#app-preloader.hide {
  opacity: 0;
  pointer-events: none;
}

#app-content {
  display: none; /* скрыто до окончания загрузки */
}

/* Спиннер */
.ios-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: #007aff; /* iOS-синий */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Первый запуск (онбординг) */
.ios-onboarding {
  text-align: center;
}
.ios-onboarding .ios-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #007aff;
  border-top-color: transparent;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}
.ios-onboarding-text {
  font-size: 16px;
  font-weight: 500;
  color: #1c1c1e;
  transition: opacity .3s ease;
}

/* Мини-прелоадер (повторные запуски) */
.ios-preloader .ios-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #007aff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* iOS alert */
.ios-alert-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
}
.ios-alert {
  background: #fff;
  border-radius: 14px;
  width: 85%;
  max-width: 320px;
  padding: 20px;
  text-align: center;
  animation: fadeIn .3s ease;
}
.ios-alert-title {
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 6px;
}
.ios-alert-desc {
  font-size: 14px;
  color: #6c6c70;
  margin-bottom: 16px;
}
.ios-alert-actions {
  display: flex;
  justify-content: center;
}
.ios-alert-btn.primary {
    background: #34C759;
    color: #fff;
    border-radius: 34px;
    padding: 8px 20px;
    font-size: 15px;
    font-weight: 500;
    border: none;
}
.ios-alert-btn.primary:active {
  background: #42b85f;
}

.btn:hover {
    background: rgba(120, 120, 128, 0.12);
    color: var(--ios-blue);
}

.btn-check:checked+.btn, .btn.active, .btn.show, .btn:first-child:active, :not(.btn-check)+.btn:active {
    color: var(--bs-btn-active-color);
    background: rgba(120, 120, 128, 0.12);
    border-color: var(--bs-btn-active-border-color);
}

/* Анимации */
@keyframes gradientMove {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from {opacity:0;transform:translateY(10px);}
  to {opacity:1;transform:translateY(0);}
}

/* Onboarding экраны */
.ios-onboarding {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  animation: fadeIn .8s ease;
}

.ios-onboarding .ios-spinner {
  width: 46px;
  height: 46px;
  border: 3px solid #007aff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite, scaleIn 0.6s ease;
}

.ios-onboarding-text {
  font-size: 17px;
  font-weight: 500;
  color: #1c1c1e;
  min-height: 24px; /* фикс, чтобы не прыгал контейнер */
  position: relative;
  overflow: hidden;
}

.ios-onboarding-text span {
  display: block;
  animation: slideUp 0.6s ease forwards;
}

/* Анимации */
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from {opacity:0;}
  to {opacity:1;}
}

/* Логотип */
.onboarding-logo {
  width: 90px;
  height: 90px;
  border-radius: 22px;
  background: url('/templates/logo.png') no-repeat center/cover;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  animation: scaleIn 0.8s ease;
  margin-bottom: 20px;
}

/* Pager dots */
.pager-dots {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.pager-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d1d1d6;
  transition: background .3s ease;
}
.pager-dots .dot.active {
  background: #007aff;
}

/* Контейнер онбординга: фиксированная ширина, чтобы прогресс не «плясал» */
.ios-onboarding {
  width: min(92vw, 340px);
  max-width: 340px;
  box-sizing: border-box;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Текст всегда вписывается в ширину контейнера */
.ios-onboarding-text {
  width: 100%;
  max-width: 100%;
  text-align: center;
  transition: opacity .25s ease;
  word-break: break-word;
}

/* Прогресс-бар всегда на всю ширину контейнера, как отдельный блок */
.progress-bar {
  width: 100%;
  height: 4px;
  background: #e5e5ea;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 16px;
  display: block;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: #007aff;
  border-radius: 2px;
  /* transition задаётся из JS под общую длительность */
}


/* фон всей страницы */
.ios-page {
  background: #f2f2f7;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 20px;
}

/* профиль сверху */
.profile-header {
  margin-bottom: 20px;
}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 12px;
}
.profile-name {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #000;
}
.profile-username {
  font-size: 15px;
  color: rgba(60,60,67,0.6);
  margin: 4px 0 0;
}

/* карточка настроек */
.settings-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0.5px 0 rgba(0,0,0,0.1);
}

/* элемент списка */
.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.settings-item:last-child {
  border-bottom: none;
}
.settings-value {
  color: rgba(60,60,67,0.6);
}


#ios-banner {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  width: 90%;
  max-width: 400px;

  display: flex;
  align-items: center;
  gap: 12px;

  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  padding: 12px 16px;

  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  opacity: 0;
  transition: all 0.4s cubic-bezier(.4,.8,.4,1);
  z-index: 9999;
}

#ios-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.banner-icon {
  font-size: 20px;
}

.banner-text {
  flex: 1;
}

.banner-title {
  font-size: 15px;
  font-weight: 600;
  color: #000;
}

.banner-subtitle {
  font-size: 13px;
  color: rgba(60,60,67,0.6);
}

.ios-modal {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255,255,255,0.4) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  overflow: hidden;
  text-align: center;
  color: #111;
}



.ios-title {
  font-size: 17px;
  font-weight: 600;
  margin: 20px 20px 10px;
  color: #000;
}

.ios-text {
  font-size: 15px;
  line-height: 1.5;
  margin: 0 20px 20px;
  color: #333;
}

.ios-footer {
  border-top: 1px solid rgba(0,0,0,0.15);
}

.btn-ios {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 14px 0;
  font-size: 17px;
  font-weight: 500;
  color: #007aff;
}
.btn-ios:active {
  background: rgba(0,0,0,0.05);
}


.smarttag-empty {
  background: #fff;
  border-radius: 20px;
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0,0,0,0.099);
  max-width: 360px;
  margin: 40px auto;
}

.smarttag-empty .empty-icon {
  margin-bottom: 20px;
  position: relative;
  width: 100px;
  height: 100px;
  margin-left: auto;
  margin-right: auto;
}

.smarttag-empty .tag {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #fdfdfd;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.08),
              0 0 15px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  letter-spacing: 0.5px;
  position: relative;
  animation: tagPulse 4s infinite;
}

@keyframes tagPulse {
  0% {
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.08),
                0 0 0 0 rgba(0,0,0,0.15);
  }
  70% {
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.08),
                0 0 0 20px rgba(0,0,0,0);
  }
  100% {
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.08),
                0 0 0 0 rgba(0,0,0,0);
  }
}

.smarttag-empty .empty-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #111;
}

.smarttag-empty .empty-text {
    font-size: 15px;
    opacity: 0.8;
    margin-bottom: 18px;
    padding: 5px 35px;
}

/* затемнение фона с blur */
.wow-overlay {
    position: fixed;
    inset: 0;
    background: rgba(242, 242, 247, 0.6);
    backdrop-filter: blur(7px);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

/* контейнер */
.wow-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fade-in 0.4s ease-out;
}

/* круг */
.wow-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  color: #34C759; /* iOS green */
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  position: relative;
  overflow: hidden;
  animation: pop-in 0.5s cubic-bezier(.4,1.4,.6,1);
}

/* анимация заливки круга */
.wow-circle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(180deg, #34c793 0%, #30b763 100%);
    opacity: 0;
    animation: fill-in 1.2s ease-out forwards;
    z-index: 1;
      box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.wow-circle i {
  position: relative;
  z-index: 2;
  color: #fff; /* белая галочка поверх заливки */
  text-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* текст */
.wow-title {
  margin-top: 20px;
    font-size: 18px;
    font-weight: 500;
  color: #1C1C1E; /* iOS label */
  opacity: 0;
  animation: fade-in 0.8s ease forwards 0.6s;
}

/* keyframes */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pop-in {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes fill-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

:root { --hs-gap: 16px; --hs-radius: 18px; }

.ios-homescreen-banner {
  position: fixed;
  left: 50%;
  bottom: calc(var(--hs-gap) + env(safe-area-inset-bottom, 0px));
  transform: translate3d(-50%, calc(100% + 24px + env(safe-area-inset-bottom, 0px)), 0);
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; max-width: min(92vw, 520px); width: max-content;
  border-radius: var(--hs-radius);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  z-index: 999999; will-change: transform;
}

.ios-homescreen-banner .hs-icon img { width: 40px; height: 40px; border-radius: 12px; }
.ios-homescreen-banner .hs-text { flex: 1; min-width: 0; }
.ios-homescreen-banner .hs-title { font-weight: 600; font-size: 15px; line-height: 1.1; }
.ios-homescreen-banner .hs-sub { font-size: 13px; color: #545454; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ios-homescreen-banner .hs-actions { display: flex; align-items: center; gap: 8px; }
.ios-homescreen-banner .hs-btn {
  background: var(--accent, #007aff); color: #fff; font-weight: 600;
  border: 0; border-radius: 12px; padding: 8px 12px; font-size: 14px; cursor: pointer;
}
.ios-homescreen-banner .hs-close {
  border: 0; background: transparent; font-size: 16px; line-height: 1; opacity: .6; cursor: pointer;
}

.ios-homescreen-banner.show { animation: hsBounceIn .55s cubic-bezier(.22,.9,.31,1.2) forwards; }
.ios-homescreen-banner.hide { animation: hsSlideOut .35s ease forwards; }

@keyframes hsBounceIn {
  0%   { transform: translate3d(-50%, calc(100% + 24px + env(safe-area-inset-bottom, 0px)), 0); }
  70%  { transform: translate3d(-50%, -6px, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
@keyframes hsSlideOut {
  to { transform: translate3d(-50%, calc(100% + 24px + env(safe-area-inset-bottom, 0px)), 0); }
}

/* если тёмная тема */
@media (prefers-color-scheme: dark) {
  .ios-homescreen-banner {
    background: rgba(22,22,24,0.72);
    color: #f2f2f7;
  }
  .ios-homescreen-banner .hs-sub { color: #b0b0b6; }
}

#content {
  padding: env(safe-area-inset-top, 0px)
           env(safe-area-inset-right, 0px)
           env(safe-area-inset-bottom, 0px)
           env(safe-area-inset-left, 0px);
  box-sizing: border-box;
}

/* --- iOS-style стеклянная карточка добавления --- */
.glassy-card {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.glassy-card:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.02);
}
.add-icon {
  font-size: 42px;
  color: var(--accent, #007aff);
  font-weight: 500;
  line-height: 1;
}
.add-text {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 500;
  color: var(--accent, #007aff);
}

/* --- Пустое состояние --- */
.smarttag-empty {
  text-align: center;
  padding: 60px 10px;
  color: #555;
}
.smarttag-empty .empty-icon .tag {
  font-size: 28px;
  background: var(--accent, #007aff);
  color: #fff;
  padding: 14px 28px;
  border-radius: 14px;
  display: inline-block;
  margin-bottom: 16px;
}
.smarttag-empty .empty-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}

.btn:focus-visible {
    outline: 0;
    box-shadow: none;
}

.btn-ios::focus-visible {
    outline: 0;
    box-shadow: none;
}
/* === iOS Ultra-Clean Admin Panel === */

.tasks-panel {
  max-width: 1200px;
  width: 100%;
  margin: 40px auto;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===== Header ===== */
.tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
  gap: 12px;
}

.tasks-count {
  font-size: 17px;
  font-weight: 600;
  color: #1c1c1e;
}

.tasks-filters {
  display: flex;
  gap: 6px;
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #007aff;
  background: rgba(120, 120, 128, 0.12);
  cursor: pointer;
  transition: all 0.25s ease;
}
.filter-btn.active {
  background: #007aff;
  color: #fff;
}
.filter-btn:active {
  background: rgba(0,122,255,0.2);
}

/* ===== Table ===== */
.tasks-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tasks-head {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr 1fr;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(60, 60, 67, 0.6);
  padding: 0 8px 6px;
}

/* Строка задачи */
.tasks-row {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr 1fr;
  align-items: center;
  padding: 18px 20px;
  background: rgba(255,255,255,0.9);
  transition: background 0.25s ease, transform 0.2s ease;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.tasks-row:last-child {
  border-bottom: none;
}
.tasks-row:hover {
  background: rgba(242,242,247,0.95);
}

/* ===== Client ===== */
.client {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,122,255,0.15);
  color: #007aff;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.name {
  font-weight: 500;
  font-size: 15px;
  color: #1c1c1e;
}

/* ===== Token & Badge ===== */
.token {
  font-weight: 500;
  font-size: 15px;
  color: #1c1c1e;
  margin-bottom: 2px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  background: rgba(255, 149, 0, 0.12);
  color: #ff9500;
  text-transform: uppercase;
}

/* ===== Editable fields ===== */
.editable {
  outline: none;
  min-width: 110px;
  padding: 8px 12px;
  font-size: 15px;
  border-radius: 10px;
  background: rgb(229 229 234 / 62%);
  transition: all 0.25s ease;
}
.editable:focus {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0,122,255,0.25);
}
.editable:empty:before {
  content: attr(data-placeholder);
  color: rgba(60, 60, 67, 0.5);
}
.needs-update {
  background: rgb(229 229 234 / 62%);
}

/* ===== Hint ===== */
.tasks-hint {
  font-size: 13px;
  color: rgba(60, 60, 67, 0.6);
  margin-top: 24px;
  text-align: center;
  line-height: 1.5;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .tasks-row,
  .tasks-head {
    grid-template-columns: 1fr 1fr;
  }
  .tasks-head {
    display: none;
  }
}

/* iPad и шире */
@media (min-width: 768px){
  .ios-modal,
  .ios-modal > *,
  .ios-modal [role="dialog"],
  .ios-modal .modal-dialog {
    width: clamp(360px, 60vw, 680px) !important;
    max-width: none !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }
}

/* iPhone и уже */
@media (max-width: 767px){
  .ios-modal,
  .ios-modal > *,
  .ios-modal [role="dialog"],
  .ios-modal .modal-dialog {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}

/* iPhone и уже */
@media (max-width: 767px) {
  .ios-modal,
  .ios-modal > *,
  .ios-modal [role="dialog"],
  .ios-modal .modal-dialog {
    width: calc(100% - 32px) !important; /* отступы слева/справа по ~16px */
    margin: 0 auto !important;
    border-radius: 22px !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
  }
}

/* iPad и шире */
@media (min-width: 768px) {
  .ios-modal,
  .ios-modal > *,
  .ios-modal [role="dialog"],
  .ios-modal .modal-dialog {
    width: clamp(360px, 60vw, 680px) !important;
    margin: 0 auto !important;
    border-radius: 26px !important;
    box-sizing: border-box !important;
  }
}

/* SMART CARD /*


/* Контейнер с логотипом и эффектами */
.smarttag-empty .empty-icon{
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 18px;
  border-radius: 28px;
  background: linear-gradient(180deg,#ffffff,#f7f9ff);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow:
    0 12px 28px rgba(0,102,255,0.15),
    inset 0 1px 0 rgba(255,255,255,0.7);
  overflow: hidden;          /* не даёт изображению вылезти */
  isolation: isolate;        /* ауры остаются чистыми */
}

/* Само изображение — аккуратно по центру */
.smarttag-empty .empty-icon .tag-logo{
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
  transition: transform 0.25s cubic-bezier(.25,.8,.25,1);
  filter: saturate(1.08) contrast(1.03);
}
.smarttag-empty .empty-icon:hover .tag-logo{ transform: scale(1.03); }

/* Вращающаяся световая шторка — гарантировано видна */
.smarttag-empty .empty-icon::after{
  content:"";
  position:absolute; inset:0;
  border-radius: inherit;
  /* узкая световая полоска по диагонали */
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(0,122,255,.12), rgba(0,122,255,0) 70%),
    linear-gradient( to right, transparent 0 44%, rgba(0,122,255,.45) 44% 56%, transparent 56% 100%);
  mix-blend-mode: screen;
  filter: blur(.6px);
  z-index: 1;
  transform-origin: 50% 50%;
  animation: vpkSpin 2.6s linear infinite !important;
}

/* усиленная пульсация ореола (оставь, если стоит слабо видно) */
.smarttag-empty .empty-icon::before{
  animation: haloPulse 2.2s ease-out infinite !important;
  opacity:.6 !important;
}

/* ключевые кадры */
@keyframes vpkSpin{
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes haloPulse{
  0%   { transform: scale(0.9); opacity:.6; }
  70%  { opacity:.25; }
  100% { transform: scale(1.85); opacity:0; }
}

/* уменьшение движений */
@media (prefers-reduced-motion: reduce){
  .smarttag-empty .empty-icon::before,
  .smarttag-empty .empty-icon::after{
    animation:none!important;
    opacity:.2;
    transform:none;
  }
}

/* ПУЛЬСАЦИЯ — теперь с фоном (видно сразу) */
.smarttag-empty .empty-icon::before{
  content:"";
  position:absolute; inset:0;
  border-radius: inherit;
  background: radial-gradient(closest-side, rgba(0,122,255,.28), rgba(0,122,255,0) 72%);
  filter: blur(4px);
  mix-blend-mode: soft-light;
  z-index: 1;
  animation: haloPulse 2.2s ease-out infinite !important;
}

/* ВРАЩАЮЩИЙСЯ СВИП — заметный и поверх изображения */
.smarttag-empty .empty-icon::after{
  content:"";
  position:absolute; inset:0;
  border-radius: inherit;
  /* сектор ~70°: бело-голубой, чтобы был виден на ярком PNG */
  background: conic-gradient(
    from 0deg,
    rgba(255,255,255,0) 0turn 0.82turn,
    rgba(255,255,255,.55) 0.82turn 0.90turn,
    rgba(0,122,255,.45)   0.90turn 1turn
  );
  mix-blend-mode: soft-light;          /* заметнее, чем screen на светлом */
  pointer-events: none;
  z-index: 3;                           /* выше картинки */
  transform-origin: 50% 50%;
  will-change: transform;
  animation: vpkSpin 2.6s linear infinite !important;
}

/* iOS26 Glass-Pill — вписывается в светлую карточку */
.smarttag-empty .empty-btn{
position: relative;
    display: inline-block;
    padding: 20px 50px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, .08);
    background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .70));
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    backdrop-filter: saturate(160%) blur(8px);
    color: #0063dd;
    font: 500 15px / 1 "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: .2px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 6px 18px rgba(0, 0, 0, .06);
    cursor: pointer;
    transition: transform .08s 
ease, box-shadow .2s 
ease, filter .2s 
ease;
}

/* лёгкий верхний блик */
.smarttag-empty .empty-btn::before{
  content:"";
  position:absolute; inset:0; border-radius:inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 60%);
  pointer-events:none;
  mix-blend-mode: overlay;
}

/* ховер/актив */
.smarttag-empty .empty-btn:hover{
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 8px 22px rgba(0,0,0,.08);
}
.smarttag-empty .empty-btn:active{
  transform: scale(.98);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 4px 12px rgba(0,0,0,.08);
}

/* вариант с иконкой «+» — чуть жирнее и белее для контраста */
.smarttag-empty .empty-btn::marker { content: ""; } /* на всякий случай */

.smarttag-empty .empty-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px rgb(10 132 255 / 10%);
  transition: box-shadow .2s ease;
}

#smarttags-container {
    padding: 5px 10px;
}
