*{box-sizing:border-box}body{margin:0;background:#0a0f1e;color:#e8ecf5;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
h1,h2,h3{color:#f5c542}h1{margin:0 0 4px}h3{margin:0 0 8px}
.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}
.auth-card{background:#111a30;border:1px solid #2a3550;border-radius:14px;padding:24px;max-width:420px;width:100%}
.tagline{color:#9fb0d0;margin:0 0 16px}
input,select{width:100%;padding:10px;margin:6px 0;border-radius:8px;border:1px solid #2a3550;background:#0a0f1e;color:#e8ecf5}
.btn{background:#22304d;color:#fff;border:0;border-radius:8px;padding:10px 16px;cursor:pointer}
.btn.gold{background:#f5c542;color:#111;font-weight:700}
.btn.small{padding:6px 10px;font-size:13px}
.btn:disabled{opacity:.5;cursor:wait}
.msg{color:#ff9a9a;min-height:18px}
.fine{color:#8ea0c2;font-size:12px}
header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#111a30;border-bottom:1px solid #2a3550}
.brand{font-size:20px;font-weight:800;color:#f5c542}
.userbox{display:flex;gap:8px;align-items:center}
.badge{background:#f5c542;color:#111;border-radius:20px;padding:2px 10px;font-size:12px;font-weight:700}
.livebar{display:flex;gap:12px;align-items:center;padding:8px 16px;background:#0d1526;font-size:13px;flex-wrap:wrap}
.api-health{color:#8ea0c2;font-size:12px}
.tabs{display:flex;gap:6px;padding:10px 16px;flex-wrap:wrap}
.tabs button{background:#16213a;color:#cdd8ee;border:1px solid #2a3550;border-radius:20px;padding:8px 16px;cursor:pointer}
.tabs button.active{background:#f5c542;color:#111;font-weight:700}
.tab{padding:0 16px 24px}
.card{background:#111a30;border:1px solid #2a3550;border-radius:12px;padding:16px;margin:10px 0}
.price-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.price-cell{background:#0a0f1e;border:1px solid #2a3550;border-radius:10px;padding:10px}
.price-cell b{font-size:16px}
.up{color:#3ddc84}.down{color:#ff6b6b}.wait{color:#f5c542}.buy{color:#3ddc84}.sell{color:#ff6b6b}
.pair-select{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}
.pair-select button{background:#16213a;color:#cdd8ee;border:1px solid #2a3550;border-radius:16px;padding:6px 12px;cursor:pointer}
.pair-select button.active{background:#f5c542;color:#111;font-weight:700}
.gate{display:flex;justify-content:space-between;border-bottom:1px solid #22304d;padding:6px 0}
.score{font-size:22px;font-weight:800;color:#f5c542;margin:8px 0}
table{width:100%;border-collapse:collapse;font-size:13px}
td,th{border-bottom:1px solid #22304d;padding:6px;text-align:left}
.subtabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.subtabs button{background:#16213a;color:#cdd8ee;border:1px solid #2a3550;border-radius:16px;padding:6px 12px;cursor:pointer}
.subtabs button.active{background:#f5c542;color:#111;font-weight:700}
.form-row{display:flex;gap:8px;flex-wrap:wrap}
.form-row input,.form-row select{flex:1;min-width:140px}
.filters{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.filters select{width:auto}
@media(max-width:600px){.brand{font-size:16px}header{flex-wrap:wrap}}

/* New: language/alert/chart additions */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10001; background: #f5c542; color: #0a0f1e; border-radius: 12px; padding: 14px 18px; max-width: min(92vw, 560px); box-shadow: 0 8px 30px rgba(0,0,0,.5); font-size: 15px; line-height: 1.5; }
.toast b { font-size: 16px; }
.chart-tf { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.chart-tf button { padding: 5px 10px; border: 1px solid #2a3550; background: #141b2e; color: #e8ecf5; border-radius: 999px; cursor: pointer; }
.chart-tf button.active { background: #f5c542; color: #0a0f1e; border-color: #f5c542; }
#chartCanvas { width: 100%; height: auto; background: #0a0f1e; border: 1px solid #2a3550; border-radius: 10px; }

/* Big BUY/SELL signal banner */
.signal-banner { border-radius: 14px; padding: 18px 16px; margin: 10px 0; text-align: center; border: 2px solid transparent; }
.signal-banner.buy { background: #0d3b22; border-color: #3ddc84; color: #d6ffe8; }
.signal-banner.sell { background: #3b0d0d; border-color: #ff6b6b; color: #ffe0e0; }
.signal-banner.wait { background: #141b2e; border-color: #2a3550; color: #8ea0c2; }
.sb-title { font-size: 30px; font-weight: 800; letter-spacing: .5px; }
.sb-line { margin-top: 6px; font-size: 15px; }
.sb-vals { margin-top: 10px; font-size: 17px; line-height: 1.8; }

/* Single-direction signal plan card (ek direction, ek trade) */
.plan-card { border: 1px solid #2a3550; border-radius: 10px; padding: 10px; margin: 6px 0; line-height: 1.8; }
.plan-card.active-buy { border-color: #3ddc84; box-shadow: 0 0 0 1px #3ddc84 inset; }
.plan-card.active-sell { border-color: #ff6b6b; box-shadow: 0 0 0 1px #ff6b6b inset; }
/* SMC confluence checklist marks */
.chk-ok{color:#3ddc84;font-weight:700}.chk-no{color:#ff6b6b;font-weight:700}.chk-na{color:#8ea0c2}
/* v4: risk management box on the plan card */
.risk-box{border:1px dashed #f5c542;border-radius:10px;padding:10px;margin-top:8px;font-size:13px;line-height:1.7;background:#0d1526}
/* v5: Copy Signal + Download Signal Image buttons */
.sig-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.btn-sig{background:#22304d;color:#fff;border:1px solid #2a3550;border-radius:8px;padding:8px 14px;cursor:pointer;font-size:14px}
.btn-sig:hover{background:#2c3d63}
.btn-sig-sm{background:#16213a;color:#cdd8ee;border:1px solid #2a3550;border-radius:8px;padding:4px 10px;cursor:pointer;font-size:12px;margin:4px 4px 0 0}
.btn-sig-sm:hover{background:#22304d}
.plan-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.status-badge { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.st-in { background: #3ddc84; color: #0a0f1e; }
.st-near { background: #f5c542; color: #0a0f1e; }
.st-wait { background: #2a3550; color: #8ea0c2; }
.st-active { background: #f5c542; color: #0a0f1e; }

/* v6: mobile-friendly (phones 360-390px) — responsive additions only, desktop unchanged */
html,body{overflow-x:hidden}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
@media (max-width:768px){
  .tab{padding:0 12px 20px}
  .card{padding:12px;margin:8px 0}
  header{padding:10px 12px}
  .livebar{padding:8px 12px;font-size:12px;gap:8px}
  /* tabs / subtabs / pair selector: one scrollable row, big tap targets */
  .tabs{flex-wrap:nowrap;overflow-x:auto;padding:8px 12px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .tabs::-webkit-scrollbar{display:none}
  .tabs button{flex:0 0 auto;min-height:44px;padding:10px 16px;font-size:14px}
  .subtabs{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .subtabs::-webkit-scrollbar{display:none}
  .subtabs button{flex:0 0 auto;min-height:44px;padding:10px 14px}
  .pair-select{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .pair-select::-webkit-scrollbar{display:none}
  .pair-select button{flex:0 0 auto;min-height:44px;padding:10px 14px}
  .chart-tf{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .chart-tf button{flex:0 0 auto;min-height:40px;padding:8px 12px}
  /* tap targets: at least ~44px tall on touch screens */
  .btn{min-height:44px;padding:10px 16px}
  .btn.small{min-height:44px;padding:10px 14px;font-size:14px}
  .btn-sig{min-height:44px;padding:10px 16px}
  .btn-sig-sm{min-height:44px;padding:10px 12px;font-size:13px}
  input,select{min-height:44px;font-size:16px}
  /* banner readable on narrow screens */
  .signal-banner{padding:14px 12px}
  .sb-title{font-size:24px}
  .sb-line{font-size:14px}
  .sb-vals{font-size:15px;line-height:1.7}
  /* tables scroll inside their container, never the whole page */
  .table-wrap{margin:8px -12px;padding:0 12px}
  table{font-size:13px}
  td,th{padding:6px 8px;white-space:nowrap}
  /* checklist / gate rows may wrap to two lines instead of squeezing */
  .gate{flex-wrap:wrap;gap:2px 10px}
  .gate span:last-child{text-align:right}
  /* price grid: 2 columns on phones */
  .price-grid{grid-template-columns:repeat(2,1fr)}
  .score{font-size:20px}
  /* toast: above the home-indicator safe area, never full-width */
  .toast{bottom:calc(16px + env(safe-area-inset-bottom,0px));max-width:92vw;font-size:14px}
}
@media (max-width:480px){
  .brand{font-size:16px}
  .sb-title{font-size:22px}
  .sb-vals{font-size:14px}
  .tab{padding:0 10px 20px}
  .card{padding:12px 10px}
  header{gap:8px}
  .userbox{flex-wrap:wrap;justify-content:flex-end}
  #helloUser{display:none}
  .table-wrap{margin:8px -10px;padding:0 10px}
}

/* v7: modals (signal pop-up + share card) — pehle se HTML me, sirf show/hide */
/* v9.2: signal pop-up sits above everything, including the splash overlay (z-index 9999) */
.modal{position:fixed;inset:0;background:rgba(0,0,0,.72);z-index:10000;display:flex;align-items:flex-start;justify-content:center;padding:16px;overflow-y:auto}
.modal-card{background:#111a30;border:1px solid #f5c542;border-radius:14px;padding:20px;max-width:520px;width:100%;margin:auto}
.modal-card.wide{max-width:560px}
/* v7: branded share card (portrait preview) */
.share-card{border:2px solid #f5c542;border-radius:14px;padding:18px;text-align:center;background:#0a0f1e}
.share-card-brand{color:#f5c542;font-weight:800;letter-spacing:1px}
.share-card-pair{font-size:34px;font-weight:800;margin:8px 0}
.share-card-dir{display:inline-block;padding:6px 22px;border-radius:999px;font-size:22px;font-weight:800}
.share-card-dir.buy{background:#3ddc84;color:#0a0f1e}
.share-card-dir.sell{background:#ff6b6b;color:#fff}
.share-card-code{color:#8ea0c2;font-size:13px;margin:8px 0}
.share-boxes{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:12px 0}
/* v9.5: SMC per-pair tasdeeq cards — 2-col grid (phone par 1 col) */
.smc-pair-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;margin-top:10px}
@media (max-width:480px){.smc-pair-cards{grid-template-columns:1fr}}
.share-box{border:1px solid #2a3550;border-radius:10px;padding:8px}
.share-box-label{color:#8ea0c2;font-size:12px}
.share-box-val{font-size:20px;font-weight:800}
.share-box-status{font-size:11px;color:#8ea0c2}
.share-timeline{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.share-timeline span{border:1px solid #2a3550;border-radius:999px;padding:4px 10px;font-size:12px}
.tl-done{color:#3ddc84;border-color:#3ddc84}
.tl-pend{color:#8ea0c2}
.share-text-preview{background:#0a0f1e;border:1px solid #2a3550;border-radius:10px;padding:12px;max-height:180px;overflow-y:auto;white-space:pre-wrap;font-size:13px;line-height:1.6}
/* v7: sentiment wave bars + zone corridor */
.sent-bar{display:flex;height:14px;border-radius:999px;overflow:hidden;background:#22304d;margin:6px 0}
.sent-bull{background:#3ddc84;height:100%}
.sent-bear{background:#ff6b6b;height:100%}
.corr-track{position:relative;height:18px;background:#22304d;border-radius:999px;margin:10px 0 4px}
.corr-zone{position:absolute;top:0;height:100%;border-radius:999px;opacity:.7}
.corr-zone.demand{background:#3ddc84}
.corr-zone.supply{background:#ff6b6b}
.corr-price{position:absolute;top:-4px;width:4px;height:26px;background:#f5c542;border-radius:2px;transform:translateX(-2px)}
/* v7: monitoring controls in the live bar */
.mon-ctl{display:inline-flex;gap:6px;align-items:center}
.mon-ctl select{width:auto;margin:0;min-height:0;padding:4px 8px}
/* v7: history rows are clickable for details */
.hist-row{cursor:pointer}
/* v7: light theme (Preferences se) */
body.light{background:#eef1f6;color:#1a2333}
body.light .card,body.light header,body.light .auth-card{background:#fff;border-color:#d5dce8}
body.light .price-cell,body.light .plan-card,body.light .share-card{background:#f7f9fc;border-color:#d5dce8}
body.light h1,body.light h2,body.light h3{color:#8a6d00}
body.light .livebar{background:#e2e8f2}
body.light input,body.light select{background:#fff;color:#1a2333;border-color:#c4cede}
body.light .tabs button,body.light .pair-select button,body.light .subtabs button,body.light .chart-tf button{background:#e8edf5;color:#1a2333;border-color:#c4cede}
body.light .btn{background:#dfe6f2;color:#1a2333}
body.light #chartCanvas{background:#fff}
body.light .tagline,body.light .fine,body.light .api-health{color:#5a6b8c}
body.light .modal-card{background:#fff;border-color:#8a6d00}
body.light .share-text-preview{background:#f7f9fc;border-color:#d5dce8}
body.light .share-box{border-color:#d5dce8}
body.light .sent-bar,body.light .corr-track{background:#dfe6f2}
/* v8: beginner guide + why-trade box + Terminal-only notices */
.guide-box ol{margin:8px 0 0;padding-left:22px;line-height:1.9;font-size:15px}
.guide-box li{margin-bottom:4px}
.notice-banner{border:1px dashed #f5c542;background:#0d1526;border-radius:10px;padding:10px;font-weight:700;line-height:1.6}
/* v9.1: one-line "what is this tab" banners — small calm strip, same gold/dark language as .notice-banner */
.tab-banner{border:1px solid #f5c542;border-left:5px solid #f5c542;background:#141b2e;border-radius:10px;padding:10px 12px;font-weight:700;line-height:1.6;text-align:center;margin:0 0 10px}
/* v9.3: weekend market-closed notice (Terminal, server flag se) */
.market-closed-banner{background:#3a2b00;border:1px solid #f5c542;color:#ffe9a8;border-radius:12px;padding:14px 16px;margin:10px 0;font-size:15px;line-height:1.5}
body.light .market-closed-banner{background:#fff3c4;border-color:#8a6d00;color:#4a3500}
.why-box{border:1px solid #3ddc84;border-radius:10px;padding:12px;margin:10px 0;background:#0d1f16;line-height:1.7}
.why-box h4{margin:0 0 6px;color:#3ddc84}
.why-box ul{margin:0;padding-left:22px}
.why-box li{margin-bottom:4px}
body.light .notice-banner{background:#fff8e1;border-color:#8a6d00}
body.light .tab-banner{background:#fff8e1;border-color:#8a6d00}
body.light .why-box{background:#eef7f0;border-color:#2e9e5b}
body.light .why-box h4{color:#2e9e5b}

@media (max-width:768px){
  .modal{padding:10px}
  .modal-card{padding:14px}
  .share-card-pair{font-size:28px}
  .share-box-val{font-size:18px}
}

/* v9: Telegram alerts card */
.tg-card .btn{display:inline-block;min-height:44px;line-height:1.5;padding:12px 18px;text-decoration:none}
.tg-card p{line-height:1.7}
body.light .tg-card .btn{color:#111}

/* v9.1: branded splash screen (overlay only, CSS only, no images) */
#splash{position:fixed;inset:0;z-index:9999;background:#0a0f1e;display:flex;align-items:center;justify-content:center;padding:20px;text-align:center;transition:opacity .4s ease}
#splash.hide{opacity:0;pointer-events:none}
.splash-inner{width:100%;max-width:420px;display:flex;flex-direction:column;align-items:center}
.splash-emblem{width:76px;height:76px;border:2px solid #f5c542;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#f5c542;font-size:42px;font-weight:800;margin-bottom:18px;animation:splashPulse 1.6s ease-in-out infinite}
@keyframes splashPulse{0%,100%{box-shadow:0 0 0 0 rgba(245,197,66,.35)}50%{box-shadow:0 0 0 12px rgba(245,197,66,0)}}
.splash-brand{color:#f5c542;font-size:clamp(26px,7vw,34px);font-weight:800;letter-spacing:2px;line-height:1.2}
.splash-tag{color:#9fb0d0;font-size:12px;font-weight:600;letter-spacing:3px;margin:10px 0 26px}
.splash-bar{width:100%;max-width:280px;height:8px;background:#22304d;border-radius:4px;overflow:hidden}
.splash-fill{height:100%;width:0;background:#f5c542;border-radius:4px;transition:width .12s linear}
.splash-status{color:#8ea0c2;font-size:14px;min-height:20px;margin-top:12px}
.splash-skip{margin-top:20px;min-height:44px;min-width:100px;padding:10px 22px;background:transparent;color:#f5c542;border:1px solid #f5c542;border-radius:22px;font-size:15px;font-weight:700;cursor:pointer}
@media (prefers-reduced-motion:reduce){.splash-emblem{animation:none}.splash-fill{transition:none}}

/* ---- v9.1: new terminal layout (price card, signal card, action row) ---- */
.price-card{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;background:#16223a;border:1px solid #22304d;border-radius:10px;padding:14px;margin:10px 0}
.pc-col{min-width:0}
.pc-label{color:#8ea0c2;font-size:11px;letter-spacing:.5px;text-transform:uppercase}
.pc-big{font-size:22px;font-weight:800;color:#e8ecf5;line-height:1.2;word-break:break-all}
.pc-sub{color:#8ea0c2;font-size:12px;margin-top:2px}
.pc-sync{grid-column:1/-1;color:#8ea0c2;font-size:12px;border-top:1px solid #22304d;padding-top:8px}
.sig-card{background:#16223a;border:1px solid #22304d;border-radius:10px;padding:14px;margin:10px 0}
.sig-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.sig-pair{font-size:20px;font-weight:800;color:#e8ecf5}
.pair-badge{background:#f5c542;color:#111;border-radius:4px;padding:2px 8px;font-size:11px;font-weight:800;vertical-align:middle}
.sig-dir{font-size:22px;font-weight:800;margin-top:6px}
.sig-dir.buy{color:#3ddc84}.sig-dir.sell{color:#ff6b6b}.sig-dir.wait{color:#f5c542}
.conf-ring{position:relative;width:110px;height:110px;flex:0 0 auto}
.conf-ring svg{display:block;transform:rotate(-90deg)}
.ring-num{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;color:#e8ecf5}
.sig-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:12px;border-top:1px solid #22304d;padding-top:10px}
.sig-meta>div{min-width:0;font-size:13px;color:#e8ecf5;word-break:break-word}
.scan-line{color:#f5c542;font-weight:700;margin:10px 0 0}
.badge-conf{background:#3ddc84;color:#111;border-radius:12px;padding:2px 8px;font-size:11px;font-weight:800}
.badge-pend{background:#f5c542;color:#111;border-radius:12px;padding:2px 8px;font-size:11px;font-weight:800}
.req-box{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:8px 0}
.req-buy,.req-sell{border:1px solid #22304d;border-radius:8px;padding:10px;font-size:13px;line-height:1.5}
.req-buy b{color:#3ddc84}.req-sell b{color:#ff6b6b}
.action-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0}
.action-row .btn-sig{min-height:44px;font-size:13px}
.btn-analyze{background:#f5c542;color:#111;font-weight:800}
@media (max-width:600px){
  .price-card{grid-template-columns:repeat(2,1fr)}
  .sig-meta{grid-template-columns:repeat(2,1fr)}
  .req-box{grid-template-columns:1fr}
  .action-row{grid-template-columns:repeat(2,1fr)}
  .pc-big{font-size:19px}
  .sig-dir{font-size:19px}
  .smc-controls select{flex:1 1 100%}
  .tp-row{flex-direction:column;gap:6px}
}
/* ---- v9.1: SMC tab card style (terminal wali card language, SMC ke asal data ke sath) ---- */
.smc-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0}
.smc-controls select{min-height:44px;font-size:16px;background:#0a0f1e;color:#e8ecf5;border:1px solid #22304d;border-radius:8px;padding:8px}
.smc-controls .btn-sig{min-height:44px}
.tf-pill{background:#16223a;border:1px solid #22304d;border-radius:12px;padding:6px 10px;font-size:12px;font-weight:700;color:#e8ecf5;white-space:nowrap}
.smc-feed-card{margin:10px 0}
.tp-row{display:flex;flex-wrap:wrap;gap:12px;margin:8px 0;font-size:13px;color:#e8ecf5}
.tp-row>span{white-space:nowrap}
/* v9.3 language dropdown: 44px tap target, fits 360px screens */
.lang-select{width:auto;max-width:160px;min-height:44px;font-size:16px;margin:0;padding:8px 10px;cursor:pointer}
@media (max-width:640px){.lang-select{max-width:132px;padding:8px 6px}}
