* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #0b1020;
    color: #f5f7fb;
}

a {
    color: #7dd3fc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.nav {
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding: 18px 0;
    background: rgba(0,0,0,0.18);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    color: white;
}

.nav-links {
    display: flex;
    gap: 14px;
    align-items: center;
}

.hero {
    padding: 70px 0;
}

.card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

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

h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    margin: 0 0 18px;
}

h2 {
    margin-top: 0;
}

p {
    line-height: 1.6;
    color: #dbe4f0;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    background: #38bdf8;
    color: #06111f;
    cursor: pointer;
}

.btn.secondary {
    background: rgba(255,255,255,0.12);
    color: white;
}

.form {
    display: grid;
    gap: 14px;
}

label {
    font-weight: 700;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.22);
    color: white;
    border-radius: 12px;
    padding: 13px;
    font-size: 16px;
}

.notice {
    padding: 14px;
    border-radius: 12px;
    margin: 18px 0;
}

.notice.error {
    background: rgba(239,68,68,0.18);
    border: 1px solid rgba(239,68,68,0.4);
}

.notice.success {
    background: rgba(34,197,94,0.18);
    border: 1px solid rgba(34,197,94,0.4);
}

.small {
    font-size: 14px;
    color: #b9c6d8;
}

.warning {
    color: #fde68a;
}

@media (max-width: 760px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .nav-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        flex-wrap: wrap;
    }
}

.danger-btn {
    display: inline-block;
    border: 0;
    border-radius: 12px;
    padding: 10px 13px;
    font-weight: 700;
    background: rgba(239,68,68,0.9);
    color: white;
    cursor: pointer;
}

.danger-zone {
    border-top: 1px solid rgba(255,255,255,0.14);
    margin-top: 12px;
    padding-top: 12px;
}

/* Sidebar layout upgrade */
body {
    padding-left: 260px;
}

.nav {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    overflow-y: auto;
    border-bottom: 0;
    border-right: 1px solid rgba(255,255,255,0.12);
    padding: 22px 0;
    z-index: 50;
}

.nav .container {
    width: 100%;
    padding: 0 18px;
}

.nav-inner {
    flex-direction: column;
    align-items: stretch;
}

.brand {
    display: block;
    margin-bottom: 18px;
    font-size: 26px;
}

.nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
}

.nav-links a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #dbe4f0;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.10);
    text-decoration: none;
}

.nav-links .btn {
    text-align: center;
    color: #06111f;
}

.hero {
    padding-top: 42px;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.legal-links a {
    font-size: 14px;
    color: #b9c6d8;
}

@media (max-width: 900px) {
    body {
        padding-left: 0;
    }

    .nav {
        position: static;
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.12);
    }

    .nav-inner {
        flex-direction: column;
    }

    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nav-links a {
        padding: 8px 10px;
    }
}

.nav-links a.active {
    background: rgba(56,189,248,0.18);
    border: 1px solid rgba(56,189,248,0.35);
    color: #ffffff;
}

.legal-links {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 12px;
}

.legal-links a {
    padding: 6px 8px;
    font-size: 13px;
}

/* Grouped sidebar navigation */
.grouped-nav {
    gap: 10px;
}

.nav-top-link,
.nav-child-link {
    display: block;
    border: 1px solid transparent;
}

.nav-top-link.active,
.nav-child-link.active {
    background: rgba(56,189,248,0.18);
    border: 1px solid rgba(56,189,248,0.35);
    color: #ffffff;
}

.nav-group {
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    background: rgba(255,255,255,0.045);
    overflow: hidden;
}

.nav-group summary {
    list-style: none;
    cursor: pointer;
    padding: 11px 12px;
    color: #ffffff;
    font-weight: 800;
    border-radius: 12px;
    user-select: none;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-group summary::after {
    content: "▾";
    float: right;
    color: #b9c6d8;
    transition: transform 0.15s ease;
}

.nav-group:not([open]) summary::after {
    transform: rotate(-90deg);
}

.nav-group summary:hover,
.nav-group summary.active {
    background: rgba(255,255,255,0.08);
}

.nav-children {
    display: grid;
    gap: 4px;
    padding: 0 8px 9px 8px;
}

.nav-child-link {
    padding: 9px 10px 9px 18px !important;
    font-size: 14px;
    color: #dbe4f0;
}

.nav-top-link.logout-link {
    margin-top: 4px;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.22);
}

.nav-top-link.logout-link:hover {
    background: rgba(239,68,68,0.20);
}

@media (max-width: 900px) {
    .grouped-nav {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .nav-group {
        width: 100%;
    }

    .nav-children {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .nav-children {
        grid-template-columns: 1fr;
    }
}

/* Admin support view spacing fix */
.section-card + .stat-grid {
    margin-top: 22px;
}

/* Announcements / notification UI */
.announcement-wrap {
    width: min(1100px, 92%);
    margin: 18px auto 0 auto;
    display: grid;
    gap: 12px;
}

.announcement-banner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
}

.announcement-banner p {
    margin: 6px 0 0;
}

.announcement-info {
    border-color: rgba(56,189,248,0.4);
    background: rgba(56,189,248,0.12);
}

.announcement-success {
    border-color: rgba(34,197,94,0.4);
    background: rgba(34,197,94,0.12);
}

.announcement-warning {
    border-color: rgba(234,179,8,0.45);
    background: rgba(234,179,8,0.12);
}

.announcement-error {
    border-color: rgba(239,68,68,0.45);
    background: rgba(239,68,68,0.12);
}

.announcement-dismiss {
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 700;
    cursor: pointer;
    background: rgba(255,255,255,0.14);
    color: white;
}

.notification-unread {
    border-color: rgba(56,189,248,0.45);
    background: rgba(56,189,248,0.09);
}

.notification-read {
    opacity: 0.75;
}

@media (max-width: 900px) {
    .announcement-wrap {
        margin-top: 14px;
    }

    .announcement-banner {
        flex-direction: column;
    }
}

/* Mobile navigation toggle */
.nav-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nav-mobile-toggle {
    display: none;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 900px) {
    .nav-mobile-toggle {
        display: inline-block;
    }

    .nav .brand {
        margin-bottom: 0;
    }

    .nav-links.grouped-nav {
        display: none;
        margin-top: 14px;
    }

    .nav-links.grouped-nav.nav-open {
        display: grid;
    }
}

/* Top notification bell / header pill */
.top-user-alerts {
    width: min(1100px, 92%);
    margin: 18px auto 0 auto;
    display: flex;
    justify-content: flex-end;
}

.top-notification-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 800;
    text-decoration: none;
}

.top-notification-pill:hover {
    background: rgba(255,255,255,0.13);
    text-decoration: none;
}

.top-notification-pill.has-unread {
    border-color: rgba(56,189,248,0.55);
    background: rgba(56,189,248,0.16);
}

.top-notification-count {
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.16);
    font-size: 13px;
}

.top-notification-pill.has-unread .top-notification-count {
    background: rgba(14,165,233,0.95);
    color: white;
}

@media (max-width: 900px) {
    .top-user-alerts {
        justify-content: center;
        margin-top: 14px;
    }

    .top-notification-pill {
        width: 100%;
        justify-content: center;
    }
}

/* Global desktop sidebar collapse */
.nav-desktop-collapse {
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 900;
    cursor: pointer;
}

.nav-desktop-collapse:hover {
    background: rgba(56,189,248,0.16);
    border-color: rgba(56,189,248,0.45);
}

@media (min-width: 901px) {
    body.app-nav-collapsed .nav {
        width: 82px;
        overflow: visible;
    }

    body.app-nav-collapsed .nav .container.nav-inner {
        width: 82px;
        padding-left: 10px;
        padding-right: 10px;
    }

    body.app-nav-collapsed .nav .brand {
        font-size: 0;
    }

    body.app-nav-collapsed .nav .brand::after {
        content: "S";
        font-size: 22px;
        font-weight: 1000;
    }

    body.app-nav-collapsed .nav-links.grouped-nav {
        gap: 8px;
    }

    body.app-nav-collapsed .nav-top-link,
    body.app-nav-collapsed .nav-group summary {
        font-size: 0;
        text-align: center;
        padding: 12px 8px;
    }

    body.app-nav-collapsed .nav-top-link::first-letter,
    body.app-nav-collapsed .nav-group summary::first-letter {
        font-size: 15px;
    }

    body.app-nav-collapsed .nav-group summary::after {
        display: none;
    }

    body.app-nav-collapsed .nav-children {
        display: none;
    }

    body.app-nav-collapsed .logout-link {
        font-size: 0;
    }

    body.app-nav-collapsed .logout-link::after {
        content: "⎋";
        font-size: 18px;
    }

    body.app-nav-collapsed .nav-desktop-collapse {
        width: 44px;
        padding: 9px 0;
    }
}

@media (max-width: 900px) {
    .nav-desktop-collapse {
        display: none;
    }
}

/* Global desktop sidebar collapse */
.nav-desktop-collapse {
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 900;
    cursor: pointer;
}

.nav-desktop-collapse:hover {
    background: rgba(56,189,248,0.16);
    border-color: rgba(56,189,248,0.45);
}

@media (min-width: 901px) {
    body.app-nav-collapsed .nav {
        width: 82px;
        overflow: visible;
    }

    body.app-nav-collapsed .nav .container.nav-inner {
        width: 82px;
        padding-left: 10px;
        padding-right: 10px;
    }

    body.app-nav-collapsed .nav .brand {
        font-size: 0;
    }

    body.app-nav-collapsed .nav .brand::after {
        content: "S";
        font-size: 22px;
        font-weight: 1000;
    }

    body.app-nav-collapsed .nav-links.grouped-nav {
        gap: 8px;
    }

    body.app-nav-collapsed .nav-top-link,
    body.app-nav-collapsed .nav-group summary {
        font-size: 0;
        text-align: center;
        padding: 12px 8px;
    }

    body.app-nav-collapsed .nav-top-link::first-letter,
    body.app-nav-collapsed .nav-group summary::first-letter {
        font-size: 15px;
    }

    body.app-nav-collapsed .nav-group summary::after {
        display: none;
    }

    body.app-nav-collapsed .nav-children {
        display: none;
    }

    body.app-nav-collapsed .logout-link {
        font-size: 0;
    }

    body.app-nav-collapsed .logout-link::after {
        content: "⎋";
        font-size: 18px;
    }

    body.app-nav-collapsed .nav-desktop-collapse {
        width: 44px;
        padding: 9px 0;
    }
}

@media (max-width: 900px) {
    .nav-desktop-collapse {
        display: none;
    }
}

/* Trade Desk Pro: compact quote strip above chart */
.pro-workstation .pro-quote-strip {
    top: 68px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 6 !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 2px !important;
    padding: 0 2px !important;
    pointer-events: auto;
}

.pro-workstation .pro-quote-card {
    border-radius: 0 !important;
    padding: 4px 8px !important;
    min-height: 34px !important;
    box-shadow: none !important;
}

.pro-workstation .pro-quote-label {
    font-size: 9px !important;
    line-height: 1.1 !important;
    margin-bottom: 1px !important;
}

.pro-workstation .pro-quote-value {
    font-size: 12px !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
}

.pro-workstation #pro-chart {
    top: 106px !important;
}

.pro-workstation .pro-left-drawer,
.pro-workstation .pro-right-drawer {
    top: 122px !important;
}

@media (max-width: 1500px) {
    .pro-workstation .pro-quote-strip {
        top: 136px !important;
        grid-template-columns: repeat(6, minmax(110px, 1fr)) !important;
        overflow-x: auto !important;
    }

    .pro-workstation #pro-chart {
        top: 176px !important;
    }

    .pro-workstation .pro-left-drawer,
    .pro-workstation .pro-right-drawer {
        top: 192px !important;
    }
}

@media (max-width: 1100px) {
    .pro-workstation .pro-quote-strip {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        margin: 2px 12px 8px 12px !important;
        padding: 0 !important;
        overflow-x: visible !important;
    }

    .pro-workstation #pro-chart {
        top: auto !important;
    }

    .pro-workstation .pro-left-drawer,
    .pro-workstation .pro-right-drawer {
        top: auto !important;
    }
}

@media (max-width: 620px) {
    .pro-workstation .pro-quote-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        margin: 2px 8px 8px 8px !important;
    }
}

/* Trade Desk Pro: trade ticket drawer sizing + draggable polish */
.pro-workstation .pro-right-drawer {
    width: clamp(320px, 24vw, 390px) !important;
    max-width: calc(100% - 32px) !important;
    max-height: calc(100% - 142px) !important;
    bottom: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.pro-workstation .pro-right-drawer .pro-drawer-title {
    cursor: grab;
    user-select: none;
    position: sticky;
    top: -14px;
    z-index: 3;
    background: rgba(10, 18, 38, 0.96);
    backdrop-filter: blur(16px);
    margin: -14px -14px 14px -14px;
    padding: 14px;
    border-radius: 22px 22px 0 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.pro-workstation .pro-right-drawer.dragging .pro-drawer-title {
    cursor: grabbing;
}

.pro-workstation .pro-right-drawer.dragging {
    outline: 1px solid rgba(56,189,248,0.65);
    box-shadow: 0 26px 70px rgba(0,0,0,0.5);
}

.pro-workstation .pro-right-drawer input,
.pro-workstation .pro-right-drawer select,
.pro-workstation .pro-right-drawer button {
    max-width: 100%;
}

.pro-workstation .pro-ticket-tabs {
    grid-template-columns: 1fr 1fr;
}

.pro-workstation .pro-right-drawer .form {
    gap: 11px;
}

@media (max-width: 1100px) {
    .pro-workstation .pro-right-drawer {
        width: auto !important;
        max-width: calc(100% - 24px) !important;
        max-height: none !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }

    .pro-workstation .pro-right-drawer .pro-drawer-title {
        cursor: default;
        position: relative;
        top: auto;
    }
}

@media (max-width: 620px) {
    .pro-workstation .pro-right-drawer {
        max-width: calc(100% - 16px) !important;
    }
}

/* Trade Desk Pro: true workstation sizing */
@media (min-width: 1101px) {
    body.trade-desk-pro-page {
        overflow: hidden !important;
        height: 100dvh !important;
    }

    body.trade-desk-pro-page .top-user-alerts,
    body.trade-desk-pro-page .announcement-wrap {
        display: none !important;
    }

    body.trade-desk-pro-page .pro-main {
        height: calc(100dvh - 4px) !important;
        max-height: calc(100dvh - 4px) !important;
        margin: 2px 6px 2px 6px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    body.trade-desk-pro-page .pro-workstation {
        height: 100% !important;
        min-height: 0 !important;
        max-height: 100% !important;
        border-radius: 14px !important;
        overflow: hidden !important;
    }

    body.trade-desk-pro-page .pro-toolbar {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        min-height: 58px !important;
        padding: 7px 12px !important;
        border-radius: 14px 14px 0 0 !important;
    }

    body.trade-desk-pro-page .pro-toolbar input {
        height: 40px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    body.trade-desk-pro-page .pro-pill,
    body.trade-desk-pro-page .pro-icon-btn,
    body.trade-desk-pro-page .pro-timeframe {
        padding: 8px 11px !important;
        line-height: 1.15 !important;
    }

    body.trade-desk-pro-page .pro-quote-strip {
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 2px !important;
        gap: 2px !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        overflow: hidden !important;
    }

    body.trade-desk-pro-page .pro-quote-card {
        min-height: 34px !important;
        height: 34px !important;
        padding: 4px 8px !important;
        border-radius: 0 !important;
    }

    body.trade-desk-pro-page .pro-quote-label {
        font-size: 9px !important;
        line-height: 1 !important;
        margin-bottom: 1px !important;
    }

    body.trade-desk-pro-page .pro-quote-value {
        font-size: 12px !important;
        line-height: 1.1 !important;
    }

    body.trade-desk-pro-page #pro-chart {
        top: 96px !important;
        bottom: 0 !important;
        height: auto !important;
    }

    body.trade-desk-pro-page .pro-left-drawer {
        top: 112px !important;
        bottom: 86px !important;
        max-height: calc(100% - 198px) !important;
        overflow: hidden !important;
    }

    body.trade-desk-pro-page .pro-watchlist {
        overflow-y: auto !important;
        min-height: 0 !important;
    }

    body.trade-desk-pro-page .pro-right-drawer {
        top: 112px !important;
        right: 16px !important;
        bottom: auto !important;
        width: clamp(310px, 23vw, 370px) !important;
        max-width: calc(100% - 32px) !important;
        height: auto !important;
        max-height: calc(100% - 128px) !important;
        padding: 11px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-drawer-title {
        margin: -11px -11px 9px -11px !important;
        padding: 10px 11px !important;
        border-radius: 20px 20px 0 0 !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-drawer-title h2 {
        font-size: 18px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-mini-grid {
        gap: 7px !important;
        margin: 8px 0 10px 0 !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-mini-card {
        padding: 8px 9px !important;
        border-radius: 12px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .form {
        gap: 8px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer label {
        margin-bottom: 3px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer input,
    body.trade-desk-pro-page .pro-right-drawer select {
        padding: 9px 10px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
    }

    body.trade-desk-pro-page .pro-ticket-tabs {
        margin: 8px 0 !important;
        gap: 7px !important;
    }

    body.trade-desk-pro-page .pro-side {
        padding: 9px !important;
        border-radius: 12px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .btn {
        padding: 10px 12px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-muted {
        margin-top: 4px !important;
        font-size: 12px !important;
    }

    body.trade-desk-pro-page .pro-bottom-drawer {
        left: 12px !important;
        right: 12px !important;
        bottom: 10px !important;
        height: 62px !important;
        max-width: calc(100% - 24px) !important;
        border-radius: 18px !important;
    }

    body.trade-desk-pro-page .pro-bottom-drawer.open {
        height: min(285px, calc(100% - 124px)) !important;
    }

    body.trade-desk-pro-page .pro-bottom-head {
        height: 62px !important;
        padding: 9px 12px !important;
    }

    body.trade-desk-pro-page .pro-bottom-body {
        height: calc(100% - 62px) !important;
        overflow: auto !important;
        padding: 10px 12px 12px !important;
    }

    body.trade-desk-pro-page .pro-tab {
        padding: 7px 11px !important;
    }

    body.trade-desk-pro-page .pro-table-wrap {
        max-height: 100% !important;
        overflow: auto !important;
    }
}

/* Wrapped toolbar layout on medium desktops */
@media (min-width: 1101px) and (max-width: 1500px) {
    body.trade-desk-pro-page .pro-toolbar {
        min-height: 118px !important;
    }

    body.trade-desk-pro-page .pro-quote-strip {
        top: 120px !important;
        grid-template-columns: repeat(6, minmax(95px, 1fr)) !important;
        overflow-x: auto !important;
    }

    body.trade-desk-pro-page #pro-chart {
        top: 156px !important;
    }

    body.trade-desk-pro-page .pro-left-drawer,
    body.trade-desk-pro-page .pro-right-drawer {
        top: 172px !important;
        max-height: calc(100% - 188px) !important;
    }

    body.trade-desk-pro-page .pro-left-drawer {
        bottom: 86px !important;
        max-height: calc(100% - 258px) !important;
    }
}

/* Mobile/tablet keeps natural page scrolling */
@media (max-width: 1100px) {
    body.trade-desk-pro-page {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
    }

    body.trade-desk-pro-page .pro-main {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    body.trade-desk-pro-page .pro-workstation {
        height: auto !important;
        min-height: 1180px !important;
        overflow: visible !important;
    }

    body.trade-desk-pro-page .pro-right-drawer {
        overflow: visible !important;
    }
}


/* Trade Desk Pro: sidebar-aware full workstation layout */
@media (min-width: 1101px) {
    body.trade-desk-pro-page .pro-main {
        position: fixed !important;
        top: 2px !important;
        right: 6px !important;
        bottom: 2px !important;
        left: 286px !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    body.trade-desk-pro-page.app-nav-collapsed .pro-main {
        left: 88px !important;
        right: 6px !important;
        width: auto !important;
        max-width: none !important;
    }

    body.trade-desk-pro-page .pro-workstation {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
    }
}

/* Trade Desk Pro: dock bottom drawer instead of covering chart/date axis */
@media (min-width: 1101px) {
    body.trade-desk-pro-page .pro-bottom-drawer {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 0 0 14px 14px !important;
        border-left: 0 !important;
        border-right: 0 !important;
        border-bottom: 0 !important;
        height: 58px !important;
        z-index: 7 !important;
    }

    body.trade-desk-pro-page .pro-bottom-drawer.open {
        height: min(285px, 38vh) !important;
    }

    body.trade-desk-pro-page .pro-bottom-head {
        height: 58px !important;
        padding: 8px 12px !important;
    }

    body.trade-desk-pro-page .pro-bottom-body {
        height: calc(100% - 58px) !important;
        overflow: auto !important;
    }

    /* When bottom drawer is collapsed, reserve space for the bottom bar. */
    body.trade-desk-pro-page #pro-chart {
        bottom: 58px !important;
    }

    /* When bottom drawer is expanded, shrink the chart above it. */
    body.trade-desk-pro-page .pro-workstation.bottom-open #pro-chart {
        bottom: min(285px, 38vh) !important;
    }

    body.trade-desk-pro-page .pro-left-drawer {
        bottom: 74px !important;
        max-height: calc(100% - 186px) !important;
    }

    body.trade-desk-pro-page .pro-workstation.bottom-open .pro-left-drawer {
        bottom: calc(min(285px, 38vh) + 16px) !important;
        max-height: calc(100% - 112px - min(285px, 38vh) - 16px) !important;
    }

    body.trade-desk-pro-page .pro-right-drawer {
        max-height: calc(100% - 128px - 58px) !important;
    }

    body.trade-desk-pro-page .pro-workstation.bottom-open .pro-right-drawer {
        max-height: calc(100% - 128px - min(285px, 38vh)) !important;
    }
}

@media (min-width: 1101px) and (max-width: 1500px) {
    body.trade-desk-pro-page #pro-chart {
        bottom: 58px !important;
    }

    body.trade-desk-pro-page .pro-workstation.bottom-open #pro-chart {
        bottom: min(285px, 38vh) !important;
    }

    body.trade-desk-pro-page .pro-left-drawer {
        bottom: 74px !important;
        max-height: calc(100% - 246px) !important;
    }

    body.trade-desk-pro-page .pro-workstation.bottom-open .pro-left-drawer {
        bottom: calc(min(285px, 38vh) + 16px) !important;
        max-height: calc(100% - 172px - min(285px, 38vh) - 16px) !important;
    }

    body.trade-desk-pro-page .pro-right-drawer {
        max-height: calc(100% - 188px - 58px) !important;
    }

    body.trade-desk-pro-page .pro-workstation.bottom-open .pro-right-drawer {
        max-height: calc(100% - 188px - min(285px, 38vh)) !important;
    }
}

/* Options Chain Pro alignment fix */
.options-chain-pro-page .ocp-chain {
    table-layout: fixed !important;
    min-width: 1500px !important;
}

.options-chain-pro-page .ocp-chain th,
.options-chain-pro-page .ocp-chain td {
    width: 62px !important;
    max-width: 62px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.options-chain-pro-page .ocp-chain th.strike,
.options-chain-pro-page .ocp-chain td.strike {
    position: static !important;
    left: auto !important;
    width: 92px !important;
    max-width: 92px !important;
    min-width: 92px !important;
    text-align: center !important;
    background: rgba(15,23,42,0.96) !important;
    border-left: 1px solid rgba(148,163,184,0.22) !important;
    border-right: 1px solid rgba(148,163,184,0.22) !important;
    z-index: auto !important;
}

.options-chain-pro-page .ocp-chain th {
    position: sticky !important;
    top: 0 !important;
}

.options-chain-pro-page .ocp-chain th.strike {
    z-index: 3 !important;
}

.options-chain-pro-page .ocp-contract.ocp-itm {
    background: rgba(34,197,94,0.105) !important;
}

.options-chain-pro-page .ocp-contract.ocp-otm {
    background: rgba(255,255,255,0.025) !important;
}

.options-chain-pro-page .ocp-contract.ocp-atm {
    background: rgba(56,189,248,0.14) !important;
}

.options-chain-pro-page .ocp-chain tr.ocp-atm-row td.strike {
    background: rgba(56,189,248,0.22) !important;
    color: #e0f2fe !important;
}

/* Options Chain Pro compact usable layout */
.options-chain-pro-page .ocp-chain {
    table-layout: fixed !important;
    min-width: 980px !important;
    width: 100% !important;
}

.options-chain-pro-page .ocp-chain th,
.options-chain-pro-page .ocp-chain td {
    width: auto !important;
    max-width: none !important;
    padding: 7px 8px !important;
    font-size: 12px !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.options-chain-pro-page .ocp-chain th.strike,
.options-chain-pro-page .ocp-chain td.strike {
    position: static !important;
    left: auto !important;
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    text-align: center !important;
    font-size: 13px !important;
}

.options-chain-pro-page .ocp-side-title {
    text-align: center !important;
    background: rgba(15,23,42,0.96) !important;
    color: #e2e8f0 !important;
    font-size: 12px !important;
}

.options-chain-pro-page .ocp-chain-wrap {
    overflow-x: auto !important;
}

.options-chain-pro-page .ocp-contract {
    min-width: 60px !important;
}

.options-chain-pro-page .ocp-empty {
    color: rgba(203,213,225,0.42) !important;
}

@media (min-width: 1300px) {
    .options-chain-pro-page .ocp-chain {
        min-width: 100% !important;
    }
}

@media (max-width: 900px) {
    .options-chain-pro-page .ocp-chain {
        min-width: 980px !important;
    }
}

/* Options Chain Pro column settings */
.options-chain-pro-page .ocp-column-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 16px;
}

.options-chain-pro-page .ocp-column-select {
    width: 100%;
    min-height: 260px;
    border: 1px solid rgba(148,163,184,0.18);
    background: rgba(0,0,0,0.28);
    color: white;
    border-radius: 14px;
    padding: 8px;
    font-size: 15px;
}

.options-chain-pro-page .ocp-column-select option {
    padding: 8px;
}

.options-chain-pro-page .ocp-column-buttons,
.options-chain-pro-page .ocp-column-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.options-chain-pro-page .ocp-column-actions {
    justify-content: flex-end;
    border-top: 1px solid rgba(148,163,184,0.16);
    padding-top: 14px;
}

@media (max-width: 700px) {
    .options-chain-pro-page .ocp-column-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Options Chain Pro show/hide column controls */
.options-chain-pro-page .ocp-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: 16px;
    background: rgba(255,255,255,0.045);
}

.options-chain-pro-page .ocp-column-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 14px;
    padding: 12px;
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: 16px;
    background: rgba(255,255,255,0.045);
}

.options-chain-pro-page .ocp-column-check {
    display: flex;
    gap: 7px;
    align-items: center;
    color: #e2e8f0;
    font-size: 14px;
    cursor: pointer;
}

.options-chain-pro-page .ocp-column-check input {
    accent-color: #38bdf8;
}

@media (max-width: 700px) {
    .options-chain-pro-page .ocp-column-checks {
        grid-template-columns: 1fr;
    }
}

/* Options Chain Pro order ticket */
.options-chain-pro-page .ocp-options-ticket {
    margin-top: 18px;
    border: 1px solid rgba(148,163,184,0.16);
    background: rgba(255,255,255,0.055);
    border-radius: 18px;
    padding: 14px;
}

.options-chain-pro-page .ocp-options-ticket h3 {
    margin-top: 0;
}

.options-chain-pro-page .ocp-ticket-side-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.options-chain-pro-page .ocp-ticket-side {
    border: 1px solid rgba(148,163,184,0.18);
    color: white;
    border-radius: 14px;
    padding: 11px;
    font-weight: 1000;
    cursor: pointer;
    background: rgba(255,255,255,0.075);
}

.options-chain-pro-page .ocp-ticket-side.buy.active {
    background: rgba(34,197,94,0.18);
    border-color: rgba(34,197,94,0.55);
}

.options-chain-pro-page .ocp-ticket-side.sell.active {
    background: rgba(239,68,68,0.18);
    border-color: rgba(239,68,68,0.55);
}

.options-chain-pro-page .ocp-ticket-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.options-chain-pro-page .ocp-price-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.options-chain-pro-page .ocp-order-preview {
    border: 1px solid rgba(56,189,248,0.28);
    background: rgba(56,189,248,0.08);
    border-radius: 14px;
    padding: 12px;
    color: #e0f2fe;
    font-weight: 800;
}

.options-chain-pro-page .ocp-submit-order {
    width: 100%;
    justify-content: center;
}

@media (max-width: 700px) {
    .options-chain-pro-page .ocp-ticket-grid {
        grid-template-columns: 1fr;
    }
}

/* Global live status pill */
.top-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 800;
    white-space: nowrap;
}

.top-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #eab308;
    box-shadow: 0 0 0 4px rgba(234,179,8,0.12);
}

.top-live-pill.live-ok {
    border-color: rgba(34,197,94,0.45);
    background: rgba(34,197,94,0.12);
}

.top-live-pill.live-ok .top-live-dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.14);
}

.top-live-pill.live-stale {
    border-color: rgba(234,179,8,0.45);
    background: rgba(234,179,8,0.12);
}

.top-live-pill.live-error {
    border-color: rgba(239,68,68,0.45);
    background: rgba(239,68,68,0.12);
}

.top-live-pill.live-error .top-live-dot {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.14);
}

#stripp3r-live-time {
    color: rgba(255,255,255,0.72);
    font-size: 12px;
}

@media (max-width: 900px) {
    .top-user-alerts {
        flex-wrap: wrap;
    }

    .top-live-pill {
        width: 100%;
        justify-content: center;
    }
}

/* Trade Desk Pro live chip */
.trade-desk-pro-page .pro-live-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(34,197,94,0.38);
    background: rgba(34,197,94,0.10);
    color: #bbf7d0;
    border-radius: 999px;
    padding: 8px 11px;
    font-weight: 900;
    font-size: 12px;
    white-space: nowrap;
}

/* Trade Desk Pro stock order preview */
.trade-desk-pro-page .pro-price-buttons {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.trade-desk-pro-page .pro-price-buttons .pro-icon-btn {
    flex: 1;
    min-width: 70px;
}

.trade-desk-pro-page .pro-order-preview {
    border: 1px solid rgba(56,189,248,0.28);
    background: rgba(56,189,248,0.08);
    border-radius: 14px;
    padding: 11px;
    color: #e0f2fe;
    font-weight: 800;
    font-size: 13px;
}

.trade-desk-pro-page .pro-submit-confirm {
    border: 1px solid rgba(234,179,8,0.38);
    background: rgba(234,179,8,0.10);
    border-radius: 14px;
    padding: 11px;
}

.trade-desk-pro-page .pro-submit-confirm-text {
    color: #fde68a;
    font-weight: 800;
    margin-bottom: 9px;
    font-size: 13px;
}

.trade-desk-pro-page .pro-submit-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Trade Desk Pro: safe stock order preview UI */
.trade-desk-pro-page .pro-price-buttons {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.trade-desk-pro-page .pro-price-buttons .pro-icon-btn {
    flex: 1;
    min-width: 70px;
}

.trade-desk-pro-page .pro-order-preview {
    border: 1px solid rgba(56,189,248,0.28);
    background: rgba(56,189,248,0.08);
    border-radius: 14px;
    padding: 11px;
    color: #e0f2fe;
    font-weight: 800;
    font-size: 13px;
}

/* Trade Desk Pro: stock submit confirmation */
.trade-desk-pro-page .pro-submit-confirm {
    border: 1px solid rgba(234,179,8,0.38);
    background: rgba(234,179,8,0.10);
    border-radius: 14px;
    padding: 11px;
}

.trade-desk-pro-page .pro-submit-confirm-text {
    color: #fde68a;
    font-weight: 800;
    margin-bottom: 9px;
    font-size: 13px;
}

.trade-desk-pro-page .pro-submit-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Trade Desk Pro: stock order confirmation as popup modal */
.trade-desk-pro-page #pro-stock-submit-confirm {
    position: fixed !important;
    inset: 0 !important;
    z-index: 5000 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 22px !important;
    background: rgba(0,0,0,0.68) !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.trade-desk-pro-page #pro-stock-submit-confirm .pro-submit-confirm-text,
.trade-desk-pro-page #pro-stock-submit-confirm .pro-submit-confirm-actions {
    width: min(520px, 94vw);
    background: rgba(8,13,28,0.96);
    border-left: 1px solid rgba(234,179,8,0.38);
    border-right: 1px solid rgba(234,179,8,0.38);
}

.trade-desk-pro-page #pro-stock-submit-confirm .pro-submit-confirm-text {
    border-top: 1px solid rgba(234,179,8,0.38);
    border-radius: 20px 20px 0 0;
    padding: 18px 18px 10px;
    color: #fde68a;
    font-size: 16px;
    font-weight: 900;
}

.trade-desk-pro-page #pro-stock-submit-confirm .pro-submit-confirm-actions {
    border-bottom: 1px solid rgba(234,179,8,0.38);
    border-radius: 0 0 20px 20px;
    padding: 10px 18px 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Trade Desk Pro: polished stock order confirmation modal */
.trade-desk-pro-page #pro-stock-submit-confirm {
    position: fixed !important;
    inset: 0 !important;
    z-index: 5000 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 22px !important;
    background: rgba(0,0,0,0.62) !important;
    border: 0 !important;
    border-radius: 0 !important;
    backdrop-filter: blur(10px);
}

.trade-desk-pro-page #pro-stock-submit-confirm .pro-submit-modal-card {
    width: min(460px, 94vw);
    border: 1px solid rgba(148,163,184,0.22);
    background:
        radial-gradient(circle at top left, rgba(56,189,248,0.11), transparent 36%),
        rgba(8,13,28,0.97);
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(0,0,0,0.58);
    padding: 18px;
}

.trade-desk-pro-page #pro-stock-submit-confirm .pro-submit-modal-title {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 1000;
    color: #eef6ff;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.trade-desk-pro-page #pro-stock-submit-confirm .pro-submit-confirm-text {
    width: auto !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    color: #cbd5e1 !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
}

.trade-desk-pro-page #pro-stock-submit-confirm .pro-submit-modal-preview {
    border: 1px solid rgba(56,189,248,0.30);
    background: rgba(56,189,248,0.09);
    color: #e0f2fe;
    border-radius: 16px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 850;
    margin-bottom: 14px;
}

.trade-desk-pro-page #pro-stock-submit-confirm .pro-submit-confirm-actions {
    width: auto !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.trade-desk-pro-page #pro-stock-submit-confirm .pro-submit-confirm-actions .btn {
    width: 100%;
    justify-content: center;
}

/* Trade Desk Pro: compact trade ticket so Limit mode fits better */
@media (min-width: 1101px) {
    body.trade-desk-pro-page .pro-right-drawer {
        width: clamp(300px, 22vw, 360px) !important;
        padding: 9px !important;
        max-height: calc(100% - 126px - 58px) !important;
    }

    body.trade-desk-pro-page .pro-workstation.bottom-open .pro-right-drawer {
        max-height: calc(100% - 126px - min(285px, 38vh)) !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-drawer-title {
        margin: -9px -9px 7px -9px !important;
        padding: 9px 10px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-drawer-title h2 {
        font-size: 17px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-mini-grid {
        gap: 6px !important;
        margin: 6px 0 8px 0 !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-mini-card {
        padding: 7px 8px !important;
        border-radius: 11px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-quote-label {
        font-size: 9px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-quote-value {
        font-size: 12px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer .form {
        gap: 6px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer label {
        font-size: 12px !important;
        margin-bottom: 2px !important;
    }

    body.trade-desk-pro-page .pro-right-drawer input,
    body.trade-desk-pro-page .pro-right-drawer select {
        padding: 7px 9px !important;
        min-height: 36px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
    }

    body.trade-desk-pro-page .pro-ticket-tabs {
        margin: 6px 0 !important;
        gap: 6px !important;
    }

    body.trade-desk-pro-page .pro-side {
        padding: 8px !important;
        border-radius: 11px !important;
    }

    body.trade-desk-pro-page .pro-price-buttons {
        gap: 5px !important;
    }

    body.trade-desk-pro-page .pro-price-buttons .pro-icon-btn {
        padding: 7px 8px !important;
        min-width: 0 !important;
        font-size: 12px !important;
    }

    body.trade-desk-pro-page .pro-order-preview {
        padding: 8px 9px !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
        border-radius: 12px !important;
    }

    body.trade-desk-pro-page #pro-preview-stock-order {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 4 !important;
        width: 100% !important;
        padding: 9px 11px !important;
        box-shadow: 0 -10px 24px rgba(8,13,28,0.72);
    }

    body.trade-desk-pro-page .pro-right-drawer .pro-muted {
        display: none !important;
    }
}

/* Standalone stock order preview modal */
.stock-order-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 8000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0,0,0,0.62);
    backdrop-filter: blur(10px);
}

.stock-order-preview-modal.open {
    display: flex;
}

.stock-order-preview-card {
    width: min(480px, 94vw);
    background:
        radial-gradient(circle at top left, rgba(56,189,248,0.12), transparent 36%),
        rgba(8,13,28,0.98);
    border: 1px solid rgba(148,163,184,0.22);
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(0,0,0,0.58);
    padding: 18px;
    color: #eef6ff;
}

.stock-order-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.stock-order-preview-kicker {
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.stock-order-preview-head h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.stock-order-preview-close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.22);
    background: rgba(255,255,255,0.08);
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.stock-order-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stock-order-preview-grid div {
    border: 1px solid rgba(148,163,184,0.14);
    background: rgba(255,255,255,0.055);
    border-radius: 15px;
    padding: 11px;
}

.stock-order-preview-grid .wide {
    grid-column: 1 / -1;
}

.stock-order-preview-grid span {
    display: block;
    color: #9fb0c7;
    font-size: 11px;
    margin-bottom: 4px;
}

.stock-order-preview-grid strong {
    display: block;
    color: #eef6ff;
    font-size: 17px;
    line-height: 1.2;
}

.stock-order-preview-note {
    margin-top: 12px;
    border: 1px solid rgba(234,179,8,0.32);
    background: rgba(234,179,8,0.09);
    color: #fde68a;
    border-radius: 15px;
    padding: 11px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 750;
}

.stock-order-preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.stock-order-preview-actions .btn {
    width: 100%;
    justify-content: center;
}

.trade-preview-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    z-index: 9000;
    display: none;
    max-width: min(640px, 92vw);
    border-radius: 999px;
    padding: 12px 16px;
    font-weight: 900;
    color: white;
    background: rgba(8,13,28,0.96);
    border: 1px solid rgba(148,163,184,0.24);
    box-shadow: 0 20px 55px rgba(0,0,0,0.35);
}

.trade-preview-toast.show {
    display: block;
}

.trade-preview-toast.success {
    border-color: rgba(34,197,94,0.45);
    background: rgba(22,101,52,0.96);
}

.trade-preview-toast.error {
    border-color: rgba(239,68,68,0.45);
    background: rgba(127,29,29,0.96);
}

/* Strategy Builder asset-type section toggle */
.sb-hidden {
    display: none !important;
}

/* Options Chain Pro strategy launch highlight */
.options-chain-pro-page .ocp-highlight-contract {
    outline: 2px solid rgba(56,189,248,0.9) !important;
    background: rgba(56,189,248,0.24) !important;
}

/* Strategy Scanner match actions */
.match-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* Strategy Scanner auto scan controls */
.scanner-auto-panel {
    display: grid;
    gap: 10px;
    border: 1px solid rgba(56,189,248,0.18);
    background: rgba(56,189,248,0.06);
    border-radius: 16px;
    padding: 12px;
}

/* Strategy Scanner exit matches */
.exit-match-card {
    border-color: rgba(234,179,8,0.24) !important;
    background: rgba(234,179,8,0.055) !important;
}

/* Strategy Scanner exit matches */
.exit-match-card {
    border-color: rgba(234,179,8,0.24) !important;
    background: rgba(234,179,8,0.055) !important;
}

/* Options Chain Pro strategy launch highlight */
.options-chain-pro-page .ocp-highlight-contract {
    outline: 2px solid rgba(56,189,248,0.9) !important;
    background: rgba(56,189,248,0.24) !important;
}

/* Strategy Events automation dry-run result */
.automation-dry-run-result {
    margin-top: 12px;
    border-radius: 14px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
}

.automation-dry-run-result.passed {
    border-color: rgba(34,197,94,0.38);
    background: rgba(34,197,94,0.10);
    color: #bbf7d0;
}

.automation-dry-run-result.blocked {
    border-color: rgba(239,68,68,0.38);
    background: rgba(239,68,68,0.10);
    color: #fecaca;
}

/* Strategy Events paper submit result */
.automation-submit-result {
    margin-top: 12px;
    border-radius: 14px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
}

.automation-submit-result.submitted {
    border-color: rgba(34,197,94,0.42);
    background: rgba(34,197,94,0.12);
    color: #bbf7d0;
}

.automation-submit-result.blocked {
    border-color: rgba(239,68,68,0.38);
    background: rgba(239,68,68,0.10);
    color: #fecaca;
}

/* Strategy paper order preview modal */
.strategy-preview-open {
    overflow: hidden;
}

.strategy-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.strategy-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(8px);
}

.strategy-preview-card {
    position: relative;
    width: min(760px, 96vw);
    max-height: 90vh;
    overflow: auto;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.14);
    background: #0b1220;
    box-shadow: 0 30px 90px rgba(0,0,0,0.55);
    padding: 18px;
}

.strategy-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.strategy-preview-head h2 {
    margin: 0;
    font-size: 24px;
}

.strategy-preview-head p,
.strategy-preview-sub,
.strategy-preview-note {
    color: #a8b3c7;
}

.strategy-preview-close {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: #fff;
    border-radius: 12px;
    width: 38px;
    height: 38px;
    font-size: 24px;
    cursor: pointer;
}

.strategy-preview-symbol {
    font-size: 22px;
    font-weight: 950;
    margin-bottom: 4px;
}

.strategy-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.strategy-preview-stat {
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.055);
    border-radius: 14px;
    padding: 12px;
}

.strategy-preview-stat span {
    display: block;
    color: #9fb0c7;
    font-size: 12px;
    margin-bottom: 5px;
}

.strategy-preview-stat strong {
    display: block;
    font-size: 18px;
}

.strategy-preview-warning,
.strategy-preview-blocked,
.strategy-preview-submitted {
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
}

.strategy-preview-warning {
    border: 1px solid rgba(234,179,8,0.35);
    background: rgba(234,179,8,0.10);
    color: #fde68a;
}

.strategy-preview-blocked {
    border: 1px solid rgba(239,68,68,0.38);
    background: rgba(239,68,68,0.10);
    color: #fecaca;
}

.strategy-preview-submitted {
    border: 1px solid rgba(34,197,94,0.42);
    background: rgba(34,197,94,0.12);
    color: #bbf7d0;
}

.strategy-preview-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.10);
    padding-top: 14px;
    margin-top: 14px;
}

@media (max-width: 700px) {
    .strategy-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* Fix Strategy Preview modal action buttons */
.strategy-preview-actions {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

.strategy-preview-actions .btn,
.strategy-preview-actions button {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
}

.strategy-preview-actions .btn.secondary {
    min-width: 110px !important;
}

#strategy-preview-confirm-submit {
    min-width: 180px !important;
}

@media (max-width: 520px) {
    .strategy-preview-actions {
        flex-wrap: wrap !important;
    }

    .strategy-preview-actions .btn,
    .strategy-preview-actions button {
        flex: 1 1 auto !important;
    }
}

/* Options Chain Pro - Multi-leg preview modal */
.ocp-mleg-preview-open {
    overflow: hidden;
}

.ocp-mleg-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.ocp-mleg-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.74);
    backdrop-filter: blur(8px);
}

.ocp-mleg-preview-card {
    position: relative;
    width: min(860px, 96vw);
    max-height: 90vh;
    overflow: auto;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.16);
    background: #08111f;
    color: #fff;
    box-shadow: 0 34px 100px rgba(0,0,0,.62);
    padding: 18px;
}

.ocp-mleg-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255,255,255,.10);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.ocp-mleg-preview-head h2 {
    margin: 0;
    font-size: 24px;
}

.ocp-mleg-preview-head p,
.ocp-mleg-preview-sub,
.ocp-mleg-preview-note {
    color: #a8b3c7;
}

.ocp-mleg-preview-close {
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.07);
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
}

button.ocp-mleg-preview-close {
    width: 40px;
    height: 40px;
    font-size: 24px;
}

.ocp-mleg-preview-main {
    border: 1px solid rgba(56,189,248,.28);
    background: rgba(56,189,248,.08);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
}

.ocp-mleg-preview-title {
    font-size: 22px;
    font-weight: 950;
}

.ocp-mleg-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.ocp-mleg-preview-stat {
    border: 1px solid rgba(255,255,255,.11);
    background: rgba(255,255,255,.055);
    border-radius: 14px;
    padding: 12px;
}

.ocp-mleg-preview-stat span {
    display: block;
    color: #9fb0c7;
    font-size: 12px;
    margin-bottom: 5px;
}

.ocp-mleg-preview-stat strong {
    display: block;
    font-size: 18px;
}

.ocp-mleg-preview-note {
    border: 1px solid rgba(234,179,8,.28);
    background: rgba(234,179,8,.08);
    color: #fde68a;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
}

.ocp-mleg-preview-section-title {
    margin: 12px 0 8px;
}

.ocp-mleg-preview-leg {
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.18);
    border-radius: 14px;
    padding: 10px;
    margin-bottom: 8px;
    color: #dbe7ff;
}

.ocp-mleg-preview-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,.10);
    padding-top: 14px;
    margin-top: 14px;
}

.ocp-mleg-preview-btn {
    border: 1px solid rgba(255,255,255,.14);
    color: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 900;
    cursor: pointer;
    width: auto !important;
}

.ocp-mleg-preview-btn.secondary {
    background: rgba(255,255,255,.08);
}

.ocp-mleg-preview-btn.primary {
    background: linear-gradient(135deg, rgba(37,99,235,.95), rgba(14,165,233,.95));
}

.ocp-mleg-preview-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.ocp-mleg-preview-blocked,
.ocp-mleg-preview-submitted {
    border-radius: 14px;
    padding: 12px;
    margin: 12px 0;
}

.ocp-mleg-preview-blocked {
    border: 1px solid rgba(239,68,68,.40);
    background: rgba(239,68,68,.12);
    color: #fecaca;
}

.ocp-mleg-preview-submitted {
    border: 1px solid rgba(34,197,94,.42);
    background: rgba(34,197,94,.12);
    color: #bbf7d0;
}

@media (max-width: 720px) {
    .ocp-mleg-preview-grid {
        grid-template-columns: 1fr;
    }

    .ocp-mleg-preview-actions {
        flex-wrap: wrap;
    }
}
