.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

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

.btn--primary {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent) 100%);
  color: var(--btn-primary-text);
  box-shadow: 0 2px 12px var(--accent-glow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn--primary:hover {
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn--danger {
  background: var(--red-dim);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--red);
}

.btn--danger:hover {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}

[data-theme="light"] .btn--danger {
  color: #dc2626;
}

[data-theme="light"] .btn--danger:hover {
  color: #b91c1c;
}

.btn--sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
}

.card {
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card__title {
  font-size: 15px;
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pill--execution { background: var(--blue-dim); color: var(--blue); }
.pill--execution .pill__dot { background: var(--blue); }
.pill--won { background: var(--purple-dim); color: var(--purple); }
.pill--won .pill__dot { background: var(--purple); }
.pill--picked { background: var(--cyan-dim); color: var(--cyan); }
.pill--picked .pill__dot { background: var(--cyan); }
.pill--in_transit { background: var(--blue-dim); color: var(--blue); }
.pill--in_transit .pill__dot { background: var(--blue); animation: pulse-dot 2s infinite; }
.pill--customs { background: var(--amber-dim); color: var(--amber); }
.pill--customs .pill__dot { background: var(--amber); }
.pill--delivered { background: var(--green-dim); color: var(--green); }
.pill--delivered .pill__dot { background: var(--green); }

.pill--paid { background: var(--green-dim); color: var(--green); }
.pill--partial { background: var(--amber-dim); color: var(--amber); }
.pill--pending { background: rgba(148, 163, 184, 0.12); color: var(--text-secondary); }
.pill--debt { background: var(--red-dim); color: var(--red); }

.stat-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 136px;
  padding: 18px 18px 16px;
}

.stat-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-card__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-secondary);
}

.stat-card__icon svg {
  width: 18px;
  height: 18px;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  filter: blur(16px);
  pointer-events: none;
  opacity: 0.6;
}

.stat-card__label {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.35;
  margin-bottom: 0;
  padding-right: 4px;
}

.stat-card > .stat-card__label {
  margin-bottom: 14px;
}

.stat-card__head .stat-card__label {
  margin-bottom: 0;
}

.stat-card__value-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.stat-card__value {
  font-family: var(--font-mono);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
}

.stat-card__currency {
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 0;
}

.stat-card__trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 99px;
  align-self: flex-start;
}

.stat-card__trend--up {
  background: var(--green-dim);
  color: var(--green);
}

.stat-card__trend--down {
  background: var(--red-dim);
  color: var(--red);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 901px) {
  .search-bar {
    min-width: min(260px, 100%);
    width: auto;
  }
}

.search-bar:focus-within {
  border-color: var(--border-accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px var(--accent-dim), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search-bar svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  outline: none;
  background: transparent;
}

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

.view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  flex-shrink: 0;
}

.view-switcher__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
}

.view-switcher__btn--active {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(46, 232, 192, 0.03);
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 99px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.progress-bar__fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 1s var(--ease-out);
}

.timeline {
  display: flex;
  gap: 0;
  position: relative;
}

.timeline__step {
  flex: 1;
  text-align: center;
  position: relative;
}

.timeline__step::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.timeline__step:last-child::before {
  display: none;
}

.timeline__dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  margin: 0 auto 10px;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  transition: all var(--transition);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.timeline__step--done .timeline__dot {
  background: linear-gradient(145deg, var(--accent-soft), var(--accent));
  border-color: transparent;
  box-shadow: 0 0 20px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: var(--bg-deep);
}

.timeline__step--done::before {
  background: var(--accent);
}

.timeline__step--active .timeline__dot {
  border-color: var(--accent);
  animation: pulse-ring 2s infinite;
}

.timeline__label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline__step--done .timeline__label,
.timeline__step--active .timeline__label {
  color: var(--text);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-header__title {
  font-size: 16px;
  font-weight: 700;
}

.section-header__desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-tag--mvp { background: var(--green-dim); color: var(--green); }
.badge-tag--std { background: var(--blue-dim); color: var(--blue); }
.badge-tag--vip { background: var(--purple-dim); color: var(--purple); }
