:root {
    --twc-primary: #66b2ff;
    --twc-primary-hover: #7abcff;
    --twc-primary-active: #4f9ce8;
    --twc-surface: #33475f;
    --twc-surface-alt: #2e425a;
    --twc-app-surface: linear-gradient(145deg, #2f4056 0%, #2a3a4f 100%);
    --twc-on-surface: #ecf3fb;
    --twc-border: rgba(255, 255, 255, 0.14);
    --twc-subtle: #a6b7c8;
    --twc-secondary: #3f5a78;
    --twc-scrollbar-thumb: rgba(71, 85, 105, 0.72);
    --twc-scrollbar-track: rgba(148, 163, 184, 0.18);
    --twc-scrollbar-border: rgba(248, 250, 252, 0.92);

    --bs-primary: var(--twc-primary);
    --bs-primary-rgb: 102, 178, 255;
}

* {
    scrollbar-width: auto;
    scrollbar-color: var(--twc-scrollbar-thumb) var(--twc-scrollbar-track);
}

*::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

*::-webkit-scrollbar-track {
    background: var(--twc-scrollbar-track);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: var(--twc-scrollbar-thumb);
    border-radius: 999px;
    border: 2px solid var(--twc-scrollbar-border);
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 12px;
    height: 100%;
    margin: 0;
    overflow: hidden;
    color: var(--twc-on-surface);
    background: var(--twc-app-surface);
}

body,
h1, h2, h3, h4, h5, h6,
p, li, dt, dd,
label, legend,
th, td,
.card-title,
.card-text,
.form-label,
.dropdown-item,
.list-group-item {
    color: var(--twc-on-surface);
}

.text-muted,
.text-secondary,
.form-text,
small,
.small {
    color: var(--twc-subtle) !important;
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}


a, .btn-link {
    color: var(--twc-primary);
}

.btn-primary {
    color: #fff;
    background-color: var(--twc-primary);
    border-color: var(--twc-primary-active);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

input[type="file"] {
    color: transparent;
}

    /* Restore color when user hovers or focuses (optional) */
    input[type="file"]:hover,
    input[type="file"]:focus {
        color: inherit;
    }

    /* Style the file button cleanly */
    input[type="file"]::file-selector-button {
        color: #212529;
        background-color: #e9ecef;
        border: 1px solid #ced4da;
        border-radius: 0.375rem;
        padding: 0.375rem 0.75rem;
        margin-right: 0.75rem;
        cursor: pointer;
    }

        input[type="file"]::file-selector-button:hover {
            background-color: #dde1e5;
        }

/* 🔒 Completely hide native file input (final fix) */
.hidden-file-input {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.status-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
}

.ticker-toggle {
    background: transparent;
    border: 0;
    color: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font: inherit;
}

.ticker-toggle-icon {
    font-size: 0.9rem;
    opacity: 0.8;
}

.ticker-toggle:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.indicator-group-toggle {
    background: transparent;
    border: 0;
    color: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font: inherit;
}

.indicator-group-chevron {
    font-size: 0.9rem;
    opacity: 0.7;
}

.indicator-group-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.sequence-group-content-row {
    --sequence-card-height: 64px;
    --sequence-card-gap: 10px;
    --sequence-card-step: calc(var(--sequence-card-height) + var(--sequence-card-gap));
}

.sequence-lane-track {
    min-width: 0;
}

.sequence-lane-body {
    min-width: 0;
    box-sizing: border-box;
}

.sequence-lane-track .sequence-cards {
    flex: 1 1 0;
    min-width: 0;
}

.sequence-progress {
    width: 56px;
    min-height: 100%;
    align-self: stretch;
    display: block;
    background: transparent;
    overflow: visible;
    position: relative;
    z-index: 0;
}

.sequence-progress::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 10px;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.16);
    border-radius: 999px;
    z-index: 0;
}

.sequence-progress-label {
    position: absolute;
    left: calc(50% + 11px);
    right: auto;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    color: #e2e8f0;
    background: transparent;
    border-radius: 0;
    padding: 0;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-align: left;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.7);
    z-index: 2;
    pointer-events: none;
}

.sequence-progress-label--top {
    top: 4px;
}

.sequence-progress-label--bottom {
    bottom: 4px;
}

.sequence-progress-fill {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    max-height: 100%;
    transition: height 0.2s ease;
    border-radius: 999px;
    z-index: 1;
}

.sequence-progress-fill--top {
    top: 0;
    height: calc(var(--sequence-count-top) * var(--sequence-card-step));
}

.sequence-progress-fill--bottom {
    bottom: 0;
    height: calc(var(--sequence-count-bottom) * var(--sequence-card-step));
}

.sequence-progress.is-fully-aligned .sequence-progress-fill--top,
.sequence-progress.is-fully-aligned .sequence-progress-fill--bottom {
    height: 100%;
}

.sequence-progress.is-buy .sequence-progress-fill--top {
    background: linear-gradient(180deg, #26b050 0%, #1f8a3f 100%);
}

/* ---------- Modal layering fix ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483640;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 2147483641;
}

.logs-output-card {
    position: relative;
    z-index: 0;
}

.sequence-progress.is-sell .sequence-progress-fill--top {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
}

.sequence-progress.is-neutral .sequence-progress-fill--top {
    background: linear-gradient(180deg, rgba(156, 163, 175, 0.8) 0%, rgba(107, 114, 128, 0.8) 100%);
}

.sequence-progress-fill--bottom.end-buy {
    background: linear-gradient(180deg, #26b050 0%, #1f8a3f 100%);
}

.sequence-progress-fill--bottom.end-sell {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
}

.sequence-progress-fill--bottom.end-neutral {
    background: linear-gradient(180deg, rgba(156, 163, 175, 0.8) 0%, rgba(107, 114, 128, 0.8) 100%);
}
