.live-badge { background: rgba(157, 255, 196, 0.08); border: 1px solid rgba(157, 255, 196, 0.28); color: var(--neon-green); padding: 8px 16px; border-radius: 40px; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; min-height: 44px; }
.live-badge i { animation: pulse 2s infinite; }

/* СПИСОК СБОРОВ */
.section-title { font-size: 0.9rem; font-weight: 700; color: var(--neon-purple); text-transform: uppercase; letter-spacing: 0.8px; margin: 20px 0 12px; display: flex; align-items: center; gap: 8px; }
.bank-card { background: var(--dark-card); border: 1px solid rgba(201, 163, 255, 0.16); border-radius: 20px; padding: 18px 20px; margin-bottom: 12px; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; gap: 10px; }
.bank-card:hover { background: rgba(201, 163, 255, 0.08); border-color: rgba(201, 163, 255, 0.4); }
.bank-card.closed { opacity: 0.7; }
.bank-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bank-card-title { font-family: 'Comfortaa', cursive; font-weight: 700; font-size: 1.15rem; color: #f2ecff; }
.bank-card-arrow { color: var(--neon-pink); font-size: 1rem; }
.bank-card-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-dim); }
.bank-card-meta i { color: var(--neon-purple); }
.bank-progress-wrap { margin-top: 4px; }
.bank-progress-text { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 6px; }
.bank-progress-text strong { color: var(--neon-green); }
.bank-progress-bar { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 10px; overflow: hidden; }
.bank-progress-fill { height: 100%; background: var(--neon-green); border-radius: 10px; box-shadow: 0 0 10px rgba(157, 255, 196, 0.4); }

/* ДЕТАЛИ СБОРА */
.detail-view { animation: slideInRight 0.3s cubic-bezier(0.2, 1.2, 0.4, 1); }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }

.detail-header { margin-bottom: 20px; }
.detail-back-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.15); color: var(--text-main); padding: 10px 16px; border-radius: 12px; font-size: 0.9rem; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; transition: 0.2s; }
.detail-back-btn:hover { background: rgba(255, 255, 255, 0.1); }
.detail-title { font-family: 'Comfortaa', cursive; font-size: 1.6rem; color: #f2ecff; margin-bottom: 10px; line-height: 1.2; }
.detail-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.9rem; color: var(--text-dim); }
.detail-meta i { color: var(--neon-purple); }
.detail-meta strong { color: var(--neon-yellow); }

.tabs-container { display: flex; gap: 8px; margin-bottom: 16px; background: rgba(0,0,0,0.2); padding: 6px; border-radius: 16px; }
.tab-btn { flex: 1; padding: 12px; border-radius: 12px; border: none; background: transparent; color: var(--text-dim); font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { background: rgba(201, 163, 255, 0.15); color: var(--text-main); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.tab-count { background: rgba(255,255,255,0.1); font-size: 0.75rem; padding: 2px 8px; border-radius: 20px; color: var(--text-dim); }
.tab-btn.active .tab-count { background: var(--neon-pink); color: #fff; }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s; }

.scroll-box { max-height: 55vh; overflow-y: auto; padding-right: 4px; }
.scroll-box::-webkit-scrollbar { width: 4px; }
.scroll-box::-webkit-scrollbar-thumb { background: rgba(201,163,255,0.3); border-radius: 4px; }

/* Сетка детей (десктоп) */
.children-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.detail-child { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(201, 163, 255, 0.13); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.detail-child.paid { border-color: rgba(157, 255, 196, 0.32); background: rgba(157, 255, 196, 0.03); }
.detail-child.partial { border-color: rgba(255, 233, 163, 0.35); background: rgba(255, 233, 163, 0.03); }
.detail-child.unpaid { border-color: rgba(255, 139, 160, 0.28); background: rgba(255, 139, 160, 0.02); }
.detail-child-name { font-weight: 700; font-size: 1rem; color: #f2ecff; word-break: break-word; }
.detail-child-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.detail-child-amount { font-size: 0.85rem; color: var(--text-dim); }
.detail-child-amount strong { color: var(--neon-green); }
.detail-child-amount .partial-amount { color: var(--neon-yellow); }
.detail-child-badge { font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 30px; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; flex-shrink: 0; }
.detail-child-badge.paid { background: rgba(157, 255, 196, 0.12); color: var(--neon-green); }
.detail-child-badge.partial { background: rgba(255, 233, 163, 0.12); color: var(--neon-yellow); }
.detail-child-badge.unpaid { background: rgba(255, 139, 160, 0.1); color: var(--neon-red); }

/* Список расходов */
.expenses-list { display: flex; flex-direction: column; gap: 8px; }
.detail-expense { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(201, 163, 255, 0.13); border-radius: 16px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-exp-left { flex: 1; min-width: 0; }
.detail-exp-desc { font-size: 0.95rem; color: #e8defa; line-height: 1.4; word-break: break-word; margin-bottom: 4px; }
.detail-exp-date { font-size: 0.75rem; color: var(--neon-blue); font-weight: 700; }
.detail-exp-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.detail-exp-amount { font-family: 'Comfortaa', cursive; font-weight: 700; font-size: 1rem; color: var(--neon-yellow); white-space: nowrap; }

.file-buttons { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.file-btn { background: rgba(140, 224, 255, 0.08); border: 1px solid rgba(140, 224, 255, 0.28); color: var(--neon-blue); padding: 6px 8px; border-radius: 10px; font-size: 0.75rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; min-height: 36px; min-width: 36px; }
.file-btn:hover { background: rgba(140, 224, 255, 0.2); }
.file-btn.photo { background: rgba(255, 139, 216, 0.08); border-color: rgba(255, 139, 216, 0.28); color: var(--neon-pink); }

.updated-at { font-size: 0.8rem; color: var(--text-dim); text-align: center; margin-top: 24px; padding-top: 18px; border-top: 1px dashed rgba(201, 163, 255, 0.13); }

/* ============ ФИКС МОДАЛКИ (ДЕСКТОП И МОБИЛКА) ============ */
.modal-overlay { 
  position: fixed; 
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  background: rgba(8, 6, 18, 0.85); 
  backdrop-filter: blur(8px); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  z-index: 99999; 
  padding: 20px;
}
.modal-box { 
  background: var(--dark-card); 
  border: 1px solid rgba(201, 163, 255, 0.25); 
  border-radius: 24px; 
  padding: 20px; 
  box-shadow: 0 20px 60px rgba(0,0,0,0.6); 
  animation: fadeIn 0.2s;
}
.modal-box img { display: block; max-width: 100%; max-height: 70vh; object-fit: contain; margin: 0 auto; }

/* МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 720px) {
  .card { padding: 0 !important; background: transparent !important; border: none !important; box-shadow: none !important; }
  .bank-card { padding: 16px; border-radius: 20px; }
  .bank-card-title { font-size: 1.15rem; }
  
  .detail-back-btn { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; margin-bottom: 16px; }
  .detail-title { font-size: 1.3rem; }
  .detail-meta { flex-direction: column; gap: 6px; font-size: 0.85rem; }
  
  .tabs-container { padding: 4px; border-radius: 12px; gap: 4px; margin-bottom: 12px; }
  .tab-btn { padding: 10px; font-size: 0.85rem; border-radius: 10px; flex-direction: column; gap: 4px; }
  .tab-btn i { font-size: 1.1rem; }
  
  /* Квадратная сетка 2 колонки */
  .children-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .detail-child { 
    aspect-ratio: 1 / 1; 
    padding: 12px; 
    border-radius: 16px; 
    display: flex; 
    flex-direction: column;
    justify-content: space-between;
  }
  .detail-child-name { 
    font-size: 0.85rem; 
    line-height: 1.3; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
  }
  .detail-child-bottom { flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 8px; }
  .detail-child-amount { font-size: 0.75rem; }
  .detail-child-badge { font-size: 0.6rem; padding: 3px 8px; }
  
  .detail-expense { padding: 12px; flex-wrap: wrap; gap: 8px; border-radius: 12px; }
  .detail-exp-left { width: 100%; }
  .detail-exp-desc { font-size: 0.9rem; }
  .detail-exp-right { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
  .detail-exp-amount { font-size: 1.05rem; }
  
  .scroll-box { max-height: 60vh; }
  
  /* Модалка на мобилке по центру, не сдвигает контент */
  .modal-overlay { padding: 10px; }
  .modal-box { 
    width: 100% !important; 
    max-width: 100% !important; 
    border-radius: 20px !important;
    padding: 12px !important;
  }
  .modal-box img { max-height: 60vh; }
}

.export-actions { display: flex; gap: 8px; }
.export-btn {
  background: rgba(201, 163, 255, 0.1); border: 1px solid rgba(201, 163, 255, 0.3);
  color: #d9c7ff; padding: 8px 12px; border-radius: 12px; font-weight: 700;
  font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: 0.2s;
}
.export-btn:hover { background: rgba(201, 163, 255, 0.2); }

@media (max-width: 720px) {
  .export-actions { width: 100%; margin-top: 10px; }
  .export-btn { flex: 1; justify-content: center; padding: 10px; font-size: 0.9rem; }
}

/* Дополнительные цвета для статистики */
.bank-progress-text span {
  font-size: 0.8rem;
  font-weight: 600;
}