*{box-sizing:border-box}body{margin:0;background:#f4f7fb;color:#162033;font:14px Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}a{text-decoration:none;color:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:235px;position:fixed;inset:0 auto 0 0;background:#fff;border-right:1px solid #e3e9f2;padding:18px 14px;z-index:50}.brand{display:flex;align-items:center;gap:12px;padding:7px 10px 25px}.brand-mark{width:43px;height:43px;position:relative;border-radius:13px;background:linear-gradient(135deg,#c56b2b,#7b4f9e);box-shadow:0 10px 28px #7b4f9e22}.brand-mark:before{content:"";position:absolute;inset:2px;border:1px solid #ffffff55;border-radius:11px}.orb{position:absolute;width:12px;height:12px;border-radius:50%;left:15px;top:15px;background:#fff;box-shadow:0 0 0 5px #ffffff22,0 0 18px #fff9}.arc{position:absolute;border:2px solid #ffffffd0;border-left-color:transparent;border-bottom-color:transparent;border-radius:50%}.a{width:27px;height:27px;left:8px;top:8px;transform:rotate(35deg)}.b{width:35px;height:35px;left:4px;top:4px;opacity:.4;transform:rotate(215deg)}.pulse{position:absolute;inset:0;border-radius:13px;border:1px solid #c56b2b66;animation:pulse 2.6s ease-out infinite}@keyframes pulse{0%{transform:scale(.8);opacity:.7}70%,100%{transform:scale(1.25);opacity:0}}.brand-word{display:flex;flex-direction:column;line-height:1}.brand-word strong{font-size:20px;letter-spacing:-.6px}.brand-word strong span{color:#c56b2b}.brand-word small{font-size:7px;letter-spacing:2px;color:#8993a5;margin-top:6px}.sidebar nav a{display:block;padding:12px 14px;border-radius:8px;margin:4px 0;color:#667085;transition:.2s}.sidebar nav a:hover,.sidebar nav a.active{background:#f6eee9;color:#a65421;transform:translateX(3px)}.side-footer{position:absolute;left:14px;right:14px;bottom:16px}.user-chip{display:flex;flex-direction:column;padding:12px;border:1px solid #e3e9f2;border-radius:9px;background:#fafbfc}.user-chip span{color:#8390a2;font-size:11px;margin-top:3px;overflow:hidden;text-overflow:ellipsis}.signout{display:block;margin-top:8px;padding:9px;border:1px solid #e3e9f2;border-radius:7px;text-align:center;color:#64748b;font-size:12px}.main{width:calc(100% - 235px);margin-left:235px;padding:20px 32px}.topbar{height:58px;display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.top-title{color:#667085}.live-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#17956a;box-shadow:0 0 12px #17956a88;margin-right:7px}.top-actions{display:flex;gap:9px;align-items:center}.balance{padding:9px 12px;border:1px solid #e3e9f2;border-radius:8px;background:#fff}.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#c56b2b,#7b4f9e);color:#fff;font-weight:700}.icon-btn,.mobile-brand{display:none}.btn{border:0;border-radius:8px;padding:11px 16px;cursor:pointer;font-weight:700}.btn.primary{background:linear-gradient(135deg,#c56b2b,#a75326);color:white}.btn.ghost{background:white;border:1px solid #e3e9f2;color:#344054}.flash{padding:11px 14px;border-radius:8px;margin-bottom:16px}.flash.success{background:#e8f7f1;color:#147a59}.flash.error{background:#fff0f1;color:#b42336}.page-head{margin:10px 0 22px}.page-head h1{margin:6px 0;font-size:34px}.muted{color:#718096}.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.card{background:#fff;border:1px solid #e3e9f2;border-radius:13px;padding:18px;box-shadow:0 8px 28px #1b31500b}.metric small{color:#718096}.metric strong{display:block;font-size:26px;margin-top:6px}.up{color:#17956a}.down{color:#d94b5b}.row{display:grid;grid-template-columns:1.6fr .9fr;gap:14px;margin-top:14px}.chart{height:290px}.chart svg{width:100%;height:230px}.chart-line{fill:none;stroke:#c56b2b;stroke-width:3}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:11px;border-bottom:1px solid #e3e9f2}.table th{font-size:11px;color:#718096}.tag{display:inline-block;background:#f4f6fa;border:1px solid #e3e9f2;padding:5px 8px;border-radius:20px;font-size:11px;margin:3px}.bot-grid,.plan-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.bot-card{padding:20px}.bot-card h3{margin:12px 0 5px}.bot-card p{color:#718096;line-height:1.55}.price{font-size:23px;font-weight:800;margin:14px 0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field{display:flex;flex-direction:column;gap:6px}.field label{font-size:12px;color:#667085}.field input,.field select{height:42px;border:1px solid #d8e0ea;border-radius:7px;padding:0 11px;background:#fff}.field input:focus,.field select:focus{outline:none;border-color:#c56b2b;box-shadow:0 0 0 3px #c56b2b12}.spacer{height:14px}.empty{padding:35px;text-align:center;color:#718096;border:1px dashed #d8e0ea;border-radius:10px;background:#fff}.pointer-glow{position:fixed;width:180px;height:180px;border-radius:50%;pointer-events:none;z-index:1000;background:radial-gradient(circle,#c56b2b1b,#7b4f9e08 45%,transparent 72%);transform:translate(-50%,-50%);mix-blend-mode:multiply}.modal{display:none;position:fixed;inset:0;background:#18203355;backdrop-filter:blur(5px);align-items:center;justify-content:center;padding:18px;z-index:200}.modal.open{display:flex}.dialog{width:min(560px,100%);background:#fff;border:1px solid #e3e9f2;border-radius:14px;padding:25px;box-shadow:0 25px 70px #1b315030}.close{float:right;background:none;border:0;font-size:23px;color:#667085;cursor:pointer}@media(max-width:1050px){.sidebar{width:200px}.main{margin-left:200px;width:calc(100% - 200px);padding:18px}.grid4{grid-template-columns:repeat(2,1fr)}.bot-grid,.plan-grid{grid-template-columns:1fr 1fr}.row{grid-template-columns:1fr}}@media(max-width:720px){.sidebar{position:fixed;transform:translateX(-105%);transition:.25s;width:270px}.sidebar.open{transform:translateX(0)}.main{margin-left:0;width:100%;padding:14px}.mobile-brand{display:flex;gap:8px;align-items:center}.mobile-brand .icon-btn{display:block}.topbar{height:50px}.grid4,.bot-grid,.plan-grid,.form-grid{grid-template-columns:1fr}.table-wrap{overflow:auto}.card{padding:15px}.pointer-glow{display:none}}@media(prefers-reduced-motion:reduce){.pulse,.card,.btn,.sidebar nav a{animation:none!important;transition:none!important}}
.algo-market-widget {
    width: 100%;
    margin-top: 12px;
}

.algo-market-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.algo-market-assets,
.algo-market-ranges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.market-symbol,
.market-range {
    border: 1px solid #e1e7ef;
    background: #fff;
    color: #526071;
    border-radius: 7px;
    padding: 7px 11px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease;
}

.market-symbol:hover,
.market-range:hover {
    transform: translateY(-1px);
    border-color: #c56b2b;
}

.market-symbol.active,
.market-range.active {
    color: #fff;
    background: #c56b2b;
    border-color: #c56b2b;
}

.algo-market-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.algo-market-stats > div {
    padding: 9px 10px;
    border: 1px solid #e6ebf2;
    border-radius: 8px;
    background: #fbfcfe;
}

.algo-market-stats small {
    display: block;
    margin-bottom: 4px;
    color: #8b96a6;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .7px;
}

.algo-market-stats strong {
    display: block;
    color: #27364a;
    font-size: 13px;
}

.algo-chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    min-height: 240px;
    overflow: hidden;
    border: 1px solid #e6ebf2;
    border-radius: 9px;
    background: #fff;
}

#algoMarketCanvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.algo-chart-tooltip {
    position: absolute;
    z-index: 10;
    width: 155px;
    padding: 9px 10px;
    border: 1px solid #dfe5ed;
    border-radius: 7px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 8px 24px rgba(20,35,55,.12);
    color: #526071;
    font-family: Arial,sans-serif;
    font-size: 10px;
    line-height: 1.55;
    pointer-events: none;
}

.algo-chart-tooltip strong {
    color: #27364a;
}

.algo-market-legend {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: #778397;
    font-size: 10px;
}

.algo-market-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.algo-market-legend i {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.legend-price {
    background: #c56b2b;
}

.legend-buy {
    background: #16845f;
}

.legend-sell {
    background: #b42336;
}

.market-source {
    margin-left: auto;
}

.algo-market-note {
    margin-top: 8px;
    color: #9aa4b2;
    font-size: 9px;
    line-height: 1.5;
}

@media (max-width:760px) {

    .algo-market-stats {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .algo-chart-container {
        height: 260px;
    }

    .market-source {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width:480px) {

    .algo-market-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .algo-market-assets,
    .algo-market-ranges {
        width: 100%;
    }

    .market-symbol,
    .market-range {
        flex: 1;
    }
}


.support-access-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.support-access-card h3 {
    margin: 4px 0 6px;
}

.support-disabled {
    opacity: .48;
    cursor: not-allowed !important;
    filter: grayscale(.25);
}

.support-disabled:hover {
    transform: none !important;
}

@media (max-width: 650px) {
    .support-access-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .support-access-card .btn {
        width: 100%;
    }
}


/* =========================================================
   ALGOPLUS DASHBOARD LAYOUT
   ========================================================= */

.dashboard-container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px 30px 50px;
    box-sizing: border-box;
}

.dashboard-section {
    width: 100%;
    margin-bottom: 24px;
}

.dashboard-section:last-child {
    margin-bottom: 0;
}


/* ---------------------------------------------------------
   Dashboard header
   --------------------------------------------------------- */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.dashboard-header-copy {
    min-width: 0;
}

.dashboard-header-copy h1 {
    margin: 5px 0 8px;
    line-height: 1.15;
}

.dashboard-header-copy p {
    margin: 0;
    max-width: 720px;
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}


/* ---------------------------------------------------------
   Metric cards
   --------------------------------------------------------- */

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

.dashboard-metric {
    min-width: 0;
    min-height: 132px;
    padding: 20px;
    box-sizing: border-box;
}

.dashboard-metric small {
    display: block;
    margin-bottom: 12px;
}

.dashboard-metric strong {
    display: block;
    font-size: 27px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.dashboard-metric .metric-note {
    margin-top: 9px;
    font-size: 12px;
}


/* ---------------------------------------------------------
   Main content grid
   --------------------------------------------------------- */

.dashboard-main-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 2fr)
        minmax(300px, 1fr);
    gap: 20px;
    align-items: stretch;
}

.dashboard-main-grid > * {
    min-width: 0;
}


/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */

.dashboard-card {
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.dashboard-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.dashboard-card-header > div {
    min-width: 0;
}

.dashboard-card-header h3 {
    margin: 0 0 5px;
}

.dashboard-card-header p {
    margin: 0;
}


/* ---------------------------------------------------------
   Chart area
   --------------------------------------------------------- */

.dashboard-chart-card {
    min-height: 420px;
}

.dashboard-chart-wrap {
    width: 100%;
    min-width: 0;
    height: 310px;
    position: relative;
    overflow: hidden;
}

.dashboard-chart-wrap svg,
.dashboard-chart-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
}


/* ---------------------------------------------------------
   Right-side status panel
   --------------------------------------------------------- */

.dashboard-status-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.dashboard-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-width: 0;
    padding: 15px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.06);
}

.dashboard-status-item > div:first-child {
    min-width: 0;
}

.dashboard-status-item strong {
    display: block;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
}


/* ---------------------------------------------------------
   Action grid
   --------------------------------------------------------- */

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

.dashboard-action {
    min-width: 0;
    padding: 20px;
    transition:
        transform .22s ease,
        border-color .22s ease,
        background .22s ease,
        box-shadow .22s ease;
}

.dashboard-action:hover {
    transform: translateY(-3px);
    border-color: rgba(197,107,43,.35);
    background: rgba(255,255,255,.035);
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.dashboard-action h3 {
    margin: 0 0 7px;
}

.dashboard-action p {
    margin: 0 0 16px;
}


/* ---------------------------------------------------------
   Subscription / support area
   --------------------------------------------------------- */

.dashboard-bottom-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.dashboard-bottom-grid > * {
    min-width: 0;
}


/* ---------------------------------------------------------
   Dropdowns
   --------------------------------------------------------- */

.ap-dropdown {
    position: relative;
}

.ap-dropdown-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 150px;
    cursor: pointer;
}

.ap-dropdown-chevron {
    width: 7px;
    height: 7px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}

.ap-dropdown.open .ap-dropdown-chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}

.ap-dropdown-menu {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    min-width: 220px;
    padding: 7px;
    z-index: 1000;

    border-radius: 12px;
    background: rgba(25,25,27,.97);
    border: 1px solid rgba(255,255,255,.09);
    box-shadow:
        0 18px 50px rgba(0,0,0,.35),
        0 4px 15px rgba(0,0,0,.2);

    opacity: 0;
    visibility: hidden;
    transform:
        translateY(-7px)
        scale(.98);

    transform-origin: top right;

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;
}

.ap-dropdown.open .ap-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform:
        translateY(0)
        scale(1);
}

.ap-dropdown-menu a,
.ap-dropdown-menu button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    box-sizing: border-box;

    border: 0;
    border-radius: 8px;
    background: transparent;

    color: inherit;
    text-decoration: none;
    text-align: left;

    cursor: pointer;
    transition:
        background .16s ease,
        transform .16s ease;
}

.ap-dropdown-menu a:hover,
.ap-dropdown-menu button:hover {
    background: rgba(255,255,255,.06);
    transform: translateX(2px);
}


/* ---------------------------------------------------------
   Status badges
   --------------------------------------------------------- */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-active {
    color: #62d69b;
    background: rgba(98,214,155,.08);
}

.status-pending {
    color: #e0a85c;
    background: rgba(224,168,92,.08);
}

.status-disabled {
    color: #9ba1aa;
    background: rgba(155,161,170,.08);
}


/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.dashboard-actions .btn,
.dashboard-bottom-grid .btn {
    max-width: 100%;
    box-sizing: border-box;
}

.dashboard-actions .btn {
    white-space: nowrap;
}


/* ---------------------------------------------------------
   Entrance animation
   --------------------------------------------------------- */

.dashboard-section {
    animation:
        dashboardFadeIn .45s ease both;
}

.dashboard-section:nth-child(2) {
    animation-delay: .05s;
}

.dashboard-section:nth-child(3) {
    animation-delay: .10s;
}

.dashboard-section:nth-child(4) {
    animation-delay: .15s;
}

@keyframes dashboardFadeIn {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1150px) {

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

    .dashboard-main-grid,
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }

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

}


@media (max-width: 760px) {

    .dashboard-container {
        padding: 22px 18px 40px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .dashboard-metrics,
    .dashboard-actions {
        grid-template-columns: 1fr;
    }

    .dashboard-chart-card {
        min-height: 360px;
    }

    .dashboard-chart-wrap {
        height: 250px;
    }

    .dashboard-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

}


@media (max-width: 480px) {

    .dashboard-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .dashboard-metric {
        min-height: 115px;
        padding: 17px;
    }

    .dashboard-metric strong {
        font-size: 23px;
    }

    .dashboard-status-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .ap-dropdown-menu {
        position: fixed;
        left: 14px;
        right: 14px;
        top: auto;
        min-width: 0;
    }

}


/* =========================================================
   ALGOPLUS GLOBAL RESPONSIVE SYSTEM
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

img,
svg,
canvas {
    max-width: 100%;
}

button,
a,
input,
select,
textarea {
    font: inherit;
}


/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-section {
    width: 100%;
    margin-bottom: 24px;
    animation: apFadeIn .45s ease both;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-header-copy {
    min-width: 0;
}

.dashboard-header h1 {
    margin: 5px 0 8px;
    line-height: 1.12;
}

.dashboard-header p {
    margin: 0;
    max-width: 760px;
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}


/* Metrics */

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

.dashboard-metric {
    min-width: 0;
    min-height: 135px;
    padding: 21px;
    overflow: hidden;
}

.dashboard-metric small {
    display: block;
    margin-bottom: 12px;
}

.dashboard-metric strong {
    display: block;
    font-size: 28px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.dashboard-metric span {
    display: block;
    margin-top: 9px;
}


/* Main dashboard grid */

.dashboard-main-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 2fr)
        minmax(300px, 1fr);
    gap: 20px;
    align-items: stretch;
}

.dashboard-main-grid > * {
    min-width: 0;
}


/* Chart */

.dashboard-chart-card {
    min-width: 0;
    min-height: 410px;
    overflow: hidden;
}

.dashboard-chart-card svg,
.dashboard-chart-card canvas {
    display: block;
    width: 100%;
    max-width: 100%;
}


/* Cards */

.dashboard-card {
    min-width: 0;
    overflow: hidden;
}

.dashboard-card h3 {
    margin-top: 0;
}


/* Support */

.support-access-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 21px;
}

.support-access-card > div:first-child {
    min-width: 0;
}

.support-access-card h3 {
    margin: 5px 0 7px;
}

.support-access-card p {
    margin: 0;
}


/* =========================================================
   QUICK ACTIONS
   ========================================================= */

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

.dashboard-action {
    min-width: 0;
    padding: 20px;
    overflow: hidden;
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        border-color .22s ease,
        background .22s ease;
}

.dashboard-action:hover {
    transform: translateY(-4px);
    border-color: rgba(197,107,43,.35);
    box-shadow: 0 15px 35px rgba(0,0,0,.18);
}


/* =========================================================
   DROPDOWNS
   ========================================================= */

.ap-dropdown {
    position: relative;
}

.ap-dropdown-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

.ap-dropdown-chevron {
    width: 7px;
    height: 7px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.ap-dropdown.open .ap-dropdown-chevron {
    transform: rotate(225deg);
}

.ap-dropdown-menu {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    min-width: 220px;
    padding: 7px;
    z-index: 1000;

    border-radius: 12px;
    background: rgba(25,25,27,.98);
    border: 1px solid rgba(255,255,255,.09);

    box-shadow:
        0 20px 50px rgba(0,0,0,.35);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.98);

    transform-origin: top right;

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;
}

.ap-dropdown.open .ap-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.ap-dropdown-menu a,
.ap-dropdown-menu button {
    display: flex;
    width: 100%;
    padding: 11px 12px;

    border: 0;
    border-radius: 8px;
    background: transparent;

    color: inherit;
    text-decoration: none;
    text-align: left;

    cursor: pointer;

    transition:
        background .15s ease,
        transform .15s ease;
}

.ap-dropdown-menu a:hover,
.ap-dropdown-menu button:hover {
    background: rgba(255,255,255,.06);
    transform: translateX(2px);
}


/* =========================================================
   PUBLIC LANDING PAGE
   ========================================================= */

.public-page .main {
    min-width: 0;
}

.public-container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 30px;
}

.public-section {
    width: 100%;
    margin-bottom: 24px;
}

.public-fade {
    animation: apFadeIn .5s ease both;
}


/* Hero */

.public-hero {
    display: grid;
    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(300px, .65fr);
    gap: 22px;
    align-items: stretch;
}

.public-hero > * {
    min-width: 0;
}

.public-hero-main {
    min-height: 380px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.public-hero-main h1 {
    max-width: 900px;
    margin: 8px 0 14px;

    font-size: clamp(
        36px,
        5vw,
        64px
    );

    line-height: 1.03;
    letter-spacing: -.035em;
}

.public-hero-main p {
    max-width: 730px;
    line-height: 1.7;
}

.public-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.public-hero-side {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.public-stat {
    min-width: 0;
    padding: 23px;
}

.public-stat small {
    display: block;
    margin-bottom: 10px;
}

.public-stat strong {
    display: block;
    font-size: 29px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}


/* Public metrics */

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

.public-grid > * {
    min-width: 0;
}


/* Public content */

.public-content-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 2fr)
        minmax(300px, 1fr);
    gap: 20px;
}

.public-content-grid > * {
    min-width: 0;
}

.public-card {
    min-width: 0;
    padding: 24px;
    overflow: hidden;
}

.public-card h2,
.public-card h3 {
    margin-top: 0;
}

.public-card p {
    line-height: 1.65;
}


/* Public chart */

.public-chart {
    width: 100%;
    height: 310px;
    overflow: hidden;
}

.public-chart svg,
.public-chart canvas {
    display: block;
    width: 100%;
    height: 100%;
}


/* Features */

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

.public-feature {
    min-width: 0;
    padding: 23px;

    transition:
        transform .22s ease,
        border-color .22s ease,
        box-shadow .22s ease;
}

.public-feature:hover {
    transform: translateY(-4px);
    border-color: rgba(197,107,43,.35);
    box-shadow: 0 15px 35px rgba(0,0,0,.18);
}

.public-feature h3 {
    margin: 0 0 8px;
}

.public-feature p {
    margin: 0;
}


/* =========================================================
   GENERAL HOVER INTERACTION
   ========================================================= */

.card {
    transition:
        transform .22s ease,
        border-color .22s ease,
        box-shadow .22s ease;
}

.card:hover {
    border-color: rgba(197,107,43,.18);
}

.btn {
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        opacity .18s ease;
}

.btn:not(:disabled):hover {
    transform: translateY(-2px);
}

.btn:not(:disabled):active {
    transform: translateY(0);
}


/* =========================================================
   ANIMATION
   ========================================================= */

@keyframes apFadeIn {

    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   TABLES
   ========================================================= */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrap table {
    width: 100%;
    min-width: 650px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 1150px) {

    .dashboard-metrics,
    .public-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .dashboard-main-grid,
    .public-content-grid {
        grid-template-columns: 1fr;
    }

    .public-hero {
        grid-template-columns: 1fr;
    }

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

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

}


@media (max-width: 760px) {

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .dashboard-metrics,
    .dashboard-actions,
    .public-grid,
    .public-features {
        grid-template-columns: 1fr;
    }

    .support-access-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .support-access-card .btn {
        width: 100%;
    }

    .public-container {
        padding: 22px 18px 45px;
    }

    .public-hero-main {
        min-height: 330px;
        padding: 25px;
    }

    .public-hero-main h1 {
        font-size: 40px;
    }

    .public-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .public-actions .btn {
        width: 100%;
        text-align: center;
    }

    .public-chart {
        height: 250px;
    }

}


@media (max-width: 480px) {

    .public-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .dashboard-metric {
        min-height: 115px;
        padding: 17px;
    }

    .dashboard-metric strong {
        font-size: 23px;
    }

    .public-hero-main {
        padding: 20px;
    }

    .public-hero-main h1 {
        font-size: 33px;
    }

    .ap-dropdown-menu {
        position: fixed;
        left: 14px;
        right: 14px;
        top: auto;
        min-width: 0;
    }

}


/* =========================================================
   REDUCE MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

}

/* =========================================================
   MARKET GRAPH FIX
   ========================================================= */

.market-chart,
.chart,
.dashboard-chart-card,
.public-chart {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.market-chart {
    position: relative;
    height: 320px;
}

.market-chart svg,
.market-chart canvas,
.chart svg,
.chart canvas,
.dashboard-chart-card svg,
.dashboard-chart-card canvas,
.public-chart svg,
.public-chart canvas {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
}

.dashboard-chart-card {
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.dashboard-chart-card > svg {
    height: 300px;
}

.public-chart {
    height: 300px;
}

.public-chart > svg {
    height: 100%;
}

@media (max-width: 760px) {

    .market-chart {
        height: 250px;
    }

    .dashboard-chart-card > svg {
        height: 250px;
    }

    .public-chart {
        height: 240px;
    }

}

@media (max-width: 480px) {

    .market-chart {
        height: 210px;
    }

    .dashboard-chart-card > svg {
        height: 210px;
    }

    .public-chart {
        height: 210px;
    }

}



/* =========================================================
   ALGOPLUS RESPONSIVE SYSTEM
   ========================================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
svg,
canvas,
iframe {
    max-width: 100%;
}

.app-shell,
.main,
.public-main,
.dashboard-main {
    min-width: 0;
    max-width: 100%;
}

.main {
    width: 100%;
}

.card,
.row,
.grid4,
.dashboard-main-grid,
.dashboard-metrics {
    min-width: 0;
    max-width: 100%;
}

.row {
    display: grid;
    grid-template-columns:
        minmax(0, 2fr)
        minmax(280px, 1fr);
    gap: 20px;
    align-items: stretch;
}

.row > *,
.grid4 > *,
.dashboard-main-grid > *,
.dashboard-metrics > * {
    min-width: 0;
    max-width: 100%;
}


/* ---------------------------------------------------------
   TradingView chart
   --------------------------------------------------------- */

.ap-tv-chart {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.ap-tv-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
}

.ap-tv-chart-header h3 {
    margin: 4px 0 0;
}

.ap-tv-badge {
    flex-shrink: 0;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 10px;
    letter-spacing: .08em;
    border: 1px solid rgba(197,107,43,.25);
    background: rgba(197,107,43,.08);
}

.ap-tv-chart-frame {
    width: 100%;
    max-width: 100%;
    height: 390px;
    min-height: 280px;
    overflow: hidden;
    border-radius: 10px;
}

.ap-tv-chart-frame .tradingview-widget-container {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
}

.ap-tv-chart-frame
.tradingview-widget-container__widget {
    width: 100% !important;
    height: calc(100% - 28px) !important;
    max-width: 100% !important;
}

.tradingview-widget-copyright {
    height: 28px;
    padding-top: 5px;
    font-size: 10px;
    opacity: .45;
}

.tradingview-widget-copyright a {
    color: inherit;
    text-decoration: none;
}


/* ---------------------------------------------------------
   Page headings
   --------------------------------------------------------- */

.page-head {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 24px;
}

.page-head h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.page-head p {
    max-width: 760px;
}


/* ---------------------------------------------------------
   Metrics
   --------------------------------------------------------- */

.grid4,
.dashboard-metrics {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.metric,
.dashboard-metric {
    min-width: 0;
    overflow: hidden;
}

.metric strong,
.dashboard-metric strong {
    overflow-wrap: anywhere;
}


/* ---------------------------------------------------------
   Buttons and actions
   --------------------------------------------------------- */

.top-actions,
.public-actions,
.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    max-width: 100%;
    white-space: normal;
}


/* ---------------------------------------------------------
   Navigation
   --------------------------------------------------------- */

.sidebar {
    min-width: 0;
}

.sidebar nav a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 1150px) {

    .grid4,
    .dashboard-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .row,
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    .ap-tv-chart-frame {
        height: 350px;
    }

}


/* ---------------------------------------------------------
   Phone
   --------------------------------------------------------- */

@media (max-width: 760px) {

    .main {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-head {
        margin-bottom: 18px;
    }

    .page-head h1 {
        font-size: clamp(28px, 9vw, 40px);
        line-height: 1.08;
    }

    .grid4,
    .dashboard-metrics {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .row,
    .dashboard-main-grid {
        gap: 14px;
    }

    .card {
        width: 100%;
        max-width: 100%;
    }

    .ap-tv-chart-header {
        align-items: flex-start;
    }

    .ap-tv-chart-frame {
        height: 300px;
        min-height: 240px;
    }

    .top-actions,
    .public-actions,
    .dashboard-actions {
        width: 100%;
    }

}


/* ---------------------------------------------------------
   Small phones
   --------------------------------------------------------- */

@media (max-width: 480px) {

    .main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-head h1 {
        font-size: 30px;
    }

    .card {
        padding: 16px;
    }

    .ap-tv-chart-header {
        display: block;
    }

    .ap-tv-badge {
        display: inline-block;
        margin-top: 10px;
    }

    .ap-tv-chart-frame {
        height: 260px;
        min-height: 220px;
    }

    .btn {
        min-height: 44px;
    }

}


/* ---------------------------------------------------------
   Prevent long content from breaking layouts
   --------------------------------------------------------- */

h1,
h2,
h3,
h4,
p,
small,
span,
a,
strong {
    overflow-wrap: anywhere;
}

input,
select,
textarea {
    max-width: 100%;
}


/* ---------------------------------------------------------
   Reduced motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

}



/* =========================================================
   DASHBOARD CHART FIRST LAYOUT
   ========================================================= */

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: 100%;
    min-width: 0;
}

.dashboard-main-grid > * {
    min-width: 0;
    width: 100%;
}

.dashboard-chart-card {
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.dashboard-chart-card .ap-tv-chart,
.dashboard-chart-card .ap-tv-chart-frame,
.dashboard-chart-card .tradingview-widget-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}


/* Compact account information below chart */

.dashboard-metrics {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin-top: 18px;
}

.dashboard-metric {
    min-width: 0;
    min-height: 92px;
    padding: 15px 17px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.dashboard-metric small {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    opacity: .65;
}

.dashboard-metric strong {
    display: block;
    font-size: 21px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.dashboard-metric span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
}


/* Support remains separate */

.support-access-card {
    margin-bottom: 20px;
}


/* Chart receives priority */

.ap-tv-chart-frame {
    width: 100%;
    max-width: 100%;
    height: 430px;
    min-height: 300px;
    overflow: hidden;
}

.ap-tv-chart-frame .tradingview-widget-container {
    width: 100% !important;
    height: 100% !important;
}

.ap-tv-chart-frame
.tradingview-widget-container__widget {
    width: 100% !important;
    height: calc(100% - 28px) !important;
}


/* Laptop */

@media (max-width: 1100px) {

    .ap-tv-chart-frame {
        height: 390px;
    }

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

}


/* Tablet */

@media (max-width: 760px) {

    .dashboard-main-grid {
        gap: 14px;
    }

    .ap-tv-chart-frame {
        height: 320px;
        min-height: 260px;
    }

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

    .dashboard-metric {
        min-height: 82px;
        padding: 13px;
    }

}


/* Phone */

@media (max-width: 480px) {

    .ap-tv-chart-frame {
        height: 270px;
        min-height: 220px;
    }

    .dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-metric {
        min-height: 78px;
    }

}


/* =========================================================
   FINAL DASHBOARD CHART LAYOUT FIX
   ========================================================= */

/* Main dashboard row must allow the chart to determine
   its own height. */

.dashboard-main-grid {
    display: grid !important;
    grid-template-columns:
        minmax(0, 2fr)
        minmax(300px, 1fr) !important;

    gap: 20px !important;

    align-items: start !important;

    width: 100% !important;
    min-width: 0 !important;
}


/* Every column must be allowed to shrink correctly. */

.dashboard-main-grid > * {
    min-width: 0 !important;
    max-width: 100% !important;
}


/* Chart card must grow around the TradingView widget. */

.dashboard-chart-card,
.dashboard-main-grid .chart {
    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    min-height: 0 !important;

    overflow: hidden !important;

    align-self: start !important;
}


/* TradingView wrapper */

.dashboard-chart-card .ap-tv-chart {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    overflow: hidden !important;
}


/* Chart header */

.dashboard-chart-card .ap-tv-chart-header {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 14px;
}


/* Actual TradingView area */

.dashboard-chart-card .ap-tv-chart-frame {
    width: 100% !important;
    max-width: 100% !important;

    height: 330px !important;
    min-height: 330px !important;

    overflow: hidden !important;

    border-radius: 10px;
}


/* TradingView itself */

.dashboard-chart-card
.tradingview-widget-container {
    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    min-width: 0 !important;

    overflow: hidden !important;
}


.dashboard-chart-card
.tradingview-widget-container__widget {
    width: 100% !important;

    height: calc(100% - 28px) !important;

    max-width: 100% !important;
}


/* Copyright line must stay inside chart */

.dashboard-chart-card
.tradingview-widget-copyright {
    height: 28px !important;
    max-height: 28px !important;

    overflow: hidden !important;

    padding-top: 5px !important;

    font-size: 10px !important;
}


/* =========================================================
   METRICS
   ========================================================= */

.dashboard-metrics {
    position: relative !important;

    clear: both;

    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

    gap: 14px !important;

    width: 100% !important;
    max-width: 100% !important;

    margin-top: 20px !important;

    min-width: 0 !important;
}


/* Metrics must never overlap the chart */

.dashboard-metrics,
.dashboard-metrics > * {
    position: relative !important;
    z-index: 2 !important;
}


.dashboard-metric {
    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    min-height: 100px !important;

    padding: 16px !important;

    overflow: hidden !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}


.dashboard-metric strong {
    display: block !important;

    font-size: 23px !important;
    line-height: 1.15 !important;

    overflow-wrap: anywhere !important;
}


/* =========================================================
   WHY ALGOPLUS CARD
   ========================================================= */

.dashboard-main-grid > .card:not(.dashboard-chart-card) {
    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    height: auto !important;
    min-height: 330px !important;

    overflow: hidden !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .dashboard-main-grid {
        grid-template-columns: 1fr !important;
    }

    .dashboard-main-grid > .card:not(.dashboard-chart-card) {
        min-height: 0 !important;
    }

    .dashboard-chart-card
    .ap-tv-chart-frame {
        height: 350px !important;
        min-height: 350px !important;
    }

    .dashboard-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
    }

}


/* =========================================================
   PHONE
   ========================================================= */

@media (max-width: 700px) {

    .dashboard-main-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .dashboard-chart-card
    .ap-tv-chart-frame {
        height: 290px !important;
        min-height: 290px !important;
    }

    .dashboard-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 10px !important;

        margin-top: 14px !important;
    }

    .dashboard-metric {
        min-height: 90px !important;
        padding: 14px !important;
    }

}


/* =========================================================
   SMALL PHONE
   ========================================================= */

@media (max-width: 480px) {

    .dashboard-chart-card
    .ap-tv-chart-frame {
        height: 250px !important;
        min-height: 250px !important;
    }

    .dashboard-metrics {
        grid-template-columns: 1fr !important;
    }

    .dashboard-metric {
        min-height: 78px !important;
    }

    .dashboard-chart-card
    .ap-tv-chart-header {
        display: block !important;
    }

    .dashboard-chart-card
    .ap-tv-badge {
        display: inline-block;

        margin-top: 8px;
    }

}


/* =========================================================
   PREVENT PAGE-WIDE HORIZONTAL SCROLL
   ========================================================= */

html,
body {
    width: 100% !important;
    max-width: 100% !important;

    overflow-x: hidden !important;
}

.main,
.dashboard-main,
.dashboard-section {
    min-width: 0 !important;
    max-width: 100% !important;
}


/* =========================================================
   ALGOPLUS HOMEPAGE FINAL CHART FIX
   Targets the actual homepage classes:
   .row
   .card.chart
   .grid4
   ========================================================= */

/* Main two-column section */
.main .row {
    display: grid !important;

    grid-template-columns:
        minmax(0, 2fr)
        minmax(300px, 1fr) !important;

    gap: 20px !important;

    align-items: start !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    min-height: 0 !important;

    margin-bottom: 0 !important;

    overflow: visible !important;
}


/* Both cards must respect the grid */
.main .row > .card {
    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;
    min-height: 0 !important;

    height: auto !important;

    align-self: start !important;

    overflow: hidden !important;
}


/* Account Performance card */
.main .row > .card.chart {
    height: auto !important;

    min-height: 0 !important;

    overflow: hidden !important;

    padding-bottom: 16px !important;
}


/* =========================================================
   TradingView container
   ========================================================= */

.main .row .ap-tv-chart {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    height: auto !important;

    overflow: hidden !important;
}


/* Header above chart */
.main .row .ap-tv-chart-header {
    width: 100% !important;

    display: flex !important;

    align-items: center !important;
    justify-content: space-between !important;

    gap: 12px !important;

    margin-bottom: 12px !important;
}


/* Actual chart box */
.main .row .ap-tv-chart-frame {
    display: block !important;

    position: relative !important;

    width: 100% !important;
    max-width: 100% !important;

    height: 310px !important;
    min-height: 310px !important;

    overflow: hidden !important;

    border-radius: 8px !important;
}


/* TradingView outer container */
.main .row
.ap-tv-chart-frame
.tradingview-widget-container {
    position: relative !important;

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    height: 100% !important;

    min-width: 0 !important;

    overflow: hidden !important;
}


/* TradingView widget */
.main .row
.ap-tv-chart-frame
.tradingview-widget-container__widget {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    height: calc(100% - 25px) !important;

    min-height: 0 !important;

    overflow: hidden !important;
}


/* TradingView iframe */
.main .row
.ap-tv-chart-frame iframe {
    display: block !important;

    width: 100% !important;

    max-width: 100% !important;

    height: 100% !important;

    border: 0 !important;
}


/* TradingView copyright */
.main .row
.tradingview-widget-copyright {
    display: block !important;

    width: 100% !important;

    height: 25px !important;
    max-height: 25px !important;

    overflow: hidden !important;

    padding-top: 4px !important;

    font-size: 9px !important;
}


/* =========================================================
   RIGHT HAND WHY ALGOPLUS CARD
   ========================================================= */

.main .row > .card:not(.chart) {
    height: 100% !important;

    min-height: 310px !important;

    align-self: stretch !important;
}


/* =========================================================
   METRIC CARDS
   These must sit AFTER the entire .row.
   ========================================================= */

.main > .grid4 {
    position: relative !important;

    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

    gap: 16px !important;

    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    clear: both !important;

    margin-top: 20px !important;

    padding-top: 0 !important;

    z-index: 5 !important;

    transform: none !important;
}


/* Individual metric cards */
.main > .grid4 > .card {
    position: relative !important;

    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    height: auto !important;

    min-height: 105px !important;

    overflow: hidden !important;

    align-self: stretch !important;
}


/* =========================================================
   Remove old chart height restrictions
   ========================================================= */

.main .row .chart svg {
    max-width: 100% !important;
    height: auto !important;
}


/* =========================================================
   LAPTOP
   ========================================================= */

@media (max-width: 1100px) {

    .main .row {
        grid-template-columns:
            minmax(0, 1.7fr)
            minmax(280px, 1fr) !important;

        gap: 16px !important;
    }

    .main .row .ap-tv-chart-frame {
        height: 300px !important;
        min-height: 300px !important;
    }

    .main > .grid4 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 14px !important;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 800px) {

    .main .row {
        grid-template-columns: 1fr !important;

        gap: 14px !important;
    }

    .main .row > .card:not(.chart) {
        min-height: 0 !important;
    }

    .main .row .ap-tv-chart-frame {
        height: 300px !important;
        min-height: 300px !important;
    }

    .main > .grid4 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        margin-top: 14px !important;
    }

}


/* =========================================================
   PHONE
   ========================================================= */

@media (max-width: 600px) {

    .main {
        width: 100% !important;
        max-width: 100% !important;

        overflow-x: hidden !important;
    }

    .main .row {
        width: 100% !important;

        grid-template-columns: 1fr !important;

        gap: 14px !important;
    }

    .main .row > .card {
        width: 100% !important;
    }

    .main .row .ap-tv-chart-header {
        display: block !important;
    }

    .main .row .ap-tv-chart-header h3 {
        margin-bottom: 5px !important;
    }

    .main .row .ap-tv-badge {
        display: inline-block !important;

        margin-top: 7px !important;
    }

    .main .row .ap-tv-chart-frame {
        width: 100% !important;

        height: 260px !important;
        min-height: 260px !important;
    }

    .main > .grid4 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 10px !important;

        margin-top: 14px !important;
    }

    .main > .grid4 > .card {
        min-height: 90px !important;

        padding: 14px !important;
    }

}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 420px) {

    .main > .grid4 {
        grid-template-columns: 1fr !important;
    }

    .main .row .ap-tv-chart-frame {
        height: 235px !important;
        min-height: 235px !important;
    }

}


/* =========================================================
   ABSOLUTE SAFETY
   ========================================================= */

.main .row *,
.main > .grid4 * {
    max-width: 100%;
}

.main .row,
.main > .grid4 {
    box-sizing: border-box !important;
}

