/* ============================================================================
 * UzProcure Executive FinTech & Auto-Bid Design System
 * Modern Dark Obsidian + Emerald/Cyan Trading Aesthetic (Mobile-First PWA / TMA)
 * ============================================================================ */

:root {
  --bg-root: #060913;
  --bg-elevated: #0d1424;
  --bg-card: rgba(16, 25, 43, 0.86);
  --bg-card-solid: #10192b;
  --bg-input: #0a101e;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.24);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --emerald: #10b981;
  --emerald-bright: #34d399;
  --cyan: #38bdf8;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --shadow-card: 0 14px 36px -12px rgba(2, 6, 23, 0.72);
  --shadow-glow-emerald: 0 8px 28px -6px rgba(16, 185, 129, 0.42);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-root);
  background-image:
    radial-gradient(ellipse 80% 45% at 50% -10%, rgba(16, 185, 129, 0.15), transparent 65%),
    radial-gradient(ellipse 55% 35% at 95% 18%, rgba(56, 189, 248, 0.08), transparent 60%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.safe-pb {
  padding-bottom: calc(5.8rem + env(safe-area-inset-bottom, 0px));
}

/* Glass Surfaces */
.glass-header {
  background: rgba(6, 9, 19, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}

.glass-nav {
  background: rgba(9, 14, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.fintech-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, border-color 0.2s ease;
}

.fintech-card-green {
  border-color: rgba(16, 185, 129, 0.34);
  background: linear-gradient(165deg, rgba(16, 40, 38, 0.55) 0%, rgba(16, 25, 43, 0.92) 45%);
}

.fintech-card-red {
  border-color: rgba(244, 63, 94, 0.28);
}

/* Hero Portfolio Card */
.portfolio-hero {
  background: linear-gradient(135deg, #0d2230 0%, #0f1b33 52%, #0d2724 100%);
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 22px;
  box-shadow: 0 20px 44px -18px rgba(16, 185, 129, 0.25);
  position: relative;
  overflow: hidden;
}

.portfolio-hero::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 70%);
  pointer-events: none;
}

/* Verdict Ribbon Badges */
.badge-green {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.38);
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.38);
}

.badge-red {
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.38);
}

/* Primary Trading CTA Button */
.btn-trade-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 700;
  border: none;
  box-shadow: var(--shadow-glow-emerald);
  transition: transform 0.12s ease, filter 0.15s ease;
}

.btn-trade-primary:hover {
  filter: brightness(1.08);
}

.btn-trade-primary:active {
  transform: scale(0.97);
}

.btn-trade-danger {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 8px 24px -6px rgba(244, 63, 94, 0.45);
}

/* Quick Preset Chips */
.chip-btn {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chip-btn:hover,
.chip-btn.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

/* Direction 2-Column Selector Card */
.dir-tile {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  transition: all 0.16s ease;
  cursor: pointer;
}

.dir-tile:active {
  transform: scale(0.98);
}

.dir-tile.selected {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.94));
  border-color: rgba(16, 185, 129, 0.62);
  box-shadow: 0 6px 20px -8px rgba(16, 185, 129, 0.35);
}

/* Inputs */
.fintech-input {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fintech-input:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

/* Bottom Navigation Active Pill */
.nav-item {
  position: relative;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-item.active {
  color: var(--emerald-bright);
  font-weight: 700;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24%;
  right: 24%;
  height: 2.5px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
}

/* Animations */
.pulse-live {
  animation: pulseLive 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.88); }
}

.sheet-enter {
  animation: sheetUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.urgent-timer {
  color: #fb7185 !important;
  animation: pulseLive 1.4s ease-in-out infinite;
}

/* Modal Backdrop */
.modal-backdrop {
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
