/* ==========================================================================
   Components — components.css
   Buttons, Badges, Cards, Modals, Forms, Currency Pill & Toasts
   ========================================================================== */

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
  background: #6d28d9;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-accent:hover {
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.5);
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-success {
  background: #059669;
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: #047857;
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

.btn-small {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.btn-large {
  padding: 0.85rem 1.65rem;
  font-size: 1rem;
}

.purchases-subtab.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
}

/* ==========================================================================
   Badges & Pills
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge-accent {
  background: rgba(124, 58, 237, 0.25);
  color: #ddd6fe;
  border: 1px solid rgba(124, 58, 237, 0.4);
}

.badge-gold {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-glass {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-info {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

/* ==========================================================================
   Currency Pill & Role Switcher
   ========================================================================== */
.currency-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem 0.35rem 0.85rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
}

.currency-icon {
  font-size: 1rem;
}

.currency-amount {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fbbf24;
}

.currency-add-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-gradient);
  border: none;
  color: #000;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: var(--transition);
}

.currency-add-btn:hover {
  transform: scale(1.15) rotate(90deg);
}

.role-pill-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.role-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.role-btn:hover {
  color: var(--text-primary);
}

.role-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.lang-switch-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
}

/* ==========================================================================
   Work Cards & Grid
   ========================================================================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  align-items: start;
}

.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}

.work-card-media {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #070a13;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-cover-backdrop {
  position: absolute;
  inset: -15px;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.38) saturate(1.3);
  transform: scale(1.15);
  opacity: 0.85;
  pointer-events: none;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.work-card:hover .work-cover-backdrop {
  transform: scale(1.25);
  filter: blur(22px) brightness(0.45) saturate(1.4);
}

.work-cover-img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.65));
  transition: transform 0.35s ease;
}

.work-card:hover .work-cover-img {
  transform: scale(1.03);
}

.work-card-media::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 65%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 3;
}

.work-badge-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
  z-index: 4;
}

.work-badge-overlay .badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  opacity: 1 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.95);
}

/* Полная непрозрачность и безупречная читаемость цены на любом фоне обложки (светлом, белом, цветном) */
.work-badge-overlay .badge-accent,
.work-badge-overlay .badge-price,
.badge-price {
  background: #150d28 !important; /* 100% непрозрачный глубокий фиолетово-черный фон */
  color: #ffffff !important;       /* Яркий чистый белый текст */
  border: 1.5px solid #a855f7 !important; /* Четкий фиолетовый контур */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.95), 0 0 12px rgba(168, 85, 247, 0.45) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  font-weight: 800;
}

.work-badge-overlay .badge-glass {
  background: #111420 !important; /* 100% непрозрачный темный фон */
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.95) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  font-weight: 700;
}

.work-badge-overlay .badge-success {
  background: #062817 !important; /* 100% непрозрачный изумрудный фон */
  color: #34d399 !important;
  border: 1.5px solid #10b981 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.95), 0 0 12px rgba(16, 185, 129, 0.4) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  font-weight: 800;
}

.work-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.tag-pill {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  color: var(--text-muted);
}

.work-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.work-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  font-style: italic;
}

.work-desc-container {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.work-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
  word-break: break-word;
  user-select: text;
}

.work-desc.has-expand {
  cursor: pointer;
}

.work-desc.has-expand:hover {
  color: var(--text-primary);
}

.work-desc.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  max-height: none;
}

.work-desc-toggle {
  align-self: flex-start;
  margin-top: 6px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-secondary, #38bdf8);
  cursor: pointer;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.work-desc-toggle:hover {
  color: #fff;
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.4);
}

.work-meta-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.work-card-footer {
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 0.75rem;
}

.work-card-footer > :only-child {
  grid-column: 1 / -1;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.work-card-footer.single-action,
.work-card-footer:has(> :only-child) {
  display: flex;
  justify-content: center;
  align-items: center;
}

.work-card-footer.single-action > *,
.work-card-footer:has(> :only-child) > * {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  animation: modal-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-pop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes modal-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.modal-card.modal-shake {
  animation: modal-shake 0.3s ease-in-out;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
}

/* ==========================================================================
   2-Step Topup Flow & 30-min Timer Styles
   ========================================================================== */
.step-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.step-nav-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.step-nav-pill.active {
  background: rgba(124, 58, 237, 0.25);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.step-nav-pill.completed {
  color: #34d399;
}

.step-nav-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.72rem;
  font-weight: 700;
}

.step-nav-pill.active .step-nav-num {
  background: var(--accent-primary);
  color: #fff;
}

.step-nav-pill.completed .step-nav-num {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
}

.step-nav-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.preset-amounts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.preset-chip:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--accent-primary);
  color: #fff;
  transform: translateY(-1px);
}

.topup-calc-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.calc-notice {
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.73rem;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.35;
}

.timer-countdown-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.05) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.timer-countdown-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timer-display-digits {
  font-family: monospace;
  font-size: 1.15rem;
  color: #fbbf24;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  letter-spacing: 1px;
}

/* ==========================================================================
   xPub Payment Details Card
   ========================================================================== */
.invoice-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.invoice-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.invoice-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.invoice-qr-canvas {
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  background: #fff;
  padding: 8px;
}

.copy-input-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.copy-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.85rem;
}

/* ==========================================================================
   Archive Upload Dropzone
   ========================================================================== */
.dropzone {
  border: 2px dashed rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.05);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.1);
  box-shadow: var(--shadow-glow);
}

.dropzone-icon {
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Forms & Controls
   ========================================================================== */
.input-styled, .select-styled, .textarea-styled {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: var(--transition);
}

.input-styled:focus, .select-styled:focus, .textarea-styled:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ==========================================================================
   Toasts Container
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  font-weight: 500;
  animation: slide-in 0.3s ease;
  transition: opacity 0.3s ease;
}

.toast-message.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--info); }

/* ==========================================================================
   Paid Button & 3-Confirmations Tracker
   ========================================================================== */
.btn-paid {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid #10b981;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-paid:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.btn-paid:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.confirmations-tracker-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(56, 189, 248, 0.05);
  animation: fadeIn 0.3s ease;
}

.confirmations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.confirmations-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #38bdf8;
  display: inline-block;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 4px #38bdf8; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px #38bdf8; }
  100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 4px #38bdf8; }
}

.confirmations-counter-badge {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 2px 8px;
  border-radius: 12px;
}

.confirmations-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.confirmations-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #10b981 100%);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.confirmations-steps-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
}

.conf-step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.conf-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.conf-step-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conf-step-item.active {
  color: #38bdf8;
}

.conf-step-item.active .conf-step-num {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.conf-step-item.completed {
  color: #34d399;
}

.conf-step-item.completed .conf-step-num {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.confirmations-status-note {
  font-size: 0.74rem;
  color: #93c5fd;
  margin: 0;
  line-height: 1.4;
  background: rgba(56, 189, 248, 0.08);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  border-left: 3px solid #38bdf8;
}

/* Кнопка открытия активной сделки из истории */
.btn-resume-deal {
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  border: 1px solid rgba(124, 58, 237, 0.5);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.btn-resume-deal:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
  transform: translateY(-1px);
}

/* Модальное окно истории сделок — просторный полноразмерный адаптивный лэйаут */
#deposits-history-modal {
  padding: 0.75rem;
}

#deposits-history-modal .modal-card {
  max-width: 1320px;
  width: 98%;
}

#deposits-history-modal .modal-body {
  padding: 1rem 1.25rem;
}

/* ==========================================================================
   Feedback Floating Action Button (FAB) & Pulsing Glow
   ========================================================================== */
.feedback-fab {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 55%, #8b5cf6 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 22px rgba(14, 165, 233, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 950;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.25s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.feedback-fab:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6), 0 0 20px rgba(14, 165, 233, 0.55);
}

.feedback-fab:active {
  transform: translateY(-1px) scale(0.98);
}

.feedback-fab::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.45) 0%, transparent 72%);
  animation: fab-pulse 2.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  pointer-events: none;
}

@keyframes fab-pulse {
  0% {
    transform: scale(0.92);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.38);
    opacity: 0.25;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.feedback-fab-icon {
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.25s ease;
}

.feedback-fab:hover .feedback-fab-icon {
  transform: rotate(-8deg) scale(1.1);
}

/* Tooltip floating beside FAB */
.feedback-fab-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.feedback-fab:hover .feedback-fab-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Скрытие кнопки в режиме открытой читалки */
body.reader-open .feedback-fab {
  display: none !important;
}

@media (max-width: 640px) {
  .feedback-fab {
    bottom: 18px;
    right: 18px;
    width: 48px;
    height: 48px;
  }
  .feedback-fab-icon {
    font-size: 1.35rem;
  }
  .feedback-fab-tooltip {
    display: none; /* скрываем тултип на сенсорных экранах */
  }
}

/* ==========================================================================
   Feedback Modal & Telegram Banner
   ========================================================================== */
#feedback-modal .modal-card {
  max-width: 540px;
  width: 95%;
}

.telegram-direct-banner {
  background: linear-gradient(135deg, rgba(36, 161, 222, 0.14) 0%, rgba(36, 161, 222, 0.04) 100%);
  border: 1px solid rgba(36, 161, 222, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1.15rem;
}

.telegram-direct-btn {
  background: #24a1de;
  color: #ffffff !important;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(36, 161, 222, 0.35);
}

.telegram-direct-btn:hover {
  background: #1e87bb;
  box-shadow: 0 4px 14px rgba(36, 161, 222, 0.5);
  transform: translateY(-1px);
}

.feedback-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  margin: 1rem 0;
}

.feedback-divider::before,
.feedback-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.feedback-divider span {
  padding: 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Status badges for admin tickets */
.badge-ticket-new {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-ticket-progress {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-ticket-resolved {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}



