:root{color-scheme:dark;--bg:#070e1a;--panel:#121d2d;--border:#243249;--muted:#8e9db3;--text:#eaf1fc;--amber:#ffcf64;--red:#ff757e;--blue:#62a9ff;--green:#57d3a3;--soft:#19283c}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 80% -20%,#1b344f 0%,#07111e 46%,#070e1a 100%);color:var(--text);font-family:system-ui,-apple-system,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;font-size:14px}button,input{font:inherit}button{cursor:pointer}.shell{max-width:1490px;margin:0 auto;padding:0 28px}.topbar{display:flex;align-items:center;justify-content:space-between;padding:26px 0;border-bottom:1px solid var(--border)}.logomark{font-size:21px;letter-spacing:.09em;font-weight:900;color:#e9f4ff}.logomark>span{color:var(--amber)}.logomark i{display:inline-block;height:7px;width:7px;border-radius:50%;background:var(--green);margin:0 9px 3px 6px;box-shadow:0 0 12px #57d3a390}.subtitle{margin:6px 0 0;color:var(--muted);font-size:12px}.top-actions{display:flex;align-items:center;gap:12px}.connection{display:flex;align-items:center;gap:8px;border:1px solid #2a4b40;border-radius:25px;padding:9px 14px;color:var(--green);font-size:12px;background:#112920}.connection.stale{color:var(--amber);border-color:#6b5430;background:#2c2416}.pulse{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 10px currentColor}.logout{border:1px solid var(--border);border-radius:9px;padding:10px 14px;background:transparent;color:#dbe5f4}.logout:hover{background:#18263b}.hero{display:flex;align-items:end;justify-content:space-between;gap:30px;padding:35px 0 25px}.eyebrow,.smallcaps{font-size:11px;letter-spacing:.20em;color:var(--green);font-weight:700}.hero h1{margin:13px 0 12px;font-size:clamp(25px,3vw,40px);line-height:1.27;letter-spacing:-.05em}.hero em{font-style:normal;color:var(--amber)}.hero p{margin:0;color:var(--muted);font-size:13px}.hero-stat{display:flex;flex-direction:column;align-items:flex-end;gap:2px;color:var(--muted);font-size:12px;min-width:130px}.hero-stat strong{font-size:42px;color:var(--text);font-weight:750;line-height:1.1}.hero-stat small{font-size:11px}.meta-bar{display:flex;gap:26px;align-items:center;flex-wrap:wrap;color:var(--muted);padding:18px 0;font-size:12px}.meta-bar strong{color:#dce8f5;font-weight:600;margin-left:7px}.legend{margin-left:auto;display:flex;gap:14px}.legend-item{display:flex;align-items:center;gap:6px}.dot{display:inline-block;height:6px;width:6px;border-radius:50%}.dot-gold{background:var(--amber)}.dot-red{background:var(--red)}.dot-blue{background:var(--blue)}.warning{border:1px solid #71583c;background:#30261b;padding:12px 15px;color:var(--amber);border-radius:10px;margin-bottom:14px}.stocks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.stock-card{background:linear-gradient(160deg,#152238,#101b2a 75%);border:1px solid var(--border);border-radius:15px;overflow:hidden;min-width:0;box-shadow:0 6px 25px #03091440}.stock-card:nth-child(3){grid-column:1/-1}.stock-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:22px 23px 13px}.stock-name{font-weight:740;font-size:19px;letter-spacing:-.04em}.code{color:var(--muted);font-size:12px;margin-left:7px;font-weight:500}.stock-subtitle{font-size:12px;color:var(--muted);margin-top:5px}.feed{border:1px solid #285540;border-radius:8px;color:var(--green);padding:5px 8px;font-size:11px;white-space:nowrap;background:#102d22}.feed.stale,.feed.waiting{color:var(--amber);border-color:#5e4e31;background:#302719}.feed.closed{color:#c6d4e5;border-color:#43516b;background:#233046}.stock-current{display:flex;align-items:baseline;gap:10px;padding:0 23px 17px}.stock-current strong{font-size:clamp(26px,3vw,37px);font-variant-numeric:tabular-nums;letter-spacing:-.035em}.stock-current small{color:var(--muted);font-size:12px}.position-section{padding:0 16px}.ladder-head,.ladder-row{display:grid;grid-template-columns:27% 19% 54%;align-items:center;gap:0;min-height:27px;font-variant-numeric:tabular-nums}.ladder-head{font-size:11px;font-weight:700;color:#8ea5bd;padding:9px 12px;background:#1c2b3e;border:1px solid #2b3d54;border-radius:7px}.ladder-row{position:relative;margin:0 4px;padding:0 8px;border-bottom:1px solid #27344a;font-size:12px}.ladder-row:last-child{border-bottom:0}.ladder-row::before{content:'';position:absolute;inset:0;background:transparent;pointer-events:none}.ladder-row.current{background:#4b3a1e;border:1px solid #a67d38;border-radius:6px;margin:3px 4px;font-weight:800;color:var(--amber)}.ladder-row.key{font-weight:750}.ladder-row .num{text-align:right;padding-right:8px}.ladder-row .pct{text-align:right;padding-right:10px;white-space:nowrap}.ladder-row .level{text-align:left;padding-left:9px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:flex;align-items:center;gap:5px;min-width:0}.ladder-row .level span{overflow:hidden;text-overflow:ellipsis}.ladder-row .level:before{content:' ';display:inline-block;flex:0 0 6px;height:6px;border-radius:50%;background:currentColor}.ladder-row.red{color:var(--red)}.ladder-row.blue{color:var(--blue)}.ladder-row.fib{color:#96a6bc}.ladder-row.neutral{color:#dce8f9}.ladder-row.current .level:before{border-radius:0;background:var(--amber);clip-path:polygon(0 0,100% 50%,0 100%);width:8px;height:10px}.stock-bottom{display:grid;grid-template-columns:minmax(0,1fr) minmax(175px,.88fr);gap:12px;padding:19px 20px 21px;border-top:1px solid var(--border);margin-top:17px}.signals{display:flex;flex-direction:column;gap:9px;min-width:0}.caption{color:var(--muted);font-size:11px;letter-spacing:.02em;font-weight:700}.macds{display:flex;gap:5px}.macd{padding:5px 7px;border:1px solid #31445b;border-radius:7px;color:#cad6e6;font-size:11px;background:#16253a}.macd.up{border-color:#285942;color:var(--green)}.macd.down{border-color:#6a3846;color:var(--red)}.info{font-size:11px;color:#b7c8dc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.watch{color:var(--amber);font-size:11px}.buy-box{background:#1a2a3f;border:1px solid #33465c;border-radius:9px;padding:11px}.buy-box .caption{margin-bottom:9px}.buy-title{font-size:12px;font-weight:750;color:#a4c8ff;background:#223b5c;border-radius:6px;padding:7px 9px}.buy-title.missing{color:#ffc0b6;background:#462931}.buy-title.ready{color:#89edbd;background:#1c4935}.buy-title.confirming{color:var(--amber);background:#453820}.buy-title.paused,.buy-title.waiting{color:#c9d4e5;background:#303b50}.reason{font-size:11px;color:#f2acaa;margin-top:8px;line-height:1.5}.reason:before{content:'×';margin-right:7px}.reason.empty{color:#8698ac}.reason.empty:before{content:'—'}.loading-card{border:1px dashed #41536a;border-radius:14px;padding:80px 25px;text-align:center;color:#a0afc3;grid-column:1/-1}.foot-note{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:23px 4px;color:var(--muted);font-size:11px}footer{border-top:1px solid var(--border);padding:24px 0;margin:15px 0 30px;color:#8094b1;font-size:12px;letter-spacing:.08em}footer span{color:#5d718c}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}.login-panel{width:min(100%,455px);padding:42px;background:linear-gradient(145deg,#17243a,#111b2b);border:1px solid #2d4056;border-radius:19px;box-shadow:0 28px 85px #03061099}.login-panel .smallcaps{margin-top:34px}.login-panel h1{font-size:29px;letter-spacing:-.05em;margin:12px 0 14px}.muted{color:var(--muted);line-height:1.8}.login-panel form{margin-top:29px}.login-panel label{display:block;font-size:12px;color:#d0ddef;margin-bottom:10px}.login-panel input{width:100%;padding:14px 13px;border:1px solid #40536d;outline:none;border-radius:8px;background:#0d1727;color:#f0f5ff;font-size:15px}.login-panel input:focus{border-color:#91baea}.primary-button{margin-top:7px;background:#a2cfff;border:0;color:#102033;font-weight:800;border-radius:8px;padding:14px 16px;width:100%;display:flex;justify-content:space-between}.primary-button:hover{background:#bfddff}.form-error{min-height:18px;color:var(--red);font-size:12px}.login-foot{margin-top:27px;border-top:1px solid #334357;padding-top:18px;color:#8397ae;font-size:11px;line-height:1.6}@media (max-width:970px){.stocks{grid-template-columns:1fr}.stock-card:nth-child(3){grid-column:auto}.legend{margin-left:0}.hero-stat{display:none}}@media(max-width:610px){.shell{padding:0 12px}.topbar{padding:18px 3px}.logomark{font-size:17px}.subtitle{font-size:10px}.top-actions{gap:5px}.connection{padding:6px;font-size:10px}.logout{padding:7px;font-size:10px}.hero{padding:25px 4px 14px}.hero h1{font-size:25px}.hero p{font-size:11px;line-height:1.7}.meta-bar{gap:10px;padding:12px 4px;font-size:10px}.legend{width:100%;justify-content:space-between;font-size:10px}.stock-head{padding:16px 14px 11px}.stock-name{font-size:16px}.stock-current{padding:0 14px 12px}.stock-current strong{font-size:27px}.position-section{padding:0 8px}.ladder-head,.ladder-row{grid-template-columns:26% 20% 54%;font-size:10px}.ladder-head{padding:9px 6px}.ladder-row{margin:0 2px;padding:0 5px;min-height:26px}.ladder-row .num{padding-right:4px}.ladder-row .pct{padding-right:5px}.ladder-row .level{padding-left:7px}.stock-bottom{grid-template-columns:1fr;gap:16px;padding:14px}.signals{gap:8px}.buy-box{padding:10px}.foot-note{font-size:10px}.login-panel{padding:31px 25px}}

.head-pct{text-align:right;padding-right:9px}.head-label{padding-left:14px}
/* WEB 2.0 - guest layout, responsive 3 columns */
body.guest-layout .shell{max-width:1900px;padding:0 22px}
.guest-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:25px 4px 14px}
.guest-hero h1{margin:0 0 7px;font-size:clamp(22px,2.1vw,32px);letter-spacing:-.04em}
.guest-hero h1 em{font-style:normal;color:var(--amber)}
.guest-hero p{margin:0;color:#b4c6dd;line-height:1.7}
.action-button,.details-button{border:1px solid #4a769d;background:#254462;color:#e8f3ff;font-size:12px;border-radius:8px;padding:10px 14px;font-weight:750}
.action-button:hover,.details-button:hover{background:#315a7d}
.sort-note{color:#72d6ae}
.guest-stocks{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start}
.guest-stocks .stock-card:nth-child(3){grid-column:auto}
.guest-card{position:relative;min-width:0}
.guest-card .stock-head{padding:16px 13px 10px}
.guest-card .stock-name{font-size:16px}
.guest-card .stock-head>div:last-child{text-align:right}
.guest-card .rank-badge{font-size:11px;color:#74deb5;font-weight:750;margin-bottom:5px}
.guest-card .feed{font-size:10px;padding:4px 6px}
.guest-card .stock-current{padding:0 14px 0}
.guest-card .stock-current strong{font-size:clamp(24px,2.3vw,32px)}
.guest-change{padding:0 14px 11px;font-weight:700;color:#ff969f}
.guest-change.positive{color:#72d6ae}
.guest-change small{color:#97abc5;font-size:10px;font-weight:400}
.guest-entry{background:#233650;margin:0 12px 10px;border-radius:8px;padding:9px 10px}
.guest-entry>span{font-size:10px;color:#a4bfd5}
.guest-entry>div{display:flex;gap:4px;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-top:4px}
.guest-entry strong{color:#fbd083;font-size:13px}
.guest-entry small{font-size:10px;color:#cedced}
.returns{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:0 12px 13px}
.return-item{padding:7px 2px;border-radius:7px;background:#223249;text-align:center;display:flex;flex-direction:column;gap:3px;min-width:0}
.return-item span{font-size:10px;color:#9cb1cb;white-space:nowrap}
.return-item strong{font-size:12px;font-variant-numeric:tabular-nums;color:#becbdf}
.positive,.return-item strong.positive{color:#71d9b3}
.negative,.return-item strong.negative{color:#ff8e9b}
.guest-card .position-section{padding:0 8px}
.guest-card .ladder-head,.guest-card .ladder-row{grid-template-columns:27% 20% 53%}
.guest-card .ladder-row{font-size:clamp(10px,.83vw,12px);min-height:29px;padding:0 5px}
.guest-card .ladder-row .level{white-space:normal;line-height:1.2;padding-left:5px}
.guest-card .ladder-row .level span{white-space:normal;display:block;overflow:visible;text-overflow:clip}
.guest-card .ladder-row .num{padding-right:3px}
.guest-card .ladder-row .pct{padding-right:3px}
.guest-card .ladder-head{padding:7px 6px}
.guest-bottom{border-top:1px solid var(--border);padding:11px 12px 13px;margin-top:10px;display:flex;flex-direction:column;gap:10px}
.guest-bottom .macds{flex-wrap:wrap}
.guest-bottom .macd{font-size:11px}
.guest-buy{background:#24334b;border-radius:8px;padding:10px;display:flex;justify-content:space-between;gap:5px}
.guest-buy span{font-size:11px;color:#b7c8da}
.guest-buy strong{font-size:11px;color:#ffafb8}
.guest-bottom .details-button{width:100%}
.partner-panel{display:flex;align-items:center;justify-content:space-between;gap:15px;border:1px solid #354962;border-radius:11px;padding:16px 18px;margin-top:22px}
.partner-panel strong{font-size:13px}
.partner-panel p{font-size:11px;color:#a9bcd3;margin:5px 0 0}
.partner-panel>span{font-size:25px;color:#9eb9d9}
.legal{color:#8ca1ba;font-size:11px;line-height:1.8}
.guest-footer{text-align:center;color:#b8c8e0}
.guest-card.held-blink{animation:holding-border 1.4s ease-in-out infinite}
@keyframes holding-border{0%,100%{box-shadow:0 0 0 2px #ff384e,0 0 18px #f3424a8c;border-color:#fc4656}50%{box-shadow:0 0 0 1px #78363c,0 0 2px #d65e6620;border-color:#8d3c49}}
@media(prefers-reduced-motion:reduce){.guest-card.held-blink{animation:none;border:2px solid #ec4754}}
.modal[hidden]{display:none!important}
.modal{position:fixed;inset:0;z-index:999;display:flex;align-items:center;justify-content:center;padding:14px}
.modal-backdrop{position:absolute;inset:0;background:#020916c9}
.modal-card{position:relative;background:#14243a;border:1px solid #38506a;border-radius:15px;width:min(100%,770px);max-height:85vh;overflow:auto;padding:20px;box-shadow:0 20px 70px #0009}
.modal-head{display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid #33465f;padding-bottom:12px;margin-bottom:12px}
.modal-head h2{margin:0;font-size:18px}
.modal-close{background:#233951;border:1px solid #47617a;border-radius:7px;color:white;font-size:21px;width:34px;height:34px}
.modal-notice{font-size:11px;line-height:1.7;color:#bdcce0}
.history-table{width:100%;border-collapse:collapse}
.history-table td,.history-table th{padding:11px 8px;border-bottom:1px solid #33425b;font-size:12px;text-align:right}
.history-table td:first-child,.history-table th:first-child{text-align:left}
.admin-stats{display:flex;flex-wrap:wrap;align-items:center;gap:12px;background:#1a2a3e;border:1px solid #3b4e65;border-radius:10px;padding:12px 16px;margin:14px 0}
.admin-stats>span{min-width:135px;font-size:12px;color:#b9cbe3}
.admin-stats strong{color:#72dcb6;font-size:18px}
.admin-stats small{width:100%;color:#9bafc7}
@media(min-width:971px){.guest-stocks{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:970px){.guest-stocks{grid-template-columns:1fr}.guest-stocks .stock-card:nth-child(3){grid-column:auto}}
@media(min-width:700px) and (max-width:970px){.guest-stocks{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:610px){body.guest-layout .shell{padding:0 11px}.guest-hero{align-items:flex-start;flex-wrap:wrap}.guest-card .ladder-row{font-size:11px}.guest-card .stock-current strong{font-size:27px}}

/* V82.1: Admin gets two existing stock cards plus a real-time, full-gates diagnostic card. */
body:not(.guest-layout) .shell{max-width:1950px;padding:0 22px}
body:not(.guest-layout) .stocks{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start}
body:not(.guest-layout) .stock-card:nth-child(3){grid-column:auto}
body:not(.guest-layout) .stock-current strong{font-size:clamp(22px,2vw,35px)}
body:not(.guest-layout) .stock-bottom{grid-template-columns:1fr;padding:14px;gap:12px}
body:not(.guest-layout) .stock-card .ladder-row{font-size:clamp(10px,.77vw,12px);padding:0 4px}
body:not(.guest-layout) .stock-card .ladder-row .level{padding-left:4px}
.admin-card{border-color:#46739f}
.admin-card .stock-head{background:linear-gradient(115deg,#1b3654,#15253c)}
.admin-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:4px 13px 12px}
.admin-tab{background:#1b3049;color:#b7cde8;border:1px solid #34516d;border-radius:7px;padding:10px 6px;font-size:11px;font-weight:700;min-width:0;overflow-wrap:anywhere;line-height:1.35}
.admin-tab.selected{background:#275681;color:#fff;border-color:#68a8db}
.admin-card .stock-current{padding-bottom:15px}
.admin-status-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:0 12px 12px}
.admin-status-grid>div{background:#23354f;border-radius:6px;padding:10px 4px;color:#acc2dc;text-align:center;font-size:10px}
.admin-status-grid strong{display:block;color:#f4ca6c;font-size:11px;padding-top:4px}
.admin-reasons{margin:3px 12px 14px;padding:11px;background:#263247;border:1px solid #3a506c;border-radius:7px}
.admin-reasons b{color:#abd1ff;font-size:11px}.admin-reasons p{margin:7px 0 0;color:#ffa2ac;font-size:11px;line-height:1.5}.admin-reasons .ok-text{color:#9cdeb8}
.admin-logic-body{padding:0 12px}
.admin-logic-group{margin:0 0 10px}.admin-logic-group h4{font-size:11px;letter-spacing:.02em;color:#a5cef9;background:#1d3048;padding:10px;margin:0 0 2px;border-radius:5px}
.admin-logic-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center;border-bottom:1px solid #293d52;padding:8px 5px}
.admin-label{font-size:11px;color:#d5e2f5;line-height:1.35}.admin-label small{display:block;font-size:10px;color:#89a7c7;line-height:1.5;margin-top:3px}
.admin-status{font-size:10px;border-radius:5px;padding:5px 7px;font-weight:700;white-space:nowrap}
.admin-status.ok{color:#71e6b5;background:#1a4838}.admin-status.block{color:#ff959a;background:#4a2c36}.admin-status.wait{color:#ffe0a3;background:#473b27}.admin-status.info{color:#a3ccff;background:#253d56}
.admin-help{font-size:10px;color:#95abc6;padding:10px 14px 18px;line-height:1.8}
@media(min-width:760px) and (max-width:1200px){body:not(.guest-layout) .stocks{grid-template-columns:repeat(2,minmax(0,1fr))}body:not(.guest-layout) .admin-card{grid-column:1/-1}}
@media(max-width:759px){body:not(.guest-layout) .stocks{grid-template-columns:1fr}body:not(.guest-layout) .admin-card{grid-column:auto}}

/* V82.2: four performance cells, narrow screens keep labels legible. */
@media(max-width:380px){.return-item span{font-size:9px}.return-item strong{font-size:11px}.returns{gap:3px}}

/* V82.3: 4 performance cells & unmistakable build label. */
.build-badge{display:inline-block;color:#88e4c3;background:#143a34;border:1px solid #316f5d;border-radius:5px;padding:4px 7px;font-size:10px;font-weight:800;vertical-align:middle;white-space:nowrap}
.build-badge.build-warning{color:#ffd1a8;background:#623826;border-color:#a56846}
.returns{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px}
.return-item{min-width:0}
.return-item.today-return{background:#254761;border:1px solid #356c9e}
.return-item.today-return span{color:#d5eaff;font-weight:700}
.return-item strong{font-size:clamp(10px,.95vw,13px)}
@media(max-width:610px){.build-badge{font-size:9px}.return-item span{font-size:9px}.return-item strong{font-size:11px}}

/* V82.3.1: small screens show two admin tabs, the third full-width. */
@media(max-width:420px){.admin-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-tab:last-child{grid-column:1/-1}}

/* V82.3.2: preserve the right-hand administrator diagnostics, show all three
   individual quote cards: Samsung(top left), SK(top center), KODEX(bottom left).
   On smaller screens existing 2-column / 1-column stacking stays intact. */
@media(min-width:1201px){
  body:not(.guest-layout) .stocks>.stock-card:nth-child(1){grid-column:1;grid-row:1}
  body:not(.guest-layout) .stocks>.stock-card:nth-child(2){grid-column:2;grid-row:1}
  body:not(.guest-layout) .stocks>.stock-card:nth-child(3):not(.admin-card){grid-column:1;grid-row:2}
  body:not(.guest-layout) .stocks>.admin-card{grid-column:3;grid-row:1 / span 2}
}
