:root {
  --ink: #f2f5f0;
  --muted: #8b9790;
  --faint: #657069;
  --bg: #0b0e0d;
  --panel: #121715;
  --panel-2: #171d1a;
  --line: #28302c;
  --green: #b8ff5f;
  --green-dim: #3d612e;
  --amber: #ffcb66;
  --red: #ff6b6b;
  --blue: #7db7ff;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0,0,0,.34);
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% -10%, rgba(184,255,95,.08), transparent 30%), var(--bg); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 9px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.muted { color: var(--muted); }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1.2fr) minmax(400px, .8fr); }
.auth-story { padding: clamp(48px, 8vw, 120px); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; border-right: 1px solid var(--line); }
.auth-story::after { content: ""; position: absolute; width: 500px; height: 500px; border: 1px solid rgba(184,255,95,.13); border-radius: 50%; right: -240px; bottom: -210px; box-shadow: 0 0 0 70px rgba(184,255,95,.025), 0 0 0 140px rgba(184,255,95,.015); }
.brand-mark { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 52px; border: 1px solid var(--green); border-radius: 16px; color: var(--green); font-weight: 900; letter-spacing: -.05em; }
.brand-mark.small { width: 36px; height: 36px; margin: 0; border-radius: 11px; font-size: 12px; }
.auth-story h1 { margin: 0; max-width: 750px; font-size: clamp(64px, 8vw, 122px); line-height: .83; letter-spacing: -.075em; font-weight: 780; }
.auth-copy { max-width: 510px; margin: 34px 0; color: #b8c0bb; font-size: 18px; line-height: 1.7; }
.safety-panel { display: flex; align-items: center; gap: 14px; width: fit-content; margin-top: 28px; padding: 14px 18px; background: rgba(184,255,95,.06); border: 1px solid rgba(184,255,95,.16); border-radius: 14px; }
.safety-panel div { display: grid; gap: 3px; }.safety-panel small { color: var(--muted); }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(184,255,95,.11); }
.auth-card { width: min(100%, 560px); margin: auto; padding: clamp(34px, 6vw, 80px); }
.auth-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 44px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.auth-tab { flex: 1; border: 0; border-radius: 9px; padding: 11px; color: var(--muted); background: transparent; cursor: pointer; }
.auth-tab.active { color: var(--ink); background: #272e2a; }
.stack { display: grid; gap: 20px; }.stack h2 { margin: 0; font-size: 30px; letter-spacing: -.04em; }.stack p { margin: 7px 0 14px; }
label { display: grid; gap: 8px; color: #cbd2ce; font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #0f1311; color: var(--ink); padding: 12px 13px; transition: border-color .15s, background .15s; }
input:hover, select:hover, textarea:hover { border-color: #3d4943; } textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.6; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); cursor: pointer; font-weight: 750; }
.button:hover { border-color: #465249; transform: translateY(-1px); }.button.primary { color: #11150f; background: var(--green); border-color: var(--green); }.button.danger { color: #fff; background: #8f2f35; border-color: #b5434a; }.button.warning { color: #211706; background: var(--amber); border-color: var(--amber); }.button.small { min-height: 34px; padding: 7px 11px; font-size: 12px; }.button.full { width: 100%; margin-top: 4px; }
.form-error { min-height: 22px; color: #ff9292; font-size: 13px; }
.app-layout { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 26px 18px; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); background: #0d110f; z-index: 10; }
/* 메뉴가 화면보다 길면(휴대폰, 낮은 PC 창) 메뉴 안에서 스크롤해 관리자 메뉴까지 모두 닿게 한다. dvh는 휴대폰 주소창을 뺀 실제 높이다. */
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 30px; }.sidebar-brand div { display: grid; }.sidebar-brand small { color: var(--muted); font-size: 11px; }
#main-nav { display: grid; gap: 5px; }.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 13px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; text-align: left; }.nav-item span { color: var(--faint); font: 10px ui-monospace, monospace; }.nav-item:hover { color: var(--ink); background: #151a18; }.nav-item.active { color: var(--ink); background: #202720; }.nav-item.active span { color: var(--green); }
.sidebar-foot { margin-top: auto; display: grid; gap: 12px; }.safety-chip { display: flex; align-items: center; gap: 8px; padding: 11px; color: var(--muted); background: #121714; border-radius: 10px; font-size: 11px; }.safety-chip span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }.text-button { border: 0; padding: 10px; color: var(--muted); background: transparent; cursor: pointer; text-align: left; }
.workspace { min-width: 0; }.topbar { min-height: 78px; padding: 13px 28px; display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); background: rgba(11,14,13,.88); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 9; }
.account-switcher { display: flex; align-items: center; gap: 10px; }.account-switcher label { display: block; white-space: nowrap; color: var(--muted); font-size: 11px; }.account-switcher select { min-width: 230px; padding: 9px 12px; }
.topbar-status { margin-left: auto; display: flex; gap: 8px; }.environment-badge, .status-badge { display: inline-flex; align-items: center; min-height: 27px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .06em; }.environment-badge { color: var(--blue); background: rgba(125,183,255,.07); border-color: rgba(125,183,255,.2); }
.status-badge.healthy, .pill.healthy { color: var(--green); background: rgba(184,255,95,.07); border-color: rgba(184,255,95,.24); }.status-badge.warning, .pill.warning { color: var(--amber); background: rgba(255,203,102,.07); border-color: rgba(255,203,102,.24); }.status-badge.error, .pill.error { color: var(--red); background: rgba(255,107,107,.07); border-color: rgba(255,107,107,.24); }.status-badge.unknown, .pill.unknown, .pill.stopped { color: #aab2ad; background: rgba(170,178,173,.06); border-color: rgba(170,178,173,.2); }
.user-block { display: flex; align-items: center; gap: 10px; padding-left: 18px; border-left: 1px solid var(--line); }.user-block div { display: grid; text-align: right; }.user-block small { color: var(--muted); font-size: 10px; }.user-block > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #12160f; background: var(--green); font-weight: 900; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; font-size: 20px; }.topbar > .icon-button { display: none; }
#content { padding: clamp(24px, 4vw, 52px); max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }.page-head h1 { margin: 0; font-size: clamp(31px, 4vw, 48px); letter-spacing: -.055em; }.page-head p { margin: 8px 0 0; color: var(--muted); }.actions { display: flex; gap: 9px; flex-wrap: wrap; }
.hero-status { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 16px; margin-bottom: 16px; }.hero-card, .panel, .metric-card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #151b18, #111513); box-shadow: var(--shadow); }
.hero-card { padding: clamp(26px, 4vw, 45px); overflow: hidden; position: relative; }.hero-card::after { content: ""; width: 260px; height: 260px; position: absolute; right: -100px; top: -130px; border: 1px solid rgba(184,255,95,.17); border-radius: 50%; box-shadow: 0 0 0 45px rgba(184,255,95,.025); }.hero-card h2 { margin: 3px 0 18px; font-size: clamp(29px, 4vw, 54px); letter-spacing: -.06em; }.hero-card p { max-width: 700px; color: var(--muted); line-height: 1.65; }.hero-values { display: flex; gap: 26px; margin-top: 28px; flex-wrap: wrap; }.hero-values div { display: grid; gap: 4px; }.hero-values strong { font-size: 21px; }.hero-values small { color: var(--muted); }
.control-card { padding: 25px; display: grid; align-content: space-between; min-height: 250px; }.control-state { font-size: 54px; line-height: 1; font-weight: 800; letter-spacing: -.07em; }.control-card p { color: var(--muted); line-height: 1.5; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }.metric-card { padding: 19px; box-shadow: none; }.metric-card .label { color: var(--muted); font-size: 11px; }.metric-card .value { margin-top: 13px; font-size: 26px; font-weight: 790; letter-spacing: -.045em; }.metric-card .hint { margin-top: 7px; color: var(--faint); font-size: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }.panel { padding: 22px; box-shadow: none; }.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }.panel-head h2, .panel-head h3 { margin: 0; font-size: 17px; }.panel-head small { color: var(--muted); }
.list { display: grid; gap: 8px; }.list-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 58px; padding: 11px 13px; border: 1px solid #242b27; border-radius: 11px; background: rgba(255,255,255,.012); }.list-row-main { min-width: 0; }.list-row-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.list-row-main small { color: var(--muted); }.row-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }.data-table th, .data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }.data-table th { color: var(--muted); background: #111613; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }.data-table td { font-size: 12px; }.data-table tr:last-child td { border-bottom: 0; }.data-table tbody tr:hover { background: rgba(184,255,95,.025); }
.empty { display: grid; place-items: center; min-height: 190px; padding: 30px; border: 1px dashed #303a34; border-radius: 14px; color: var(--muted); text-align: center; }.empty strong { color: var(--ink); font-size: 18px; }.empty p { margin: 7px 0 0; }
.notice { padding: 13px 15px; border-left: 3px solid var(--amber); border-radius: 5px 11px 11px 5px; color: #cfc6b2; background: rgba(255,203,102,.06); font-size: 12px; line-height: 1.6; }.notice.safe { border-color: var(--green); background: rgba(184,255,95,.05); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }.form-grid .wide { grid-column: 1 / -1; }.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal { width: min(760px, calc(100vw - 28px)); max-height: min(88vh, 920px); padding: 0; border: 1px solid #3a443e; border-radius: 19px; color: var(--ink); background: var(--panel); box-shadow: 0 30px 100px rgba(0,0,0,.7); }.modal::backdrop { background: rgba(3,5,4,.76); backdrop-filter: blur(6px); }.modal-frame > header { display: flex; align-items: start; justify-content: space-between; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); }.modal-frame h2 { margin: 0; letter-spacing: -.035em; }.modal-body { padding: 23px 24px 26px; overflow-y: auto; max-height: calc(88vh - 90px); }
/* Korean wraps between words, never inside one ("바 / 로" on phones, 2026-09-22); a token longer than the line may still break. */
.modal, .notice { word-break: keep-all; overflow-wrap: anywhere; }
/* A button label never splits ("보 / 관" on phones, 2026-09-22); a row of buttons wraps to the next line instead. */
.button { white-space: nowrap; }
.form-actions { flex-wrap: wrap; }
.toast-region { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 9px; z-index: 100; }.toast { min-width: 280px; max-width: 440px; padding: 13px 15px; border: 1px solid #3b463f; border-radius: 12px; background: #1a211d; box-shadow: var(--shadow); font-size: 12px; animation: toast-in .2s ease-out; }.toast.error { border-color: rgba(255,107,107,.45); }.toast strong { display: block; margin-bottom: 3px; }
.loading { min-height: 320px; display: grid; place-items: center; color: var(--muted); }.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }.positive { color: var(--green); }.negative { color: var(--red); }.right { text-align: right; }
.mt-16 { margin-top: 16px; }.input-auto { width: auto; }.input-gap { margin-right: 8px; }.input-stage { width: 145px; }.input-weight { width: 80px; }
.code-input { min-height: 280px; white-space: pre; }
.code-input.compact-code { min-height: 90px; }
.backtest-report-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.backtest-report-metrics .metric-card { min-width: 0; }
.backtest-chart { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #0d1210; }
.backtest-chart svg { display: block; width: 100%; height: 180px; }
.backtest-chart path { stroke: var(--green); stroke-width: 2; }
.backtest-chart small { display: block; margin-top: 8px; color: var(--muted); text-align: right; }
@keyframes spin { to { transform: rotate(360deg); } } @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 1100px) { .metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.hero-status { grid-template-columns: 1fr; }.grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .auth-layout { grid-template-columns: 1fr; }.auth-story { min-height: 42vh; padding: 46px 30px; border-right: 0; border-bottom: 1px solid var(--line); }.auth-story h1 { font-size: 62px; }.auth-story .brand-mark { margin-bottom: 32px; }.auth-copy { font-size: 15px; }.auth-card { padding: 42px 26px 70px; }.app-layout { grid-template-columns: 1fr; }.sidebar { position: fixed; transform: translateX(-105%); transition: transform .2s; width: 250px; box-shadow: var(--shadow); }.app-layout.menu-open .sidebar { transform: translateX(0); }.topbar > .icon-button { display: inline-grid; }.topbar { padding: 12px 16px; gap: 10px; }.account-switcher label, .topbar-status, .user-block div { display: none; }.account-switcher { flex: 1; }.account-switcher select { min-width: 0; }.user-block { padding-left: 10px; }.grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { #content { padding: 25px 16px 60px; }.page-head { align-items: start; flex-direction: column; }.metrics-grid, .form-grid, .backtest-report-metrics { grid-template-columns: 1fr; }.form-grid .wide { grid-column: auto; }.hero-card { padding: 24px; }.hero-card h2 { font-size: 34px; }.control-state { font-size: 42px; }.modal-body, .modal-frame > header { padding-left: 17px; padding-right: 17px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* Phase 9.1 operations dashboard. The desktop editor uses persistent 24-column
   coordinates; occupied cells reject a drop instead of swapping widgets. */
#content:has(.operations-dashboard) { width: 100%; max-width: none; margin: 0; padding: 14px; }
.operations-dashboard { width: 100%; min-width: 0; --row: calc(64px * var(--dashboard-zoom)); font-size: calc(13px * var(--dashboard-zoom)); }
.operations-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.operations-toolbar h1 { margin: 0; font-size: clamp(28px, 3vw, 44px); letter-spacing: -.055em; }
.operations-toolbar small { color: var(--muted); }
.operations-controls { position: relative; display: flex; align-items: end; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.operations-controls label { min-width: 125px; gap: 4px; color: var(--muted); font-size: 10px; }
.operations-controls select { min-height: 40px; padding: 8px 10px; }
.operations-controls .button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.dashboard-mode { min-height: 40px; display: inline-flex; align-items: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #0d1210; font-size: 10px; font-weight: 700; white-space: nowrap; }.dashboard-mode.viewing { color: var(--green); border-color: rgba(184,255,95,.35); }.dashboard-mode.editing { color: var(--amber); border-color: rgba(255,190,92,.45); }
.dashboard-scale-control { min-width: 245px; display: grid; gap: 4px; color: var(--muted); font-size: 10px; }.dashboard-scale-control > div { display: grid; grid-template-columns: 34px minmax(100px,1fr) 42px 34px; align-items: center; gap: 5px; min-height: 40px; padding: 3px 5px; border: 1px solid var(--line); border-radius: 9px; background: #0d1210; }.dashboard-scale-control button { width: 32px; height: 32px; padding: 0; border: 1px solid #35423b; border-radius: 7px; color: var(--ink); background: #202923; cursor: pointer; font-size: 17px; }.dashboard-scale-control button:hover { border-color: var(--green); }.dashboard-scale-control input { width: 100%; padding: 0; accent-color: var(--green); }.dashboard-scale-control output { color: var(--green); text-align: center; font: 10px ui-monospace, monospace; }
.operations-context { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 16px; margin: -5px 2px 6px; padding: 0; border: 0; color: var(--faint); background: transparent; font-size: 9px; }
.widget-drawer { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin-bottom: 12px; padding: 12px 15px; border: 1px solid rgba(184,255,95,.25); border-radius: 13px; background: rgba(184,255,95,.04); }
.widget-drawer strong { margin-right: 5px; }.widget-drawer label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }.widget-drawer input { width: auto; }
.widget-grid { position: relative; width: 100%; height: var(--dashboard-height); min-height: 480px; display: grid; grid-template-columns: repeat(24, minmax(65px, 1fr)); grid-auto-rows: 40px; gap: 10px; align-content: start; align-items: stretch; padding: 10px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border: 1px solid #202a25; border-radius: 16px; background: #0d1210; }
.widget-grid.editing { border: 1px dashed rgba(184,255,95,.55); background-image: linear-gradient(rgba(184,255,95,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(184,255,95,.025) 1px, transparent 1px); background-size: 75px 50px; }
.dashboard-resize-bar { width: 100%; min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 5px; border: 1px solid rgba(184,255,95,.3); border-radius: 9px; color: var(--green); background: rgba(184,255,95,.055); cursor: ns-resize; touch-action: none; }.dashboard-resize-bar:hover, .dashboard-resize-bar.active { background: rgba(184,255,95,.12); }.dashboard-resize-bar small { color: var(--muted); font: 10px ui-monospace, monospace; }
.dashboard-widget { position: relative; width: auto; min-width: 0; max-width: none; height: auto; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid #27322d; border-radius: 14px; background: linear-gradient(160deg, #151c19, #101512); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.dashboard-widget:hover { border-color: #3d4d45; }.dashboard-widget.dragging { opacity: .45; }
.dashboard-widget.placement-conflict { opacity: .9; border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,91,91,.22); }.dashboard-widget.placement-conflict::after { content: "다른 위젯과 겹쳐 배치할 수 없습니다"; position: absolute; inset: 50% auto auto 50%; z-index: 80; width: max-content; max-width: calc(100% - 24px); padding: 8px 11px; border-radius: 8px; color: #fff; background: rgba(166,35,35,.95); transform: translate(-50%,-50%); font-size: 11px; font-weight: 700; text-align: center; }
.dashboard-widget.size-open { overflow: visible; z-index: 30; }
.dashboard-widget.maximized { position: fixed; left: calc(50% + 125px); top: 52%; width: min(1100px, calc(100vw - 330px)); height: min(720px, calc(100vh - 170px)); transform: translate(-50%, -50%); z-index: 40; box-shadow: 0 30px 120px rgba(0,0,0,.8); }
.widget-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); }
.widget-title { min-width: 0; flex: 1 1 auto; display: grid; padding: 0 3px; }.widget-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .96em; }.widget-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: .68em; }
.widget-actions { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 3px; flex-wrap: nowrap; }.widget-icon { flex: 0 0 auto; width: 28px; height: 28px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }.widget-icon:hover { color: var(--ink); background: #27302c; }
.widget-move-button, .widget-size-button { width: auto; min-width: 52px; padding: 0 7px; border: 1px solid #35433c; color: var(--ink); background: #202923; font-size: 10px; }
.widget-move-button { cursor: grab; touch-action: none; }.widget-move-button:active, .widget-move-button.active { cursor: grabbing; border-color: var(--green); color: var(--green); }
.widget-size-button[aria-expanded="true"] { border-color: var(--green); color: var(--green); }
.widget-body { min-height: 0; overflow: auto; padding: 12px; }.widget-loading { color: var(--muted); }
.resize-handle { position: absolute; width: 28px; height: 28px; bottom: 2px; z-index: 4; border: 0; background-color: transparent; touch-action: none; opacity: .85; }.resize-east { right: 2px; border-radius: 7px 0 10px; background-image: repeating-linear-gradient(135deg, transparent 0 4px, var(--green) 5px 7px); cursor: nwse-resize; }.resize-west { left: 2px; border-radius: 0 7px 0 10px; background-image: repeating-linear-gradient(45deg, transparent 0 4px, var(--green) 5px 7px); cursor: nesw-resize; }
.resize-handle:hover { opacity: 1; background-color: rgba(184,255,95,.12); }
.widget-grid:not(.editing) .resize-handle { display: none; }
.widget-grid:not(.editing) .widget-move-button { opacity: .65; }
.widget-size-panel { position: absolute; top: 42px; right: 8px; z-index: 50; width: min(330px, calc(100vw - 48px)); padding: 13px; border: 1px solid #4b5d53; border-radius: 12px; color: var(--ink); background: #18211c; box-shadow: 0 20px 55px rgba(0,0,0,.72); cursor: default; }
.widget-size-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }.widget-size-panel > header div { display: grid; }.widget-size-panel > header small { color: var(--muted); font-size: 10px; }.widget-size-panel > header button { width: 26px; height: 26px; border: 0; border-radius: 7px; color: var(--muted); background: #28332d; cursor: pointer; }
.widget-size-readout { display: block; margin-bottom: 11px; padding: 8px 10px; border-radius: 8px; color: var(--green); background: rgba(184,255,95,.07); font: 11px ui-monospace, monospace; }
.widget-size-panel label { display: grid; gap: 5px; margin-top: 9px; color: var(--muted); font-size: 10px; }.size-stepper { display: grid; grid-template-columns: 32px minmax(0,1fr) 32px; align-items: center; gap: 7px; }.size-stepper button { width: 32px; height: 30px; padding: 0; border: 1px solid #3b4941; border-radius: 7px; color: var(--ink); background: #202a24; cursor: pointer; font-size: 17px; }.size-stepper button:hover { border-color: var(--green); }.size-stepper input { width: 100%; padding: 0; accent-color: var(--green); }
.size-presets { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; margin-top: 13px; }.size-presets button { min-height: 31px; padding: 5px 3px; border: 1px solid #35423b; border-radius: 7px; color: var(--muted); background: #101713; cursor: pointer; font-size: 9px; }.size-presets button:hover { border-color: var(--green); color: var(--ink); }.widget-size-panel > p { margin: 10px 0 0; color: var(--faint); font-size: 9px; line-height: 1.45; }
.profile-menu { position: absolute; right: 0; top: calc(100% + 7px); z-index: 60; width: 210px; padding: 6px; border: 1px solid #3a463f; border-radius: 12px; background: #171e1a; box-shadow: var(--shadow); }
.profile-menu button { width: 100%; padding: 9px 11px; border: 0; border-radius: 8px; color: var(--ink); background: transparent; cursor: pointer; text-align: left; font-size: 12px; }.profile-menu button:hover { background: #28322d; }.profile-menu button.danger { color: #ff9696; }
.operations-legend { display: flex; align-items: center; gap: 14px; margin-top: 10px; color: var(--faint); font-size: 10px; }.operations-legend span:last-child { margin-left: auto; }
.kpi { display: grid; gap: 4px; margin-bottom: 14px; }.kpi small { color: var(--muted); }.kpi strong { font-size: 1.9em; letter-spacing: -.045em; }
.widget-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }.widget-metrics > div { min-width: 0; display: grid; gap: 3px; padding: 8px; border: 1px solid #26302b; border-radius: 9px; }.widget-metrics small { color: var(--muted); font-size: .72em; }.widget-metrics strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88em; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--faint); font-size: .74em; line-height: 1.5; }
.legend > span:not(.pill) { margin-right: 8px; }
.pill.buy { background: rgba(120, 160, 255, .16); color: #9fbcff; border-color: rgba(120, 160, 255, .35); }
.pill.sell { background: rgba(255, 170, 110, .16); color: #ffc08a; border-color: rgba(255, 170, 110, .35); }
.pill.cost { background: rgba(160, 160, 170, .14); color: var(--faint); border-color: rgba(160, 160, 170, .3); }
.record-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.record-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.record-when { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: .82em; }
.record-body summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; list-style: none; }
.record-body summary::-webkit-details-marker { display: none; }
.record-body summary::before { content: "▸"; color: var(--faint); }
.record-body[open] summary::before { content: "▾"; }
.record-module { font-size: .86em; }
.record-line { margin: 10px 0 0 18px; }
.record-line > span { display: block; font-size: .74em; margin-bottom: 2px; }
.record-line p, .record-line ul { margin: 0; line-height: 1.55; }
.record-line ul { padding-left: 18px; }
.record-line a { color: var(--accent, #9fbcff); word-break: break-all; }
.record-link { background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; }
.record-link:hover strong { text-decoration: underline; }
@media (max-width: 720px) { .record-row { grid-template-columns: 1fr; gap: 6px; } .record-when { flex-direction: row; } }
.code-hint { display: block; margin-top: 2px; font-size: .72em; font-weight: 400; color: var(--faint); letter-spacing: .02em; }
.data-note { margin: 10px 0 0; color: var(--faint); font-size: .7em; line-height: 1.45; }.up { color: #ff7979; }.down { color: #75aaff; }
.widget-table { height: 100%; overflow: auto; }.widget-table table { width: 100%; border-collapse: collapse; white-space: nowrap; }.widget-table th, .widget-table td { padding: 7px 8px; border-bottom: 1px solid #25302b; text-align: right; font-size: .76em; }.widget-table th { position: sticky; top: 0; color: var(--muted); background: #121815; }.widget-table th:first-child, .widget-table td:first-child { text-align: left; }.widget-table td button { display: grid; padding: 0; border: 0; color: var(--ink); background: none; cursor: pointer; text-align: left; }.widget-table td button small { color: var(--muted); }
.widget-table td:first-child > strong, .widget-table td:first-child > small { display: block; }.widget-table td:first-child > small { color: var(--muted); font-size: .82em; }
.portfolio-bars { display: grid; gap: 11px; }.portfolio-bars > div { display: grid; gap: 5px; }.portfolio-bars header { display: flex; align-items: end; justify-content: space-between; gap: 12px; }.portfolio-bars header span { min-width: 0; display: grid; }.portfolio-bars header strong, .portfolio-bars header small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.portfolio-bars header small { color: var(--muted); font-size: .68em; }.portfolio-bar { height: 9px; overflow: hidden; border-radius: 999px; background: #26302b; }.portfolio-bar i { display: block; height: 100%; border-radius: inherit; background: #75aaff; }.portfolio-bar i.up { background: #ff7979; }
.symbol-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }.symbol-line > div:first-child { display: grid; }.symbol-line span { color: var(--muted); font-size: .75em; }.segment { padding: 5px 8px; border: 1px solid var(--line); color: var(--muted); background: #101512; cursor: pointer; }.segment:first-child { border-radius: 7px 0 0 7px; }.segment:last-child { border-radius: 0 7px 7px 0; }.segment.active { color: #101512; background: var(--green); border-color: var(--green); }
.price-chart { width: 100%; height: calc(100% - 55px); min-height: 110px; overflow: visible; }.chart-foot { display: flex; justify-content: space-between; color: var(--faint); font-size: .68em; }
.order-book { display: grid; gap: 3px; }.order-book > div { display: grid; grid-template-columns: 1fr 24px 1fr; align-items: center; gap: 5px; font-size: .72em; }.order-book b { color: var(--faint); text-align: center; }.order-book span { display: flex; justify-content: space-between; padding: 4px 5px; border-radius: 5px; }.order-book .ask { color: #7fb0ff; background: rgba(75,132,255,.08); }.order-book .bid { color: #ff8b8b; background: rgba(255,80,80,.08); }.order-book small { opacity: .72; }
.status-stack, .compact-list { display: grid; gap: 6px; }.status-stack > div, .compact-list > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 6px 8px; border-bottom: 1px solid #25302b; }.compact-list span { min-width: 0; display: grid; }.compact-list strong, .compact-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.compact-list small { color: var(--muted); font-size: .68em; }
.indicator-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }.indicator-grid > div { min-width: 0; display: grid; padding: 7px; border: 1px solid #25302b; border-radius: 8px; }.indicator-grid span { font-size: .75em; }.indicator-grid strong { margin: 3px 0; font-size: 1.2em; }.indicator-grid small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: .58em; }
.health-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px 10px; }.health-grid > div { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 5px; border-bottom: 1px solid #25302b; }.health-grid span:nth-child(2) { min-width: 0; display: grid; }.health-grid strong, .health-grid small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.health-grid small { color: var(--muted); font-size: .62em; }.health-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }.health-dot.healthy { background: var(--green); }.health-dot.warning { background: var(--amber); }.health-dot.error { background: var(--red); }
.widget-unavailable, .zero-state { height: 100%; min-height: 90px; display: grid; place-content: center; gap: 5px; padding: 16px; color: var(--muted); text-align: center; }.widget-unavailable strong { color: var(--ink); }.widget-unavailable span { max-width: 360px; font-size: .75em; line-height: 1.5; }
.density-compact .widget-body { padding: 7px; }.density-compact .widget-head { min-height: 42px; }.density-detailed .widget-body { padding: 16px; }.density-detailed .data-note { font-size: .76em; }

@media (max-width: 1200px) { .operations-toolbar { align-items: start; flex-direction: column; }.operations-controls { justify-content: flex-start; }.indicator-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }.dashboard-widget.maximized { left: 50%; width: min(1050px, calc(100vw - 48px)); } }
@media (max-width: 820px) { #content:has(.operations-dashboard) { padding: 8px; }.operations-controls { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }.operations-controls label, .operations-controls .button, .dashboard-scale-control { min-width: 0; }.dashboard-scale-control { grid-column: 1 / -1; }.operations-context { justify-content: flex-start; flex-wrap: wrap; }.widget-grid, .widget-grid.editing { display: flex; flex-flow: column nowrap; height: max(560px, var(--dashboard-height)); min-height: 560px; padding: 6px; background: #0d1210; }.dashboard-widget { flex: 0 0 max(90px, calc(var(--widget-rows) * 40px)); width: 100%; min-width: 0; min-height: 90px; }.dashboard-widget.maximized { left: 12px; top: 12px; width: calc(100vw - 24px); height: calc(100vh - 24px); transform: none; }.widget-size-panel { position: fixed; top: 72px; right: 16px; left: 16px; width: auto; }.health-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .operations-controls { grid-template-columns: 1fr; }.operations-context > span { display: none; }.indicator-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.widget-metrics { grid-template-columns: 1fr; }.operations-legend { flex-wrap: wrap; }.operations-legend span:last-child { margin-left: 0; } }
.dashboard-phone-note { display: none; }
/* 휴대폰: 저장된 PC 좌표·크기와 상관없이 위젯을 한 줄에 하나씩 쌓고 높이는 내용에 맞춘다.
   작은 화면에서 끌어서 옮기거나 크기를 바꾸기 어렵다는 소유자 요청(2026-09-23)에 따라 이동·크기·
   작업영역 높이 조절은 숨기고 PC에서만 편집한다. Profile은 바꾸지 않으므로 PC 배치는 그대로다.
   아주 긴 표만 위젯 안에서 스크롤한다. */
@media (max-width: 820px) { .dashboard-phone-note { display: block; margin: 0 2px 10px; color: var(--faint); font-size: 12px; line-height: 1.5; word-break: keep-all; }.widget-grid, .widget-grid.editing { height: auto; min-height: 0; overflow: visible; padding: 0; gap: 12px; border: 0; background: none; }.dashboard-widget { flex: 0 0 auto; height: auto; min-height: 0; }.dashboard-widget .widget-body { max-height: 75vh; overflow: auto; }.widget-move-button, .widget-size-button, .resize-handle, .dashboard-resize-bar, .widget-drawer, .widget-size-panel, [data-dashboard="fit"], [data-dashboard="edit"], .dashboard-mode, [data-dashboard="save"]:disabled { display: none; } }
/* Module settings form (admin, 2026-09-22) */
.config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.config-field { display: flex; flex-direction: column; gap: 6px; }
.config-field > span { display: flex; flex-direction: column; }
.config-input { display: flex; align-items: center; gap: 8px; }
.config-input input { flex: 1; }
.config-input span { color: var(--muted); font-size: 12px; min-width: 18px; }
@media (max-width: 720px) { .config-grid { grid-template-columns: 1fr; } }
