:root {
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: rgba(22, 27, 34, 0.85);
  --bg-card-hover: rgba(30, 37, 46, 0.9);
  --border-color: rgba(48, 54, 61, 0.6);
  --text-primary: #e6edf3;
  --text-secondary: rgba(230, 237, 243, 0.7);
  --text-muted: rgba(139, 148, 158, 0.8);
  --accent-green: #10b981;
  --accent-cyan: #06b6d4;
  --glow-green: rgba(16, 185, 129, 0.4);
}

html {
  -webkit-text-size-adjust: 100%;
  background: #0d1117 !important;
  background-color: #0d1117 !important;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100svh;
  min-height: -webkit-fill-available;
  color: var(--text-primary, #e6edf3);
  padding-top: var(--sat);
  padding-left: var(--sal);
  padding-right: var(--sar);
  background: #0d1117 !important;
  background-color: #0d1117 !important;
}

/* Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #0d1117 !important;
  background-color: #0d1117 !important;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-btn {
  color: var(--text-primary);
  font-size: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.2s;
}

.back-btn:hover {
  border-color: var(--accent-green);
}

.header-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-right {
  width: 32px;
}

/* Tab Navigation */
.tabs-container {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 0.75rem 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab-btn.active {
  color: #f7931a;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #f7931a;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  border-radius: 9px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  margin-left: 0.375rem;
}

/* Order Card */
.order-card {
  margin: 0.75rem 1rem;
  padding: 1rem;
  background: rgba(13, 17, 23, 0.9) !important;
  border: 1px solid rgba(48, 54, 61, 0.6);
  border-radius: 12px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.order-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.order-type-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.order-type-badge.buy {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.order-type-badge.sell {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.order-coin {
  font-weight: 600;
  color: #fff;
}

.order-status {
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
}

.status-pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.status-paid {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.status-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.status-disputed {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.order-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.order-detail-item {
  font-size: 0.75rem;
}

.order-detail-label {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.25rem;
}

.order-detail-value {
  color: #fff;
  font-weight: 500;
}

.order-id {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: monospace;
}

.order-counterparty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.counterparty-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: #fff;
}

.counterparty-info {
  flex: 1;
}

.counterparty-name {
  font-weight: 500;
  color: #fff;
  font-size: 0.875rem;
}

.counterparty-meta {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.5);
}

.order-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.order-btn {
  flex: 1;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #f7931a;
  color: #fff;
}

.btn-primary:hover {
  background: #e8850f;
}

.btn-secondary {
  background: rgba(13, 17, 23, 0.9) !important;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* Timer */
.order-timer {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 6px;
  font-size: 0.75rem;
  color: #fbbf24;
}

.timer-urgent {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: rgba(13, 17, 23, 0.9) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.empty-text {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  max-width: 280px;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 0;
  padding-bottom: max(0.5rem, var(--sab));
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.6875rem;
  transition: color 0.2s;
}

.nav-item.active {
  color: #f7931a;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

/* Safe area padding for content */
.content-wrapper {
  padding-bottom: calc(80px + var(--sab));
}

.inline-style-c8be1ccba6 {
  display: none;
}