:root {
    --canvas: #f7d99b;
    --ink: #f7f7f2;
    --muted: #8d8d8c;
    --shell: #0d0c0c;
    --panel: #202020;
    --panel-soft: #292929;
    --line: rgba(255, 255, 255, 0.08);
    --lime: #d9ff00;
    --lime-deep: #8ea900;
    --orange: #ffad08;
    --danger: #ff8c8c;
    --shadow: 0 30px 70px rgba(57, 37, 7, 0.25);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-width: 320px;
    background: var(--shell);
    color: var(--ink);
}

button, input { font: inherit; }
button { border: 0; }

.app-shell {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 26px;
    gap: 26px;
    background: var(--shell);
}

.sidebar {
    position: sticky;
    top: 26px;
    display: flex;
    align-self: start;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: calc(100vh - 52px);
    overflow: hidden;
    padding: 14px 10px;
    background: linear-gradient(180deg, #1a1a18, #161713);
    border-radius: 15px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.side-nav {
    display: grid;
    gap: 14px;
}

.side-button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #30302e;
    color: #d8d8d2;
    font-size: 16px;
    text-decoration: none;
}

.side-button.active {
    background: var(--lime);
    color: #181818;
}

.side-button:hover { background: #484844; }
.side-button.active:hover { background: #e4ff38; }

.dashboard {
    min-width: 0;
    padding: 0 6px 6px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.card-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(330px, 100%);
    padding: 12px 16px;
    border-radius: 24px;
    background: #2e2d2d;
    color: var(--muted);
    font-size: 13px;
}

.search-icon { color: #b8b8b4; font-size: 17px; }

.card-search input {
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ededeb;
    font-size: 13px;
}

.card-search input::placeholder { color: var(--muted); }
.card-search input::-webkit-search-cancel-button { display: none; }

.card-search-results {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    display: none;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #232323;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
}

.card-search-results.open { display: block; }

.card-search-option {
    display: block;
    width: 100%;
    padding: 10px 11px;
    border-radius: 9px;
    background: transparent;
    color: #f0f0eb;
    cursor: pointer;
    text-align: left;
}

.card-search-option:hover,
.card-search-option.active {
    background: #333330;
}

.card-search-option strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
}

.card-search-option span {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-search-empty {
    padding: 12px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.card-search-highlight {
    animation: card-search-pulse 1.8s ease-out;
}

@keyframes card-search-pulse {
    0%, 35% {
        border-color: var(--lime);
        box-shadow: 0 0 0 3px rgba(217, 255, 0, 0.17);
    }
    100% {
        border-color: rgba(255, 255, 255, 0.025);
        box-shadow: none;
    }
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #deded9;
}

.top-actions > span {
    color: #f1f1ed;
    font-size: 13px;
    font-weight: 500;
}

.top-actions a {
    color: inherit;
    text-decoration: none;
    font-size: 13px;
}

.page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.page-heading h1 {
    margin: 0;
    color: #f4f4ee;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 500;
    letter-spacing: -1.7px;
}

.page-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 22px;
    background: var(--panel-soft);
    color: #dfdfd8;
    font-size: 12px;
}

.pill.accent {
    background: var(--orange);
    color: #17130a;
    font-weight: 700;
}

.panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.025);
    border-radius: 15px;
    background: var(--panel);
}

.panel h2, .panel h3 {
    margin: 0;
    color: #f1f1ed;
    font-weight: 500;
}

.panel h2 { font-size: 14px; }
.panel h3 { font-size: 30px; letter-spacing: -1px; }
.panel-label { color: var(--muted); font-size: 12px; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.login-panel {
    grid-column: span 2;
    min-height: 225px;
}

.login-panel .panel-head,
.card-placeholder .panel-head,
.empty-panel .panel-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 15px;
}

.panel-subtitle {
    margin: 5px 0 20px;
    color: var(--muted);
    font-size: 11px;
}

.metric {
    margin: 8px 0 20px;
    color: var(--ink);
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -1px;
}

.source-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.source-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #30302f;
    color: var(--lime);
}

.source-copy { flex: 1; min-width: 0; }
.source-copy strong { display: block; color: #ededeb; font-size: 12px; font-weight: 500; }
.source-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.source-value { color: #f1f1ec; font-size: 12px; font-weight: 600; }

.kite-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
}

.kite-status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange);
    content: "";
}

.kite-status.connected { color: var(--lime); }
.kite-status.connected::before { background: var(--lime); }

.login-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.token-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    background: #121212;
    color: var(--ink);
    font-size: 12px;
}

.token-input:focus { border-color: var(--lime-deep); }

.button {
    min-height: 39px;
    padding: 0 14px;
    border-radius: 9px;
    background: #353533;
    color: #f4f4ee;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

.button:hover { background: #464641; }
.button.primary { background: var(--lime); color: #191919; }
.button.primary:hover { background: #e8ff47; }
.button.danger {
    border-color: rgba(255, 140, 140, 0.3);
    background: rgba(116, 35, 35, 0.42);
    color: #ffd0d0;
}
.button.danger:hover { background: rgba(145, 42, 42, 0.62); }

.login-url {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    background: #121212;
    color: var(--lime);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.login-url a { color: inherit; }
.login-result { min-height: 16px; margin-top: 11px; color: var(--muted); font-size: 11px; }

.chart-panel { min-height: 225px; }
.chart {
    display: flex;
    align-items: end;
    gap: 8px;
    height: 130px;
    margin-top: 25px;
    padding: 0 7px 8px;
    border-bottom: 1px solid var(--line);
}

.chart-bar {
    flex: 1;
    min-width: 7px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, var(--lime), var(--lime-deep));
    opacity: 0.9;
}

.chart-bar:nth-child(2n) { background: linear-gradient(180deg, #8ca900, #4f5e00); }

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: #686866;
    font-size: 9px;
}

.empty-panel {
    grid-column: 1 / -1;
    min-height: 180px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
}

.empty-panel p {
    max-width: 500px;
    margin: 35px auto 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.empty-panel code {
    padding: 3px 6px;
    border-radius: 5px;
    background: #121212;
    color: var(--lime);
}

.card-placeholder { min-height: 180px; }

.calendar-panel {
    grid-column: span 2;
    display: grid;
    grid-template-columns: minmax(180px, 0.65fr) minmax(300px, 1.35fr);
    gap: 24px;
    min-height: 230px;
}

.calendar-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr auto;
    align-items: center;
    gap: 18px;
    padding-right: 24px;
    border-right: 1px solid var(--line);
}

.calendar-date-copy {
    align-self: center;
}

.calendar-summary .panel-subtitle {
    margin-bottom: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.calendar-weekday {
    color: #f4f4ee;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.7px;
}

.calendar-full-date {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.calendar-time {
    color: #f2f2ed;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.calendar-clock {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding-top: 13px;
    border-top: 1px solid var(--line);
}

.calendar-clock span {
    color: #73736f;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.calendar-day-number {
    color: var(--lime);
    font-size: clamp(58px, 7vw, 88px);
    font-weight: 500;
    letter-spacing: -5px;
    line-height: 0.9;
}

.mini-calendar {
    min-width: 0;
}

.calendar-weekdays,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}

.calendar-weekdays {
    margin: 17px 0 7px;
    color: #6f6f6b;
    font-size: 9px;
    text-align: center;
}

.calendar-day {
    display: grid;
    min-height: 27px;
    place-items: center;
    border-radius: 7px;
    color: #aaa9a4;
    font-size: 10px;
}

.calendar-day:not(.empty):hover {
    background: #2d2d2a;
    color: #f4f4ee;
}

.calendar-day.today {
    background: var(--lime);
    color: #171717;
    font-weight: 700;
}

.data-puller-card {
    grid-column: 1 / -1;
}

.data-puller-form {
    display: grid;
    gap: 9px;
}

.data-puller-form label {
    color: #aaa9a3;
    font-size: 11px;
}

.data-puller-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.data-puller-options {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.symbol-list-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
}

.symbol-list-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.symbol-list-switch {
    position: relative;
    width: 31px;
    height: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #141414;
    transition: background 150ms ease;
}

.symbol-list-switch::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #777771;
    content: "";
    transition: transform 150ms ease, background 150ms ease;
}

.symbol-list-toggle input:checked + .symbol-list-switch {
    background: var(--lime);
}

.symbol-list-toggle input:checked + .symbol-list-switch::after {
    background: #171717;
    transform: translateX(13px);
}

.symbol-list-toggle input:focus-visible + .symbol-list-switch {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.symbol-list-toggle input:disabled + .symbol-list-switch {
    cursor: wait;
    opacity: 0.55;
}

.interval-toggle {
    display: inline-flex;
    margin: 0;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #141414;
}

.interval-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.interval-toggle label {
    padding: 7px 13px;
    border-radius: 16px;
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
}

.interval-toggle input:checked + label {
    background: var(--lime);
    color: #171717;
}

.interval-toggle input:focus-visible + label {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.data-puller-form > .token-input {
    width: 100%;
}

.token-input.shared-symbols-loaded {
    border-color: rgba(217, 255, 0, 0.35);
    color: var(--lime);
    cursor: default;
}

.data-puller-dates {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 9px;
}

.data-puller-dates > div {
    display: grid;
    gap: 7px;
}

.date-input-wrap {
    position: relative;
}

.date-display {
    width: 100%;
    padding-right: 46px;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

.date-picker-trigger {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    border-radius: 7px;
    background: #242422;
    color: var(--muted);
    cursor: pointer;
    transform: translateY(-50%);
}

.date-picker-trigger:hover,
.date-picker-trigger[aria-expanded="true"] {
    background: var(--lime);
    color: #171717;
}

.date-picker-trigger:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 2px;
}

.date-picker-trigger svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.date-picker {
    position: absolute;
    z-index: 20;
    bottom: calc(100% + 9px);
    left: 0;
    width: min(310px, calc(100vw - 42px));
    padding: 14px;
    border: 1px solid rgba(217, 255, 0, 0.18);
    border-radius: 13px;
    background: #181816;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.date-picker[hidden] {
    display: none;
}

.date-picker-head {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    gap: 8px;
}

.date-picker-month {
    color: #f4f4ee;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.date-picker-nav {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    background: #242422;
    color: #d2d2cc;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.date-picker-nav:hover {
    background: #30302d;
    color: var(--lime);
}

.date-picker-weekdays,
.date-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.date-picker-weekdays {
    margin: 14px 0 7px;
    color: #6f6f6a;
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
}

.date-picker-day {
    display: grid;
    aspect-ratio: 1;
    min-width: 0;
    padding: 0;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #c1c1bb;
    cursor: pointer;
    font-size: 10px;
}

.date-picker-day:hover {
    border-color: rgba(217, 255, 0, 0.28);
    background: #292926;
    color: #fff;
}

.date-picker-day.outside {
    color: #555550;
}

.date-picker-day.today {
    border-color: var(--lime-deep);
    color: var(--lime);
}

.date-picker-day.selected {
    border-color: var(--lime);
    background: var(--lime);
    color: #171717;
    font-weight: 700;
}

.date-picker-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 9px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.date-picker-foot button {
    padding: 6px 9px;
    border-radius: 7px;
    background: transparent;
    color: var(--lime);
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
}

.date-picker-foot button:hover {
    background: rgba(217, 255, 0, 0.09);
}

.data-puller-result {
    min-height: 18px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.data-puller-result code {
    color: var(--lime);
}

.nifty-750-card {
    position: relative;
    grid-column: span 1;
    height: 280px;
    min-height: 280px;
    aspect-ratio: auto;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: var(--lime);
    box-shadow: 0 15px 35px rgba(217, 255, 0, 0.08);
    color: #171717;
}

.nifty-750-card::before {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    width: 122px;
    height: 76px;
    background: var(--shell);
    clip-path: path("M 0 0 C 22 0 15 44 40 44 H 87 C 108 44 122 58 122 76 V 0 Z");
    content: "";
}

.anchor-selector-card::before {
    width: 166px;
    clip-path: path("M 0 0 C 22 0 15 44 40 44 H 131 C 152 44 166 58 166 76 V 0 Z");
}

.nifty-750-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-right: 106px;
}

.anchor-selector-card .nifty-750-head {
    padding-right: 150px;
}

.nifty-750-identity {
    display: flex;
    align-items: center;
    gap: 9px;
}

.nifty-750-mark {
    display: grid;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: #f2ff9b;
    color: #171717;
    font-size: 11px;
    font-weight: 800;
}

.nifty-750-card h2 {
    color: #171717;
    font-size: 13px;
    font-weight: 700;
}

.nifty-750-head .panel-subtitle {
    margin-bottom: 0;
    color: rgba(23, 23, 23, 0.62);
    font-size: 9px;
}

.nifty-750-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(23, 23, 23, 0.65);
    font-size: 10px;
    font-weight: 600;
}

.nifty-750-state::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(23, 23, 23, 0.45);
    content: "";
}

.nifty-750-state.ready {
    color: #171717;
}

.nifty-750-state.ready::before {
    background: #171717;
}

.nifty-750-tools {
    position: absolute;
    z-index: 2;
    top: 3px;
    right: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nifty-750-tool {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border-radius: 50%;
    background: #171717;
    color: #97978f;
    cursor: pointer;
    line-height: 1;
    text-decoration: none;
}

.nifty-750-tool:hover {
    background: #2a2a27;
    color: #d1d1c9;
}

.nifty-750-tool:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.nifty-750-tool svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.nifty-750-refresh {
    background: #e5ff38;
    color: #171717;
}

.nifty-750-refresh:hover {
    background: #efff72;
    color: #171717;
}

.nifty-750-refresh.refreshing {
    animation: nifty-refresh-spin 0.8s linear infinite;
}

@keyframes nifty-refresh-spin {
    to { transform: rotate(360deg); }
}

.nifty-750-summary {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.nifty-750-count {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.nifty-750-count strong {
    color: #171717;
    font-size: 34px;
    font-weight: 500;
    letter-spacing: -1.5px;
    line-height: 1;
}

.nifty-750-count span {
    color: rgba(23, 23, 23, 0.62);
    font-size: 10px;
}

.nifty-750-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    padding-top: 11px;
    border-top: 1px solid rgba(23, 23, 23, 0.17);
}

.nifty-750-foot span {
    display: block;
    color: rgba(23, 23, 23, 0.58);
    font-size: 8px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.nifty-750-foot strong {
    display: block;
    margin-top: 4px;
    color: #171717;
    font-size: 9px;
    font-weight: 500;
}

.nifty-750-source {
    white-space: nowrap;
}

.nifty-750-result {
    min-height: 12px;
    margin-top: 7px;
    color: rgba(23, 23, 23, 0.62);
    font-size: 9px;
}

.nifty-750-refresh:disabled {
    cursor: wait;
    opacity: 0.65;
}

.anchor-selector-summary {
    margin-top: 11px;
}

.anchor-selector-symbols {
    display: -webkit-box;
    min-height: 38px;
    margin-top: 12px;
    overflow: hidden;
    color: rgba(23, 23, 23, 0.82);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.anchor-selector-robust-actions {
    display: flex;
    gap: 7px;
    margin-top: 10px;
}

.anchor-selector-robust-actions .button {
    min-height: 28px;
    padding: 5px 11px;
    border-color: rgba(23, 23, 23, 0.18);
    background: rgba(23, 23, 23, 0.06);
    color: #171717;
    font-size: 9px;
}

.anchor-selector-robust-actions .button:hover {
    border-color: rgba(23, 23, 23, 0.34);
    background: rgba(23, 23, 23, 0.11);
}

.anchor-selector-robust-panel {
    width: min(1400px, 100%);
}

.anchor-selector-robust-summary {
    display: flex;
    align-items: baseline;
    gap: 7px;
    color: var(--muted);
    font-size: 10px;
}

.anchor-selector-robust-summary strong {
    color: var(--lime);
    font-size: 22px;
}

.anchor-selector-robust-table th,
.anchor-selector-robust-table td {
    white-space: nowrap;
}

.anchor-selector-foot {
    margin-top: 10px;
}

.anchor-selector-foot > div:last-child {
    text-align: right;
}

.anchor-selector-card .nifty-750-result {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.allocation-lock-card {
    height: 280px;
}

.allocation-lock-tool {
    flex: 0 0 auto;
}

.allocation-lock-details-panel {
    width: min(1400px, 100%);
}

.allocation-lock-details-table th,
.allocation-lock-details-table td {
    white-space: nowrap;
}

.allocation-lock-error-panel {
    width: min(700px, 100%);
}

.allocation-lock-error-message {
    max-height: min(420px, 60vh);
    overflow: auto;
    padding: 16px;
    border: 1px solid rgba(255, 114, 114, 0.28);
    border-radius: 12px;
    background: rgba(255, 114, 114, 0.08);
    color: #ffb2b2;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.allocation-lock-form {
    display: grid;
    gap: 7px;
    margin-top: 8px;
}

.allocation-lock-form textarea,
.allocation-lock-amount,
.allocation-lock-top-k {
    width: 100%;
    border: 1px solid rgba(23, 23, 23, 0.18);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.28);
    color: #171717;
    font-size: 10px;
    font-weight: 650;
}

.allocation-lock-form textarea {
    min-height: 38px;
    max-height: 48px;
    padding: 8px 9px;
    outline: 0;
    resize: vertical;
}

.allocation-lock-form textarea::placeholder {
    color: rgba(23, 23, 23, 0.48);
}

.allocation-lock-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
}

.allocation-lock-amount {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 9px;
}

.allocation-lock-amount input,
.allocation-lock-top-k input {
    min-width: 0;
    width: 100%;
    padding: 7px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font-weight: 750;
}

.allocation-lock-top-k {
    display: flex;
    align-items: center;
    gap: 5px;
    width: auto;
    padding-left: 8px;
}

.allocation-lock-top-k > span {
    color: rgba(23, 23, 23, 0.62);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.allocation-lock-top-k input {
    width: 28px;
    padding: 7px 0;
    text-align: center;
}

.allocation-lock-top-k button {
    align-self: stretch;
    padding: 0 9px;
    border: 0;
    border-left: 1px solid rgba(23, 23, 23, 0.14);
    border-radius: 0 8px 8px 0;
    background: rgba(23, 23, 23, 0.08);
    color: #171717;
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.allocation-lock-top-k button:hover {
    background: rgba(23, 23, 23, 0.14);
}

.allocation-lock-top-k button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.allocation-lock-summary {
    margin-top: 6px;
}

.allocation-lock-quantities {
    min-height: 29px;
    margin-top: 5px;
    -webkit-line-clamp: 2;
}

.allocation-lock-foot {
    margin-top: 4px;
}

.allocation-lock-foot > div:last-child {
    text-align: right;
}

.allocation-lock-card .nifty-750-result {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.utility-card {
    position: relative;
    min-height: 280px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    background:
        radial-gradient(circle at 90% 0, rgba(217, 255, 0, 0.09), transparent 35%),
        #1c1d1b;
    color: var(--ink);
}

.utility-card-head,
.utility-card-identity,
.utility-card-foot,
.aws-service-row {
    display: flex;
    align-items: center;
}

.utility-card-head,
.utility-card-foot {
    justify-content: space-between;
    gap: 12px;
}

.utility-card-identity {
    min-width: 0;
    gap: 10px;
}

.utility-card-mark {
    display: grid;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(217, 255, 0, 0.28);
    border-radius: 50%;
    background: rgba(217, 255, 0, 0.08);
    color: var(--lime);
    font-size: 11px;
    font-weight: 800;
}

.utility-card .panel-subtitle {
    margin: 3px 0 0;
}

.utility-card-state {
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.utility-card-state.ready {
    color: var(--lime);
}

.aws-billing-total {
    margin-top: 20px;
}

.aws-billing-total > span,
.utility-placeholder-body > span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.aws-billing-total > strong {
    display: block;
    margin-top: 5px;
    color: #f5f6ef;
    font-size: 37px;
    font-weight: 520;
    letter-spacing: -0.06em;
    line-height: 1;
}

.aws-billing-total > small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 10px;
}

.aws-billing-total > .aws-billing-breakdown {
    margin-top: 4px;
    color: #c6c8bd;
    font-size: 9px;
}

.aws-billing-services {
    display: grid;
    gap: 1px;
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

.aws-service-row {
    min-width: 0;
    gap: 9px;
    padding: 7px 10px;
    background: #20211f;
}

.aws-service-rank {
    color: rgba(217, 255, 0, 0.58);
    font-size: 9px;
    font-weight: 750;
}

.aws-service-row strong {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: #d5d6cf;
    font-size: 10px;
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aws-service-row b {
    color: #f5f6ef;
    font-size: 10px;
}

.aws-billing-empty {
    min-height: 86px;
    padding: 20px;
    background: #20211f;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.aws-billing-setup {
    display: grid;
    gap: 8px;
    align-content: center;
    min-height: 96px;
}

.aws-billing-setup strong {
    color: #f5f6ef;
    font-size: 11px;
}

.aws-billing-setup span {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
}

.aws-billing-setup a {
    width: fit-content;
    padding: 6px 9px;
    border: 1px solid rgba(217, 255, 0, 0.26);
    border-radius: 7px;
    color: var(--lime);
    font-size: 8px;
    font-weight: 750;
    text-decoration: none;
    text-transform: uppercase;
}

.utility-card-foot {
    position: absolute;
    right: 20px;
    bottom: 14px;
    left: 20px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.utility-card-foot strong {
    color: #d5d6cf;
    font-weight: 650;
}

.todays-pnl-total {
    margin-top: 20px;
}

.todays-pnl-total > span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.todays-pnl-total > strong {
    display: block;
    margin-top: 5px;
    color: #f5f6ef;
    font-size: 37px;
    font-weight: 520;
    letter-spacing: -0.05em;
    line-height: 1;
}

.todays-pnl-total > strong.positive,
.todays-pnl-row b.positive {
    color: var(--lime);
}

.todays-pnl-total > strong.negative,
.todays-pnl-row b.negative {
    color: #ff9696;
}

.todays-pnl-total > small {
    display: block;
    margin-top: 7px;
    color: #c6c8bd;
    font-size: 9px;
}

.todays-pnl-positions {
    display: grid;
    gap: 1px;
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

.todays-pnl-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: #20211f;
}

.todays-pnl-row strong {
    min-width: 0;
    overflow: hidden;
    color: #d5d6cf;
    font-size: 10px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todays-pnl-row small {
    display: none;
    color: var(--muted);
    font-size: 8px;
}

.todays-pnl-row b {
    color: #f5f6ef;
    font-size: 10px;
}

.todays-pnl-position-state {
    min-width: 39px;
    color: var(--muted);
    font-size: 7px;
    font-weight: 750;
    letter-spacing: 0.05em;
}

.todays-pnl-position-state.open {
    color: #ffc86b;
}

.todays-pnl-empty {
    min-height: 86px;
    padding: 20px;
    background: #20211f;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.utility-placeholder {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 50%),
        #191a18;
}

.utility-placeholder .utility-card-mark {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #b7b8b1;
}

.utility-placeholder-body {
    display: flex;
    min-height: 160px;
    flex-direction: column;
    justify-content: center;
    padding: 8px 8%;
}

.utility-placeholder-body strong {
    margin-top: 8px;
    color: #e4e5de;
    font-size: 21px;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.utility-placeholder-body p {
    max-width: 280px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.live-charts-mark svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.live-charts-card-body {
    min-height: 128px;
    padding-top: 34px;
}

.live-charts-card-body > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.live-charts-card-body > strong {
    display: block;
    margin-top: 5px;
    color: #f5f6ef;
    font-size: 42px;
    font-weight: 520;
    letter-spacing: -0.05em;
    line-height: 1;
}

.live-charts-card-body > p {
    margin: 7px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-charts-open {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(217, 255, 0, 0.18);
    border-radius: 11px;
    background: rgba(217, 255, 0, 0.08);
    color: var(--lime);
    cursor: pointer;
    font-size: 10px;
    font-weight: 750;
}

.live-charts-open:hover {
    background: rgba(217, 255, 0, 0.14);
}

.live-charts-open:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.live-charts-panel {
    width: 100vw;
    height: 100vh;
    max-height: none;
    gap: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
}

.live-charts-tabs {
    display: flex;
    min-height: 50px;
    flex: 0 0 auto;
    gap: 7px;
    margin: 20px 0 14px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.live-charts-tabs button {
    min-width: 110px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #252624;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
}

.live-charts-tabs button.active {
    border-color: rgba(217, 255, 0, 0.38);
    background: rgba(217, 255, 0, 0.09);
    color: var(--lime);
}

.live-charts-tabs strong,
.live-charts-tabs b,
.live-charts-tabs span {
    display: block;
}

.live-charts-tabs strong {
    color: inherit;
    font-size: 11px;
}

.live-charts-tabs b {
    margin-top: 3px;
    color: #f5f6ef;
    font-size: 10px;
    font-weight: 650;
}

.live-charts-tabs span {
    margin-top: 3px;
    font-size: 8px;
    text-transform: uppercase;
}

.live-chart-toolbar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    margin-bottom: 3px;
}

.live-chart-toolbar > div:first-child {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.live-chart-toolbar strong {
    color: #f5f6ef;
    font-size: 18px;
}

.live-chart-toolbar > div:first-child span {
    color: var(--lime);
    font-size: 13px;
}

.live-chart-levels {
    display: flex;
    max-width: 72%;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.live-chart-level {
    display: grid;
    min-width: 92px;
    grid-template-columns: 1fr auto;
    gap: 2px 7px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #252624;
}

.live-chart-level span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 750;
    text-transform: uppercase;
}

.live-chart-level strong {
    grid-row: span 2;
    color: #f5f6ef;
    font-size: 10px;
    font-weight: 700;
}

.live-chart-level b {
    color: var(--muted);
    font-size: 8px;
}

.live-chart-level.upper { border-color: rgba(124, 166, 255, 0.28); }
.live-chart-level.anchor { border-color: rgba(245, 246, 239, 0.2); }
.live-chart-level.lower { border-color: rgba(184, 140, 255, 0.28); }
.live-chart-level.buy { border-color: rgba(66, 216, 154, 0.32); }
.live-chart-level.sell { border-color: rgba(255, 114, 114, 0.32); }

.live-chart-stage {
    position: relative;
    height: 75vh;
    min-height: 75vh;
    flex: 0 0 75vh;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: #171816;
}

.live-chart-stage svg {
    display: block;
    width: 100%;
    height: 100%;
}

.live-chart-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 11px;
}

.live-chart-empty[hidden] {
    display: none;
}

.live-chart-grid-line {
    stroke: rgba(255, 255, 255, 0.055);
    stroke-width: 1;
}

.live-chart-axis-label {
    fill: #777871;
    font-size: 11px;
    font-weight: 650;
}

.live-chart-price-line {
    fill: none;
    stroke: #d9ff00;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

.live-chart-upper-line,
.live-chart-anchor-line,
.live-chart-lower-line,
.live-chart-buy-line,
.live-chart-sell-line {
    stroke-dasharray: 7 6;
    stroke-width: 1.4;
}

.live-chart-upper-line { stroke: #7ca6ff; }
.live-chart-anchor-line { stroke: #f5f6ef; }
.live-chart-lower-line { stroke: #b88cff; }
.live-chart-buy-line { stroke: #42d89a; }
.live-chart-sell-line { stroke: #ff7272; }

.live-chart-orders {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.live-order-chip {
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: #252624;
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.live-order-chip.buy {
    border-color: rgba(66, 216, 154, 0.28);
    color: #42d89a;
}

.live-order-chip.sell {
    border-color: rgba(255, 114, 114, 0.28);
    color: #ff7272;
}

@media (max-width: 760px) {
    .live-chart-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .live-chart-stage {
        height: 75vh;
        min-height: 75vh;
    }

    .live-chart-levels {
        max-width: 100%;
        justify-content: flex-start;
    }
}

.signout-link {
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
}

.signout-link:hover { color: var(--ink); }

/* Login */
.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.login-frame {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    width: min(940px, 100%);
    min-height: 540px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--shell);
    box-shadow: var(--shadow);
}

.login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px;
    background:
        radial-gradient(circle at 70% 25%, rgba(217, 255, 0, 0.22), transparent 22%),
        linear-gradient(145deg, #1b1c17, #101110);
}

.login-visual::after {
    position: absolute;
    right: -80px;
    bottom: -90px;
    width: 250px;
    height: 250px;
    border: 1px solid rgba(217, 255, 0, 0.28);
    border-radius: 50%;
    box-shadow: 0 0 0 28px rgba(217, 255, 0, 0.05), 0 0 0 56px rgba(217, 255, 0, 0.035);
    content: "";
}

.visual-logo {
    display: block;
    width: 76px;
    height: 68px;
    object-fit: contain;
}
.visual-copy { position: relative; z-index: 1; }
.visual-copy h1 { max-width: 390px; margin: 0 0 15px; color: #f6f6f0; font-size: clamp(32px, 5vw, 58px); font-weight: 500; letter-spacing: -2px; line-height: 0.98; }
.visual-copy p { max-width: 350px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.visual-foot { color: #686866; font-size: 11px; }

.login-form-panel {
    display: flex;
    align-items: center;
    padding: 42px;
    background: #171717;
}

.login-card { width: 100%; }
.login-card h2 { margin: 0 0 7px; color: #f5f5ef; font-size: 26px; font-weight: 500; letter-spacing: -0.8px; }
.login-card .subtitle { margin: 0 0 28px; color: var(--muted); font-size: 12px; }
.login-card label { display: block; margin: 17px 0 7px; color: #aaa9a3; font-size: 11px; }
.login-card input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #242424; color: #f4f4ee; font-size: 13px; }
.login-card input:focus { border-color: var(--lime-deep); }
.login-card button { width: 100%; margin-top: 25px; }
.error { padding: 11px 12px; border: 1px solid rgba(255, 140, 140, 0.28); border-radius: 8px; background: rgba(116, 35, 35, 0.35); color: var(--danger); font-size: 11px; }

@media (max-width: 940px) {
    .app-shell { grid-template-columns: 1fr; min-height: 100vh; padding: 14px; }
    .sidebar {
        top: 14px;
        z-index: 30;
        flex-direction: row;
        width: 100%;
        height: 64px;
        min-height: 64px;
        padding: 8px 13px;
    }
    .side-nav { display: flex; }
    .brand-mark { width: 40px; height: 40px; }
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-panel { grid-column: 1 / -1; }
    .calendar-panel { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
    .app-shell { width: 100%; margin: 0; border-radius: 0; }
    .topbar, .page-heading { align-items: flex-start; flex-direction: column; }
    .page-actions { width: 100%; }
    .page-actions .pill { flex: 1; justify-content: center; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .login-frame { grid-template-columns: 1fr; }
    .login-visual { min-height: 260px; padding: 28px; }
    .login-form-panel { padding: 28px; }
    .data-puller-dates { grid-template-columns: 1fr; }
    .data-puller-toolbar { align-items: flex-start; flex-direction: column; }
    .data-puller-options { width: 100%; justify-content: space-between; }
    .calendar-panel { grid-template-columns: 1fr; }
    .calendar-summary { padding-right: 0; padding-bottom: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ─── Trade Runner - Strat0.1 strategy card ───────────────────────────── */
.strategy-card { grid-column: span 3; }

.strategy-form { display: flex; flex-direction: column; gap: 12px; }

.strategy-form > .token-input {
    flex: 0 0 auto;
    min-height: 54px;
    max-height: 72px;
    resize: vertical;
    font: inherit;
    line-height: 1.45;
}

.strategy-label,
.strategy-field label {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.02em;
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.strategy-grid-compact {
    grid-template-columns: minmax(180px, 260px);
}

.strategy-field { display: flex; flex-direction: column; gap: 6px; }

.strategy-field input,
.strategy-field select {
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    background: #121212;
    color: var(--ink);
    font-size: 12px;
}

.strategy-field input:focus,
.strategy-field select:focus { border-color: var(--lime-deep); }

.strategy-confirm {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid rgba(255, 140, 140, 0.45);
    border-radius: 9px;
    background: rgba(255, 140, 140, 0.08);
    color: var(--danger);
    font-size: 11px;
}

.strategy-confirm input { accent-color: var(--danger); }

.strategy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.strategy-actions .button:disabled { opacity: 0.45; cursor: not-allowed; }

.strategy-status { margin: 0; color: var(--muted); font-size: 11px; }

.strategy-monitor {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(5, 5, 5, 0.72);
}

#live-charts-window {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}

.strategy-monitor[hidden] { display: none; }

.strategy-monitor-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(1100px, 100%);
    max-height: 100%;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}

#live-charts-window .live-charts-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
}

.strategy-monitor-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 15px;
}

.strategy-monitor-head h3 { margin: 0; font-size: 18px; letter-spacing: -0.4px; }
.strategy-monitor-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

.strategy-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.strategy-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-soft);
}

.strategy-stat span { color: var(--muted); font-size: 10px; }
.strategy-stat strong { font-size: 16px; font-weight: 500; }

.strategy-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }

.strategy-table { width: 100%; border-collapse: collapse; font-size: 11px; }

.strategy-table th {
    position: sticky;
    top: 0;
    padding: 10px 12px;
    background: var(--panel-soft);
    color: var(--muted);
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}

.strategy-table td {
    padding: 10px 12px;
    border-top: 1px solid var(--line);
    white-space: nowrap;
}

.strategy-empty { color: var(--muted); text-align: center; }

.strategy-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: #353533;
    color: #f1f1ed;
    font-size: 10px;
}

.strategy-pill.status-long_open,
.strategy-pill.status-both_open { background: var(--lime); color: #191919; }
.strategy-pill.status-short_open { background: var(--orange); color: #191919; }
.strategy-pill.status-day_complete,
.strategy-pill.status-round_complete { background: #3c4a1a; color: var(--lime); }
.strategy-pill.status-error { background: rgba(255, 140, 140, 0.18); color: var(--danger); }

.strategy-error { display: block; margin-top: 4px; color: var(--danger); font-size: 10px; font-style: normal; }
.strategy-minute { margin-left: 7px; color: var(--muted); }
.pnl-up { color: var(--lime); }
.pnl-down { color: var(--danger); }

@media (max-width: 940px) {
    .strategy-card { grid-column: 1 / -1; }
    .strategy-grid { grid-template-columns: 1fr; }
    .strategy-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
