:root {
  --bg-primary: #090b10;
  --bg-card: #121520;
  --bg-card-alt: #161a28;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-focus: #7c3aed;
  --border-glow: rgba(109, 40, 217, 0.55);
  --text-primary: #f1f3f9;
  --text-secondary: #9aa1b8;
  --text-muted: #636c86;
  --neon-blue: #2563eb;
  --neon-cyan: #38bdf8;
  --neon-purple: #7c3aed;
  --profit-green: #10b981;
  --neon-green: #10b981;
  --danger-red: #f43f5e;
  --neon-red: #f43f5e;
  --neon-gold: #f59e0b;
  --gold-accent: #f59e0b;
  --brand-violet: #6d28d9;
  --glow-violet: 0 0 28px -6px rgba(109, 40, 217, 0.55);
  --font-sans: 'Inter', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #090b10;
  color: #f1f3f9;
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(109, 40, 217, 0.16) 0%, transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 28px 28px;
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  font-size: 17px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* ==========================================
   어르신 친화 150% 특대형 모달 & 뷰 분리
========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 13, 0.94);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 16px;
}

.modal-card {
  background: linear-gradient(180deg, rgba(17, 24, 54, 0.98) 0%, rgba(9, 14, 32, 0.98) 100%);
  border: 1.5px solid rgba(79, 110, 247, 0.35);
  border-radius: 24px;
  padding: 32px 24px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.15);
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: var(--neon-cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  margin-bottom: 12px;
}

.modal-brand-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.brand-logo-text {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--neon-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 600;
}

.view-intro {
  margin-bottom: 18px;
  text-align: center;
}

.view-tag {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  color: var(--neon-blue);
  background: rgba(37, 99, 235, 0.15);
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.view-tag.tag-new {
  color: var(--neon-green);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.view-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.btn-back-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
  display: inline-block;
  padding: 4px 8px;
}
.btn-back-link:hover {
  color: var(--neon-cyan);
}

/* 어르신 150% 특대 인풋 박스 */
.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.input-group input {
  width: 100%;
  height: 58px;
  background: rgba(8, 13, 30, 0.90);
  border: 1.5px solid rgba(79, 110, 247, 0.3);
  border-radius: 14px;
  padding: 0 18px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-sans);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.input-group input[type="password"] {
  letter-spacing: 6px;
  text-align: center;
  font-size: 26px;
}

.input-group input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 2px 4px rgba(0, 0, 0, 0.4);
  background: rgba(13, 20, 48, 0.95);
}

.input-hint {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* PIN 일치 검증 배지 */
.match-badge {
  font-size: 15px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 8px;
  text-align: center;
}

.badge-neutral {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
}

.badge-match {
  background: rgba(16, 185, 129, 0.15);
  color: var(--neon-green);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-mismatch {
  background: rgba(255, 51, 102, 0.15);
  color: var(--neon-red);
  border: 1px solid rgba(255, 51, 102, 0.4);
}

/* 빅터치 버튼 (높이 62px, 폰트 21px) */
.btn-lg-touch {
  height: 62px;
  border-radius: 16px;
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary-neon {
  width: 100%;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 40%, #6366f1 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  color: #ffffff;
  margin-top: 10px;
}

.btn-primary-neon:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.btn-primary-neon:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-primary-neon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.auth-switcher {
  margin-top: 20px;
  text-align: center;
}

.btn-switch-link {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--text-primary);
  font-size: 16px;
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-switch-link strong {
  color: var(--neon-cyan);
}

.btn-switch-link:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--neon-cyan);
}

.login-privacy-badge {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid rgba(79, 110, 247, 0.2);
  padding-top: 16px;
}

/* ==========================================
   메인 대시보드 화면
========================================== */
.app-wrapper {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 30px;
}

.top-nav, .app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #121520;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0;
}

.brand-neon-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.brand-neon-logo:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.8));
}

.brand-neon-logo-modal {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.6));
  margin-bottom: 4px;
}

.brand-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.system-sub-badge {
  font-size: 10px;
  color: #00f2fe;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-uid {
  background: rgba(13, 20, 42, 0.95);
  border: 1px solid rgba(79, 110, 247, 0.3);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.btn-uid-pin {
  cursor: pointer;
  border: 1px solid rgba(56, 189, 248, 0.3);
  transition: all 0.2s;
  background: rgba(13, 20, 42, 0.95);
  display: inline-flex;
  align-items: center;
}

.btn-uid-pin:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

.brand-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 8px;
}

.brand-name {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.brand-tagline {
  font-size: 10px;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 0.8px;
}

/* 기획서 312: 모바일 기본값 (540px 미만 컴팩트) */
.responsive-brand-titles { display: none !important; }
.responsive-logout-text { display: none !important; }
.responsive-live-chip { display: none !important; }

.btn-icon-xs {
  background: rgba(13, 20, 42, 0.95);
  border: 1px solid rgba(79, 110, 247, 0.3);
  font-size: 16px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #ffffff;
}

.btn-logout-cyber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
  flex-shrink: 0;
}

.btn-logout-cyber:hover {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  color: #ffffff;
}

/* 상태 인디케이터 바 */
.status-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: #0e111a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.status-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-pill.mode-real {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #c7d2fe;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.status-dot-real {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #818cf8;
  box-shadow: 0 0 8px #818cf8;
}

.bot-state-badge {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.bot-state-badge.state-running {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.bot-state-badge.state-stopped {
  color: #94a3b8;
}

.status-right-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-pulse-chip {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  animation: pulseChip 1.5s infinite;
}

@keyframes pulseChip {
  0% { transform: scale(0.96); opacity: 0.85; }
  50% { transform: scale(1.04); opacity: 1; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
  100% { transform: scale(0.96); opacity: 0.85; }
}

.btc-live-price {
  font-size: 15px;
  font-weight: 900;
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  font-family: 'JetBrains Mono', monospace;
}

/* 레거시 호환 */
.mode-real-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--neon-green);
  font-size: 13px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.pulse-running {
  background: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green);
  animation: pulseAnim 1.5s infinite;
}

.pulse-stopped {
  background: #64748b;
}

@keyframes pulseAnim {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.status-label {
  font-size: 15px;
  font-weight: 700;
  color: #cbd5e1;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-tag {
  font-size: 11px;
  background: rgba(255, 51, 102, 0.2);
  color: var(--neon-red);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
}

.btc-price-tag {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

/* ==========================================
   Google Stitch 정품 Obsidian Dark Glass & 마이크로 보더
========================================= */
.billboard-card, .account-summary-card, .hero-pnl-card {
  margin: 16px;
  background: #121520;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.account-summary-card::after, .panel-section::after, .billboard-card::after, .hero-pnl-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.3), transparent);
  pointer-events: none;
}

.billboard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.billboard-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
}

.shield-badge {
  font-size: 12px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.badge-shield-active {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.45) !important;
  animation: pulse-danger 1.5s infinite ease-in-out;
}

@keyframes pulse-danger {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(1.03); }
}

.billboard-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}

.metric-realized-val {
  font-size: 46px; /* 어르신 돋보기 필요없는 특대 폰트 */
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  text-shadow: 0 0 24px rgba(56, 189, 248, 0.45);
  letter-spacing: -1px;
}

.metric-unit {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-muted);
}

.billboard-sub-grid, .pnl-sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  background: #0e111a;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sub-col, .stat-col {
  display: flex;
  flex-direction: column;
}

.sub-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.sub-val {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
}

.sub-val.sub-positive {
  color: var(--neon-green);
}

.sub-val.sub-negative {
  color: var(--neon-red);
}

.sub-val.sub-neutral {
  color: #94a3b8;
}

/* ==========================================
   2대 빅터치 조작 버튼 (높이 62px)
========================================== */
.control-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 16px 16px 16px;
}

.btn-action-hero {
  width: 100%;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

/* 1) .btn-start (Primary CTA - 봇 가동) Stitch 코스믹 바이올렛 글로우 */
.btn-start {
  background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  box-shadow: 0 0 28px -6px rgba(109, 40, 217, 0.55) !important;
  border: 1px solid rgba(167, 139, 250, 0.35) !important;
  border-radius: 12px !important;
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.2s ease;
}

.btn-start::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

.btn-start:hover:not(:disabled) {
  filter: brightness(1.1) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 32px -4px rgba(109, 40, 217, 0.75) !important;
}

.btn-stop {
  background: linear-gradient(135deg, #9f1239 0%, #be123c 45%, #4c0519 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 6px 20px rgba(159, 18, 57, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* 2) .btn-action-panic (Emergency Action - 비상 청산) 언더스테이트 와인 버건디 다크 글래스 */
.btn-action-panic {
  width: 100%;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(244, 63, 94, 0.25) !important;
  color: rgba(253, 164, 175, 0.95) !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.btn-action-panic:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.1) !important;
  border-color: rgba(244, 63, 94, 0.4) !important;
  color: #fecdd3 !important;
  transform: translateY(-1px) !important;
}

.btn-action-hero:active:not(:disabled),
.btn-action-panic:active:not(:disabled) {
  transform: translateY(1px);
}

/* ==========================================
   설정 패널 (아코디언 & 폼 - 24px 여유로운 여백 & 1열 단독 배치)
========================================== */
.settings-card {
  margin: 0 16px 20px 16px;
  background: #121520;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  position: relative;
}

.settings-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.3), transparent);
  pointer-events: none;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  cursor: pointer;
  background: rgba(13, 20, 42, 0.95);
  user-select: none;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.chevron {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.chevron.open {
  transform: rotate(180deg);
}

.card-body {
  padding: 24px 20px;
  border-top: 1px solid var(--border-color);
}

.panel-section {
  padding: 24px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  background: #121520;
}

.settings-section-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--neon-cyan);
  margin: 18px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(79, 110, 247, 0.3);
}

.settings-section-title:first-child {
  margin-top: 0;
}

/* [핵심] 1열 단독 풀 와이드 및 24px 숨통 여백 */
.form-group, .form-group-full {
  margin-bottom: 24px;
  width: 100%;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
  flex-wrap: wrap;
}

.form-label-row label, .form-group label, .form-group-full label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 0;
}

.form-group input, .form-group-full input {
  width: 100%;
  height: 54px;
  background: rgba(8, 13, 30, 0.90);
  border: 1.5px solid rgba(79, 110, 247, 0.25);
  border-radius: 12px;
  padding: 14px 18px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  font-family: var(--font-mono);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.form-group input:focus, .form-group-full input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.4);
  background: rgba(10, 16, 38, 0.95);
}

.form-hint {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.4;
}

.badge-shield {
  background: rgba(16, 185, 129, 0.15);
  color: var(--profit-green);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

/* 1열 강제 오버라이드 가드 */
.grid-params-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  margin-bottom: 0 !important;
}

.form-group-half {
  width: 100% !important;
  display: block !important;
  margin-bottom: 24px !important;
}

.form-group-half label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.form-group-half input {
  width: 100%;
  height: 54px;
  background: rgba(8, 13, 30, 0.90);
  border: 1.5px solid rgba(79, 110, 247, 0.25);
  border-radius: 12px;
  padding: 14px 18px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  font-family: var(--font-mono);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.form-group-half input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* 슬라이더 스타일 */
.slider-group {
  margin-bottom: 24px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.slider-val {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--neon-cyan);
}

.neon-slider {
  width: 100%;
  height: 8px;
  background: rgba(18, 26, 56, 0.9);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
}

.neon-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--neon-cyan);
  cursor: pointer;
  box-shadow: 0 0 12px var(--neon-cyan);
}

/* 토글 스위치 */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(8, 13, 30, 0.90);
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(79, 110, 247, 0.22);
  margin-bottom: 24px;
}

.toggle-label {
  font-size: 16px;
  font-weight: 700;
}

.switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 30px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider.round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: 0.3s;
  border-radius: 34px;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider.round {
  background-color: var(--neon-cyan);
}

input:checked + .slider.round:before {
  transform: translateX(24px);
}

/* 스마트 필터 체크박스 박스 */
.filter-group-box {
  background: rgba(8, 13, 30, 0.90);
  border: 1px solid rgba(79, 110, 247, 0.22);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.filter-box-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.filter-chk-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 0;
  cursor: pointer;
}

.filter-chk-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--neon-cyan);
}

/* 4) .btn-save (암호화 설정 영구 저장) 로열 사파이어 인디고 다크 글래스 */
.btn-save, .btn-save-settings {
  width: 100%;
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.35) 0%, rgba(15, 23, 42, 0.6) 100%) !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  color: #e0e7ff !important;
  font-weight: 600 !important;
  font-size: 17px;
  margin-top: 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-save:hover:not(:disabled), .btn-save-settings:hover:not(:disabled) {
  border-color: rgba(129, 140, 248, 0.6) !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.3) !important;
  transform: translateY(-1px) !important;
}

.btn-save:active:not(:disabled), .btn-save-settings:active:not(:disabled) {
  transform: translateY(1px);
}

.msg-box {
  padding: 12px;
  border-radius: 10px;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.msg-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--neon-green);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* ==========================================
   실시간 체결 내역 리스트
========================================== */
.badge-mini {
  font-size: 12px;
  background: rgba(13, 20, 42, 0.95);
  color: #94a3b8;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid rgba(79, 110, 247, 0.25);
}

.app-footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-sub {
  font-size: 11px;
  color: #475569;
  margin-top: 4px;
}

/* ==========================================
   스마트 3단 아코디언 & 고급 퀀트 18대 파라미터 스타일
========================================== */
.accordion-header {
  transition: background 0.2s;
  cursor: pointer;
}

.accordion-header:hover {
  background: rgba(18, 28, 60, 0.95);
}

/* 3) .btn-recommend-gold (초보자 AI 추천) 코스믹 퍼플 글래스 버튼 */
#btn-apply-recommend, .btn-recommend-gold {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.35) 0%, rgba(76, 29, 149, 0.55) 100%) !important;
  border: 1px solid rgba(167, 139, 250, 0.4) !important;
  color: #e0e7ff !important;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.35) !important;
  font-size: 13px;
  font-weight: 600 !important;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

#btn-apply-recommend:hover:not(:disabled), .btn-recommend-gold:hover:not(:disabled) {
  border-color: rgba(196, 181, 253, 0.7) !important;
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.55) !important;
  transform: translateY(-1px) !important;
}

#btn-apply-recommend:active:not(:disabled), .btn-recommend-gold:active:not(:disabled) {
  transform: translateY(1px);
}

/* 2줄 아코디언 헤더 스타일 */
.header-title-two-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.title-row-primary {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
}

.title-row-secondary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.title-sub-text {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

.accordion-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.accordion-badge.badge-saved, .api-status-badge.badge-saved {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #c7d2fe;
}

.accordion-badge.badge-unsaved {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.35);
}

.cyber-select {
  width: 100%;
  height: 54px;
  background: rgba(8, 13, 30, 0.90);
  border: 1.5px solid rgba(79, 110, 247, 0.25);
  border-radius: 12px;
  padding: 0 18px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 16px) center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.cyber-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.sub-block-box {
  background: rgba(8, 13, 30, 0.90);
  border: 1px solid rgba(79, 110, 247, 0.22);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 24px;
}

.sub-block-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--neon-cyan);
  margin-bottom: 12px;
}

.radio-row-group {
  display: flex;
  gap: 16px;
  background: rgba(8, 13, 30, 0.90);
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(79, 110, 247, 0.25);
  margin-bottom: 24px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--neon-cyan);
}

/* ==========================================
   비트겟 선물 실시간 보유 자산 스트립 (로열 블루 다크 글래스)
========================================== */
.asset-balance-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #0e121e;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), inset 0 0 15px rgba(99, 102, 241, 0.05);
}

.asset-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.asset-label {
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: -0.2px;
}

.asset-val {
  font-size: 20px; /* 어르신 친화 130~140% 선명한 폰트 */
  font-weight: 900;
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.highlight-gold {
  color: #fbbf24;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.5);
}

.highlight-blue {
  color: #c7d2fe;
  text-shadow: 0 0 16px rgba(129, 140, 248, 0.4);
}

.highlight-cyan {
  color: var(--neon-cyan);
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
}

@media (max-width: 480px) {
  .asset-balance-strip {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px;
  }
  .asset-val {
    font-size: 19px;
  }
}

/* ==========================================
   최상단 고정 네온 플로팅 토스트 알림
========================================== */
.floating-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: linear-gradient(135deg, #0d1b2a 0%, #07101e 100%);
  border: 1.5px solid var(--neon-green);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), 0 0 25px rgba(16, 185, 129, 0.35);
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 92vw;
  width: max-content;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.floating-toast.toast-info {
  border-color: var(--neon-cyan);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), 0 0 25px rgba(56, 189, 248, 0.35);
}

.floating-toast.toast-success {
  border-color: var(--neon-green);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), 0 0 25px rgba(16, 185, 129, 0.35);
}

/* ==========================================
   기획서 312: 대화면/PC 미디어 쿼리 (540px 이상)
========================================== */
@media (min-width: 540px) {
  .responsive-brand-titles {
    display: flex !important;
    flex-direction: column;
    gap: 2px;
  }
  .responsive-logout-text {
    display: inline !important;
    margin-left: 6px;
    font-weight: 700;
    font-size: 13px;
  }
  .responsive-live-chip {
    display: inline-flex !important;
    align-items: center;
  }
  .btn-logout-cyber {
    width: auto;
    height: 36px;
    padding: 0 12px;
    gap: 6px;
  }
}

