.tp-page { --tp-bg: var(--at-bg-alt, #121d2e); --tp-text: var(--at-text, #e5eefb); --tp-muted: var(--at-text-dim, #acbbd0); --tp-border: var(--at-border, #354458); color: var(--tp-text); width: min(1280px, calc(100% - 32px)); margin: 24px auto; min-width: 0; }
.tp-page *, .tp-dialog * { box-sizing: border-box; }
.tp-heading, .tp-table-header, .tp-dialog-header, .tp-dialog-actions, .tp-wizard-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tp-heading { margin-bottom: 24px; }
.tp-page h1 { font-size: clamp(26px, 3vw, 36px); margin: 10px 0; line-height: 1.2; }
.tp-page h2 { font-size: 20px; margin: 0 0 10px; }
.tp-page p { line-height: 1.6; margin: 8px 0 16px; }
.tp-heading p, .tp-note, .tp-hint { color: var(--tp-muted); }
.tp-back { color: #7dd3fc; text-decoration: none; }
.tp-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid var(--tp-border); border-radius: 9px; padding: 9px 15px; color: var(--tp-text); background: var(--tp-bg); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.tp-button:hover { border-color: #7dd3fc; color: var(--tp-text); }
.tp-primary { background: #a5e5ff; color: #082135; border-color: #a5e5ff; }
.tp-primary:hover { color: #082135; background: #c5efff; }
.tp-button:disabled { opacity: .55; cursor: default; }
.tp-page :focus-visible { outline: 3px solid #38bdf8; outline-offset: 3px; }
.tp-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.tp-kpis > div { border: 1px solid var(--tp-border); background: var(--tp-bg); border-radius: 12px; padding: 18px; }
.tp-kpis span { display: block; color: var(--tp-muted); font-size: 14px; }
.tp-kpis strong { display: block; font-size: 28px; margin-top: 8px; }
.tp-panel { border: 1px solid var(--tp-border); border-radius: 14px; background: var(--tp-bg); padding: 22px; margin-bottom: 24px; min-width: 0; }
.tp-table-header { padding: 16px 0; flex-wrap: wrap; }
.tp-table-header h2, .tp-table-header p { margin: 0; }
.tp-table-header label { display: flex; align-items: center; gap: 10px; }
.tp-page input:not([type=checkbox]):not([type=radio]), .tp-page select, .tp-page textarea { display: block; width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--tp-border); border-radius: 8px; background: var(--at-bg, #0b1423); color: var(--tp-text); padding: 10px 12px; font: inherit; }
.tp-search { max-width: 460px; }
.tp-search label { display: block; margin-bottom: 7px; font-weight: 600; }
.tp-table-wrap { width: 100%; overflow-x: auto; }
.tp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tp-table th { color: var(--tp-muted); font-weight: 600; text-align: left; background: var(--at-bg, #0b1423); }
.tp-table th, .tp-table td { padding: 14px 12px; border-bottom: 1px solid var(--tp-border); vertical-align: top; }
.tp-table th:not(:first-child), .tp-table td:not(:first-child) { white-space: nowrap; }
.tp-table td:first-child { min-width: 180px; max-width: 370px; overflow-wrap: anywhere; }
.tp-table td p { margin: 5px 0 0; font-size: 13px; color: var(--tp-muted); }
.tp-row-actions { display: flex; gap: 8px; }
.tp-empty { padding: 28px !important; color: var(--tp-muted); text-align: center; }
.tp-badge { display: inline-flex; border-radius: 20px; color: #b2e8ff; background: #193951; padding: 4px 9px; font-size: 12px; }
.tp-message { padding: 13px 16px; border: 1px solid #3e8d88; background: #123b39; color: #d6fff5; border-radius: 10px; margin-bottom: 18px; overflow-wrap: anywhere; }
.tp-error { border-color: #c47a7a; background: #48232b; color: #ffe0e0; }
.tp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tp-form-grid label, .tp-field { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
.tp-wide { grid-column: 1 / -1; }
.tp-hint { display: block; font-size: 12px; font-weight: 400; line-height: 1.6; }
.tp-check { display: flex !important; align-items: flex-start; gap: 10px !important; line-height: 1.5; }
.tp-check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: #7dd3fc; }
.tp-binding-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; margin: 14px 0 22px; }
.tp-dialog { background: var(--tp-bg); color: var(--tp-text); border: 1px solid var(--tp-border); border-radius: 15px; width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 24px; overflow-y: auto; }
.tp-dialog::backdrop { background: rgba(2, 8, 19, .78); }
.tp-dialog-header { margin-bottom: 16px; }
.tp-dialog-header h2 { margin: 0; }
.tp-dialog-actions { justify-content: flex-end; margin-top: 20px; }
.tp-steps { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; padding: 0; margin: 0 0 22px; gap: 10px; }
.tp-steps li { color: var(--tp-muted); border-bottom: 3px solid var(--tp-border); padding: 12px 8px; font-size: 14px; }
.tp-steps .is-current { color: var(--tp-text); border-color: #7dd3fc; font-weight: 700; }
.tp-field { max-width: 450px; margin: 20px 0; }
.tp-profile-options { display: grid; gap: 12px; margin: 20px 0; }
.tp-profile-option { display: grid; grid-template-columns: 20px 1fr; gap: 12px; border: 1px solid var(--tp-border); border-radius: 10px; padding: 16px; cursor: pointer; }
.tp-profile-option:has(input:checked) { border-color: #7dd3fc; background: #162e42; }
.tp-profile-option input { margin-top: 4px; accent-color: #7dd3fc; }
.tp-profile-option p { margin: 5px 0 0; color: var(--tp-muted); }
.tp-wizard-actions { justify-content: flex-end; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--tp-border); }
.tp-review { background: var(--at-bg, #0b1423); padding: 18px; margin: 22px 0; border-radius: 10px; line-height: 1.8; overflow-wrap: anywhere; }
.tp-page [hidden] { display: none !important; }
html[data-theme=light] .tp-back { color: #075985; }
html[data-theme=light] .tp-profile-option:has(input:checked) { background: #e0f2fe; }
.tp-public { --tp-bg: #fff; --tp-text: #132238; --tp-muted: #4f6174; --tp-border: #d7e0e7; --at-bg: #f5f7fa; padding-top: 64px; padding-bottom: 40px; }
.tp-public p { max-width: 900px; }
.tp-public .tp-heading { max-width: 1000px; }
.tp-public h1, .tp-public h2 { color: var(--tp-text); }
.tp-public .tp-back { color: #075985; }
body.fuzzy-layout:has(#tradingProfileInfo) { height: auto; }
@media (max-width: 640px) {
    .tp-page { width: calc(100% - 24px); margin: 16px auto; }
    .tp-heading { align-items: flex-start; flex-direction: column; }
    .tp-panel { padding: 15px; }
    .tp-kpis { gap: 8px; }
    .tp-kpis > div { padding: 12px 10px; }
    .tp-kpis span { font-size: 12px; }
    .tp-kpis strong { font-size: 24px; }
    .tp-form-grid, .tp-binding-form { grid-template-columns: 1fr; }
    .tp-dialog { padding: 18px; }
    .tp-dialog-actions { flex-wrap: wrap; }
    .tp-steps { gap: 5px; }
    .tp-steps li { font-size: 12px; padding: 10px 4px; }
}
