@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&subset=cyrillic,cyrillic-ext,latin&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:           #FFFFFF;
  --surface:      #FFFFFF;
  --surface-2:    #F5F5F0;
  --border:       #EAEAEA;
  --border-dark:  #D5D5D0;
  
  --text:         #111111;
  --text-2:       #666660;
  --text-muted:   #9C9C94;
  
  --accent-gold:  #FAB835;
  --accent-gold-dark: #E2A325;
  
  --bar-bg:       #FFFFFF;
  --bar-text:     #111111;
  --bar-muted:    #777777;
  
  --empty:        #EDEDE6;
  --radius-lg:    22px;
  --radius-md:    14px;
  --radius-sm:    10px;
  --font:         'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-md:    0 6px 24px rgba(0, 0, 0, 0.05);
}

html, body {
  font-family: var(--font);
  background: #FFFFFF;
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* ── MODERN BOTTOM TOAST NOTIFICATION (ПЛАВАЮЩИЙ ТОСТ НАД МЕНЮ) ── */
.top-error-banner {
  position: fixed;
  bottom: 90px;
  left: 50%;
  top: auto;
  right: auto;
  transform: translate(-50%, 16px) scale(0.95);
  width: 276px;
  height: 48px;
  background: #0D0D0F;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 99999;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  box-sizing: border-box;
  transition: transform 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.22s ease;
}

.top-error-banner.show {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.top-error-banner.type-warning,
.top-error-banner.type-success {
  background: #0D0D0F;
}

.top-error-icon {
  width: 17px;
  height: 17px;
  color: #FF453A;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-error-banner.type-warning .top-error-icon {
  color: #FF9F0A;
}

.top-error-banner.type-success .top-error-icon {
  color: #30D158;
}

.top-error-text {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-error-close {
  display: none;
}

.loading-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background-color: #FFFFFF;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tf-loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.tf-shimmer-logo {
  width: 52px;
  height: 52px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.06));
  animation: hourglassFlip 3.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.access-denied-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background: #FFFFFF;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  box-sizing: border-box;
  text-align: center;
  animation: fadeInAccess 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInAccess {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.access-denied-box {
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.access-denied-title {
  font-size: 26px;
  font-weight: 800;
  color: #18181B;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  line-height: 1.2;
}

.access-denied-desc {
  font-size: 15px;
  color: #71717A;
  line-height: 1.48;
  margin: 0;
  max-width: 290px;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  margin: 0;
  background: var(--bar-bg);
  position: relative;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

/* ══════════════════════════════════════════════════════
   СВЕТЛАЯ КАРТОЧКА КОНТЕНТА (100% ширина без отступов по бокам)
   ══════════════════════════════════════════════════════ */
.content-sheet {
  flex: 1;
  width: 100%;
  margin: 0;
  background: var(--bg);
  border-radius: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  box-shadow: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* ── TAB CONTENT ── */
.tab-content {
  flex: 1;
  width: 100%;
  display: none;
  flex-direction: column;
  padding: 12px 16px 86px;
  gap: 14px;
}
.tab-content.active { display: flex; }

/* ── PAGE HEADER ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  height: 48px;
  background: #0D0D0F;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  flex-shrink: 0;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.page-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  margin: 0;
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.1s ease, color 0.15s ease, background-color 0.15s ease;
}
.header-btn:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}
.header-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* ── APP GREETING HEADER (КАК В РЕФЕРЕНСЕ) ── */
.app-greeting-header {
  padding: 10px 4px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.greeting-title {
  font-size: 26px;
  font-weight: 800;
  color: #111111;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.greeting-sub {
  color: #9C9C94;
  font-weight: 400;
}

.greeting-subtitle {
  font-size: 13.5px;
  font-weight: 600;
  color: #8E8E93;
  margin-top: 2px;
}

/* ── REFERENCE HERO DARK CARD (КАК В РЕФЕРЕНСЕ) ── */
.ref-hero-card {
  background: #1C1C1E; /* Глубокий матовый темный тон Apple */
  border-radius: 14px !important;
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  position: sticky;
  top: 8px;
  z-index: 50;
  overflow: hidden;
  box-sizing: border-box;
}

.ref-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.ref-hero-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.ref-hero-title {
  font-size: 19px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  cursor: pointer;
  line-height: 1.2;
}

.ref-hero-time-sub {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
}

/* ── ОВЕРЛЕЙ ОБРАБОТКИ ПРИ ОТПРАВКЕ (ЧИСТАЯ БЕЛАЯ ТЕМА БЕЗ МОДАЛОК НА ВЕСЬ ЭКРАН) ── */
.processing-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background-color: #FFFFFF;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px;
  pointer-events: all !important;
  user-select: none;
  cursor: wait;
}

.processing-box {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: none;
}

.processing-hourglass-logo {
  width: 52px;
  height: 52px;
  margin: 0;
  animation: hourglassFlip 3.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.06));
}

@keyframes hourglassFlip {
  0%, 25% {
    transform: rotate(0deg);
  }
  45%, 75% {
    transform: rotate(180deg);
  }
  95%, 100% {
    transform: rotate(360deg);
  }
}

.processing-title {
  font-size: 20px;
  font-weight: 700;
  color: #09090B;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.35;
}

.processing-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: #71717A;
  line-height: 1.45;
}

/* ── НОВАЯ ТИПОГРАФИКА ДЛЯ ШАПКИ РАЗОВОГО (ДАТА + ВРЕМЯ И ДЕВАЙС) ── */
.single-hero-datetime-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.single-text-date-wrapper,
.single-text-time-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.single-text-trigger {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  cursor: pointer;
  line-height: 1.2;
  transition: opacity 0.15s ease;
}

.single-text-trigger:active {
  opacity: 0.75;
}

/* ── БЕСКОНЕЧНЫЙ БАРАБАН ВРЕМЕНИ МЕЖДУ ФОТО И НАПОМИНАНИЕМ ── */
.single-drum-card-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #F4F4EE;
  border-radius: 14px;
  padding: 4px 12px;
  margin: 2px 0;
  box-sizing: border-box;
  gap: 12px;
  transition: gap 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.single-drum-card-wrapper.single-mode-single {
  gap: 0;
}

.drum-card-divider {
  width: 1px;
  height: 28px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 1px;
  flex-shrink: 0;
  transition: opacity 0.24s ease, transform 0.24s ease, width 0.28s cubic-bezier(0.32, 0.72, 0, 1), margin 0.28s ease;
}

.single-drum-card-wrapper.single-mode-single .drum-card-divider {
  opacity: 0;
  transform: scaleX(0);
  width: 0;
  margin: 0;
  pointer-events: none;
}

.hero-time-drum-container.single-middle-drum {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  flex: 1;
  max-width: 140px;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
  transition: max-width 0.28s cubic-bezier(0.32, 0.72, 0, 1), transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.single-middle-drum .drum-item {
  height: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.22);
  letter-spacing: -0.02em;
  scroll-snap-align: center;
  cursor: pointer;
  transition: color 0.12s ease;
}

.single-middle-drum .drum-item.active {
  color: #18181B;
  font-weight: 800;
}

.single-middle-drum .drum-colon {
  font-size: 18px;
  font-weight: 800;
  color: #18181B;
  margin-bottom: 1px;
  user-select: none;
  padding: 0 1px;
}

/* ── ГОРИЗОНТАЛЬНЫЙ БАРАБАН ПРОМЕЖУТКА МЕЖДУ ФОТО (0..5 МИН) ── */
.offset-drum-container {
  display: flex;
  align-items: center;
  height: 48px;
  flex: 1;
  max-width: 140px;
  position: relative;
  overflow-x: scroll;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  user-select: none;
  -webkit-user-select: none;
  mask-image: linear-gradient(to right, transparent 0%, black 25%, black 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 25%, black 75%, transparent 100%);
  transition: max-width 0.28s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.22s ease, transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.single-drum-card-wrapper.single-mode-single .offset-drum-container {
  max-width: 0;
  opacity: 0;
  transform: translateX(15px);
  pointer-events: none;
}

.offset-drum-container::-webkit-scrollbar {
  display: none;
}

.offset-drum-track {
  display: flex;
  align-items: center;
  height: 100%;
  padding-left: calc(50% - 35px);
  padding-right: calc(50% - 35px);
  box-sizing: content-box;
}

.offset-drum-item {
  width: 70px;
  min-width: 70px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.22);
  letter-spacing: -0.01em;
  scroll-snap-align: center;
  cursor: pointer;
  transition: color 0.12s ease;
  white-space: nowrap;
}

.offset-drum-item.active {
  color: #18181B;
  font-weight: 800;
}

.drum-column {
  flex: 1;
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.drum-column::-webkit-scrollbar {
  display: none;
}

.drum-wheel-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 13px;
  padding-bottom: 13px;
}

.drum-item {
  height: 26px;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: -0.02em;
  scroll-snap-align: center;
  cursor: pointer;
  transition: color 0.12s ease;
}

.drum-item.active {
  color: #FFFFFF;
  font-weight: 800;
}

.drum-colon {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 1px;
  user-select: none;
  padding: 0 1px;
}

.drum-highlight-bar {
  display: none;
}

.single-datetime-dot {
  display: none;
}

.single-hero-device-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.single-device-text-trigger,
.single-device-text-display {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  user-select: none;
}

.single-device-text-trigger {
  cursor: pointer;
  transition: color 0.15s ease;
}

.single-device-text-trigger:active {
  color: rgba(255, 255, 255, 0.9);
}

.hero-corner-reset-btn {
  background: transparent;
  border: none !important;
  color: rgba(255, 255, 255, 0.4);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-top: -2px;
  margin-right: -4px;
  flex-shrink: 0;
  transition: all 0.18s cubic-bezier(0.25, 1, 0.5, 1);
  outline: none;
}

.hero-corner-reset-btn:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
}

.hero-corner-reset-btn:active {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  transform: scale(0.92);
}

.hero-corner-reset-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-corner-reset-btn:active svg {
  transform: rotate(-180deg);
}

/* ══════════════════════════════════════════════════════
   TAB 3: ОТЧЁТ (СЧЁТЧИКИ ДЕЙСТВИЙ - 1 НА СТРОЧКУ)
══════════════════════════════════════════════════════ */
#tab-report {
  display: none;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

#tab-report.active {
  display: flex;
}

/* Строка кнопок действий над счетчиками (в стиле сегментных переключателей) */
.report-toolbar-row {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  background: #F4F4EE;
  padding: 3px;
  border-radius: 14px;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  gap: 0;
  margin: 0;
}

.report-toolbar-divider {
  width: 1px;
  height: 18px;
  background: rgba(0, 0, 0, 0.09);
  border-radius: 1px;
  flex-shrink: 0;
}

.report-toolbar-btn {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: #7E7E76;
  padding: 9px 0;
  border-radius: 11px;
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-toolbar-btn:active {
  background: #FFFFFF;
  color: #111111;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: scale(0.99);
}

/* ── СЕТКА СЧЁТЧИКОВ: СЛЕВА НАЗВАНИЕ В БЛОКЕ, СПРАВА КОНТРОЛЫ БЕЗ ОБЩЕГО ФОНА ── */
.report-counters-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0 0 24px 0;
  background: transparent;
  border-radius: 0;
  box-sizing: border-box;
}

.report-counter-row {
  background: transparent;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  user-select: none;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
}

/* Левая половина: Название показателя в отдельном блоке */
.report-row-left {
  flex: 1 1 50%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  background: #F4F4EE;
  border-radius: 14px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
}

.report-row-title {
  font-size: 15px;
  font-weight: 700;
  color: #18181B;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Правая половина: Контролы без фонового блока (кнопка - колбаса - кнопка) */
.report-row-actions {
  flex: 1 1 50%;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Квадратные кнопки + и - с закруглением как у остальных блоков */
.report-circle-stepper-btn {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  border-radius: 14px;
  aspect-ratio: 1 / 1;
  border: none;
  background: #F4F4EE;
  color: #18181B;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: transform 0.15s ease, background 0.15s ease;
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.report-circle-stepper-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.report-circle-stepper-btn:active {
  transform: scale(0.9);
  background: #E5E5DE;
}

/* Блок с числом с единым радиусом 14px */
.report-capsule-input {
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  flex: 1;
  min-width: 50px;
  background: #F4F4EE !important;
  border: none !important;
  border-radius: 14px !important;
  text-align: center;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  color: #18181B;
  outline: none !important;
  box-shadow: none !important;
  padding: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
}

.report-capsule-input:focus,
.report-capsule-input:active,
.report-capsule-input:hover {
  background: #F4F4EE !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.report-capsule-input::-webkit-outer-spin-button,
.report-capsule-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


/* ══════════════════════════════════════════════════════
   TAB 4: ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ
══════════════════════════════════════════════════════ */
#tab-profile {
  display: none;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding-bottom: 24px;
}

#tab-profile.active {
  display: flex;
}

.profile-hero-card {
  background: #0D0D0F;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 20px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.profile-avatar-container {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #18181B;
}

.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #EBEBE5;
  color: #18181B;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-placeholder svg {
  width: 32px;
  height: 32px;
}

.profile-hero-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.profile-hero-card .profile-name {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF !important;
  margin: 0;
  letter-spacing: -0.02em;
}

.profile-hero-card .profile-username-badge {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45) !important;
}

.profile-section-title {
  font-size: 12px;
  font-weight: 800;
  color: #A1A1AA;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 8px;
  margin-top: 4px;
}

.profile-cards-group {
  background: #F4F4EE;
  border-radius: 20px;
  padding: 4px 16px;
  display: flex;
  flex-direction: column;
}

.profile-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-info-row:last-child {
  border-bottom: none;
}

.profile-info-label {
  font-size: 14.5px;
  font-weight: 600;
  color: #71717A;
}

.profile-info-value {
  font-size: 15px;
  font-weight: 700;
  color: #18181B;
}

/* Светлые выпадающие списки в профиле, открывающиеся влево */
.profile-cards-group .custom-dropdown-menu {
  left: auto !important;
  right: 0 !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15) !important;
  min-width: 170px !important;
}

.profile-cards-group .custom-dropdown-item {
  color: #71717A !important;
}

.profile-cards-group .custom-dropdown-item:active {
  background: rgba(0, 0, 0, 0.05) !important;
}

.profile-cards-group .custom-dropdown-item.active {
  color: #18181B !important;
  background: #F4F4EE !important;
  font-weight: 700 !important;
}

.profile-cards-group .custom-dropdown-add-item {
  color: #FF5A1F !important;
  font-weight: 700 !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 4px;
  padding-top: 8px !important;
  display: flex !important;
  align-items: center;
  gap: 6px;
}

.profile-cards-group .custom-dropdown-add-item:active {
  background: rgba(255, 90, 31, 0.08) !important;
}

.prompt-input-wrapper {
  width: 100%;
  margin: 14px 0 20px;
}

.prompt-text-input {
  width: 100%;
  padding: 14px 16px;
  background: #F4F4F5;
  border: 1.5px solid transparent;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #18181B;
  outline: none;
  box-sizing: border-box;
  font-family: var(--font);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.prompt-text-input:focus {
  border-color: #0D0D0F;
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ref-action-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ref-action-icon-btn:active {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(0.92);
}

.ref-action-icon-btn svg {
  width: 15px;
  height: 15px;
  stroke: #FFFFFF;
}

.ref-dots-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  transition: background 0.12s ease;
}

.ref-dots-btn:active {
  background: rgba(255, 255, 255, 0.08);
}

.ref-dots-btn svg {
  width: 16px;
  height: 16px;
}

/* ── WEEK STRIP (ЛЕНТА ДНЕЙ КАК В РЕФЕРЕНСЕ) ── */
.ref-week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 0;
  margin-top: 24px; /* Большой красивый "воздушный" отступ */
  border-top: none;
  border-bottom: none;
}

.ref-week-day-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.ref-day-label {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  text-transform: lowercase;
}

.ref-day-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.15s ease;
}

.ref-week-day-col:active .ref-day-bubble {
  transform: scale(0.92);
}

.ref-week-day-col.active .ref-day-bubble {
  background: #E85D04; /* Оранжевый акцентный градиент как в референсе */
  background: linear-gradient(135deg, #FF6B00 0%, #D84A00 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(232, 93, 4, 0.4);
}

.ref-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.ref-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF;
  cursor: pointer;
  transition: background 0.12s ease;
}

.ref-tag-pill:active {
  background: rgba(255, 255, 255, 0.14);
}

.ref-tag-pill svg {
  width: 13px;
  height: 13px;
  stroke: rgba(255, 255, 255, 0.6);
}

.upload-zone-hint {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 8px;
}

/* ── SECTION HEADLINE (КАК В РЕФЕРЕНСЕ) ── */
.ref-section-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 4px;
}

.ref-section-headline span:first-child {
  font-size: 18px;
  font-weight: 800;
  color: #111111;
  letter-spacing: -0.02em;
}

.ref-section-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  background: #F0F0EA;
  padding: 4px 10px;
  border-radius: 999px;
}

.device-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.big-select-trigger {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, 0.7) !important; /* Название модели слегка тусклее */
  padding: 0 16px 0 0 !important; /* Резервируем место под стрелочку */
  cursor: pointer;
  max-width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  transition: color 0.15s ease;
}

.big-select-trigger:active {
  color: #FFFFFF !important;
}

.custom-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: #18181B !important; /* Плотный сплошной глубокий цвет без прозрачности */
  border: none !important;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85) !important;
  padding: 6px;
  min-width: 190px;
  z-index: 10000 !important;
  box-sizing: border-box;
  overflow: hidden;
}

.custom-dropdown-menu.open {
  display: block;
  animation: fadeInDropdown 0.12s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes fadeInDropdown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.custom-dropdown-item {
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45); /* Тусклый белый по умолчанию */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px; /* Капсульный вид внутри меню */
  transition: background-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.custom-dropdown-item + .custom-dropdown-item {
  border-top: none !important; /* Убираем линии-разделители полностью */
}

.custom-dropdown-item:active {
  background: rgba(255, 255, 255, 0.06);
}

.custom-dropdown-item.active {
  color: #FFFFFF; /* Выбранный горит ярко-белым */
  background: rgba(255, 255, 255, 0.12); /* Серый кружок подсветки как в нижней пилюле */
}

.custom-dropdown-item .check-icon {
  width: 12px;
  height: 12px;
  color: #FFFFFF;
  flex-shrink: 0;
}

.select-chevron {
  position: absolute;
  right: 0; /* Стрелочка прямо у правого края текста */
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  color: rgba(255, 255, 255, 0.5); /* Тусклый шеврон */
  pointer-events: none;
}

.datetime-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #FFFFFF;
  flex-wrap: wrap;
  font-size: 15px !important;
  font-weight: 700;
}

.time-select-wrapper,
.date-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.big-select-trigger.time-trigger,
.big-select-trigger.date-trigger {
  padding-right: 0 !important;
  color: #FFFFFF !important; /* Дата и время горят ярко-белым */
}

/* ── CUSTOM CALENDAR DROPDOWN ── */
.calendar-dropdown-menu {
  min-width: 200px !important;
  padding: 8px !important;
  z-index: 9999 !important;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  margin-bottom: 6px;
}

.calendar-header span {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}

.calendar-nav-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  transition: color 0.1s;
}

.calendar-nav-btn:active {
  color: #FFFFFF;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.calendar-grid-header {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  padding: 2px 0;
  text-transform: uppercase;
}

.calendar-day {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.1s;
}

.calendar-day:active {
  background: rgba(255, 255, 255, 0.08);
}

.calendar-day.active {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.12) !important;
  font-weight: 700;
}

.calendar-day.other-month {
  color: rgba(255, 255, 255, 0.2);
}

/* ── CUSTOM TIME PICKER DROPDOWN ── */
.time-dropdown-menu {
  min-width: 120px !important;
  padding: 6px !important;
  display: none;
  gap: 8px;
  z-index: 9999 !important;
  border: none !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8) !important;
}

.time-dropdown-menu.open {
  display: flex !important; /* Для колонок часов и минут */
}

.unified-time-menu {
  min-width: 190px !important;
  padding: 8px !important;
  left: 0 !important;
  right: auto !important;
  border: none !important;
  background: #18181B !important;
}

#single-time-menu {
  left: auto !important;
  right: -20px !important;
  border: none !important;
}

.time-picker-divider {
  width: 1px;
  height: 140px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  margin: 0 4px;
}

.time-picker-column {
  display: flex;
  flex-direction: column;
  height: 140px;
  overflow-y: auto;
  scrollbar-width: none;
  flex: 1;
}

.time-picker-column::-webkit-scrollbar {
  display: none;
}

.time-picker-item {
  padding: 6px 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  border-radius: 6px;
  text-align: center;
  transition: all 0.1s;
}

.time-picker-item:active {
  background: rgba(255, 255, 255, 0.05);
}

.time-picker-item.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
  border: none !important;
  box-shadow: none !important;
}

.bullet-separator {
  margin: 0 4px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
  font-size: 15px !important;
}

.dash-separator {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
  font-size: 15px !important;
}

/* ── DRUM TIME BOXES (single tab) ── */
.drum-time-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.drum-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.drum-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px 0;
  width: 68px;
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}

.drum-trigger:active .drum-box {
  background: rgba(255, 255, 255, 0.14);
}

.drum-colon {
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  padding: 0 2px;
}

/* ── UPLOAD ZONE ── */
.upload-zone {
  border: 1.5px dashed var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.upload-zone:hover {
  border-color: rgba(255, 255, 255, 0.15) !important;
}
.upload-icon {
  width: 18px;
  height: 18px;
  fill: rgba(255, 255, 255, 0.25); /* Слегка тусклее, чтобы не выделялась */
  transition: fill 0.15s ease;
}
.upload-zone:active .upload-icon {
  fill: rgba(255, 255, 255, 0.7);
}
.upload-zone input[type="file"] { display: none; }

/* ── SCHEDULE LIST ── */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── ПРОМЕЖУТОК МЕЖДУ КАРТОЧКАМИ (полоски + минуты) ── */
.schedule-gap-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 14px;
  user-select: none;
}

.schedule-gap-divider .gap-line {
  flex: 1;
  height: 1px;
  background: var(--border-dark);
  opacity: 0.5;
}

.schedule-gap-divider .gap-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  flex-shrink: 0;
}

.schedule-item {
  background: transparent;
}

.schedule-item:hover {
  background: transparent;
}

.schedule-item-main {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.time-label {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  min-width: 56px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  transition: all 0.25s ease;
}

.pair-photos {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 200px;
  opacity: 1;
  transform: scale(1);
  transform-origin: left center;
  transition: max-width 0.3s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease, transform 0.25s ease, margin 0.3s ease;
}

.photo-slot {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.photo-slot:active {
  transform: scale(0.95);
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-slot.empty::after {
  content: '?';
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
}

.photo-slot.has-photo::after {
  content: none;
}

/* Детальная секция карточки расписания (всегда открыта по умолчанию) */
.schedule-item-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-height: 300px;
  opacity: 1;
  transform: scaleY(1);
  transform-origin: top center;
  transition: max-height 0.3s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease, margin 0.25s ease, transform 0.25s ease;
}

.schedule-item-details.schedule-item-details--hidden {
  max-height: 0;
  opacity: 0;
  transform: scaleY(0.85);
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  pointer-events: none;
}

.details-photos-grid {
  display: flex;
  gap: 10px;
  width: 100%;
}

.details-photos-grid .story-photo-card {
  flex: 1 1 50%;
  aspect-ratio: 9 / 7.5;
  min-height: 95px;
  max-height: 125px;
  background: #F4F4EE;
  border-radius: 14px;
}

.details-photos-grid .story-badge-top {
  top: 8px;
  right: 8px;
  font-size: 10.5px;
  padding: 3px 8px;
}

.details-photos-grid .story-badge-bottom {
  bottom: 8px;
  left: 8px;
  font-size: 11px;
  padding: 3px 9px;
}

.details-photos-grid .story-placeholder .story-plus-icon {
  width: 34px;
  height: 34px;
}

.details-photos-grid .story-placeholder .story-plus-icon svg {
  width: 16px;
  height: 16px;
}

.detail-photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #F5F5F0;
  border-radius: 14px;
  padding: 10px;
  min-height: 110px;
  position: relative;
  overflow: hidden;
  border: 1.5px dashed rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.detail-photo-card.has-image {
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.04);
  padding: 0;
}

.detail-photo-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
}

.detail-photo-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  margin-top: 4px;
}

.detail-photo-delete-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.12s ease;
}

.detail-photo-delete-badge:active {
  transform: scale(0.9);
}

.detail-photo-delete-badge svg {
  width: 13px;
  height: 13px;
}

/* ── ШИРОКАЯ КНОПКА ДЕЙСТВИЯ ПОД ФОТО И МОРФ-АНИМАЦИЯ ── */
.schedule-item {
  background: transparent;
  border: none;
  border-radius: 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: none;
  user-select: none;
  overflow: visible;
  transition: gap 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.schedule-item--skipped {
  gap: 0px !important;
}

.schedule-item-details {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 160px;
  opacity: 1;
  transform: scaleY(1);
  transform-origin: top center;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              margin 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.schedule-item-details.schedule-item-details--hidden {
  max-height: 0px !important;
  opacity: 0 !important;
  transform: scaleY(0.6) scaleX(0.96) !important;
  margin: 0 !important;
  pointer-events: none !important;
}

.schedule-wide-action-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  height: 42px;
  box-sizing: border-box;
  background-color: #F4F4EE;
  color: var(--text-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: background-color 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.25s ease,
              box-shadow 0.32s ease,
              transform 0.15s ease;
}

.schedule-wide-action-btn:active {
  transform: scale(0.985);
}

.schedule-wide-action-btn.skip-state {
  background-color: #F4F4EE;
  color: var(--text-2);
}

.schedule-wide-action-btn.skip-state:hover {
  background-color: #EBEBE5;
  color: var(--text);
}

.schedule-wide-action-btn.restore-state {
  background-color: #FF5A00 !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 20px rgba(255, 90, 0, 0.28) !important;
}

.schedule-wide-action-btn .btn-text-skip,
.schedule-wide-action-btn .btn-text-restore {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.schedule-wide-action-btn.skip-state .btn-text-skip {
  opacity: 1;
  transform: translateY(0);
}

.schedule-wide-action-btn.skip-state .btn-text-restore {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.schedule-wide-action-btn.restore-state .btn-text-skip {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.schedule-wide-action-btn.restore-state .btn-text-restore {
  opacity: 1;
  transform: translateY(0);
}

/* ── 1-WEEK CALENDAR STRIP WITH WEEKDAYS (ПН, ВТ, СР...) ── */
.ref-calendar-matrix {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 0;
  margin-top: 32px;
  max-height: 80px;
  opacity: 1;
  overflow: hidden;
  box-sizing: border-box;
}

.ref-week-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.ref-week-day-name {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  user-select: none;
}

.ref-matrix-cell {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 auto;
  transition: all 0.15s ease;
}

.ref-week-item:active .ref-matrix-cell {
  transform: scale(0.92);
}

.ref-week-item.active .ref-week-day-name {
  color: #FFFFFF;
}

.ref-week-item.active .ref-matrix-cell {
  background: #FF5A00;
  color: #FFFFFF;
  box-shadow: none;
}

#tab-single {
  gap: 10px;
}

/* ── СЕГМЕНТНЫЙ ПЕРЕКЛЮЧАТЕЛЬ ОДИНОЧНАЯ / ПАРА ── */
.single-mode-wrapper {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 10;
}

.single-mode-switch {
  display: flex;
  position: relative;
  width: 100%;
  background: #F4F4EE;
  padding: 3px;
  border-radius: 14px;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

.single-mode-glider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: #FFFFFF;
  border-radius: 11px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
  z-index: 1;
}

.single-mode-switch.mode-2-active .single-mode-glider {
  transform: translateX(100%);
}

.single-mode-switch.mode-1-active .single-mode-glider {
  transform: translateX(0);
}

.single-reminder-wrapper {
  margin-top: 2px;
  margin-bottom: 2px;
}

.single-mode-btn {
  flex: 1;
  background: transparent !important;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: #7E7E76;
  padding: 9px 0;
  border-radius: 11px;
  cursor: pointer;
  text-align: center;
  position: relative;
  z-index: 5;
  transition: color 0.2s ease;
  box-shadow: none !important;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.single-mode-btn.active {
  color: #111111;
}

/* ── ПЛАШКА ЗАГРУЗКИ ДЛЯ РАСПИСАНИЯ (ЕДИНЫЙ СТИЛЬ БЕЗ ВЛОЖЕННОСТИ) ── */
.interval-upload-switch {
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.interval-upload-switch:active {
  transform: scale(0.98);
  opacity: 0.85;
}

.interval-upload-btn {
  background: transparent !important;
  color: #111111 !important;
  box-shadow: none !important;
  padding: 12px 0 !important;
  font-size: 13.5px !important;
}

/* ── СЕТКА КАРТОЧЕК ДЛЯ ФОТО (STORIES STYLE) ── */
.single-stories-grid {
  display: flex;
  gap: 12px;
  width: 100%;
  position: relative;
  align-items: stretch;
  overflow: hidden;
  padding-bottom: 0;
  margin: 0;
}

.story-photo-card {
  position: relative;
  border-radius: 14px;
  background: #F4F4EE;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Карточка 1 (До) */
#single-card-0 {
  flex: 1 1 50%;
  aspect-ratio: 1 / 1;
  transition: flex 0.35s cubic-bezier(0.32, 0.72, 0, 1), 
              aspect-ratio 0.35s cubic-bezier(0.32, 0.72, 0, 1),
              transform 0.2s ease, box-shadow 0.2s ease;
}

/* Карточка 2 (После) */
#single-card-1 {
  flex: 1 1 50%;
  aspect-ratio: 1 / 1;
  opacity: 1;
  transform: translateX(0) scale(1);
  transform-origin: right center;
  transition: flex 0.35s cubic-bezier(0.32, 0.72, 0, 1), 
              opacity 0.25s cubic-bezier(0.32, 0.72, 0, 1), 
              transform 0.35s cubic-bezier(0.32, 0.72, 0, 1),
              aspect-ratio 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

/* Режим 1 фото: Карточка 0 на 100% ширины с сохранением той же фиксированной высоты */
.single-stories-grid.mode-1 {
  gap: 0;
}

.single-stories-grid.mode-1 #single-card-0 {
  width: 100%;
  aspect-ratio: 2.08 / 1;
}

.single-stories-grid.mode-1 #single-card-1 {
  flex: 0 0 0%;
  width: 0;
  opacity: 0;
  transform: translateX(50px) scale(0.9);
  pointer-events: none;
  border-width: 0;
}

.single-recommendation-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #8E8E93;
  margin-top: 4px;
  padding: 4px 12px;
  letter-spacing: -0.01em;
  user-select: none;
  width: 100%;
  box-sizing: border-box;
}

.story-photo-card:active {
  transform: scale(0.98);
}

.story-badge-top {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: -0.01em;
  pointer-events: none;
}

.story-badge-bottom {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: -0.01em;
  pointer-events: none;
}

.story-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.story-plus-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.35);
  transition: all 0.15s ease;
}

.story-photo-card:hover .story-plus-icon {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.6);
}

.story-plus-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.story-img-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.story-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-delete-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 6;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.story-delete-btn:active {
  transform: scale(0.9);
}

.story-delete-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

/* ── RESET SCHEDULE BUTTON (в самом низу) ── */
.reset-schedule-container {
  display: flex;
  justify-content: center;
  padding: 24px 0 16px;
}

.reset-schedule-btn {
  background: transparent;
  border: 1.5px solid var(--border-dark);
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-2);
  font-family: var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.reset-schedule-btn:active {
  background: #F2F2EC;
  color: #111111;
  border-color: #111111;
  transform: scale(0.97);
}

.reset-schedule-btn svg {
  width: 16px;
  height: 16px;
}

/* ── CUSTOM MODAL OVERLAYS (CLEAN SCRIM, NO BLUR) ── */
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.custom-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.custom-modal-card {
  background: #FFFFFF;
  border-radius: 26px;
  width: 100%;
  max-width: 345px;
  padding: 24px 20px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 0 1px rgba(0, 0, 0, 0.08);
  transform: scale(0.88) translateY(8px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}

.custom-modal-overlay.open .custom-modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.modal-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.modal-close-btn {
  background: #F0F0EA;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  transition: background 0.12s ease;
}

.modal-close-btn:active {
  background: #E4E4DC;
}

.modal-close-btn svg {
  width: 16px;
  height: 16px;
}

.modal-photo-preview {
  width: 100%;
  height: 240px;
  border-radius: 16px;
  background: #F7F7F2;
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.modal-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-empty-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.modal-empty-slot svg {
  width: 36px;
  height: 36px;
  stroke: var(--text-muted);
}

.modal-empty-slot span {
  font-size: 13px;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  gap: 8px;
}

.modal-btn {
  flex: 1;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s ease;
}

.modal-btn:active {
  transform: scale(0.97);
}

.modal-btn svg {
  width: 18px;
  height: 18px;
}

.modal-btn--upload {
  background: #0D0D0F;
  color: #FFFFFF;
}

.modal-btn--delete {
  background: #FEE8E8;
  color: #E53935;
}

/* ── CONFIRM & PROMPT MODAL SPECIFIC ── */
.confirm-modal-card,
.prompt-modal-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 20px;
}

.confirm-icon-box {
  display: none !important;
}

.confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: #18181B;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.confirm-desc {
  font-size: 13.5px;
  color: #71717A;
  line-height: 1.45;
  margin-bottom: 20px;
}

.confirm-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
}

.confirm-btn {
  flex: 1;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-btn:active {
  transform: scale(0.96);
  opacity: 0.85;
}

.confirm-btn--cancel {
  background: #F4F4F5;
  color: #18181B;
}

.confirm-btn--secondary {
  background: #E4E4E7;
  color: #18181B;
}

.confirm-btn--action {
  background: #18181B;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.confirm-btn--danger {
  background: #EF4444;
  color: #FFFFFF;
}

.confirm-buttons.confirm-buttons--three {
  flex-direction: column;
  gap: 8px;
}

.confirm-buttons.confirm-buttons--three .confirm-btn {
  width: 100%;
  padding: 12px;
}

/* ── SECTION & CONTROLS ── */
.section { display: flex; flex-direction: column; gap: 8px; }

.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-left: 2px;
}

select, input[type="time"], input[type="date"], input[type="text"], input[type="number"] {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}
select:focus, input:focus { border-color: var(--text); }

.time-range { display: flex; align-items: center; gap: 8px; }
.time-range input { flex: 1; }
.time-range span { color: var(--text-2); font-size: 15px; font-weight: 700; flex-shrink: 0; }

.field-static {
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── REPORT ROWS ── */
#report-rows { display: flex; flex-direction: column; gap: 9px; }

.report-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.report-row .row-label {
  flex: 1;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  color: var(--text);
}
.report-row .row-value {
  width: 54px;
  padding: 14px 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  border: none;
  outline: none;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  border-right: 1px solid var(--border);
}
.report-row .counter-btn {
  width: 46px;
  border: none;
  background: var(--surface-2);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-family: var(--font);
  transition: background 0.1s;
}
.report-row .counter-btn + .counter-btn { border-left: 1px solid var(--border); }
.report-row .counter-btn:active { background: #DFDFD4; }

/* ══════════════════════════════════════════════════════
   АККУРАТНАЯ ПЛЫВУЩАЯ ПИЛЮЛЯ НАВИГАЦИИ (Floating Glass Pill)
   ══════════════════════════════════════════════════════ */
.bottom-bar-container {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px; /* Отступ, отделяющий оранжевую кнопку действия от пилюли */
  z-index: 100;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}

.bottom-nav-pill {
  width: 210px; /* 4 комфортные кнопки по 52px + 2px рамки */
  height: 56px;
  background: #0D0D0F;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.38);
  overflow: hidden;
  z-index: 2;
}

.floating-circle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  padding: 0;
  flex-shrink: 0;
  z-index: 3;
}

#left-action-btn {
  background: #FF5A00 !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(255, 90, 0, 0.3) !important;
  position: relative;
}

#left-action-btn:active {
  transform: scale(0.92);
  background: #E04E00 !important;
}

#left-action-btn svg {
  stroke: none !important;
  fill: #FFFFFF !important;
  width: 20px !important;
  height: 20px !important;
}

#left-action-btn svg path {
  fill: #FFFFFF !important;
}

#right-profile-btn {
  background: #0D0D0F;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

#right-profile-btn:active {
  transform: scale(0.92);
}

#right-profile-btn.active {
  background: #FFFFFF;
  color: #111111;
  border-color: #FFFFFF;
}

#right-profile-btn.active svg {
  stroke: #111111;
}

.floating-circle-btn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
}

/* Скрываем левое и правое действия для чистой навигации */
.bar-left,
.bar-right {
  display: none !important;
}

.action-label-btn {
  background: none;
  border: none;
  color: var(--bar-text);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: -0.01em;
  cursor: pointer;
  padding: 4px 8px;
  transition: opacity 0.15s ease;
}
.action-label-btn:active { opacity: 0.7; }

/* По центру: Круглые иконки вкладок */
.bar-center {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 0;
}

.nav-bubble {
  width: 52px; /* 4 кнопки * 52px = 208px */
  height: 56px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  position: relative;
  transition: background-color 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-bubble svg {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.4) !important;
  fill: currentColor !important;
  position: relative;
  z-index: 2;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

#nav-settings svg {
  width: 17.5px;
  height: 17.5px;
}

.nav-bubble svg path,
.nav-bubble svg circle,
.nav-bubble svg ellipse {
  fill: currentColor !important;
}

.nav-bubble:hover svg {
  color: rgba(255, 255, 255, 0.65) !important;
}

.nav-bubble.active {
  background: transparent !important;
}

.nav-bubble.active::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  z-index: 1;
}

.nav-bubble.active svg {
  color: #FFFFFF !important;
  transform: scale(1.06);
}

.nav-bubble.active svg path,
.nav-bubble.active svg circle,
.nav-bubble.active svg ellipse {
  fill: #FFFFFF !important;
}

/* Справа: Жёлтая акцентная круглая кнопка со счётчиком */
.bar-right {
  display: flex;
  align-items: center;
}

.action-circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: none;
  color: #111111;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(250, 184, 53, 0.3);
  transition: transform 0.12s ease, background 0.15s ease;
}
.action-circle-btn:active {
  transform: scale(0.92);
  background: var(--accent-gold-dark);
}

/* ── CONFIG SHEET (Bottom Sheet Modal) ── */
.sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sheet-overlay.open { opacity: 1; }

.config-sheet {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(100%);
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  z-index: 201;
  box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.15);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
.config-sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-dark);
  border-radius: 2px;
  margin: 12px auto 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 10px;
}
.sheet-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.sheet-close:active { background: #DCDCD0; }
.sheet-close svg { width: 16px; height: 16px; }

.sheet-body {
  padding: 10px 22px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sheet-apply-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 999px;
  background: #111111;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: background 0.15s ease, transform 0.1s ease;
}
.sheet-apply-btn:active {
  background: #333333;
  transform: scale(0.98);
}

/* ── PROFILE PAGE STYLES ── */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
}

.profile-avatar svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.profile-username {
  font-size: 13px;
  color: var(--text-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 14px 8px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.primary-action-btn {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--text);
  color: var(--surface);
  border: none;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.primary-action-btn:active {
  opacity: 0.85;
}

/* ── UNIFIED DARK BLOCK ── */
.unified-dark-block {
  background: #0D0D0F;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
  position: sticky;
  top: 8px;
  z-index: 50;
  overflow: visible; /* Чтобы выпадающие списки (календарь, время, девайсы) не обрезались */
}

.datetime-row {
  overflow: visible;
  will-change: max-height, opacity;
}

.unified-dark-block .upload-zone {
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  margin-top: 36px;
  overflow: hidden;
  will-change: max-height, opacity, margin-top, padding;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.unified-dark-block .upload-zone:active {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

.unified-dark-block .upload-zone p {
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.unified-dark-block .upload-zone .upload-hint {
  color: rgba(255, 255, 255, 0.45) !important;
  font-size: 11px;
}

/* Скрываем календарную иконку на мобильных, оставляя инпут чистым */
.config-date-input::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none;
}

/* ── WIP / ЗАГЛУШКА СТРАНИЦА ── */
.wip-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 24px 100px;
  text-align: center;
}

.wip-img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 20px;
  opacity: 0.92;
  filter: saturate(0.9);
}

.wip-text {
  font-size: 18px;
  font-weight: 700;
  color: #111111;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.wip-sub {
  font-size: 13px;
  font-weight: 400;
  color: #E3E3E3;
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════
   SETTINGS HUB & SUB-SCREENS (IOS GROUPED STYLE)
   ══════════════════════════════════════════════════════ */
.settings-hub-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.settings-categories-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.settings-group-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 12px;
}

.settings-group-block:last-child {
  margin-bottom: 0;
}

.settings-group-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8E8E93;
  padding-left: 6px;
  margin-top: 6px;
}

.settings-clean-cards-group {
  margin-top: 0 !important;
  background: #F4F4EE;
  border-radius: 16px;
  padding: 2px 16px;
  overflow: hidden;
  border: none;
}

.settings-clean-row {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  transition: opacity 0.15s ease;
  user-select: none;
}

.settings-clean-row:last-child {
  border-bottom: none;
}

.settings-clean-row:active {
  opacity: 0.6;
}

.settings-clean-label {
  font-size: 14.5px;
  font-weight: 600;
  color: #18181B;
}

.settings-clean-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-clean-badge {
  font-size: 13.5px;
  font-weight: 500;
  color: #8E8E93;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-clean-arrow {
  width: 16px;
  height: 16px;
  color: #C7C7CC;
  flex-shrink: 0;
}

/* Sub-screen */
.settings-sub-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  animation: iosSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes iosSlideIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.settings-sub-header {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  padding: 4px 0 10px;
}

.settings-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #18181B;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  justify-self: start;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.settings-back-btn:active {
  opacity: 0.5;
  transform: scale(0.96);
}

.settings-back-btn svg {
  width: 18px;
  height: 18px;
}

.settings-sub-title {
  font-size: 16px;
  font-weight: 700;
  color: #18181B;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-edit-toggle-btn {
  background: none;
  border: none;
  color: #18181B;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  justify-self: end;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.settings-edit-toggle-btn:active {
  opacity: 0.5;
  transform: scale(0.96);
}

.settings-delete-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #EF4444;
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: appleBadgePop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.settings-delete-btn:active {
  transform: scale(0.88);
  background: #DC2626;
}

.settings-delete-btn svg {
  width: 14px;
  height: 14px;
}

@keyframes appleBadgePop {
  0% {
    opacity: 0;
    transform: scale(0.4) rotate(-20deg);
  }
  70% {
    transform: scale(1.15) rotate(4deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.settings-clean-row.row-deleting {
  opacity: 0;
  transform: translateX(-30px) scale(0.95);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-selected-tag {
  font-size: 13px;
  font-weight: 600;
  color: #8E8E93;
  letter-spacing: -0.01em;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
}

/* ══════════════════════════════════════════════════════
   ПОЛНОЭКРАННЫЙ ONBOARDING (3 ШАГА ПРИ ПЕРВОМ ВХОДЕ)
══════════════════════════════════════════════════════ */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg, #FFFFFF);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font, 'Manrope', -apple-system, sans-serif);
  animation: obFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes obFadeIn {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.onboarding-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: env(safe-area-inset-top, 24px) 24px calc(env(safe-area-inset-bottom, 20px) + 24px);
}

.onboarding-header {
  padding: 12px 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.onboarding-progress-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.onboarding-dot {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: var(--border, #EAEAEA);
  transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.onboarding-dot.active {
  background: var(--text, #111111);
  width: 48px;
}

.onboarding-dot.completed {
  background: var(--text, #111111);
}

.onboarding-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  -webkit-overflow-scrolling: touch;
}

.onboarding-top-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 340px;
  margin: 0 0 24px 0;
  position: relative;
  z-index: 2;
}

.onboarding-title-block {
  text-align: center;
  width: 100%;
}

.onboarding-main-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text, #111111);
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  line-height: 1.2;
  text-align: center;
  font-family: var(--font);
}

.onboarding-subtitle {
  font-size: 14.5px;
  color: var(--text-2, #666660);
  line-height: 1.45;
  margin: 0;
  max-width: 100%;
  text-align: center;
  font-family: var(--font);
}

.onboarding-bottom-input-box {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding-bottom: 8px;
}

.onboarding-minimal-input {
  width: 100%;
  background: var(--surface-2, #F5F5F0);
  border-radius: var(--radius-md, 14px);
  padding: 16px 20px;
  border: 1.5px solid var(--border, #EAEAEA);
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #111111);
  text-align: center;
  outline: none;
  font-family: var(--font);
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.onboarding-minimal-input:focus {
  background: #FFFFFF;
  border-color: var(--text, #111111);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.onboarding-minimal-input::placeholder {
  color: var(--text-muted, #9C9C94);
  font-weight: 500;
}

/* Chips under input for fast convenient choice */
.onboarding-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.onboarding-chip-btn {
  background: var(--surface-2, #F5F5F0);
  border: 1px solid var(--border, #EAEAEA);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #111111);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s ease;
}

.onboarding-chip-btn:active {
  transform: scale(0.96);
  background: var(--border, #EAEAEA);
}

/* Card layout matching Report counters */
.onboarding-stealth-card {
  background: var(--surface-2, #F5F5F0);
  border: 1px solid var(--border, #EAEAEA);
  border-radius: var(--radius-lg, 22px);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.onboarding-stealth-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.onboarding-stealth-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--text, #111111);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.onboarding-stealth-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.onboarding-stealth-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text, #111111);
  line-height: 1.35;
  font-family: var(--font);
}

.onboarding-stealth-desc {
  font-size: 13px;
  color: var(--text-2, #666660);
  line-height: 1.45;
  font-family: var(--font);
}

.onboarding-footer {
  padding-top: 8px;
}

.onboarding-action-btn {
  width: 100%;
  background: var(--text, #111111);
  color: #FFFFFF;
  border: none;
  border-radius: 16px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.12);
  transition: all 0.15s ease;
}

.onboarding-action-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}
