* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--font-main); background-color: var(--bg-primary); color: var(--text-main); min-height: 100vh; padding: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; transition: background-color 0.3s ease, color 0.25s ease; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-color: var(--bg-primary); background-image: var(--bg-gradient); transform: translateZ(0); } button, input, select, textarea { font-family: inherit; }
.app-shell { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; animation: cardFadeUp 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.app-header { position: relative; z-index: 40; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-card); transition: border-color 0.2s ease, background-color 0.25s ease; } .app-header:hover { border-color: var(--border-focus); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.logo-box { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--logo-bg); border: 1.5px solid var(--logo-border); box-shadow: var(--shadow-logo); display: flex; align-items: center; justify-content: center; transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease; } .logo-box:hover { transform: scale(1.08) rotate(-2deg); box-shadow: var(--shadow-btn); }
.brand-logo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-text { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.brand h1 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; color: var(--text-heading); line-height: 1.38; padding: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand p { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-top: 1px; line-height: 1.36; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-wrap { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.btn-menu-trigger { width: 38px; height: 38px; border-radius: 10px; background: var(--bg-pill); border: 1px solid var(--border); color: var(--text-main); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; position: relative; z-index: 5; }
.btn-menu-trigger:hover, .btn-menu-trigger:focus-visible { background: var(--bg-pill-hover); border-color: var(--accent); box-shadow: var(--shadow-focus); transform: scale(1.06); }
.header-slide-actions { position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%) translateX(0) scale(1); transform-origin: right center; display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 6px 8px; background: var(--bg-modal); border: 1px solid var(--border-focus); border-radius: 13px; box-shadow: var(--shadow-card); z-index: 10; opacity: 1; pointer-events: auto; transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease; }
.header-slide-actions.hidden { opacity: 0; pointer-events: none; transform: translateY(-50%) translateX(18px) scale(0.92); }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: var(--bg-pill); border: 1px solid var(--border); color: var(--text-main); padding: 7px 11px; border-radius: 9px; cursor: pointer; white-space: nowrap; font-size: 0.78rem; font-weight: 700; transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease; flex-shrink: 0; }
.btn-ghost:hover { background: var(--bg-pill-hover); border-color: var(--accent); box-shadow: var(--shadow-focus); transform: translateY(-2px); }
.btn-ico { font-size: 0.95rem; line-height: 1; display: inline-flex; align-items: center; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow-card); transition: border-color 0.2s ease, background-color 0.25s ease; }
.platform-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-bottom: 12px; }
.plat-btn { min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: var(--bg-pill); border: 1px solid var(--border); color: var(--text-main); padding: 9px 6px; border-radius: 11px; cursor: pointer; font-size: 0.78rem; font-weight: 700; line-height: 1.32; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease; }
.plat-svg { width: 16px; height: 16px; flex-shrink: 0; display: block; transition: transform 0.25s ease; }
.plat-btn:hover:not(.active), .curr-btn:hover:not(.active) { background: var(--bg-pill-hover); border-color: var(--border-focus); transform: translateY(-2px); box-shadow: 0 5px 14px rgba(99, 102, 241, 0.2); }
.plat-btn:active, .curr-btn:active { transform: scale(0.96); }
.plat-btn.active, .curr-btn.active { background: var(--active-gradient); color: #ffffff; border-color: transparent; box-shadow: var(--shadow-btn); transform: translateY(-1px); }
.plat-btn.active .plat-svg { transform: scale(1.12); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)); }
.curr-bar-wrap { position: relative; display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.currency-row { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 2px 1px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.currency-row::-webkit-scrollbar { display: none; }
.curr-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: var(--bg-pill); border: 1px solid var(--border); color: var(--text-main); padding: 7px 11px; border-radius: 10px; font-size: 0.78rem; font-weight: 700; line-height: 1.32; cursor: pointer; white-space: nowrap; transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease; }
.curr-btn.active { flex: 1 1 auto; padding: 7px 13px; }
.curr-drop-btn { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; background: var(--bg-pill); border: 1px solid var(--border); color: var(--text-main); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease; }
.curr-drop-btn.hidden, .curr-drop-menu.hidden { display: none; }
.curr-drop-btn:hover, .curr-drop-btn.open { background: var(--bg-pill-hover); border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-focus); transform: translateY(-1px); }
.curr-drop-btn svg { transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
.curr-drop-btn.open svg { transform: rotate(180deg); }
.curr-drop-menu { position: absolute; top: calc(100% + 7px); right: 0; max-width: 100%; background: var(--bg-modal); border: 1px solid var(--border-focus); border-radius: 13px; padding: 9px; box-shadow: var(--shadow-card), var(--shadow-focus); z-index: 50; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; max-height: 260px; overflow-y: auto; animation: popIn 0.22s cubic-bezier(0.22, 1, 0.36, 1); }
.flag-svg { width: 18px; height: 12px; border-radius: 2px; flex-shrink: 0; display: block; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.curr-sym { display: inline-flex; align-items: center; justify-content: center; padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 800; color: var(--accent); font-size: 0.74rem; unicode-bidi: isolate; direction: ltr; }
.curr-btn.active .curr-sym { background: rgba(255, 255, 255, 0.22); color: #ffffff; }
.curr-full { display: none; font-weight: 600; font-size: 0.76rem; opacity: 0.96; }
.curr-btn.active .curr-full { display: inline; }
.slider-box { background: var(--bg-pill); border: 1.5px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease; }
.slider-box:hover { border-color: var(--border-focus); }
.slider-box:focus-within, .slider-box.active-box { background: var(--bg-box-active); border-color: var(--border-focus); box-shadow: var(--shadow-focus); transform: translateY(-2px); }
.slider-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.slider-head label { font-size: 0.92rem; font-weight: 700; color: var(--text-heading); transition: color 0.2s ease; }
.slider-box:focus-within .slider-head label, .slider-box.active-box .slider-head label { color: var(--accent); }
.input-unit-wrap { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-input); border: 1.5px solid var(--border); border-radius: 10px; padding: 4px 11px; transition: all 0.25s ease; }
.input-unit-wrap:has(.input-num:not([readonly]):focus) { border-color: var(--accent); box-shadow: var(--shadow-focus); transform: scale(1.03); }
.unit-prefix, .unit-suffix { font-size: 0.88rem; font-weight: 800; color: var(--accent); }
.input-ctrl { width: 100%; background: var(--bg-input); border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; color: var(--text-main); font-size: 0.92rem; font-weight: 600; outline: none; transition: all 0.22s ease; }
.input-ctrl:focus { border-color: var(--accent); box-shadow: var(--shadow-focus); }
.input-num { width: 82px; border: none; background: transparent; padding: 4px 2px; text-align: center; font-size: 1.04rem; font-weight: 800; color: var(--text-heading); outline: none; }
.range-slider { --pct: 10%; -webkit-appearance: none; appearance: none; width: 100%; height: 9px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) var(--pct), var(--bg-input) var(--pct)); border: 1px solid var(--border); outline: none; cursor: pointer; transition: box-shadow 0.25s ease; }
.range-slider:hover, .range-slider:focus { box-shadow: 0 0 12px rgba(99, 102, 241, 0.35); }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 23px; height: 23px; border-radius: 50%; background: var(--active-gradient); border: 2.5px solid #ffffff; box-shadow: 0 2px 10px rgba(99, 102, 241, 0.55); cursor: grab; transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease; }
.range-slider::-webkit-slider-thumb:hover, .range-slider:active::-webkit-slider-thumb { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.25), 0 4px 14px rgba(99, 102, 241, 0.65); }
.slider-ticks { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); font-weight: 700; }
.btn-submit { width: 100%; background: var(--btn-gradient); border: none; color: #ffffff; padding: 14px; border-radius: 12px; font-size: 0.98rem; font-weight: 800; letter-spacing: 0.01em; cursor: pointer; box-shadow: var(--shadow-btn); transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s ease; }
.btn-submit:hover { filter: brightness(1.08); transform: translateY(-2px) scale(1.005); }
.btn-submit:active { transform: translateY(0) scale(0.98); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(9, 14, 26, 0.74); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 100; } .modal-backdrop.hidden { display: none; }
.modal-card { background: var(--bg-modal); color: var(--text-main); border: 1px solid var(--border-focus); box-shadow: var(--shadow-card), var(--shadow-focus); border-radius: 16px; width: 92%; max-width: 520px; max-height: 85vh; display: flex; flex-direction: column; animation: popIn 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.btn-close { background: transparent; border: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; transition: transform 0.2s ease, color 0.2s ease; }
.btn-close:hover { color: var(--accent); transform: scale(1.15); }
.modal-body { padding: 14px 16px; overflow-y: auto; font-size: 0.88rem; }
.order-pill { background: var(--bg-pill); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; margin-bottom: 10px; transition: border-color 0.18s ease, transform 0.18s ease; }
.order-pill:hover { border-color: var(--border-focus); box-shadow: var(--shadow-focus); transform: translateY(-1px); }
.help-row-wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.help-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; font-weight: 800; font-size: 0.92rem; word-break: break-all; transition: color 0.2s ease; } .help-link:hover { color: var(--accent-2); text-decoration: underline; }
.help-wa-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--success) 16%, transparent); border: 1px solid color-mix(in srgb, var(--success) 42%, transparent); color: var(--success); font-size: 0.74rem; font-weight: 800; text-decoration: none; transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease; } .help-wa-chip:hover { background: var(--success); color: #ffffff; transform: translateY(-1px); }
.status-badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 0.72rem; font-weight: 700; background: rgba(245, 158, 11, 0.2); color: #d97706; }
[data-theme="dark"] .status-badge { color: #fbbf24; }
.status-badge.running { background: rgba(59, 130, 246, 0.2); color: #2563eb; }
.status-badge.completed { background: rgba(16, 185, 129, 0.2); color: #059669; }
@media (max-width: 720px) {
  .app-header { padding: 9px 11px; gap: 8px; border-radius: 13px; }
  .brand { gap: 8px; } .logo-box { width: 36px; height: 36px; border-radius: 9px; }
  .brand h1 { font-size: 0.93rem; } .brand p { font-size: 0.68rem; }
  .btn-menu-trigger { width: 34px; height: 34px; border-radius: 8px; }
  .header-slide-actions { gap: 4px; padding: 4px 5px; right: calc(100% + 6px); }
  .btn-ghost { padding: 6px 8px; font-size: 0.72rem; border-radius: 7px; }
  #viewOrdersBtn .ord-lbl-pre { display: none; }
  .platform-grid { grid-template-columns: repeat(12, 1fr); gap: 6px; margin-bottom: 10px; }
  .plat-btn:nth-child(-n+3) { grid-column: span 4; } .plat-btn:nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 640px) {
  body { padding: 8px 6px; } .card { padding: 12px 10px; border-radius: 14px; }
  .btn-ghost:not(#viewOrdersBtn) .btn-lbl { display: none; } .btn-ghost:not(#viewOrdersBtn) { width: 32px; height: 32px; padding: 0; }
  .plat-btn { padding: 7px 4px; gap: 5px; font-size: 0.72rem; border-radius: 9px; }
  .curr-btn { padding: 6px 8px; font-size: 0.69rem; gap: 4px; border-radius: 8px; }
  .curr-btn.active { padding: 6px 10px; } .curr-full { font-size: 0.69rem; } .flag-svg { width: 15px; height: 10px; }
  .curr-drop-btn { width: 30px; height: 29px; border-radius: 8px; } .curr-drop-menu { padding: 7px; gap: 5px; }
  .slider-box { padding: 11px 12px; margin-bottom: 10px; } .slider-head label { font-size: 0.84rem; } .input-num { width: 74px; font-size: 0.95rem; }
}
@media (max-width: 480px) { #viewOrdersBtn .btn-lbl { display: none; } #viewOrdersBtn { padding: 0 7px; height: 32px; gap: 3px; } .orders-count-badge { margin-left: 1px; min-width: 19px; height: 18px; padding: 0 5px; font-size: 0.66rem; } }
@media (max-width: 290px) { #viewOrdersBtn .orders-count-badge { display: none; } #viewOrdersBtn { width: 32px; padding: 0; } }