/* ============================================
   FRAGMENT AUCTION — Mini App Styles
   Тёмная тема, акценты TON-голубого, плотная сетка
   ============================================ */

:root {
  --bg-base: #0a0e14;
  --bg-elev-1: #11161f;
  --bg-elev-2: #1a2230;
  --bg-elev-3: #232d3f;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  --text-primary: #f0f4fa;
  --text-secondary: #8b95a8;
  --text-tertiary: #5a6478;
  --text-muted: #3a4256;

  --accent: #3aa8ff;
  --accent-hover: #5cb8ff;
  --accent-dim: rgba(58, 168, 255, 0.15);
  --accent-glow: rgba(58, 168, 255, 0.35);

  --success: #2ed573;
  --warning: #ffa726;
  --danger: #ff4757;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px var(--accent-glow);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --header-h: 64px;
  --tabbar-h: 68px;
}

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

html, body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-top: env(safe-area-inset-top);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
  color: inherit;
}

/* ============================================
   АТМОСФЕРНЫЙ ФОН
   ============================================ */
.bg-aura {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aura {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: drift 20s ease-in-out infinite;
}

.aura-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #3aa8ff 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.aura-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #7c4dff 0%, transparent 70%);
  bottom: -50px;
  right: -100px;
  animation-delay: -7s;
  opacity: 0.25;
}

.aura-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #00d4aa 0%, transparent 70%);
  top: 40%;
  left: 40%;
  animation-delay: -14s;
  opacity: 0.15;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(50px, -30px); }
  66% { transform: translate(-30px, 50px); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 80%);
}

/* ============================================
   ШАПКА
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 14, 20, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #2a85d9);
  color: white;
  border-radius: 10px;
  box-shadow: var(--shadow-glow);
}

.logo-mark svg {
  width: 22px;
  height: 22px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

.wallet-area {
  display: flex;
  align-items: center;
}

/* ============================================
   ГЛАВНЫЙ КОНТЕЙНЕР
   ============================================ */
.main {
  position: relative;
  padding: 20px 16px 24px;
  max-width: 560px;
  margin: 0 auto;
}

.screen {
  display: none;
  animation: screenIn 0.4s ease-out;
}

.screen.active {
  display: block;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.screen-head > div:not(.icon-btn) {
  flex: 1;
}

.screen-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.screen-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.icon-btn:hover, .icon-btn:active {
  background: var(--bg-elev-2);
  color: var(--text-primary);
  transform: scale(0.96);
}

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

/* ============================================
   СТАТ-БАР
   ============================================ */
.stats-bar {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  font-weight: 500;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin: 0 12px;
}

/* ============================================
   ФИЛЬТРЫ
   ============================================ */
.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.filters::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all 0.15s;
}

.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.filter-chip.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================
   СПИСОК NFT
   ============================================ */
.nft-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 80px;
}

.nft-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.nft-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-elev-2);
}

.nft-item.selected {
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 16px rgba(58, 168, 255, 0.2);
}

.nft-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.nft-item.selected .nft-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}

.nft-checkbox svg {
  width: 14px;
  height: 14px;
  color: white;
  opacity: 0;
  transition: opacity 0.15s;
}

.nft-item.selected .nft-checkbox svg {
  opacity: 1;
}

.nft-image {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--bg-elev-3);
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.nft-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nft-image-fallback {
  font-size: 20px;
  color: var(--text-tertiary);
}

.nft-info {
  flex: 1;
  min-width: 0;
}

.nft-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nft-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.nft-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nft-tag.tag-onsale {
  background: rgba(46, 213, 115, 0.15);
  color: var(--success);
}

.nft-tag.tag-auction {
  background: rgba(255, 167, 38, 0.15);
  color: var(--warning);
}

.nft-tag.tag-idle {
  background: rgba(139, 149, 168, 0.15);
  color: var(--text-secondary);
}

.nft-floor {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

.nft-price {
  text-align: right;
  flex-shrink: 0;
}

.nft-price-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.nft-price-value svg {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.nft-price-usd {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Скелетон */
.nft-skeleton {
  height: 72px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--bg-elev-1), var(--bg-elev-2), var(--bg-elev-1));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   ПУСТОЕ СОСТОЯНИЕ
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  color: var(--text-muted);
}

.empty-icon svg {
  width: 100%;
  height: 100%;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.empty-text {
  font-size: 13px;
  color: var(--text-tertiary);
}

.hidden {
  display: none !important;
}

/* ============================================
   КАРТОЧКИ (на экране конфига)
   ============================================ */
.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
}

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

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.text-btn {
  font-size: 12px;
  color: var(--text-tertiary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* ============================================
   ПОЛЯ ФОРМЫ
   ============================================ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.form-row:last-child { margin-bottom: 0; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.field-hint {
  cursor: help;
  opacity: 0.6;
  font-size: 10px;
}

.input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  transition: border-color 0.15s;
}

.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.input-prefix, .input-suffix {
  display: grid;
  place-items: center;
  color: var(--text-tertiary);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
  flex-shrink: 0;
}

.input-prefix svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 12px 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
  min-width: 0;
  width: 100%;
}

.input-wrap input::placeholder { color: var(--text-muted); }

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

.input-wrap input[type=number] { -moz-appearance: textfield; }

/* Быстрые варианты длительности */
.quick-picks {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.quick-pick {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.15s;
}

.quick-pick:hover {
  color: var(--text-primary);
}

.quick-pick.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================
   АВТО-РЕЛИСТИНГ
   ============================================ */
.auto-card {
  background: linear-gradient(135deg, var(--bg-elev-1), rgba(58, 168, 255, 0.04));
  border-color: rgba(58, 168, 255, 0.2);
}

.auto-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auto-info { flex: 1; }

.auto-icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* Тоггл */
.toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-elev-3);
  border-radius: var(--radius-pill);
  transition: 0.2s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.toggle input:checked + .toggle-slider {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.toggle input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.auto-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.auto-details.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.auto-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.auto-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.auto-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.auto-btn:hover {
  background: var(--bg-elev-3);
  color: var(--text-primary);
}

.auto-value {
  min-width: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
}

.auto-note {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent);
}

/* ============================================
   СПИСОК ВЫБРАННЫХ
   ============================================ */
.selected-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.selected-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-elev-2);
  border-radius: var(--radius-sm);
}

.selected-row img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-elev-3);
}

.selected-row-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-row-remove {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--text-tertiary);
  transition: color 0.15s;
}

.selected-row-remove:hover { color: var(--danger); }

.selected-row-remove svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   ЗАКРЕПЛЁННЫЙ ДОК С КНОПКОЙ
   ============================================ */
.action-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 12px 16px;
  background: linear-gradient(to top, var(--bg-base) 60%, transparent);
  z-index: 40;
}

.action-dock .summary {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 0 4px 8px;
  color: var(--text-tertiary);
}

.action-dock .summary-row {
  display: flex;
  gap: 6px;
}

.action-dock .summary-row span:last-child {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-weight: 600;
}

.btn-primary {
  width: 100%;
  max-width: 528px;
  margin: 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: white;
  background: linear-gradient(135deg, var(--accent), #2a85d9);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(58, 168, 255, 0.35);
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}

.btn-primary:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15));
  opacity: 0;
  transition: opacity 0.15s;
}

.btn-primary:hover:not(:disabled):before { opacity: 1; }

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  background: var(--bg-elev-2);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-counter {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.btn-arrow {
  width: 16px;
  height: 16px;
}

.btn-ghost {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* ============================================
   АКТИВНЫЕ АУКЦИОНЫ
   ============================================ */
.active-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.active-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.active-card.has-auto::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.active-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.active-head img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-elev-3);
}

.active-head-info { flex: 1; min-width: 0; }

.active-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.active-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.active-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.active-stat {
  background: var(--bg-elev-2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.active-stat-label {
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.active-stat-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

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

.active-actions button {
  flex: 1;
  height: 36px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.active-actions button svg {
  width: 14px;
  height: 14px;
}

.btn-stop-auto {
  background: var(--bg-elev-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-stop-auto:hover {
  background: rgba(255, 71, 87, 0.1);
  color: var(--danger);
  border-color: var(--danger);
}

.btn-stop-auto.enabled {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

.btn-enable-auto {
  background: var(--bg-elev-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-enable-auto:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

.btn-cancel-auction {
  background: var(--bg-elev-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-cancel-auction:hover {
  background: rgba(255, 71, 87, 0.1);
  color: var(--danger);
  border-color: var(--danger);
}

/* Прогресс бар времени */
.time-progress {
  height: 4px;
  background: var(--bg-elev-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 12px;
}

.time-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #00d4aa);
  border-radius: var(--radius-pill);
  transition: width 1s linear;
}

/* ============================================
   НИЖНЯЯ НАВИГАЦИЯ
   ============================================ */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tabbar-h);
  padding: 0 16px env(safe-area-inset-bottom);
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
}

.tab {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 500;
  position: relative;
  transition: color 0.15s;
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab.active {
  color: var(--accent);
}

.tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}

.tab-badge {
  position: absolute;
  top: 8px;
  right: calc(50% - 18px);
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  min-width: 14px;
  text-align: center;
}

/* ============================================
   ТОСТЫ
   ============================================ */
.toast-container {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 400px;
}

.toast {
  pointer-events: auto;
  padding: 12px 16px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s ease-out;
}

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.info { border-color: var(--accent); }

.toast svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.toast.success svg { color: var(--success); }
.toast.error svg { color: var(--danger); }
.toast.info svg { color: var(--accent); }

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

/* ============================================
   МОДАЛКА
   ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 300;
  padding: 24px;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
}

.modal-icon svg {
  width: 28px;
  height: 28px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

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

.modal-actions button {
  flex: 1;
  height: 44px;
}

/* ============================================
   АДАПТИВ
   ============================================ */
@media (max-width: 380px) {
  .form-row { grid-template-columns: 1fr; }
  .screen-title { font-size: 20px; }
  .quick-picks { gap: 4px; }
}
