/**
 * KUBELLA - Global Crypto Exchange UI
 * Clean, Standard Buy/Sell Interface (All English)
 */

:root {
  --bg-main: #080c14;
  --bg-card: #0f172a;
  --bg-card-subtle: #131d33;
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(15, 23, 42, 0.85);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-green: #00e676;
  --accent-green-bg: rgba(0, 230, 118, 0.12);
  --accent-red: #ff3366;
  --accent-red-bg: rgba(255, 51, 102, 0.12);
  --accent-cyan: #00d2ff;
  --accent-cyan-bg: rgba(0, 210, 255, 0.12);
  --accent-gold: #f59e0b;
  --accent-gold-bg: rgba(245, 158, 11, 0.12);
  --bottom-nav-height: 64px;
  --header-height: 60px;
  --app-max-width: 480px;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(0, 210, 255, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(0, 230, 118, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* App Wrapper */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-main);
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 210, 255, 0.3));
}

.brand-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #00d2ff, #00e676);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 1px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

/* Content Area */
.app-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cards */
.card-crypto {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card-crypto::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

/* Wallet Card */
.wallet-hero {
  background: linear-gradient(145deg, #111b2e 0%, #0c1322 100%);
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 210, 255, 0.08);
}

.wallet-hero::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.wallet-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wallet-total {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  margin: 4px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.wallet-total .currency {
  font-size: 20px;
  color: var(--accent-cyan);
}

.wallet-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wallet-subitem {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wallet-subitem .sublabel {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wallet-subitem .subvalue {
  font-size: 15px;
  font-weight: 700;
}

.wallet-subitem.locked .subvalue { color: var(--accent-gold); }
.wallet-subitem.profit .subvalue { color: var(--accent-green); }

/* Buttons */
.wallet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.btn-crypto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-primary-crypto {
  background: linear-gradient(135deg, #00d2ff 0%, #0077ff 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 119, 255, 0.35);
}

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

.btn-success-crypto {
  background: linear-gradient(135deg, #00e676 0%, #00b359 100%);
  color: #042413;
  box-shadow: 0 4px 14px rgba(0, 230, 118, 0.35);
}

.btn-success-crypto:active { transform: scale(0.98); }

.btn-danger-crypto {
  background: linear-gradient(135deg, #ff3366 0%, #d91c4d 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 51, 102, 0.35);
}

.btn-danger-crypto:active { transform: scale(0.98); }

.btn-secondary-crypto {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn-secondary-crypto:active { background: rgba(255, 255, 255, 0.12); }

/* Standard Buy / Sell Trading Box */
.trade-box {
  background: linear-gradient(145deg, #10192a 0%, #0b121f 100%);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.order-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.btn-order-buy {
  background: linear-gradient(135deg, #00e676 0%, #00b359 100%);
  color: #032011;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 230, 118, 0.35);
  transition: transform 0.15s ease;
}

.btn-order-buy:active { transform: scale(0.98); }

.btn-order-sell {
  background: linear-gradient(135deg, #ff3366 0%, #d91c4d 100%);
  color: #fff;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(255, 51, 102, 0.35);
  transition: transform 0.15s ease;
}

.btn-order-sell:active { transform: scale(0.98); }

/* Active Position / 15-Minute Expiry Card */
.position-card {
  background: linear-gradient(145deg, #0f2233 0%, #0b1824 100%);
  border: 1.5px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 210, 255, 0.15);
}

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

.countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-cyan);
  font-family: monospace;
}

.countdown-badge i { animation: spin-slow 3s infinite linear; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* Crypto List & Live Flashing */
.crypto-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crypto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.crypto-row:hover, .crypto-row:active {
  background: var(--bg-card-subtle);
  border-color: rgba(0, 210, 255, 0.3);
}

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

.crypto-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: var(--accent-cyan);
}

.crypto-name-box {
  display: flex;
  flex-direction: column;
}

.crypto-symbol {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.crypto-name {
  font-size: 11px;
  color: var(--text-dim);
}

.crypto-mid-chart {
  width: 65px;
  height: 24px;
}

.crypto-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.crypto-price {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  transition: color 0.3s ease, transform 0.3s ease;
}

.crypto-change {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.crypto-change.up { color: var(--accent-green); background: var(--accent-green-bg); }
.crypto-change.down { color: var(--accent-red); background: var(--accent-red-bg); }

/* Real-Time Flash Effect when price ticks */
.flash-up {
  color: var(--accent-green) !important;
  text-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
}

.flash-down {
  color: var(--accent-red) !important;
  text-shadow: 0 0 10px rgba(255, 51, 102, 0.6);
}

/* ========================================================
   BOTTOM NAVIGATION - FIXED & STABLE (NO EXPANSION BUG)
   ======================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--bottom-nav-height);
  background: rgba(10, 14, 23, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  padding: 0 4px;
  user-select: none;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  flex: 1;
  height: 100%;
  transition: color 0.2s ease;
  position: relative;
  touch-action: manipulation;
}

.nav-tab i {
  font-size: 18px;
  transition: color 0.2s ease;
}

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

/* FIXED CENTER TRADE BUTTON: NO SCALING, STABLE 44px CIRCLE */
.nav-tab.center-trade {
  color: #fff;
  flex: 1;
  position: relative;
}

.nav-tab.center-trade .trade-circle {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #00d2ff, #00e676) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: -16px !important;
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.4) !important;
  color: #080c14 !important;
  transform: none !important;
  transition: opacity 0.2s ease !important;
  overflow: hidden !important;
}

.nav-tab.center-trade .trade-circle i {
  font-size: 18px !important;
  color: #080c14 !important;
  transform: none !important;
}

.nav-tab.center-trade:active .trade-circle {
  opacity: 0.9;
  transform: none !important;
}

/* Forms */
.input-group-crypto {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.input-label-crypto {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.input-field-crypto {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border 0.2s ease;
}

.input-field-crypto:focus {
  border-color: var(--accent-cyan);
}

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

.preset-pill {
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-pill:hover, .preset-pill.active {
  background: var(--accent-cyan-bg);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.pwa-banner {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), rgba(0, 230, 118, 0.15));
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pwa-banner-text { font-size: 12px; font-weight: 600; color: #fff; }
.pwa-banner-btn {
  padding: 6px 14px;
  background: var(--accent-cyan);
  color: #04121f;
  font-weight: 700;
  font-size: 12px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

/* Modals */
.trade-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.trade-modal-overlay.show { opacity: 1; visibility: visible; }
.trade-modal-card {
  width: 100%;
  max-width: 400px;
  background: #0f172a;
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

/* Colors */
.text-green { color: var(--accent-green) !important; }
.text-red { color: var(--accent-red) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-gold { color: var(--accent-gold) !important; }

/* Fixed Chart Box: Prevents Chart.js infinite resize loop on mobile */
.chart-container-box {
  position: relative !important;
  width: 100% !important;
  height: 180px !important;
  min-height: 180px !important;
  max-height: 180px !important;
  overflow: hidden !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.chart-container-box canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 180px !important;
  max-height: 180px !important;
  display: block !important;
}

/* Admin Mobile Bottom Navigation Bar */
.admin-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--bottom-nav-height);
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--bg-card-border);
  border-left: 1px solid var(--bg-card-border);
  border-right: 1px solid var(--bg-card-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 4px;
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.6);
}

.admin-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  gap: 3px;
  flex: 1;
  min-width: 0;
  height: 100%;
  position: relative;
  transition: all 0.2s ease;
  padding: 6px 0;
}

.admin-nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

.admin-nav-item i {
  font-size: 18px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.admin-nav-item.active {
  color: var(--accent-cyan);
}

.admin-nav-item.active i {
  color: var(--accent-cyan);
  transform: translateY(-1px);
  filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.6));
}

.admin-nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  background: var(--accent-red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.4);
  line-height: 1.2;
}

.admin-nav-item .live-dot-pulse {
  position: absolute;
  top: 6px;
  right: calc(50% - 14px);
}

.live-dot-pulse {
  position: absolute;
  top: 2px;
  right: 25%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Mobile Segmented Toggle (100% fit, zero scrolling) */
.segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-card-border);
  margin-bottom: 14px;
  width: 100%;
}

.segmented-btn {
  flex: 1;
  padding: 8px 6px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.segmented-btn.active {
  background: var(--accent-cyan);
  color: #04121f;
  box-shadow: 0 2px 8px rgba(0, 210, 255, 0.3);
}

/* Admin Quick Hub Grid */
.admin-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.admin-hub-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100px;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.admin-hub-card:active {
  transform: scale(0.98);
}

/* 5% Daily Compounding Calculator Styles */
.calc-card {
  background: linear-gradient(145deg, rgba(16, 28, 48, 0.95), rgba(12, 20, 34, 0.95));
  border: 1px solid rgba(0, 210, 255, 0.28);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 210, 255, 0.04);
}

.calc-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.calc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(90deg, rgba(0, 210, 255, 0.18), rgba(0, 230, 118, 0.18));
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 210, 255, 0.3);
  letter-spacing: 0.4px;
}

.calc-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.calc-preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: #fff;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.calc-preset-btn:hover, .calc-preset-btn.active {
  background: var(--accent-cyan);
  color: #04121f;
  border-color: var(--accent-cyan);
  box-shadow: 0 2px 10px rgba(0, 210, 255, 0.35);
}

.calc-slider-wrapper {
  margin: 14px 0 10px 0;
}

.calc-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  transition: background 0.2s ease;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.8);
  border: 2px solid #fff;
  transition: transform 0.15s ease;
}

.calc-slider::-webkit-slider-thumb:hover, .calc-slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
}

.calc-milestones {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 8px;
}

.calc-milestone-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: var(--text-dim);
  padding: 4px 6px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  text-align: center;
  transition: all 0.2s ease;
}

.calc-milestone-pill:hover, .calc-milestone-pill.active {
  background: rgba(0, 230, 118, 0.18);
  color: var(--accent-green);
  border-color: rgba(0, 230, 118, 0.4);
}

.calc-result-display {
  background: linear-gradient(135deg, rgba(8, 14, 26, 0.9), rgba(16, 26, 44, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.calc-result-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: -0.5px;
  margin: 4px 0;
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
}

.calc-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.calc-breakdown-item .b-lbl {
  font-size: 10px;
  color: var(--text-dim);
}

.calc-breakdown-item .b-val {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}

.calc-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.calc-schedule-table th {
  background: #111a2e;
  color: var(--text-dim);
  padding: 8px 6px;
  text-align: right;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calc-schedule-table th:first-child, .calc-schedule-table td:first-child {
  text-align: left;
}

.calc-schedule-table td {
  padding: 7px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-align: right;
  color: var(--text-main);
  font-family: monospace;
}

.calc-schedule-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.calc-schedule-table tr.milestone-row {
  background: rgba(0, 210, 255, 0.08);
  font-weight: 700;
}

/* === SPA Shared Page Components === */
.hero-welcome-banner {
  background: linear-gradient(135deg, #0b1629 0%, #152542 60%, #1e293b 100%);
  border: 1px solid rgba(0, 210, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero-welcome-banner::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 70%);
  border-radius: 50%;
}
.notice-bar {
  background: rgba(17, 25, 42, 0.85);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-full);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 14px;
  overflow: hidden;
}
.notice-bar marquee {
  flex: 1;
  color: #cbd5e1;
  font-weight: 500;
}
.quick-4-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.quick-4-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  transition: transform 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.quick-4-item:active { transform: scale(0.96); }
.quick-4-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.banner-invite {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: #fff;
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.25);
}
.banner-signal {
  background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
  border: 1px solid rgba(0, 230, 118, 0.35);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 230, 118, 0.12);
}
.change-pill {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  min-width: 68px;
  text-align: center;
  display: inline-block;
}
.change-pill.up { background: #10b981; color: #fff; }
.change-pill.down { background: #ef4444; color: #fff; }
.team-tab-pills {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-card-border);
  margin-bottom: 14px;
}
.team-pill-btn {
  padding: 8px 10px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.team-pill-btn.active {
  background: var(--accent-cyan);
  color: #04121f;
  box-shadow: 0 2px 8px rgba(0, 210, 255, 0.3);
}
.member-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.copy-pill {
  background: rgba(0, 210, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 210, 255, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* === Mobile-First Order Confirm Popup (SweetAlert2) === */
.kubella-swal-popup {
  max-width: 390px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7) !important;
}
.kubella-swal-popup .swal2-html-container {
  margin: 8px 0 12px !important;
  padding: 0 !important;
}
.kubella-swal-popup .swal2-actions {
  width: 100% !important;
  display: flex !important;
  gap: 10px !important;
  margin-top: 10px !important;
  padding: 0 !important;
}
.kubella-swal-popup .swal2-confirm,
.kubella-swal-popup .swal2-cancel {
  flex: 1 !important;
  margin: 0 !important;
  padding: 12px 10px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
}
