:root {
    --bg: #f4f7fb;
    --bg-deep: #eaf1f7;
    --panel: #ffffff;
    --panel-2: #f8fbff;
    --line: #d8e3ee;
    --line-soft: #e8eff5;
    --text: #14263b;
    --muted: #627488;
    --cyan: #0d88b8;
    --blue: #3978d8;
    --green: #098a63;
    --amber: #a96f12;
    --red: #d55252;
    --violet: #7658d6;
    --sidebar: 260px;
    --radius: 12px;
    color-scheme: light;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-deep); }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 82% 0%, rgba(52, 115, 142, .12), transparent 31%),
        linear-gradient(180deg, #08131c 0%, #071019 100%);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar);
    display: flex;
    flex-direction: column;
    padding: 26px 18px 18px;
    background: rgba(5, 13, 20, .96);
    border-right: 1px solid var(--line-soft);
    z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand strong { display: block; font-size: 15px; letter-spacing: .03em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 4px); align-items: end; gap: 3px; width: 22px; height: 24px; padding: 4px; border: 1px solid #28404b; border-radius: 4px; background: #0c1b23; }
.brand-mark i { display: block; background: var(--cyan); border-radius: 1px; }
.brand-mark i:nth-child(1) { height: 7px; opacity: .55; }
.brand-mark i:nth-child(2) { height: 14px; }
.brand-mark i:nth-child(3) { height: 10px; opacity: .8; }

.nav-list { display: grid; gap: 5px; margin-top: 46px; }
.nav-list a { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 13px; color: #8c9aa5; border: 1px solid transparent; border-radius: 8px; transition: .2s ease; }
.nav-list a:hover { color: var(--text); background: #0b1821; }
.nav-list a.active { color: var(--text); background: linear-gradient(90deg, rgba(77, 151, 164, .16), rgba(77, 151, 164, .05)); border-color: #1f3943; }
.nav-list a.active::after { content: ""; width: 3px; height: 20px; margin-left: auto; background: var(--cyan); border-radius: 4px; box-shadow: 0 0 14px rgba(103, 214, 221, .5); }
.nav-index { color: #55707b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.nav-list a.active .nav-index { color: var(--cyan); }

.sidebar-status { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 14px; border: 1px solid #1d2c36; border-radius: 9px; background: #09141c; }
.sidebar-status small, .sidebar-status strong { display: block; }
.sidebar-status small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.sidebar-status strong { margin-top: 2px; font-size: 12px; }
.status-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(227, 183, 98, .08); }
.status-dot.danger { background: var(--red); box-shadow: 0 0 0 4px rgba(239, 110, 104, .1); }
.status-dot.good { background: var(--green); box-shadow: 0 0 0 4px rgba(99, 215, 165, .1); }
.sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 8px 0; color: var(--muted); font-size: 12px; }
.sidebar-foot form { margin: 0; }
.sidebar-foot button { padding: 0; color: #72818c; background: none; border: 0; cursor: pointer; }
.sidebar-foot button:hover { color: var(--text); }

.main-area { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--line-soft); background: rgba(7, 16, 25, .86); backdrop-filter: blur(16px); }
.environment-chip { display: inline-flex; align-items: center; gap: 8px; color: #a8b7c0; font-size: 11px; letter-spacing: .05em; }
.environment-chip span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(99, 215, 165, .65); }
.topbar-right { display: flex; align-items: baseline; gap: 10px; color: #a8b7c0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.topbar-right time { font-size: 13px; }
.timezone { color: #526672; font-size: 10px; }
.menu-button { display: none; padding: 7px 10px; color: var(--text); border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.content-wrap { width: min(1500px, 100%); margin: 0 auto; padding: 38px 34px 70px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.page-head h1 { margin: 6px 0 7px; font-size: clamp(28px, 3vw, 42px); line-height: 1.1; letter-spacing: -.035em; }
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }
.eyebrow, .section-kicker { color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.dashboard-head { align-items: center; }

.gate-card { min-width: 330px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid #284348; border-radius: 10px; background: rgba(24, 52, 55, .32); }
.gate-card.locked { border-color: rgba(239, 110, 104, .34); background: rgba(74, 29, 31, .24); }
.gate-card small, .gate-card strong { display: block; }
.gate-card small { color: var(--muted); font-size: 9px; letter-spacing: .11em; }
.gate-card strong { margin-top: 2px; color: var(--green); letter-spacing: .08em; }
.gate-card.locked strong { color: var(--red); }
.gate-caption { color: #a8b7c0; font-size: 11px; }
.gate-icon, .large-lock { position: relative; display: block; width: 28px; height: 22px; margin-top: 7px; border: 2px solid var(--red); border-radius: 4px; }
.gate-icon::before, .large-lock::before { content: ""; position: absolute; left: 5px; bottom: 17px; width: 14px; height: 12px; border: 2px solid var(--red); border-bottom: 0; border-radius: 10px 10px 0 0; }
.gate-icon::after, .large-lock::after { content: ""; position: absolute; top: 7px; left: 11px; width: 3px; height: 7px; border-radius: 2px; background: var(--red); }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metric-card { position: relative; overflow: hidden; min-height: 132px; padding: 19px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(17, 31, 43, .94), rgba(10, 22, 31, .94)); }
.metric-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: #3b5662; }
.metric-card span, .metric-card small { display: block; }
.metric-card span { color: #91a1ac; font-size: 11px; letter-spacing: .04em; }
.metric-card strong { display: block; margin: 10px 0 3px; font-size: 29px; line-height: 1; font-weight: 650; letter-spacing: -.03em; }
.metric-card small { color: #576b77; font-size: 11px; }
.metric-card.accent-blue::before { background: var(--blue); }
.metric-card.accent-amber::before { background: var(--amber); }
.metric-card.accent-violet::before { background: var(--violet); }
.metric-card.accent-green::before { background: var(--green); }
.metric-card .negative, .negative { color: #f08b85; }
.metric-card .textual { font-size: 20px; }

.section-grid { display: grid; gap: 18px; margin-bottom: 18px; }
.section-grid.two-thirds { grid-template-columns: minmax(0, 2fr) minmax(280px, .9fr); }
.section-grid.detail-columns { grid-template-columns: 1fr 1fr; }
.section-grid.three-columns { grid-template-columns: repeat(3, 1fr); }
.panel { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13, 24, 34, .9); box-shadow: 0 18px 50px rgba(0, 0, 0, .08); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.panel-head h2 { margin: 3px 0 0; font-size: 17px; font-weight: 600; }
.panel-head a { color: var(--cyan); font-size: 11px; }
.muted { color: var(--muted); font-size: 11px; }

.portfolio-list { display: grid; }
.portfolio-row { display: grid; grid-template-columns: minmax(250px, 1.7fr) repeat(3, minmax(85px, .6fr)) 20px; align-items: center; gap: 14px; padding: 15px 4px; border-top: 1px solid var(--line-soft); transition: .2s ease; }
.portfolio-row:hover { padding-left: 9px; background: rgba(255, 255, 255, .015); }
.portfolio-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.portfolio-name strong, .portfolio-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-name strong { font-size: 13px; }
.portfolio-name small { margin-top: 3px; color: #657782; font-size: 10px; }
.strategy-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; color: var(--cyan); border: 1px solid #28404a; border-radius: 7px; background: #0b1a23; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.strategy-avatar.large { width: 42px; height: 42px; flex-basis: 42px; }
.portfolio-stat span, .portfolio-stat strong { display: block; }
.portfolio-stat span { color: #586b76; font-size: 9px; text-transform: uppercase; }
.portfolio-stat strong { margin-top: 3px; font-size: 12px; }
.row-arrow { color: #46616d; transition: .2s ease; }
.portfolio-row:hover .row-arrow { color: var(--cyan); transform: translateX(3px); }

.control-stack { display: grid; }
.control-line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); color: #9cabb4; font-size: 12px; }
.control-line strong { color: var(--text); }
.control-line .state-off { color: var(--red); }
.control-note { margin: 18px 0; padding: 13px; border: 1px solid #253640; border-radius: 8px; background: #09141c; }
.control-note span { color: var(--amber); font-size: 10px; font-weight: 700; }
.control-note p { margin: 5px 0 0; color: #748691; font-size: 11px; }
.secondary-button, .primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 7px; font-weight: 650; cursor: pointer; }
.secondary-button { color: #c8d5da; border: 1px solid #2b414b; background: #10212a; }
.secondary-button:hover { border-color: #3d6570; }
.primary-button { color: #061116; border: 0; background: var(--cyan); }
.full { width: 100%; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 12px; color: #5c707b; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
td { padding: 13px 12px; color: #aab8c0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.symbol { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.status-badge { display: inline-flex; padding: 3px 7px; color: var(--amber); border: 1px solid rgba(227, 183, 98, .25); border-radius: 4px; background: rgba(227, 183, 98, .05); font-size: 10px; }
.empty-state { display: grid; place-items: center; min-height: 120px; padding: 20px; color: #647782; border: 1px dashed #243640; border-radius: 8px; text-align: center; font-size: 12px; }
.empty-state.horizontal { min-height: 90px; }
.empty-state.horizontal p { margin: 3px 0 0; }
.span-all { grid-column: 1 / -1; }

.head-stat { min-width: 145px; padding-left: 18px; border-left: 1px solid var(--line); }
.head-stat span, .head-stat strong, .head-stat small { display: block; }
.head-stat span, .head-stat small { color: var(--muted); font-size: 10px; }
.head-stat strong { margin: 2px 0; font-size: 25px; }
.danger-stat strong { color: var(--red); }
.filter-bar { display: grid; grid-template-columns: minmax(230px, 1.6fr) repeat(3, minmax(140px, .65fr)) auto; gap: 9px; margin-bottom: 18px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(13, 24, 34, .72); }
.filter-bar input, .filter-bar select { min-height: 40px; padding: 0 12px; color: #b7c4ca; border: 1px solid #233642; border-radius: 6px; outline: 0; background: #09151e; }
.filter-bar input:focus, .filter-bar select:focus { border-color: #3b6e77; box-shadow: 0 0 0 3px rgba(103, 214, 221, .06); }
.filter-bar button { min-height: 40px; padding: 0 18px; color: #061116; border: 0; border-radius: 6px; background: var(--cyan); cursor: pointer; font-weight: 700; }
.strategy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.strategy-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, rgba(16, 30, 41, .95), rgba(9, 20, 28, .95)); transition: .2s ease; }
.strategy-card:hover { transform: translateY(-2px); border-color: #34505c; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); }
.strategy-card-top, .strategy-card-foot, .gate-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.type-pill, .lifecycle-pill { display: inline-flex; align-items: center; min-height: 21px; padding: 0 7px; border-radius: 4px; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; }
.type-pill { color: var(--cyan); border: 1px solid rgba(103, 214, 221, .22); background: rgba(103, 214, 221, .05); }
.lifecycle-pill { color: var(--amber); border: 1px solid rgba(227, 183, 98, .22); background: rgba(227, 183, 98, .05); }
.strategy-title { display: flex; align-items: center; gap: 13px; margin: 22px 0 18px; }
.strategy-title h2 { overflow: hidden; margin: 0; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.strategy-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.gate-line { justify-content: flex-start; padding: 9px 10px; color: #c48b89; border: 1px solid rgba(239, 110, 104, .13); border-radius: 6px; background: rgba(239, 110, 104, .035); font-size: 10px; }
.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.mini-metrics div { min-width: 0; padding: 9px; border: 1px solid var(--line-soft); border-radius: 6px; background: rgba(5, 13, 20, .35); }
.mini-metrics span, .mini-metrics strong { display: block; }
.mini-metrics span { color: #526672; font-size: 8px; text-transform: uppercase; }
.mini-metrics strong { margin-top: 3px; font-size: 12px; }
.strategy-card-foot { padding-top: 13px; color: #637681; border-top: 1px solid var(--line-soft); font-size: 10px; }
.strategy-card-foot span:last-child { color: var(--cyan); }

.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); font-size: 11px; }
.back-link:hover { color: var(--cyan); }
.detail-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 20px; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(130deg, rgba(19, 38, 50, .95), rgba(9, 20, 29, .98)); }
.detail-hero h1 { margin: 10px 0 5px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.035em; }
.detail-hero p { margin: 0; color: var(--muted); }
.detail-tags { display: flex; gap: 7px; }
.detail-gate { min-width: 230px; padding: 14px 16px; border-left: 2px solid var(--red); background: rgba(239, 110, 104, .035); }
.detail-gate small, .detail-gate strong, .detail-gate span { display: block; }
.detail-gate small { color: #7b8b95; font-size: 9px; letter-spacing: .1em; }
.detail-gate strong { margin: 4px 0; color: #f08c86; font-size: 13px; }
.detail-gate span { color: #6c7d87; font-size: 10px; }
.detail-metrics { margin-bottom: 18px; }
.member-list { display: grid; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.member-row > div { display: flex; align-items: center; gap: 10px; }
.member-row > span { color: var(--cyan); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.member-index { color: #506772; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.check-list { display: grid; }
.check-list > div { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.check { display: inline-grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; font-size: 11px; }
.check.done { color: var(--green); border: 1px solid rgba(99, 215, 165, .3); background: rgba(99, 215, 165, .06); }
.check.pending { color: var(--amber); border: 1px solid rgba(227, 183, 98, .3); background: rgba(227, 183, 98, .06); }
.check-list p { margin: 0; }
.check-list strong, .check-list small { display: block; }
.check-list strong { font-size: 12px; }
.check-list small { margin-top: 2px; color: #667984; font-size: 10px; }
.evidence-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.evidence-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.evidence-list span { color: #4f6772; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.evidence-list p { margin: 0; color: #9cabb4; font-size: 11px; }
.source-list { display: grid; gap: 8px; }
.source-list code { overflow-wrap: anywhere; padding: 9px 10px; color: #86a3ae; border: 1px solid var(--line-soft); border-radius: 5px; background: #08131b; font-size: 10px; }

.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.source-card { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(17, 31, 43, .96), rgba(8, 19, 27, .96)); transition: .2s ease; }
.source-card:hover { transform: translateY(-2px); border-color: #36545f; box-shadow: 0 18px 42px rgba(0, 0, 0, .18); }
.source-card-top, .source-card-top > div { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.source-card h2 { margin: 20px 0 5px; font-size: 18px; }
.source-card > p { margin: 0; color: var(--muted); font-size: 11px; }
.source-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0 15px; }
.source-facts span { min-width: 0; padding: 10px; border: 1px solid var(--line-soft); border-radius: 6px; background: rgba(4, 12, 18, .38); }
.source-facts small, .source-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-facts small { color: #5d707a; font-size: 9px; }
.source-facts strong { margin-top: 4px; font-size: 11px; }
.source-error { margin: 12px 0; padding: 9px 11px; overflow-wrap: anywhere; color: #ed918c; border: 1px solid rgba(239, 110, 104, .22); border-radius: 6px; background: rgba(239, 110, 104, .05); font-size: 10px; }
.source-error.large { margin-top: 18px; }
.source-hero .detail-gate.source-good { border-left-color: var(--green); background: rgba(99, 215, 165, .035); }
.source-hero .detail-gate.source-good strong { color: var(--green); }
.pairing-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 21px 24px; border: 1px solid rgba(103, 214, 221, .35); border-radius: 12px; background: linear-gradient(120deg, rgba(20, 64, 72, .35), rgba(12, 27, 36, .92)); }
.pairing-banner h2 { margin: 5px 0; color: var(--cyan); font: 23px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .035em; overflow-wrap: anywhere; }
.pairing-banner > strong { color: var(--cyan); font: 23px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .035em; overflow-wrap: anywhere; }
.pairing-banner p { margin: 0; color: #81949e; font-size: 11px; }
.pairing-expiry { flex: 0 0 auto; padding: 8px 10px; color: var(--amber); border: 1px solid rgba(227, 183, 98, .3); border-radius: 5px; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.source-action-form { margin-top: 10px; }
.source-download { margin-top: 10px; }
.source-history-grid { align-items: start; }
.sync-run-list { display: grid; }
.sync-run-list > div:not(.empty-state) { display: flex; align-items: flex-start; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.sync-run-list .status-dot { margin-top: 5px; flex: 0 0 auto; }
.sync-run-list p { margin: 0; min-width: 0; }
.sync-run-list strong, .sync-run-list small { display: block; }
.sync-run-list strong { font-size: 11px; }
.sync-run-list small { margin-top: 3px; overflow-wrap: anywhere; color: #637782; font-size: 9px; }

.paper-stamp { padding: 10px 16px; color: var(--green); border: 2px solid rgba(99, 215, 165, .45); border-radius: 7px; transform: rotate(-2deg); text-align: center; font: 17px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.paper-stamp small { font-size: 8px; letter-spacing: .08em; }
.page-head-actions, .account-actions { display: flex; align-items: center; gap: 14px; }
.account-actions form { margin: 0; }
.account-list { display: grid; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.account-row:hover strong { color: var(--cyan); }
.account-row strong, .account-row small { display: block; }
.account-row small { margin-top: 3px; color: #657782; font-size: 10px; }
.account-row-state { text-align: right; }
.status-badge.good { color: var(--green); border-color: rgba(99, 215, 165, .28); background: rgba(99, 215, 165, .05); }
.status-badge.danger { color: var(--red); border-color: rgba(239, 110, 104, .28); background: rgba(239, 110, 104, .05); }
.status-badge.warning { color: var(--amber); border-color: rgba(227, 183, 98, .28); background: rgba(227, 183, 98, .06); }
.status-reason { display: block; max-width: 170px; margin-top: 4px; color: #788b9d; font-size: 9px; line-height: 1.35; white-space: normal; }
.execution-lock-panel { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 22px; margin-bottom: 18px; padding: 24px; border: 1px solid rgba(239, 110, 104, .28); border-radius: 13px; background: linear-gradient(110deg, rgba(63, 27, 30, .34), rgba(18, 28, 36, .86)); }
.execution-lock-panel.active { border-color: rgba(99, 215, 165, .34); background: linear-gradient(110deg, rgba(22, 68, 53, .3), rgba(18, 28, 36, .86)); }
.large-lock { width: 42px; height: 34px; margin: 14px auto 0; }
.large-lock::before { left: 7px; bottom: 29px; width: 24px; height: 18px; }
.large-lock::after { top: 11px; left: 18px; height: 10px; }
.execution-lock-panel.active .large-lock { border-color: var(--green); }
.execution-lock-panel.active .large-lock::before { border-color: var(--green); transform: translate(9px, -2px) rotate(12deg); transform-origin: left bottom; }
.execution-lock-panel.active .large-lock::after { background: var(--green); }
.execution-lock-panel h2 { margin: 4px 0; font-size: 20px; }
.execution-lock-panel p { max-width: 680px; margin: 0; color: #8b9aa3; font-size: 12px; }
.lock-facts { display: grid; gap: 7px; min-width: 170px; }
.lock-facts span { display: flex; justify-content: space-between; gap: 16px; color: #6e808a; font-size: 9px; text-transform: uppercase; }
.lock-facts strong.good { color: var(--green); }
.lock-facts strong.danger { color: var(--red); }
.compact-list { display: grid; }
.compact-list div { display: flex; justify-content: space-between; padding: 9px 0; color: #8fa0a9; border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.flow-panel { overflow: hidden; }
.flow-track { display: flex; align-items: center; justify-content: space-between; gap: 8px; overflow-x: auto; padding: 20px 5px 8px; }
.flow-track span { flex: 0 0 auto; min-width: 76px; padding: 8px 10px; color: #92a1aa; border: 1px solid #263b46; border-radius: 6px; background: #0a1720; text-align: center; font-size: 10px; }
.flow-track i { width: 28px; height: 1px; flex: 0 0 28px; background: #2c4651; }

.bind-layout { align-items: start; }
.bind-form-panel { padding: 25px; }
.secure-form { display: grid; gap: 16px; }
.form-field { display: grid; gap: 7px; }
.form-field label { color: #9cabb3; font-size: 11px; }
.form-field input { width: 100%; min-height: 46px; padding: 0 13px; color: var(--text); border: 1px solid #283d48; border-radius: 7px; outline: 0; background: #09161f; }
.form-field input:focus { border-color: #4d7c86; box-shadow: 0 0 0 3px rgba(103, 214, 221, .06); }
.field-error { color: #ef8c87; font-size: 10px; }
.confirm-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px; color: #a8b7c0; border: 1px solid #263a45; border-radius: 7px; background: #09151e; font-size: 11px; cursor: pointer; }
.confirm-row input { margin: 3px 0 0; accent-color: var(--cyan); }
.credential-note { margin-top: 18px; padding: 14px; border: 1px solid rgba(103, 214, 221, .18); border-radius: 8px; background: rgba(103, 214, 221, .035); }
.credential-note strong { color: var(--cyan); font-size: 10px; letter-spacing: .08em; }
.credential-note p { margin: 5px 0 0; color: #748691; font-size: 11px; }
.binding-policy .control-line { align-items: flex-start; }
.binding-policy .control-line strong { max-width: 58%; overflow-wrap: anywhere; text-align: right; }
.form-error ul { margin: 0; padding-left: 18px; }

.account-hero { align-items: center; }
.compact-lock { padding-top: 18px; padding-bottom: 18px; }
.performance-panel { margin-bottom: 18px; }
.performance-head { align-items: center; }
.period-switch { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line-soft); border-radius: 6px; background: #09141c; }
.period-switch a { min-width: 36px; padding: 6px 8px; color: #71838d; border-radius: 4px; text-align: center; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.period-switch a:hover, .period-switch a.active { color: #071219; background: var(--cyan); }
.performance-metrics { grid-template-columns: repeat(4, 1fr); margin: 0 0 14px; }
.performance-metrics .metric-card { min-height: 106px; }
.performance-metrics .metric-card strong { font-size: 24px; }
.metric-card.accent-red::before { background: var(--red); }
.equity-chart-wrap { min-height: 280px; padding: 8px 5px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(7, 22, 30, .45), rgba(7, 15, 22, .15)); }
#equityChart { display: block; width: 100%; height: 280px; }
.drawdown-panel, .monthly-returns-panel { margin-bottom: 18px; }
.drawdown-value { color: var(--red); font-size: 13px; }
.drawdown-chart-wrap { min-height: 250px; padding: 8px 5px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(255, 245, 245, .8), rgba(248, 251, 254, .35)); }
#drawdownChart { display: block; width: 100%; height: 250px; }
.performance-foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; color: #61747f; font-size: 10px; }
.monthly-returns-wrap { overflow-x: auto; }
.monthly-returns-table { min-width: 880px; table-layout: fixed; }
.monthly-returns-table th, .monthly-returns-table td { padding: 9px 7px; text-align: center; }
.monthly-returns-table thead th { color: #6d8093; background: #f4f8fb; }
.monthly-returns-table tbody th { color: var(--text); font-size: 11px; }
.monthly-returns-table td { border: 3px solid #fff; font-weight: 700; }
.monthly-returns-table td.positive { color: #087d5c; background: #e9f8f0; }
.monthly-returns-table td.negative { color: #bd4e4e; background: #fff0f0; }
.monthly-returns-table td.neutral { color: #7b8da0; background: #f3f7fa; }
.monthly-returns-table .average-row { border-top: 1px solid var(--line); }
.monthly-returns-table .average-row td { border-top: 0; background: transparent; }
.preview-panel { margin-bottom: 18px; }
.preview-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.preview-summary span { padding: 5px 8px; color: #6e808a; border: 1px solid var(--line-soft); border-radius: 5px; background: #09141c; font-size: 9px; }
.preview-summary strong { margin-left: 4px; color: var(--text); }
.preview-notice { margin-bottom: 14px; padding: 10px 12px; color: #bea76e; border: 1px solid rgba(227, 183, 98, .22); border-radius: 6px; background: rgba(227, 183, 98, .045); font-size: 10px; }
.cell-note { display: block; max-width: 260px; margin-top: 4px; color: #5f727d; font-size: 9px; white-space: normal; }
.cell-note.warning { color: #bd8783; }
.action-pill { display: inline-flex; padding: 3px 7px; border: 1px solid #2a3e49; border-radius: 4px; background: #0a1720; font-size: 9px; white-space: nowrap; }
.action-pill.buy { color: var(--green); border-color: rgba(99, 215, 165, .25); }
.action-pill.sell { color: var(--red); border-color: rgba(239, 110, 104, .25); }
.action-pill.excluded, .action-pill.unmanaged, .action-pill.blocked { color: var(--amber); border-color: rgba(227, 183, 98, .25); }
.positive { color: var(--green); }
.account-history-grid { align-items: start; }
.positions-panel, .order-log-panel { margin-bottom: 18px; }
.positions-table td, .order-log-table td { white-space: nowrap; }
.positions-table .position-name { color: var(--text); font-weight: 650; }
.positions-table .position-code { color: #557187; }
.quantity-cell { color: var(--green); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.direction-pill, .order-type-pill, .trigger-pill { display: inline-flex; align-items: center; padding: 3px 7px; border: 1px solid #2a3e49; border-radius: 4px; background: #0a1720; font-size: 9px; white-space: nowrap; }
.direction-pill.long, .direction-pill.buy { color: var(--green); border-color: rgba(99, 215, 165, .28); background: rgba(99, 215, 165, .06); }
.direction-pill.short, .direction-pill.sell { color: var(--red); border-color: rgba(239, 110, 104, .28); background: rgba(239, 110, 104, .06); }
.order-type-pill, .trigger-pill { color: #9fb1ba; border-color: #2b414b; }
.reason-cell { min-width: 220px; max-width: 340px; overflow: hidden; color: #81939d; text-overflow: ellipsis; }
.time-cell { color: #71838d; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.account-snapshot-facts .control-line strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.risk-list { display: grid; gap: 10px; margin-bottom: 18px; }
.risk-card { display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 16px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 10px; background: rgba(13, 24, 34, .88); }
.risk-priority { display: inline-grid; place-items: center; width: 42px; height: 28px; border-radius: 5px; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.risk-priority.p0 { color: #ff9a94; border: 1px solid rgba(239, 110, 104, .34); background: rgba(239, 110, 104, .08); }
.risk-priority.p1 { color: var(--amber); border: 1px solid rgba(227, 183, 98, .3); background: rgba(227, 183, 98, .07); }
.risk-card h2 { margin: 0 0 3px; font-size: 14px; }
.risk-card p { margin: 0; color: #788a94; font-size: 11px; }
.risk-state { padding: 4px 8px; color: #94a5ad; border: 1px solid #2a3c46; border-radius: 4px; font-size: 10px; }

.message { margin-bottom: 14px; padding: 12px 14px; border: 1px solid #2a4f58; border-radius: 7px; background: #0d252d; }
.message.error { color: #ffd0cc; border-color: rgba(239, 110, 104, .45); background: rgba(74, 29, 31, .38); }
.message.success { color: #c9f5df; border-color: rgba(99, 215, 165, .35); background: rgba(28, 77, 59, .28); }
.nav-alert-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: auto; padding: 0 5px; color: #16090a; border-radius: 10px; background: var(--red); font-size: 10px; line-height: 1; }
.nav-alert-count[hidden] { display: none; }
.alert-stack { display: grid; gap: 9px; margin-bottom: 18px; }
.alert-card { display: block; padding: 13px 15px; border: 1px solid rgba(239, 110, 104, .4); border-left: 3px solid var(--red); border-radius: 8px; background: rgba(74, 29, 31, .3); }
.alert-card.warning { border-color: rgba(227, 183, 98, .4); border-left-color: var(--amber); background: rgba(74, 57, 28, .24); }
.alert-card.critical { border-color: rgba(239, 110, 104, .65); box-shadow: 0 0 20px rgba(239, 110, 104, .08); }
.alert-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.alert-card-head strong { color: #ffd5d0; font-size: 12px; }
.alert-card.warning .alert-card-head strong { color: #f1d18e; }
.alert-card-head span { color: var(--red); font-size: 10px; }
.alert-card.warning .alert-card-head span { color: var(--amber); }
.alert-card p { margin: 4px 0; color: #d5b3b0; font-size: 12px; }
.alert-card small { color: #a47c7a; font-size: 10px; }
.alert-ledger { display: grid; gap: 10px; }
.alert-ledger-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 16px; border: 1px solid rgba(239, 110, 104, .3); border-left: 3px solid var(--red); border-radius: 8px; background: rgba(74, 29, 31, .2); }
.alert-ledger-row.warning { border-color: rgba(227, 183, 98, .32); border-left-color: var(--amber); background: rgba(74, 57, 28, .18); }
.alert-ledger-row.resolved { opacity: .58; border-color: var(--line); border-left-color: var(--green); background: rgba(13, 30, 27, .22); }
.alert-ledger-main { min-width: 0; }
.alert-ledger-main p { margin: 6px 0; color: #d0b0ad; font-size: 12px; }
.alert-ledger-main small { color: #81909a; font-size: 10px; overflow-wrap: anywhere; }
.alert-ledger-meta { min-width: 52px; text-align: center; }
.alert-ledger-meta strong, .alert-ledger-meta span { display: block; }
.alert-ledger-meta strong { color: var(--red); font-size: 22px; }
.alert-ledger-meta span { color: var(--muted); font-size: 10px; }

.login-body { overflow-x: hidden; background: #050c12; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(400px, .75fr); }
.login-context { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(32px, 6vw, 80px); border-right: 1px solid var(--line); background:
    linear-gradient(rgba(10, 22, 30, .84), rgba(5, 14, 20, .96)),
    repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(103, 214, 221, .04) 80px),
    repeating-linear-gradient(0deg, transparent 0, transparent 79px, rgba(103, 214, 221, .04) 80px);
}
.login-context::after { content: ""; position: absolute; width: 470px; height: 470px; right: -100px; top: 18%; border: 1px solid rgba(103, 214, 221, .1); border-radius: 50%; box-shadow: 0 0 100px rgba(43, 132, 143, .08), inset 0 0 100px rgba(43, 132, 143, .05); }
.login-brand { position: relative; z-index: 1; }
.login-copy { position: relative; z-index: 1; max-width: 720px; margin: 80px 0; }
.login-copy h1 { margin: 14px 0 20px; font-size: clamp(42px, 5.6vw, 78px); line-height: 1.04; letter-spacing: -.055em; }
.login-copy p { max-width: 580px; margin: 0; color: #82939d; font-size: 16px; }
.login-points { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.login-points div { padding-top: 14px; border-top: 1px solid #21333e; }
.login-points span, .login-points strong, .login-points small { display: block; }
.login-points span { color: var(--cyan); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.login-points strong { margin: 5px 0 2px; font-size: 12px; }
.login-points small { color: #61747f; font-size: 10px; }
.login-panel { display: grid; place-items: center; padding: 40px; background: #071019; }
.login-card { width: min(390px, 100%); }
.lock-badge { display: inline-flex; padding: 5px 8px; color: var(--green); border: 1px solid rgba(99, 215, 165, .26); border-radius: 4px; background: rgba(99, 215, 165, .04); font-size: 9px; letter-spacing: .08em; }
.login-card h2 { margin: 18px 0 5px; font-size: 28px; }
.login-card > p { margin: 0 0 28px; color: #74858f; }
.login-card form { display: grid; }
.login-card label { margin: 0 0 6px; color: #9cabb3; font-size: 11px; }
.login-card input { height: 46px; margin-bottom: 17px; padding: 0 13px; color: var(--text); border: 1px solid #283d48; border-radius: 7px; outline: 0; background: #09161f; }
.login-card input:focus { border-color: #4d7c86; box-shadow: 0 0 0 3px rgba(103, 214, 221, .06); }
.login-card .primary-button { margin-top: 5px; }
.form-error { margin-bottom: 16px; padding: 10px; color: #ef8c87; border: 1px solid rgba(239, 110, 104, .28); border-radius: 6px; background: rgba(239, 110, 104, .05); font-size: 11px; }
.login-footnote { display: flex; align-items: center; gap: 7px; margin-top: 22px; color: #536873; font-size: 10px; }
.login-footnote span { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

@media (max-width: 1180px) {
    .strategy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-row { grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(75px, .55fr)) 18px; }
    .section-grid.three-columns { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
    .app-shell { display: block; }
    .main-area { min-height: 100vh; }
    .sidebar { transform: translateX(-102%); transition: transform .24s ease; box-shadow: 20px 0 60px rgba(0, 0, 0, .35); }
    .sidebar.open { transform: translateX(0); }
    .menu-button { display: inline-flex; }
    .topbar { padding: 0 20px; }
    .content-wrap { padding: 28px 20px 55px; }
    .section-grid.two-thirds, .section-grid.detail-columns { grid-template-columns: 1fr; }
    .source-grid { grid-template-columns: 1fr; }
    .portfolio-row { grid-template-columns: 1fr repeat(3, 70px) 16px; }
    .login-shell { grid-template-columns: 1fr; }
    .login-context { min-height: 55vh; border-right: 0; border-bottom: 1px solid var(--line); }
    .login-copy { margin: 70px 0; }
}

@media (max-width: 680px) {
    .page-head, .detail-hero { align-items: flex-start; flex-direction: column; }
    .dashboard-head { align-items: stretch; }
    .gate-card { min-width: 0; width: 100%; grid-template-columns: 34px 1fr; }
    .gate-caption { grid-column: 2; }
    .metric-grid, .strategy-grid { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr; }
    .portfolio-row { grid-template-columns: 1fr 1fr 1fr; }
    .portfolio-name { grid-column: 1 / -1; }
    .row-arrow { display: none; }
    .detail-gate { min-width: 0; width: 100%; }
    .pairing-banner { align-items: flex-start; flex-direction: column; }
    .source-facts { grid-template-columns: 1fr; }
    .execution-lock-panel { grid-template-columns: 52px 1fr; }
    .lock-facts { grid-column: 1 / -1; }
    .page-head-actions, .account-actions { width: 100%; align-items: stretch; flex-direction: column; }
    .account-actions form, .account-actions button, .account-actions a { width: 100%; }
    .preview-summary { justify-content: flex-start; }
    .risk-card { grid-template-columns: 46px 1fr; }
    .risk-state { grid-column: 2; justify-self: start; }
    .topbar-right .timezone { display: none; }
    .login-context { padding: 30px 24px; }
    .login-copy { margin: 70px 0 50px; }
    .login-copy h1 { font-size: 42px; }
    .login-points { grid-template-columns: 1fr; gap: 12px; }
    .login-panel { padding: 48px 24px; }
}

/* Light operations theme: calm surfaces, clear hierarchy, and stronger status contrast. */
html { background: var(--bg-deep); }
body {
    background:
        radial-gradient(circle at 82% 0%, rgba(74, 165, 207, .12), transparent 31%),
        linear-gradient(180deg, #f8fbfe 0%, #f1f5f9 100%);
}
.sidebar {
    background: rgba(255, 255, 255, .94);
    border-right-color: #dce7f0;
    box-shadow: 12px 0 34px rgba(36, 70, 103, .04);
}
.brand small { color: #708196; }
.brand-mark { border-color: #c6dce8; background: #eef8fc; }
.nav-list a { color: #63758a; }
.nav-list a:hover { color: var(--text); background: #f1f7fb; }
.nav-list a.active {
    color: #135a7a;
    background: linear-gradient(90deg, #e4f5fb, #f6fbfe);
    border-color: #bfe0ed;
}
.nav-list a.active::after { box-shadow: 0 0 14px rgba(13, 136, 184, .28); }
.nav-index { color: #8aa0b2; }
.sidebar-status { border-color: #dce7f0; background: #f7fbfd; }
.sidebar-foot button { color: #72859a; }
.sidebar-foot button:hover { color: var(--text); }
.topbar {
    border-bottom-color: #dfe8f0;
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 1px 0 rgba(34, 70, 103, .02);
}
.environment-chip, .topbar-right { color: #536b80; }
.timezone { color: #8294a7; }
.menu-button { color: var(--text); background: #fff; }
.content-wrap { padding-top: 42px; }
.page-head p, .muted { color: #687b8f; }
.eyebrow, .section-kicker { color: #0b7da9; }

.gate-card {
    border-color: #b9dce8;
    background: linear-gradient(135deg, #effaff, #f8fcfe);
    box-shadow: 0 8px 22px rgba(23, 113, 150, .05);
}
.gate-card.locked { border-color: #efc5c5; background: #fff8f8; }
.gate-caption { color: #60758a; }
.metric-card {
    border-color: #dce6ef;
    background: linear-gradient(145deg, #ffffff, #f7fbfe);
    box-shadow: 0 8px 24px rgba(35, 67, 99, .05);
}
.metric-card::before { background: #b9cad8; }
.metric-card span { color: #6c7e92; }
.metric-card small { color: #7b8ea1; }
.metric-card .negative, .negative { color: #cb4b4b; }
.panel {
    border-color: #dce6ef;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 12px 32px rgba(35, 67, 99, .055);
}
.panel-head a { color: #087da9; }
.portfolio-row:hover { background: #f6fbfe; }
.portfolio-name small, .account-row small { color: #718397; }
.strategy-avatar { border-color: #c9dfeb; background: #eef8fc; }
.portfolio-stat span { color: #75879a; }
.row-arrow { color: #8ca1b3; }
.control-line { color: #61758a; }
.control-note { border-color: #e2d6b5; background: #fffaf0; }
.control-note p { color: #718195; }
.secondary-button { color: #35546c; border-color: #c8d9e5; background: #f7fbfd; }
.secondary-button:hover { border-color: #8db9ce; background: #eef8fc; }
.primary-button { color: #fff; background: #118dbb; box-shadow: 0 6px 14px rgba(17, 141, 187, .18); }
.primary-button:hover, .filter-bar button:hover { background: #087ba7; }
th { color: #698096; border-bottom-color: #d9e4ed; }
td { color: #526a81; border-bottom-color: #e8eef4; }
.symbol { color: #1a2d43; }
.status-badge { color: #9a6811; border-color: #e4cc92; background: #fff9ea; }
.empty-state { color: #74879a; border-color: #cbd9e4; }
.head-stat { border-left-color: #d8e3ed; }
.filter-bar { border-color: #dce6ef; background: rgba(255, 255, 255, .82); }
.filter-bar input, .filter-bar select {
    color: #334d65;
    border-color: #cddce7;
    background: #fff;
}
.filter-bar input:focus, .filter-bar select:focus { border-color: #64b5d2; box-shadow: 0 0 0 3px rgba(13, 136, 184, .1); }
.filter-bar button { color: #fff; background: #118dbb; }
.strategy-card, .source-card {
    border-color: #dce6ef;
    background: linear-gradient(150deg, #ffffff, #f7fbfe);
    box-shadow: 0 8px 24px rgba(35, 67, 99, .045);
}
.strategy-card:hover, .source-card:hover { border-color: #aed3e2; box-shadow: 0 14px 32px rgba(35, 67, 99, .1); }
.type-pill { color: #087ba7; border-color: #acd9e8; background: #edf9fd; }
.lifecycle-pill { color: #9a6811; border-color: #e7d39f; background: #fff9ea; }
.gate-line { color: #b04b4b; border-color: #f0caca; background: #fff7f7; }
.mini-metrics div, .source-facts span { border-color: #e4ecf2; background: #f8fbfd; }
.mini-metrics span, .source-facts small { color: #7a8da0; }
.strategy-card-foot { color: #74879a; border-top-color: #e6edf3; }
.strategy-card-foot span:last-child { color: #087da9; }
.back-link { color: #6f8296; }
.back-link:hover { color: #087da9; }
.detail-hero {
    border-color: #d6e4ed;
    background: linear-gradient(130deg, #ffffff, #eef8fc);
    box-shadow: 0 10px 30px rgba(35, 67, 99, .05);
}
.detail-gate { background: #fff8f8; }
.detail-gate small { color: #7b8da0; }
.detail-gate strong { color: #c84e4e; }
.detail-gate span { color: #718397; }
.member-index { color: #7b91a3; }
.check-list small, .evidence-list p { color: #6c8093; }
.source-list code { color: #3f7186; border-color: #dfebf2; background: #f5fafc; }
.source-card > p, .pairing-banner p { color: #6f8295; }
.source-facts { margin-bottom: 15px; }
.source-error { color: #bd4e4e; border-color: #efcaca; background: #fff7f7; }
.pairing-banner { border-color: #b5dce9; background: linear-gradient(120deg, #eaf8fc, #f8fcfe); }
.pairing-banner h2 { color: #087da9; }
.pairing-banner > strong { color: #087da9; }
.pairing-expiry { color: #9a6811; border-color: #e3cc91; background: #fffaf0; }
.sync-run-list small { color: #74879a; }
.paper-stamp { color: #07845d; border-color: rgba(9, 138, 99, .45); }
.account-row:hover strong { color: #087da9; }
.status-badge.good { color: #087d5c; border-color: #a9dec9; background: #effbf6; }
.status-badge.danger { color: #c84e4e; border-color: #efc5c5; background: #fff7f7; }
.execution-lock-panel {
    border-color: #efcaca;
    background: linear-gradient(110deg, #fff8f8, #ffffff);
    box-shadow: 0 10px 28px rgba(154, 64, 64, .05);
}
.execution-lock-panel.active { border-color: #b8dfcf; background: linear-gradient(110deg, #effbf6, #ffffff); }
.execution-lock-panel p { color: #6e8193; }
.lock-facts span { color: #72859a; }
.compact-list div { color: #65798d; }
.flow-track span { color: #5f7589; border-color: #cbdce7; background: #f8fbfd; }
.flow-track i { background: #b9cfdb; }
.form-field label { color: #63788d; }
.form-field input, .login-card input {
    color: var(--text);
    border-color: #cbdce7;
    background: #fff;
}
.form-field input:focus, .login-card input:focus { border-color: #64b5d2; box-shadow: 0 0 0 3px rgba(13, 136, 184, .1); }
.field-error, .form-error { color: #c84e4e; }
.confirm-row { color: #5f7488; border-color: #d4e1ea; background: #f8fbfd; }
.credential-note { border-color: #b9dce8; background: #effaff; }
.credential-note strong { color: #087da9; }
.credential-note p { color: #6e8193; }
.period-switch { border-color: #d7e3ec; background: #f5f9fc; }
.period-switch a { color: #71859a; }
.period-switch a:hover, .period-switch a.active { color: #fff; background: #118dbb; }
.equity-chart-wrap { border-top-color: #e3ebf2; border-bottom-color: #e3ebf2; background: linear-gradient(180deg, rgba(233, 247, 252, .72), rgba(248, 251, 254, .35)); }
.drawdown-chart-wrap { border-top-color: #f0dddd; border-bottom-color: #f0dddd; }
.performance-foot { color: #718499; }
.preview-summary span { color: #6d8194; border-color: #dfe8ef; background: #f8fbfd; }
.preview-notice { color: #966b1c; border-color: #e7d39e; background: #fffaf0; }
.cell-note { color: #74879a; }
.cell-note.warning { color: #b56c66; }
.action-pill, .direction-pill, .order-type-pill, .trigger-pill { border-color: #cbdde7; background: #f7fbfd; }
.order-type-pill, .trigger-pill { color: #60778b; }
.reason-cell { color: #718498; }
.time-cell { color: #71859a; }
.risk-card { border-color: #dce6ef; background: rgba(255, 255, 255, .95); box-shadow: 0 8px 24px rgba(35, 67, 99, .045); }
.risk-priority.p0 { color: #c84e4e; border-color: #efc6c6; background: #fff5f5; }
.risk-priority.p1 { color: #9a6811; border-color: #e5d09a; background: #fff9ec; }
.risk-card p { color: #718498; }
.risk-state { color: #667b90; border-color: #cedde7; background: #f7fbfd; }
.message { color: #23677b; border-color: #b9dce8; background: #effaff; }
.message.error { color: #b84d4d; border-color: #efcaca; background: #fff6f6; }
.message.success { color: #137453; border-color: #b9e0cf; background: #effbf6; }
.alert-card, .alert-ledger-row { border-color: #efcaca; background: #fff7f7; }
.alert-card { position: relative; padding: 0; }
.alert-card-link { display: block; padding: 13px 48px 13px 15px; }
.alert-dismiss-form {
    position: absolute;
    top: 9px;
    right: 10px;
    margin: 0;
}
.alert-dismiss {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    padding: 0;
    color: #9a7a7a;
    border: 1px solid #e4caca;
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.alert-dismiss:hover { color: #a63f3f; border-color: #d99a9a; background: #fff; }
.alert-dismiss:disabled { cursor: wait; opacity: .55; }
.alert-card[hidden] { display: none; }
.alert-card.warning, .alert-ledger-row.warning { border-color: #e6d29e; background: #fffaf0; }
.alert-card.critical { box-shadow: 0 0 20px rgba(213, 82, 82, .1); }
.alert-card-head strong { color: #b64949; }
.alert-card.warning .alert-card-head strong { color: #966b1c; }
.alert-card p, .alert-ledger-main p { color: #8c6060; }
.alert-card small, .alert-ledger-main small { color: #8b7a7a; }
.alert-ledger-row.resolved { background: #f2fbf7; }
.login-body { background: #f2f6fa; }
.login-context {
    border-right-color: #d7e4ed;
    background:
        linear-gradient(rgba(239, 249, 253, .9), rgba(248, 251, 254, .97)),
        repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(13, 136, 184, .07) 80px),
        repeating-linear-gradient(0deg, transparent 0, transparent 79px, rgba(13, 136, 184, .07) 80px);
}
.login-context::after { border-color: rgba(13, 136, 184, .15); box-shadow: 0 0 100px rgba(13, 136, 184, .08), inset 0 0 100px rgba(13, 136, 184, .04); }
.login-copy p { color: #62778b; }
.login-points div { border-top-color: #cfe0ea; }
.login-points small { color: #718498; }
.login-panel { background: #fff; }
.lock-badge { color: #087d5c; border-color: #b7dfcf; background: #effbf6; }
.login-card > p, .login-card label { color: #6b7f93; }
.login-card input { box-shadow: 0 3px 10px rgba(35, 67, 99, .035); }
.form-error { border-color: #efcaca; background: #fff6f6; }
.login-footnote { color: #708398; }

.instrument-mapping-table { min-width: 1120px; }
.instrument-mapping-table td { vertical-align: top; }
.instrument-mapping-table code { color: #32677c; font-size: 10px; }
.session-pill {
    display: inline-flex;
    min-width: 34px;
    justify-content: center;
    padding: 3px 7px;
    color: #087d5c;
    border: 1px solid #a9dec9;
    border-radius: 999px;
    background: #effbf6;
    font-size: 9px;
    font-weight: 800;
}
.session-pill.foreign { color: #966b1c; border-color: #e7d39e; background: #fffaf0; }
