/* REQ-013 OPay Securities Trading */

.ost-onboard-shell {
  padding: 8px 16px 28px;
  display: grid;
  gap: 16px;
}

.ost-onboard-hero {
  position: relative;
  height: 140px;
  display: grid;
  place-items: center;
}

.ost-onboard-orb {
  position: absolute;
  border-radius: 50%;
}

.ost-orb-a {
  width: 120px;
  height: 120px;
  background: rgba(0, 184, 118, 0.18);
  top: 10px;
  right: 36px;
}

.ost-orb-b {
  width: 72px;
  height: 72px;
  background: rgba(0, 82, 255, 0.1);
  bottom: 8px;
  left: 40px;
}

.ost-onboard-icon {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(160deg, #00b876, #00905c);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 32px;
  box-shadow: 0 12px 24px rgba(0, 144, 92, 0.28);
}

#view-ost_onboard {
  background:
    radial-gradient(ellipse 120% 70% at 50% -8%, #c8f0dc 0%, transparent 55%),
    linear-gradient(180deg, #eef9f4 0%, #f7faf8 40%, #fff 100%);
}

#view-ost_onboard .topbar {
  background: transparent;
  border-bottom: 0;
}

.ost-onboard-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
}

.ost-onboard-sub,
.ost-lead,
.ost-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #6b7280;
}

.ost-benefit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ost-benefit-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
}

.ost-benefit-list i {
  color: #00b876;
  font-size: 20px;
  margin-top: 2px;
}

.ost-benefit-list strong {
  display: block;
  font-size: 13px;
  color: #111827;
}

.ost-benefit-list span {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
  line-height: 1.4;
}

.ost-check-block {
  display: grid;
  gap: 10px;
}

.ost-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.45;
  color: #374151;
}

.ost-check input {
  margin-top: 2px;
  accent-color: #00b876;
}

.ost-link {
  background: none;
  border: 0;
  padding: 0;
  color: #00b876;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.ost-fine {
  margin: 0;
  font-size: 11px;
  color: #9ca3af;
}

.ost-hub-pad,
.ost-detail-pad {
  padding: 12px 16px 88px;
  display: grid;
  gap: 14px;
}

.ost-bp-card {
  background: linear-gradient(145deg, #111827 0%, #1f2937 100%);
  color: #fff;
  border-radius: 18px;
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
}

.ost-bp-card.soft {
  background: linear-gradient(145deg, #0f766e 0%, #115e59 100%);
}

.ost-bp-label {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 500;
}

.ost-bp-amt {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 4px;
}

.ost-bp-chn {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ost-bp-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.ost-chip {
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ost-chip.ghost {
  background: rgba(255, 255, 255, 0.08);
}

.ost-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ost-section-head h3,
.ost-h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.ost-tag {
  font-size: 10px;
  font-weight: 700;
  color: #00b876;
  background: #e8fbf3;
  padding: 3px 8px;
  border-radius: 999px;
}

.ost-stock-list,
.ost-offer-list,
.ost-order-list {
  display: grid;
  gap: 8px;
}

.ost-stock-row,
.ost-hold-row,
.ost-offer-card,
.ost-order-row {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.ost-offer-card {
  flex-direction: column;
  align-items: stretch;
}

.ost-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ost-logo.lg {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 14px;
}

.ost-logo.xl {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 16px;
}

.ost-stock-meta {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ost-stock-meta strong,
.ost-stock-px strong {
  font-size: 13px;
  color: #111827;
}

.ost-stock-meta span,
.ost-stock-px span,
.ost-muted {
  font-size: 11px;
  color: #9ca3af;
}

.ost-stock-px {
  text-align: right;
  display: grid;
  gap: 2px;
}

.ost-up { color: #00b876 !important; font-weight: 700; }
.ost-down { color: #ef4444 !important; font-weight: 700; }

.ost-hub-tabs {
  display: flex;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0));
}

.ost-tab {
  flex: 1;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
}

.ost-tab i { font-size: 20px; }
.ost-tab.active { color: #00b876; }

.ost-offer-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ost-offer-name {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.ost-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: #111827;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.ost-badge.light {
  background: rgba(255, 255, 255, 0.25);
}

.ost-offer-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #f3f4f6;
  padding-top: 10px;
  margin-top: 4px;
}

.ost-offer-bottom .right { text-align: right; }
.ost-offer-bottom span { display: block; font-size: 10px; color: #9ca3af; }
.ost-offer-bottom strong { font-size: 14px; color: #111827; }

.ost-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  background: #f9fafb;
  border-radius: 12px;
}

.ost-empty.sm { padding: 12px; font-size: 12px; }

.ost-pill {
  font-size: 9px;
  font-weight: 700;
  background: #f3f4f6;
  color: #6b7280;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
}

.ost-status {
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
}

.ost-status.ok { color: #00b876; }

.ost-detail-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ost-detail-head h2 {
  margin: 0;
  font-size: 18px;
}

.ost-detail-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #6b7280;
}

.ost-detail-price .big {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ost-chart-wrap {
  background: #f9fafb;
  border-radius: 14px;
  padding: 12px;
}

.ost-chart {
  width: 100%;
  height: 120px;
  display: block;
}

.ost-chart-hint {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 4px;
}

.ost-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ost-stats div {
  background: #f9fafb;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.ost-stats span {
  display: block;
  font-size: 10px;
  color: #9ca3af;
}

.ost-stats strong {
  font-size: 13px;
  color: #111827;
}

.ost-detail-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border: 0;
}

#ost-indemnity,
#ost-trade {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

#ost-indemnity.show,
#ost-trade.show {
  display: flex;
}

.ost-sheet {
  width: 100%;
  max-height: 88%;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 12px 16px 24px;
  display: grid;
  gap: 12px;
}

.ost-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
  margin: 0 auto 4px;
}

.ost-agree-text {
  font-size: 12px;
  line-height: 1.5;
  color: #4b5563;
  max-height: 140px;
  overflow-y: auto;
  background: #f9fafb;
  border-radius: 10px;
  padding: 10px;
}

.ost-trade-head {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
}

.ost-dir-toggle,
.ost-type-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 3px;
}

.ost-dir-toggle button,
.ost-type-row button {
  border: 0;
  background: transparent;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #9ca3af;
  border-radius: 8px;
  cursor: pointer;
}

.ost-dir-toggle button.on.buy { background: #fff; color: #0052ff; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.ost-dir-toggle button.on.sell { background: #fff; color: #ef4444; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.ost-type-row button.on { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.ost-trade-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #f3f4f6;
  font-size: 13px;
}

.ost-trade-total strong {
  font-size: 18px;
  font-weight: 800;
}

#ost-processing {
  position: absolute;
  inset: 0;
  z-index: 120;
  background: rgba(255, 255, 255, 0.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

#ost-processing.show {
  display: flex;
}

#ost-processing-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.ost-offer-hero {
  border-radius: 16px;
  padding: 20px 16px;
  color: #fff;
}

.ost-offer-hero h2 {
  margin: 8px 0 4px;
  font-size: 20px;
}

.ost-offer-hero p {
  margin: 0;
  opacity: 0.85;
  font-size: 13px;
}

.ost-kv {
  display: grid;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 14px;
}

.ost-kv > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.ost-kv span { color: #9ca3af; }
.ost-kv strong { color: #111827; text-align: right; }

.ost-stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 10px;
  align-items: center;
}

.ost-step-btn {
  height: 48px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

.ost-stepper input {
  height: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.ost-summary-card {
  background: #f9fafb;
  border-radius: 14px;
  padding: 4px;
}

.ost-success-shell {
  padding: 40px 20px 24px;
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.ost-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e8fbf3;
  color: #00b876;
  display: grid;
  place-items: center;
  font-size: 40px;
}

.ost-success-shell h2 {
  margin: 0;
  font-size: 22px;
}

.ost-success-shell > p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.ost-success-shell .ost-summary-card {
  width: 100%;
  text-align: left;
}

/* ——— OST Debug panel (demo only) ——— */
.phone-stage > .ost-debug-panel {
  flex: 0 0 auto;
  width: 300px;
  min-width: 260px;
  max-width: 340px;
  max-height: calc(100vh - 32px);
  align-self: center;
  overflow: auto;
  background: #111827;
  color: #e5e7eb;
  border: none;
  border-radius: 16px;
  padding: 16px;
  font-size: 12px;
  z-index: 40;
}

.ost-debug-panel.debug-panel {
  flex: 0 0 auto;
  min-width: 260px;
  max-width: 340px;
  max-height: calc(100vh - 32px);
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 16px;
}

.ost-debug-panel h2 {
  margin: 0 0 10px;
  font-size: 15px;
  color: #fff;
}

.ost-debug-panel h3 {
  margin: 0 0 8px;
  font-size: 12px;
  color: #93c5fd;
}

.ost-debug-panel .debug-section {
  margin-bottom: 14px;
}

.ost-debug-panel .muted {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}

.ost-debug-panel .ost-dbg-row {
  margin: 8px 0;
  padding: 8px;
  border-radius: 8px;
  background: #1f2937;
}

.ost-debug-panel .ost-dbg-meta {
  font-size: 12px;
  margin-bottom: 6px;
  line-height: 1.35;
}

.ost-debug-panel .dbg-row button,
.ost-debug-panel .debug-section > button {
  border-radius: 8px;
  border: 1px solid #374151;
  background: #1f2937;
  color: #fff;
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
}

.ost-debug-panel .dbg-row button:hover,
.ost-debug-panel .debug-section > button:hover {
  border-color: #00b876;
}

@media (max-width: 900px) {
  .phone-stage > .ost-debug-panel,
  .ost-debug-panel.debug-panel {
    width: 100%;
    max-width: 390px;
    max-height: 320px;
  }
}
