:root {
    --bg: #070b12;
    --surface: #0d1421;
    --surface-2: #111b2c;
    --panel: #ffffff;
    --soft: #f4f7fb;
    --ink: #121827;
    --muted: #6b7280;
    --line: #dce3ee;
    --line-dark: #223049;
    --brand: #00b386;
    --brand-2: #19d3a2;
    --blue: #3b82f6;
    --danger: #e5484d;
    --warning: #f59e0b;
    --shadow: 0 20px 60px rgba(7, 11, 18, 0.16);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--design-surface, var(--soft));
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    border: 0;
    cursor: pointer;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--brand);
    color: #03100c;
    font-weight: 900;
}

.brand img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: contain;
    background: white;
}

.brand.center {
    justify-content: center;
}

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 11px 18px;
    background: var(--brand);
    color: #03100c;
    font-weight: 800;
}

.btn.small {
    min-height: 36px;
    padding: 8px 13px;
}

.btn.secondary {
    background: #eef6ff;
    border: 1px solid #bfdbfe;
    color: #0f3f74;
}

.btn.secondary:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #0b315f;
}

.side-nav a.active,
.settings-index a.active,
.tab-switcher label:hover,
.tab-switcher input:checked + label,
.mini.approve,
.status.approved {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #03100c !important;
}

.side-nav a:hover,
.settings-index a:hover,
.table-action,
.permission-editor summary,
.up,
.positive,
.eyebrow {
    color: var(--brand) !important;
}

.check-row input,
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--brand);
}

.brand span,
.balance-pill,
.nav-badge,
.price-line,
.spec-chart-toolbar button.active,
.order-type-row button.active {
    background: var(--brand) !important;
    color: #03100c !important;
}

.market-watchlist button:hover,
.market-watchlist button.active,
.spec-side-toggle label:has(input:checked),
.market-chip.active,
.theme-card:has(input:checked) {
    border-color: var(--brand) !important;
}

.landing-body {
    background:
        radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--brand) 24%, transparent), transparent 30%),
        linear-gradient(135deg, var(--design-dark) 0%, #0f1b2d 56%, #071018 100%);
}

.ghost-btn {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.landing-body {
    min-height: 100vh;
    color: white;
    background:
        radial-gradient(circle at 20% 10%, rgba(0, 179, 134, 0.22), transparent 30%),
        linear-gradient(135deg, #070b12 0%, #0f1b2d 56%, #071018 100%);
}

.landing-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-nav nav,
.hero-actions,
.inline-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inline-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.inline-form input {
    min-height: 34px;
}

.hero {
    width: min(1180px, calc(100% - 32px));
    margin: 58px auto 34px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 34px;
    align-items: center;
}

.hero h1 {
    font-size: 72px;
    line-height: 0.95;
    margin: 10px 0 20px;
    letter-spacing: 0;
}

.lead {
    max-width: 610px;
    color: #c7d2e5;
    font-size: 20px;
    line-height: 1.65;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--brand-2);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.hero-terminal {
    min-height: 430px;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(13, 20, 33, 0.82);
    box-shadow: var(--shadow);
}

.ticker-row,
.market-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line-dark);
}

.ticker-row em,
.market-item em {
    font-style: normal;
    font-weight: 800;
}

.chart-lines {
    height: 190px;
    margin-top: 34px;
    background:
        linear-gradient(160deg, transparent 45%, rgba(0, 179, 134, 0.85) 46%, transparent 48%),
        linear-gradient(20deg, transparent 48%, rgba(59, 130, 246, 0.7) 49%, transparent 51%),
        repeating-linear-gradient(to right, transparent 0 54px, rgba(255, 255, 255, 0.05) 55px 56px),
        repeating-linear-gradient(to bottom, transparent 0 38px, rgba(255, 255, 255, 0.05) 39px 40px);
    border: 1px solid var(--line-dark);
    border-radius: 8px;
}

.chart-lines.large {
    height: 260px;
}

.trading-overview {
    overflow: hidden;
}

.market-strip,
.market-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 14px;
}

.market-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin-bottom: 18px;
}

.market-card {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
}

.market-card.bull {
    background: linear-gradient(180deg, #ffffff 0%, #ecfff8 100%);
}

.market-card.bear {
    background: linear-gradient(180deg, #ffffff 0%, #fff0f1 100%);
}

.market-card strong,
.market-card span,
.market-card em {
    position: relative;
    z-index: 1;
}

.market-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

.market-card em {
    display: inline-flex;
    margin-top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 179, 134, 0.12);
    color: #047857;
    font-style: normal;
    font-weight: 900;
}

.market-card.bear em {
    background: rgba(229, 72, 77, 0.12);
    color: var(--danger);
}

.market-card.large-card {
    min-height: 210px;
}

.market-card-head,
.market-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.market-card-foot {
    margin-top: 12px;
}

.coin-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #111827;
    color: var(--brand-2);
    font-weight: 900;
}

.mini-chart {
    width: 100%;
    height: 72px;
    margin-top: 8px;
    opacity: 0.95;
}

.trading-chart-panel {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background:
        repeating-linear-gradient(to right, transparent 0 74px, rgba(17, 24, 39, 0.06) 75px 76px),
        repeating-linear-gradient(to bottom, transparent 0 48px, rgba(17, 24, 39, 0.06) 49px 50px),
        #ffffff;
    overflow: hidden;
}

.chart-toolbar {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
}

.chart-toolbar span {
    padding: 6px 8px;
    border-radius: 7px;
    background: #f3f6fb;
    color: #111827;
    font-size: 13px;
}

.candlestick-board {
    height: 320px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 28px 24px;
}

.candle {
    position: relative;
    width: 9px;
    min-height: 16px;
    border-radius: 2px;
}

.candle::before {
    content: "";
    position: absolute;
    left: 4px;
    top: -12px;
    width: 1px;
    height: calc(100% + 24px);
    background: currentColor;
}

.up-candle {
    color: #00a884;
    background: #00c49a;
}

.down-candle {
    color: #e5484d;
    background: #ff4d57;
}

.market-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.55fr) minmax(320px, 1fr);
    gap: 18px;
    align-items: center;
}

.markets-terminal {
    padding: 0;
    overflow: hidden;
}

.tradingview-widget-container {
    width: 100%;
}

.tv-market-overview {
    height: calc(100vh - 170px);
    min-height: 780px;
}

.tv-market-overview .tradingview-widget-container__widget,
.tv-advanced-chart .tradingview-widget-container__widget,
.tv-mini-chart .tradingview-widget-container__widget,
.tv-ticker .tradingview-widget-container__widget {
    width: 100%;
    height: 100%;
}

.tv-advanced-chart iframe,
.tv-market-overview iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: inherit !important;
}

.tv-advanced-chart {
    height: 820px;
    min-height: 820px;
}

.tv-mini-chart {
    height: 420px;
    margin-top: 16px;
}

.tv-ticker {
    min-height: 74px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.market-tab-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.market-tabs {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    min-height: 64px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.market-tabs label {
    display: inline-flex;
    min-height: 64px;
    align-items: center;
    color: #111827;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

#tab-track:checked ~ .market-tabs label[for="tab-track"],
#tab-chart:checked ~ .market-tabs label[for="tab-chart"] {
    color: #0f3b7a;
    border-bottom-color: #0f3b7a;
}

.market-tab-panel {
    display: none;
}

#tab-track:checked ~ .track-panel,
#tab-chart:checked ~ .chart-panel-tab {
    display: block;
}

.track-panel,
.chart-panel-tab {
    padding: 10px;
}

.matrix-wrap {
    max-width: 100%;
    overflow: auto;
    padding: 0 18px 18px;
}

.market-matrix {
    min-width: 940px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.market-matrix th,
.market-matrix td {
    min-width: 112px;
    height: 40px;
    padding: 9px 12px;
    border-right: 1px solid #edf0f5;
    border-bottom: 1px solid #edf0f5;
    text-align: center;
    background: #ffffff;
    vertical-align: middle;
}

.market-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    color: #111827;
}

.market-matrix tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    text-align: left;
    background: #ffffff;
}

.coin-dot {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-right: 7px;
    border-radius: 50%;
    background: #0f3b7a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
}

.market-matrix .neutral-cell {
    background: #f0f4fc;
    color: #64748b;
}

.market-matrix .heat-up {
    background: #dff7ed;
}

.market-matrix .heat-down {
    background: #fde8eb;
}

.tradingview-shell {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    min-height: 520px;
}

.chart-watchlist {
    border-right: 1px solid var(--line);
    background: #fafafa;
}

.search-line {
    display: flex;
    justify-content: space-between;
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    font-weight: 900;
}

.chart-watchlist a {
    display: grid;
    gap: 4px;
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.chart-watchlist a.active,
.chart-watchlist a:hover {
    background: #ffffff;
    box-shadow: inset 3px 0 0 #0f3b7a;
}

.personal-chart {
    min-width: 0;
    background: #ffffff;
}

.pro-toolbar {
    overflow-x: auto;
    white-space: nowrap;
}

.pro-toolbar a {
    margin-left: auto;
    color: #047857;
    font-weight: 900;
}

.price-line {
    display: flex;
    gap: 12px;
    padding: 8px 14px;
    color: #087d76;
    font-size: 13px;
}

.chart-canvas {
    position: relative;
    height: 430px;
    margin: 0 16px 20px;
    overflow: hidden;
    border: 1px solid #edf0f5;
    background:
        repeating-linear-gradient(to right, transparent 0 88px, rgba(15, 23, 42, 0.07) 89px 90px),
        repeating-linear-gradient(to bottom, transparent 0 40px, rgba(15, 23, 42, 0.07) 41px 42px),
        #ffffff;
}

.chart-canvas::before {
    content: "08:00   08:15   08:30   08:45   09:00   09:15   09:30   09:45   10:00";
    position: absolute;
    left: 42px;
    right: 24px;
    bottom: 8px;
    color: #111827;
    font-size: 12px;
    word-spacing: 30px;
}

.bb-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 95px;
    border: 1px solid #0c9395;
    border-left: 0;
    border-right: 0;
    border-radius: 48% 42% 45% 46%;
    opacity: 0.55;
}

.bb-line.upper {
    top: 78px;
}

.bb-line.middle {
    top: 150px;
    height: 70px;
    border-color: #923131;
}

.bb-line.lower {
    top: 230px;
}

.tv-candle {
    position: absolute;
    bottom: 88px;
    width: 7px;
    border-radius: 1px;
}

.tv-candle::before {
    content: "";
    position: absolute;
    left: 3px;
    top: -13px;
    width: 1px;
    height: calc(100% + 26px);
    background: currentColor;
}

.volume {
    position: absolute;
    bottom: 30px;
    width: 7px;
    opacity: 0.45;
}

.vol-up {
    background: #00a884;
}

.vol-down {
    background: #ff4d57;
}

.price-tag {
    position: absolute;
    right: 8px;
    min-width: 70px;
    padding: 3px 6px;
    color: white;
    background: #008b7c;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
}

.tag-main {
    top: 248px;
}

.tag-high {
    top: 182px;
}

.tag-low {
    top: 288px;
}

.feature-band {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 70px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-band article {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

.feature-band span,
.market-item span,
.muted {
    color: var(--muted);
}

.auth-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
    background:
        radial-gradient(circle at top left, rgba(0, 179, 134, 0.24), transparent 30%),
        var(--bg);
}

.auth-card {
    width: min(440px, 100%);
    padding: 34px;
    border-radius: 10px;
    background: white;
    box-shadow: var(--shadow);
}

.install-card {
    width: min(620px, 100%);
}

.auth-card h1 {
    text-align: center;
    margin: 26px 0 22px;
}

.form-stack {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    background: white;
}

hr {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--line);
}

.check-row {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
}

.check-row input {
    width: 18px;
    min-height: 18px;
}

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

.kyc-files,
.kyc-admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kyc-files a,
.kyc-admin-links a {
    color: #047857;
    font-weight: 800;
}

textarea {
    resize: vertical;
}

.form-note {
    text-align: center;
    color: var(--muted);
}

.form-note a,
.panel-head a,
.table-action {
    color: #047857;
    font-weight: 800;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    background: var(--design-surface, #eef2f7);
}

.sidebar {
    position: sticky;
    top: 0;
    grid-row: 1 / span 2;
    height: 100vh;
    padding: 22px;
    color: white;
    background: #0b1220;
    border-right: 1px solid var(--line-dark);
}

.admin-sidebar {
    background: #111827;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-column: 2;
    grid-row: 1;
    padding: 16px 30px 0;
    background: linear-gradient(180deg, var(--design-surface, #eef2f7) 0%, color-mix(in srgb, var(--design-surface, #eef2f7) 92%, transparent) 72%, transparent 100%);
}

.admin-topbar + .content {
    grid-row: 2;
    padding-top: 22px;
}

.admin-global-search {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px;
    max-width: 760px;
    padding: 10px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.admin-global-search input {
    min-height: 36px;
    border: 1px solid #dce3ee;
    border-radius: 7px;
    padding: 0 12px;
    background: #f8fafc;
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
}

.side-nav {
    display: grid;
    gap: 6px;
    margin-top: 34px;
}

.side-nav a {
    padding: 12px 13px;
    border-radius: 8px;
    color: #c8d2e2;
    font-weight: 700;
}

.side-nav a.nav-with-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.side-dropdown {
    display: grid;
    gap: 6px;
}

.side-dropdown summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 8px;
    color: #c8d2e2;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.side-dropdown summary::-webkit-details-marker {
    display: none;
}

.side-dropdown summary::after {
    content: "v";
    color: #8fa3bd;
    font-size: 14px;
    font-weight: 900;
    transition: transform .18s ease;
}

.side-dropdown summary.nav-with-badge::after {
    order: 3;
}

.side-dropdown[open] summary::after {
    transform: rotate(180deg);
}

.side-dropdown summary.active,
.side-dropdown summary:hover {
    background: rgba(0, 179, 134, 0.14);
    color: white;
}

.side-subnav {
    display: grid;
    gap: 5px;
    padding: 0 0 4px 12px;
}

.side-subnav a {
    min-height: 36px;
    padding: 9px 11px;
    border-left: 2px solid rgba(148, 163, 184, .22);
    border-radius: 7px;
    font-size: 13px;
}

.nav-badge {
    display: inline-grid;
    place-items: center;
    min-width: 23px;
    height: 23px;
    padding: 0 7px;
    border-radius: 999px;
    background: #e5484d;
    color: #ffffff;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
}

.side-nav a.active,
.side-nav a:hover {
    background: rgba(0, 179, 134, 0.14);
    color: white;
}

.side-user {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    display: grid;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--line-dark);
    color: #c8d2e2;
}

.side-user a {
    color: var(--brand-2);
    font-weight: 800;
}

.communication-option {
    display: block;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.communication-option:hover {
    border-color: var(--brand);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.user-badge {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    color: white;
}

.user-badge strong,
.user-badge small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-badge small {
    color: #91a1b8;
    font-size: 12px;
    font-weight: 600;
}

.avatar {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand);
    color: #03100c;
    font-weight: 900;
}

.avatar.large {
    width: 64px;
    height: 64px;
    font-size: 28px;
}

.avatar-photo {
    overflow: hidden;
    padding: 0;
    background: #ffffff;
}

.avatar-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-form {
    display: block;
    margin: 0;
}

.profile-photo-trigger {
    position: relative;
    display: inline-grid;
    place-items: center;
    margin: 0;
    cursor: pointer;
    border-radius: 50%;
}

.profile-photo-trigger .avatar.large {
    width: 76px;
    height: 76px;
    border: 3px solid #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

.profile-photo-trigger input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.profile-photo-trigger .photo-action-label {
    position: absolute;
    inset: auto 6px 6px;
    display: grid;
    place-items: center;
    min-height: 22px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .78);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .18s ease, transform .18s ease;
}

.profile-photo-trigger:hover .photo-action-label,
.profile-photo-trigger:focus-within .photo-action-label {
    opacity: 1;
    transform: translateY(0);
}

.profile-photo-trigger:hover .avatar,
.profile-photo-trigger:focus-within .avatar {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent);
}

.impersonation-banner {
    position: fixed;
    top: 12px;
    right: 18px;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .12);
    font-size: 13px;
    font-weight: 850;
}

.impersonation-banner span {
    color: #92400e;
}

.impersonation-banner a {
    padding: 6px 8px;
    border-radius: 6px;
    background: #f59e0b;
    color: #111827;
    font-weight: 900;
}

.content {
    grid-column: 2;
    padding: 30px;
}

.markets-content {
    padding: 16px;
}

.markets-content .page-head {
    margin-bottom: 12px;
}

.markets-content .page-head h1 {
    font-size: 24px;
}

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

.page-head h1 {
    margin: 0;
    font-size: 32px;
}

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

.section-title {
    margin: 0 0 12px;
    color: #0f3b7a;
    font-size: 22px;
}

.account-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 22px;
}

.summary-card {
    min-height: 102px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(18, 24, 39, 0.04);
}

.summary-card span {
    display: block;
    margin-bottom: 8px;
    color: #778aa8;
    font-size: 16px;
    font-weight: 700;
}

.summary-card strong {
    color: #111827;
    font-size: 22px;
    font-weight: 500;
}

.summary-card i {
    display: inline-grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #24568f;
    color: #ffffff;
    font-style: normal;
    font-weight: 900;
}

.metric,
.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(18, 24, 39, 0.05);
}

.metric {
    padding: 20px;
}

.metric span {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
}

.metric strong {
    font-size: 28px;
}

.panel {
    padding: 22px;
    margin-bottom: 18px;
}

.panel h2 {
    margin: 0 0 18px;
    font-size: 21px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.panel-head h2 {
    margin: 0;
}

.panel-head .muted {
    margin: 5px 0 0;
}

.summary-grid.compact {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 18px;
}

.summary-grid.compact .summary-card {
    min-height: 92px;
    padding: 16px;
}

.onboarding-card {
    display: grid;
    gap: 14px;
}

.onboarding-card .panel-head {
    margin-bottom: 0;
}

.onboarding-card .panel-head strong {
    color: #047857;
    font-size: 24px;
}

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

.onboarding-list a {
    align-items: start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #172033;
    display: grid;
    gap: 7px;
    min-height: 126px;
    padding: 13px;
}

.onboarding-list a.done {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.onboarding-list a.todo:hover {
    background: #eef6ff;
    border-color: #bfdbfe;
}

.onboarding-list span {
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 11px;
    font-weight: 850;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.onboarding-list a.done span {
    background: #00b386;
    border-color: #00b386;
    color: #ffffff;
    font-size: 10px;
}

.onboarding-list strong {
    font-size: 14px;
}

.onboarding-list em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    line-height: 1.35;
}

.client-dashboard-page {
    display: grid;
    gap: 16px;
}

.client-premium-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 2px;
}

.client-premium-hero > div,
.client-premium-hero > aside {
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.client-premium-hero > div {
    padding: 22px;
}

.client-premium-hero h1 {
    margin: 4px 0 8px;
    color: #0f172a;
    font-size: 30px;
    line-height: 1.1;
}

.client-premium-hero p {
    margin: 0;
    color: #64748b;
    font-weight: 650;
}

.client-premium-hero > aside {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 22px;
    background: #0f172a;
    color: #ffffff;
}

.client-premium-hero aside span,
.client-premium-hero aside small {
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
}

.client-premium-hero aside strong {
    font-size: 28px;
    line-height: 1.1;
}

.client-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

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

.premium-metrics article {
    display: grid;
    gap: 6px;
    min-height: 104px;
    padding: 15px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.premium-metrics span,
.premium-metrics em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.premium-metrics strong {
    color: #0f172a;
    font-size: 20px;
    font-weight: 850;
}

.client-premium-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
    gap: 16px;
}

.client-premium-grid.lower {
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
}

.premium-progress-card {
    display: grid;
    gap: 14px;
}

.premium-progress-card .panel-head {
    margin-bottom: 0;
}

.premium-progress-card .panel-head > strong {
    color: #047857;
    font-size: 28px;
}

.next-premium-action {
    display: grid;
    gap: 5px;
    padding: 13px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eef6ff;
}

.next-premium-action.done {
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.next-premium-action span {
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.next-premium-action strong {
    color: #0f172a;
    font-size: 15px;
}

.next-premium-action em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 650;
}

.compact-checklist {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.compact-checklist a {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 44px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.compact-checklist a.done {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.compact-checklist i {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
}

.compact-checklist a.done i {
    background: #00a87e;
    color: #ffffff;
}

.compact-checklist span {
    overflow: hidden;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.premium-action-grid a {
    display: grid;
    gap: 5px;
    min-height: 78px;
    padding: 13px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #fbfdff;
}

.premium-action-grid a:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.premium-action-grid strong {
    color: #0f172a;
    font-size: 14px;
}

.premium-action-grid span {
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}

.account-status-strip {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.account-status-strip span {
    display: flex;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 850;
}

.account-status-strip .ok {
    background: #ecfdf5;
    color: #047857;
}

.account-status-strip .warn {
    background: #fff7ed;
    color: #9a3412;
}

.portfolio-mini-list,
.premium-activity-list {
    display: grid;
    gap: 9px;
}

.portfolio-mini-list div,
.premium-activity-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    min-height: 48px;
    padding: 10px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #fbfdff;
}

.portfolio-mini-list span,
.premium-activity-list span {
    display: grid;
    gap: 2px;
}

.portfolio-mini-list strong,
.premium-activity-list strong {
    color: #0f172a;
    font-size: 13px;
}

.portfolio-mini-list em,
.premium-activity-list em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 650;
}

.portfolio-mini-list b {
    color: #0f172a;
    font-size: 12px;
}

.portfolio-mini-list small {
    color: #047857;
    font-weight: 850;
}

.market-chip-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.market-chip-row a {
    display: grid;
    gap: 5px;
    min-height: 74px;
    padding: 11px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #fbfdff;
}

.market-chip-row span {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.market-chip-row strong {
    color: #0f172a;
    font-size: 14px;
}

.market-chip-row em {
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
}

.compact-tradingview {
    padding-bottom: 12px;
}

.portfolio-spec-page {
    display: grid;
    gap: 16px;
}

.portfolio-spec-hero {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.portfolio-spec-hero article {
    display: grid;
    gap: 6px;
    min-height: 106px;
    padding: 16px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.portfolio-spec-hero span,
.portfolio-spec-hero em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
}

.portfolio-spec-hero strong {
    color: #0f172a;
    font-size: 22px;
    font-weight: 850;
}

.portfolio-spec-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1fr);
    gap: 16px;
}

.speculation-ticket {
    border-color: #bfdbfe;
}

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

.spec-side-toggle label {
    position: relative;
    display: grid;
    align-content: center;
    min-height: 58px;
    gap: 3px;
    overflow: hidden;
    padding: 11px 12px 11px 42px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 900;
    cursor: pointer;
}

.spec-side-toggle label::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    transform: translateY(-50%);
}

.spec-side-toggle label::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    transform: translateY(-50%);
}

.spec-side-toggle span {
    font-size: 13px;
}

.spec-side-toggle small {
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.spec-side-toggle label:has(input:checked)::before {
    border-color: currentColor;
}

.spec-side-toggle label:has(input:checked)::after {
    background: currentColor;
}

.spec-side-toggle .buy-side:has(input:checked) {
    border-color: #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, .16), #ffffff);
    color: #047857;
}

.spec-side-toggle .sell-side:has(input:checked) {
    border-color: #f43f5e;
    background: linear-gradient(135deg, rgba(244, 63, 94, .15), #ffffff);
    color: #be123c;
}

.spec-side-toggle input {
    position: absolute;
    opacity: 0;
}

.conditional-order-fields {
    display: grid;
    gap: 8px;
}

.conditional-order-fields label[hidden] {
    display: none;
}

.order-ticket-note {
    margin: 0;
    padding: 10px 11px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
}

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

.spec-preview div {
    display: grid;
    gap: 4px;
    min-height: 66px;
    padding: 10px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #fbfdff;
}

.spec-preview span {
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
}

.spec-preview strong {
    color: #0f172a;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.spec-market-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.spec-market-list a {
    display: grid;
    gap: 5px;
    min-height: 84px;
    padding: 12px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #fbfdff;
}

.spec-market-list a:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.spec-market-list span {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.spec-market-list strong {
    color: #0f172a;
    font-size: 15px;
}

.spec-market-list em {
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
}

.portfolio-detail-grid {
    align-items: start;
}

.spec-trade-list {
    display: grid;
    gap: 9px;
}

.spec-trade-list div {
    display: grid;
    gap: 4px;
    padding: 11px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #fbfdff;
}

.spec-trade-list span {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.spec-trade-list strong {
    color: #0f172a;
    font-size: 13px;
}

.spec-trade-list em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 650;
}

.market-terminal-shell {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid #cfd9e6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.terminal-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .75fr);
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #1f2a3a;
    background: #0f172a;
}

.terminal-head h2,
.terminal-head p {
    margin: 0;
}

.terminal-head h2 {
    color: #ffffff;
    font-size: 22px;
}

.terminal-head > div > span {
    color: #9fb0c7;
    font-size: 13px;
    font-weight: 650;
}

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

.terminal-stats article {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid #243247;
    border-radius: 8px;
    background: #121c2f;
}

.terminal-stats span,
.terminal-section-head span {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.terminal-stats strong {
    color: #ffffff;
    font-size: 15px;
}

.terminal-layout {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr) 315px;
    min-height: 520px;
}

.market-watchlist,
.market-focus-panel,
.order-ticket-pro {
    padding: 16px;
}

.market-watchlist {
    border-right: 1px solid #1f2a3a;
    background: #111827;
}

.order-ticket-pro {
    border-left: 1px solid #d9e2ef;
    background: #f8fafc;
}

.terminal-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.terminal-section-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
}

.market-watchlist .terminal-section-head h3,
.order-book-panel .terminal-section-head h3 {
    color: #f8fafc;
}

.market-watchlist .terminal-section-head span,
.order-book-panel .terminal-section-head span {
    color: #8da2bd;
}

.market-watchlist button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    width: 100%;
    min-height: 64px;
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid #243247;
    border-radius: 8px;
    background: #162033;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.market-watchlist button:hover,
.market-watchlist button.active {
    border-color: #14b8a6;
    background: #102f34;
    transform: translateY(-1px);
}

.market-watchlist span {
    display: grid;
    gap: 3px;
}

.market-watchlist strong {
    color: #f8fafc;
    font-size: 13px;
}

.market-watchlist em {
    color: #94a3b8;
    font-size: 11px;
    font-style: normal;
    font-weight: 650;
}

.market-watchlist b {
    color: #e2e8f0;
    font-size: 12px;
}

.market-watchlist i {
    grid-column: 2;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    text-align: right;
}

.market-focus-panel {
    display: grid;
    grid-template-rows: auto auto minmax(320px, 1fr) auto auto;
    gap: 12px;
    background: #f5f8fc;
}

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

.market-focus-price div {
    display: grid;
    gap: 4px;
    padding: 11px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    background: #ffffff;
}

.market-focus-price span {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.market-focus-price strong {
    color: #0f172a;
    font-size: 16px;
}

.trading-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 12px;
    min-height: 330px;
}

.spec-chart-frame {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    border: 1px solid #1e293b;
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 18%, rgba(20, 184, 166, 0.08), transparent 26%),
        linear-gradient(180deg, #0b1220 0%, #101827 100%);
}

.spec-chart-toolbar {
    position: absolute;
    inset: 12px 12px auto 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spec-chart-toolbar div {
    display: grid;
    gap: 2px;
    margin-right: auto;
}

.spec-chart-toolbar small {
    color: #8da2bd;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
}

.spec-chart-toolbar strong {
    color: #ffffff;
    font-size: 18px;
}

.spec-chart-toolbar button {
    min-width: 34px;
    padding: 5px 7px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 850;
    text-align: center;
}

.spec-chart-toolbar button:hover {
    border-color: rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .14);
}

.spec-chart-toolbar button.active {
    background: #00a87e;
    color: #03100c;
}

.chart-price-scale {
    position: absolute;
    inset: 68px 10px 70px auto;
    z-index: 2;
    display: grid;
    align-content: space-between;
    color: #8da2bd;
    font-size: 10px;
    font-weight: 850;
    text-align: right;
}

.candle-chart {
    position: absolute;
    inset: 66px 58px 76px 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    background:
        linear-gradient(rgba(148, 163, 184, 0.13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.11) 1px, transparent 1px);
    background-size: 100% 25%, 10% 100%;
}

.candle-chart i {
    position: relative;
    display: block;
    width: 9px;
    height: var(--body);
    margin-bottom: var(--bottom);
    border-radius: 2px;
}

.candle-chart i::before {
    content: "";
    position: absolute;
    left: 4px;
    bottom: calc((var(--body) - var(--wick)) / 2);
    width: 1px;
    height: var(--wick);
}

.candle-chart i.up,
.candle-chart i.up::before {
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.25);
}

.candle-chart i.down,
.candle-chart i.down::before {
    background: #f43f5e;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
}

.trade-chart-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.chart-position-line {
    position: absolute;
    right: 0;
    left: 0;
    height: 1px;
    background: rgba(250, 204, 21, .9);
    box-shadow: 0 0 16px rgba(250, 204, 21, .28);
}

.chart-position-line.open.buy {
    background: rgba(16, 185, 129, .95);
    box-shadow: 0 0 16px rgba(16, 185, 129, .3);
}

.chart-position-line.open.sell {
    background: rgba(239, 68, 68, .95);
    box-shadow: 0 0 16px rgba(239, 68, 68, .3);
}

.chart-position-line.closed {
    height: 0;
    border-top: 2px dashed rgba(100, 116, 139, .95);
    background: transparent;
    box-shadow: none;
    opacity: .9;
}

.chart-position-line.closed b {
    background: rgba(71, 85, 105, .94);
    color: #e2e8f0;
}

.chart-close-marker {
    position: absolute;
    right: 118px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    margin-top: -12px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 999px;
    background: rgba(15, 23, 42, .92);
    color: #fff;
    font-size: 10px;
    font-weight: 950;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .22);
}

.chart-close-marker.profit {
    background: rgba(5, 150, 105, .94);
}

.chart-close-marker.loss {
    background: rgba(220, 38, 38, .94);
}

.chart-close-marker em {
    font-style: normal;
    opacity: .9;
}

.chart-position-legend {
    position: absolute;
    left: 12px;
    bottom: 44px;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}

.chart-position-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .82);
    color: #f8fafc;
    font-size: 10px;
    font-weight: 850;
}

.chart-position-legend i {
    width: 16px;
    height: 2px;
    display: inline-block;
    border-radius: 99px;
}

.chart-position-legend .open-buy {
    background: #10b981;
}

.chart-position-legend .open-sell {
    background: #ef4444;
}

.chart-position-legend .closed {
    border-top: 2px dashed #94a3b8;
}

.risk-reward-layer {
    z-index: 5;
}

.risk-reward-box {
    position: absolute;
    left: 18%;
    width: 42%;
    border-left: 1px solid rgba(15, 23, 42, .18);
    border-right: 1px solid rgba(15, 23, 42, .18);
}

.risk-reward-box.profit {
    background: rgba(16, 185, 129, .24);
    border-top: 1px solid rgba(16, 185, 129, .45);
}

.risk-reward-box.loss {
    background: rgba(239, 68, 68, .18);
    border-bottom: 1px solid rgba(239, 68, 68, .45);
}

.risk-reward-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, rgba(15, 23, 42, .05) 0 1px, transparent 1px 18px);
}

.risk-reward-label {
    position: absolute;
    left: 14%;
    width: 50%;
    min-height: 20px;
    display: grid;
    place-items: center;
    padding: 3px 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    transform: translateY(-50%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
}

.risk-reward-label.target,
.risk-reward-label.entry {
    background: rgba(16, 185, 129, .92);
}

.risk-reward-label.stop {
    background: rgba(185, 28, 28, .94);
}

.risk-reward-label.entry {
    min-height: 36px;
}

.risk-reward-current {
    position: absolute;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(15, 23, 42, .92);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    transform: translateY(-50%);
}

.risk-reward-current::before {
    content: "";
    position: absolute;
    right: 100%;
    width: 720px;
    height: 1px;
    background: rgba(15, 23, 42, .28);
}

.risk-reward-current em {
    color: #34d399;
    font-style: normal;
}

.chart-position-line b,
.chart-position-line em {
    position: absolute;
    right: 8px;
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(15, 23, 42, .92);
    color: #fde68a;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.chart-position-line b {
    top: -25px;
}

.chart-position-line em {
    top: 4px;
    color: #f8fafc;
}

.chart-order-marker {
    position: absolute;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid rgba(255, 255, 255, .88);
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 950;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .28);
}

.chart-order-marker.buy {
    background: #10b981;
}

.chart-order-marker.sell {
    background: #ef4444;
}

.chart-empty-overlay {
    position: absolute;
    left: 16px;
    bottom: 12px;
    padding: 5px 8px;
    border-radius: 7px;
    background: rgba(15, 23, 42, .86);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 850;
}

.volume-bars {
    position: absolute;
    right: 58px;
    bottom: 18px;
    left: 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 44px;
    opacity: .82;
}

.volume-bars i {
    display: block;
    width: 9px;
    height: var(--vol);
    border-radius: 2px 2px 0 0;
    background: rgba(34, 197, 94, 0.36);
}

.volume-bars i.down {
    background: rgba(244, 63, 94, 0.34);
}

.price-line {
    position: absolute;
    right: 8px;
    top: 46%;
    padding: 6px 9px;
    border-radius: 7px;
    background: #22c55e;
    color: #03100c;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, .22), 0 10px 24px rgba(34, 197, 94, .22);
}

.order-book-panel {
    display: grid;
    grid-template-rows: auto auto 1fr auto auto 1fr;
    min-height: 330px;
    padding: 12px;
    border: 1px solid #1e293b;
    border-radius: 8px;
    background: #101827;
}

.terminal-section-head.compact {
    margin-bottom: 8px;
}

.order-book-list {
    display: grid;
    align-content: center;
    gap: 5px;
}

.order-book-header {
    display: flex;
    justify-content: space-between;
    padding: 0 6px 5px;
    color: #8da2bd;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.order-book-list div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 7px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 850;
}

.order-book-list.asks div {
    background: linear-gradient(90deg, rgba(244, 63, 94, 0.22), rgba(244, 63, 94, 0.04));
    color: #fecdd3;
}

.order-book-list.bids div {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.22), rgba(34, 197, 94, 0.04));
    color: #bbf7d0;
}

.order-book-mid {
    display: grid;
    gap: 3px;
    margin: 8px 0;
    padding: 9px;
    border-radius: 7px;
    border: 1px solid #243247;
    background: #0b1220;
    color: #ffffff;
    text-align: center;
}

.order-book-mid span {
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.order-book-mid strong {
    font-size: 14px;
}

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

.execution-metrics div {
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    background: #fbfdff;
}

.execution-metrics span {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.execution-metrics strong {
    color: #0f172a;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.chart-axis {
    position: absolute;
    right: 12px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    font-size: 10px;
    font-weight: 850;
}

.chart-axis.top {
    top: 18px;
}

.chart-axis.mid {
    top: 48%;
}

.chart-axis.low {
    bottom: 18px;
}

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

.risk-strip span {
    padding: 9px 10px;
    border-radius: 8px;
    background: #e8f7f4;
    color: #0f766e;
    font-size: 12px;
    font-weight: 850;
    text-align: center;
}

.order-ticket-pro .panel-head {
    margin-bottom: 12px;
}

.order-ticket-pro .panel-head h2 {
    font-size: 20px;
}

.order-type-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.order-type-row button {
    min-height: 32px;
    border: 1px solid #dce3ee;
    border-radius: 7px;
    background: #ffffff;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.order-type-row button.active {
    border-color: #99f6e4;
    background: #ccfbf1;
    color: #0f766e;
}

.grid.two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
    gap: 18px;
}

.table-wrap {
    overflow-x: auto;
}

.empty-state {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    display: grid;
    gap: 6px;
    justify-items: center;
    padding: 26px;
    text-align: center;
}

.empty-state.compact {
    justify-items: start;
    padding: 16px;
    text-align: left;
}

.empty-state strong {
    color: #0f172a;
    font-size: 15px;
}

.empty-state span {
    font-size: 13px;
}

.permission-editor summary {
    color: #047857;
    cursor: pointer;
    font-weight: 800;
}

.permission-editor form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 10px;
    min-width: min(520px, 72vw);
    padding: 12px;
}

.withdrawal-action-stack {
    display: grid;
    gap: 9px;
    min-width: 230px;
}

.withdrawal-action-stack form {
    display: grid;
    gap: 7px;
}

.withdrawal-action-stack textarea {
    min-height: 58px;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
}

.up {
    color: #047857;
}

.down {
    color: var(--danger);
}

.balance-pill,
.status {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    border-radius: 999px;
    padding: 7px 12px;
    background: #e8f8f2;
    color: #047857;
    font-weight: 800;
}

.status.pending {
    background: #fff7df;
    color: #92400e;
}

.status.in_review {
    background: #eef2ff;
    color: #3730a3;
}

.status.approved {
    background: #e8f8f2;
    color: #047857;
}

.status.rejected {
    background: #feecec;
    color: #b42318;
}

.status.sent {
    background: #e8f8f2;
    color: #047857;
}

.status.failed {
    background: #feecec;
    color: #b42318;
}

.status.info {
    background: #eef2ff;
    color: #3730a3;
}

.status.admin {
    background: #f3e8ff;
    color: #6d28d9;
}

.status.client {
    background: #ecfdf5;
    color: #047857;
}

.status.none {
    background: #eef2f7;
    color: #475569;
}

.alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 8px;
    font-weight: 700;
}

.alert.success {
    background: #e8f8f2;
    color: #047857;
}

.alert.error {
    background: #feecec;
    color: #b42318;
}

.mini {
    min-height: 34px;
    border-radius: 7px;
    padding: 8px 10px;
    color: white;
    font-weight: 800;
}

.mini.approve {
    background: #047857;
}

.mini.reject {
    background: #b42318;
}

.table-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.finance-file-button {
    min-height: 31px;
    padding: 7px 12px;
    border: 1px solid #99f6e4;
    background: #ccfbf1;
    color: #0f766e;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
    box-shadow: 0 7px 16px rgba(15, 118, 110, 0.12);
}

.finance-file-button:hover {
    border-color: #5eead4;
    background: #99f6e4;
    color: #134e4a;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18);
}

.withdrawal-file-button {
    border-color: #bfdbfe;
    background: #dbeafe;
    color: #1d4ed8;
    box-shadow: 0 7px 16px rgba(29, 78, 216, 0.12);
}

.withdrawal-file-button:hover {
    border-color: #93c5fd;
    background: #bfdbfe;
    color: #1e3a8a;
    box-shadow: 0 10px 20px rgba(29, 78, 216, 0.18);
}

.admin-users-page {
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

.admin-users-head h1 {
    margin-bottom: 8px;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0;
}

.admin-users-head .muted,
.users-list-panel .panel-head .muted {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 400;
}

.admin-users-actions {
    align-items: stretch;
}

.user-action-card {
    border: 1px solid #e4eaf3;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.user-action-card h2,
.users-list-panel h2 {
    font-size: 18px;
    font-weight: 650;
    letter-spacing: 0;
}

.admin-users-page label {
    color: #5f6b7a;
    font-size: 13px;
    font-weight: 600;
}

.admin-users-page input,
.admin-users-page select {
    min-height: 40px;
    border-color: #e0e7f0;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 400;
}

.users-list-panel {
    padding: 0;
    overflow: hidden;
    border: 1px solid #e4eaf3;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

.users-list-panel .panel-head {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid #e7edf5;
}

.users-accordion-list {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
}

.user-accordion-item {
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
    overflow: hidden;
}

.user-accordion-item[open] {
    border-color: #bcd7f5;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.065);
}

.user-accordion-item summary {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 66px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
}

.user-accordion-item summary:hover {
    background: #fbfdff;
}

.user-accordion-item summary::-webkit-details-marker {
    display: none;
}

.accordion-arrow {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid #dbe7f3;
    border-radius: 50%;
    background: #fff;
}

.accordion-arrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #0f3f74;
    border-bottom: 2px solid #0f3f74;
    transform: rotate(-45deg);
    transition: transform .16s ease;
}

.user-accordion-item[open] .accordion-arrow::before {
    transform: rotate(45deg);
}

.user-accordion-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    padding: 16px;
    border-top: 1px solid #e8eef6;
    background: #f8fafc;
}

.accordion-detail-card {
    display: grid;
    align-content: start;
    gap: 9px;
    min-width: 0;
    padding: 13px;
    border: 1px solid #e5edf6;
    border-radius: 8px;
    background: #fff;
}

.detail-label {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.user-accordion-item .status,
.user-accordion-item .mini,
.user-accordion-item .table-button {
    min-height: 28px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.user-accordion-item .compact-actions {
    gap: 7px;
}

.user-accordion-item .table-button {
    justify-content: center;
}

.users-table {
    min-width: 1080px;
    font-size: 13px;
    color: #233044;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.users-table th {
    padding: 12px 16px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.users-table td {
    padding: 16px;
    border-top: 1px solid #e6edf6;
    border-bottom: 1px solid #e6edf6;
    background: #fff;
    vertical-align: middle;
    font-weight: 400;
}

.users-table td:first-child {
    border-left: 1px solid #e6edf6;
    border-radius: 10px 0 0 10px;
}

.users-table td:last-child {
    border-right: 1px solid #e6edf6;
    border-radius: 0 10px 10px 0;
}

.users-table tbody tr:hover {
    background: transparent;
}

.users-table tbody tr:hover td {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.user-id {
    color: #7b8796;
    font-size: 12px;
    font-weight: 600;
}

.user-cell {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 260px;
}

.user-cell strong,
.user-cell small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-cell strong {
    color: #172033;
    font-size: 15px;
    font-weight: 800;
}

.user-cell small {
    margin-top: 3px;
    color: #7b8796;
    font-size: 12px;
    font-weight: 400;
}

.avatar.small {
    width: 42px;
    height: 42px;
    font-size: 13px;
    font-weight: 900;
    background: linear-gradient(135deg, #e0f2fe, #dcfce7);
    color: #0f3f74;
}

.users-table .status,
.users-table .mini {
    min-height: 26px;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}

.users-table .role-status {
    background: #eef6ff;
    color: #1d4ed8;
    text-transform: capitalize;
}

.user-balance {
    color: #0f766e;
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
}

.account-stack,
.verification-stack,
.user-actions-stack {
    display: grid;
    gap: 8px;
    align-items: start;
}

.verification-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.user-meta {
    min-width: 170px;
}

.user-meta span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    line-height: 1.7;
}

.modern-meta {
    min-width: 0;
    gap: 6px;
}

.modern-meta span {
    padding: 8px 10px;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    background: #f8fafc;
}

.modern-meta .detail-label {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
}

.modern-meta em {
    color: #7b8796;
    font-style: normal;
    font-weight: 800;
}

.user-meta strong {
    color: #243044;
    font-weight: 700;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users-table .muted,
.user-accordion-item .muted {
    color: #7b8796;
    font-size: 12px;
    font-weight: 400;
}

.users-table .kyc-admin-links,
.user-accordion-item .kyc-admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.users-table .kyc-admin-links a,
.user-accordion-item .kyc-admin-links a {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 650;
}

.users-table .inline-form {
    gap: 8px;
    align-items: center;
}

.users-table .inline-form input {
    min-width: 190px;
    min-height: 34px;
    font-size: 12px;
}

.reset-inline-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
}

.client-danger-form,
.client-delete-form {
    display: grid;
    gap: 7px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.client-danger-form {
    grid-template-columns: minmax(160px, 1fr) auto;
    align-items: center;
}

.client-delete-form {
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
    align-items: center;
}

.client-danger-form input,
.client-delete-form input {
    min-height: 34px;
    font-size: 12px;
}

.client-delete-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff7f7;
}

.admin-sensitive-editor .form-stack + .form-stack {
    margin-top: 10px;
}

.admin-delete-box {
    padding-top: 10px;
    border-top: 1px dashed #fecaca;
}

.manager-assign-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.manager-assign-form select {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
}

.manager-card {
    display: grid;
    gap: 10px;
    margin: 20px 0;
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #f8fafc;
    text-align: left;
}

.manager-card h3,
.manager-card p {
    margin: 0;
}

.manager-card h3 {
    font-size: 15px;
}

.manager-card p {
    color: #0f3b7a;
    font-weight: 800;
}

.order-card {
    align-self: start;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-header h2,
.profile-header p {
    margin: 0;
}

.profile-header .balance-pill {
    margin-left: auto;
}

.compact-actions {
    margin-top: 8px;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(18, 24, 39, 0.04);
}

.admin-tabs a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    color: #314158;
    font-weight: 800;
}

.admin-tabs a:hover {
    background: #eef6ff;
    color: #0f3b7a;
}

.admin-user-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.admin-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-summary .summary-card {
    min-height: 86px;
    padding: 18px;
}

.admin-summary .summary-card span {
    font-size: 14px;
}

.admin-summary .summary-card strong {
    font-size: 18px;
}

.admin-summary .summary-card i {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
}

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

.detail-grid div {
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #f8fafc;
}

.detail-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.detail-grid strong {
    display: block;
    overflow-wrap: anywhere;
    color: #111827;
}

.admin-forms-grid {
    margin-bottom: 18px;
}

.wide-inline {
    grid-template-columns: minmax(240px, 420px) auto;
}

.admin-profile-card {
    position: sticky;
    top: 24px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(18, 24, 39, 0.08);
    text-align: center;
}

.admin-profile-card h2 {
    margin: 14px 0 4px;
}

.avatar.xlarge {
    width: 86px;
    height: 86px;
    margin: 0 auto;
    font-size: 34px;
}

.profile-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 22px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.profile-status-grid div {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 16px 10px;
}

.profile-status-grid div + div {
    border-left: 1px solid var(--line);
}

.profile-status-grid small {
    color: var(--muted);
    font-weight: 800;
}

.kyc-box {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    text-align: left;
}

.kyc-box h3 {
    margin: 0 0 12px;
}

.kyc-box p {
    margin: 8px 0;
    overflow-wrap: anywhere;
}

.client-360-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.compact-list {
    display: grid;
    gap: 10px;
}

.compact-list-item {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 11px;
}

.compact-list-item strong {
    color: #0f172a;
    display: block;
    font-size: 14px;
}

.compact-list-item span {
    color: #64748b;
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.quick-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    margin: 16px 0;
}

.quick-actions a {
    background: #eef6ff;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    color: #0f3f74;
    font-size: 12px;
    font-weight: 800;
    padding: 9px 10px;
    text-align: center;
}

.client-message-list {
    display: grid;
    gap: 10px;
}

.client-message-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 11px;
}

.client-message-item.admin {
    background: #f8fafc;
}

.client-message-item.client {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.client-message-item strong,
.client-message-item span {
    display: block;
    font-size: 12px;
}

.client-message-item p {
    color: #243044;
    font-size: 13px;
    line-height: 1.5;
    margin: 5px 0;
}

.kyc-box-mini {
    margin-top: 16px;
}

.kyc-box-mini h4 {
    margin: 0 0 10px;
}

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

.liveness-mini-grid figure {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 0;
    overflow: hidden;
}

.liveness-mini-grid img {
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    width: 100%;
}

.liveness-mini-grid figcaption {
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
    padding: 7px;
}

.kyc-admin-links.stacked {
    display: grid;
    gap: 8px;
}

.kyc-filter-bar {
    display: grid;
    grid-template-columns: 180px minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.kyc-review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 18px;
}

.kyc-review-card {
    display: grid;
    gap: 16px;
}

.kyc-verification-panel {
    grid-column: 1 / -1;
    padding: 0;
    overflow: hidden;
}

.kyc-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
    padding: 22px;
    border-bottom: 1px solid #e7edf5;
    background: #fbfdff;
}

.kyc-panel-head h2 {
    margin: 4px 0 6px;
}

.kyc-real-form {
    padding: 22px;
}

.kyc-step-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
    gap: 18px;
}

.kyc-step-card {
    position: relative;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}

.kyc-step-card h3 {
    margin: 0 0 16px;
    font-size: 17px;
}

.kyc-step-number {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: #0f172a;
    color: white;
    font-size: 13px;
    font-weight: 800;
}

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

.kyc-camera-frame {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 280px;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #0f172a;
}

.kyc-camera-frame video,
.kyc-camera-frame img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
}

.kyc-camera-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 8px;
    padding: 24px;
    color: #e5edf7;
    text-align: center;
}

.kyc-camera-placeholder strong {
    font-size: 18px;
}

.kyc-camera-placeholder span {
    max-width: 310px;
    color: #aebbd0;
    font-size: 13px;
    line-height: 1.5;
}

.kyc-camera-overlay {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.kyc-camera-overlay strong {
    font-size: 18px;
    font-weight: 800;
}

.kyc-camera-overlay span {
    color: #dbeafe;
    font-size: 14px;
    line-height: 1.45;
}

.kyc-camera-actions {
    margin-top: 12px;
    flex-wrap: wrap;
}

.kyc-camera-actions .primary-action {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.kyc-liveness-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.kyc-liveness-steps li {
    min-height: 34px;
    display: grid;
    place-items: center;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #64748b;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.kyc-liveness-steps li.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.kyc-liveness-steps li.done {
    border-color: #99f6e4;
    background: #ecfdf5;
    color: #047857;
}

.kyc-current-files {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.kyc-selfie-review {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.kyc-selfie-review img {
    width: 86px;
    height: 86px;
    border-radius: 8px;
    object-fit: cover;
}

.kyc-selfie-review span {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.kyc-selfie-review.compact {
    grid-template-columns: 72px minmax(0, 1fr);
    margin: 12px 0;
}

.kyc-selfie-review.compact img {
    width: 72px;
    height: 72px;
}

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

.kyc-document-gallery figure {
    margin: 0;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.kyc-document-gallery figcaption {
    margin-bottom: 8px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.kyc-document-gallery img {
    width: 100%;
    height: 180px;
    border-radius: 7px;
    object-fit: cover;
    background: #0f172a;
}

.kyc-document-gallery form {
    margin-top: 8px;
}

.kyc-document-gallery small {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.liveness-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kyc-pdf-preview {
    display: grid;
    place-items: center;
    height: 180px;
    border-radius: 7px;
    background: #e2e8f0;
    color: #334155;
    font-weight: 900;
}

.kyc-liveness-admin {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    color: #166534;
}

.kyc-liveness-admin span {
    font-size: 12px;
    color: #15803d;
}

.kyc-rejection-note,
.kyc-client-rejection {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    background: #fff1f2;
    color: #9f1239;
}

.kyc-rejection-note strong,
.kyc-client-rejection strong {
    color: #9f1239;
    font-size: 13px;
}

.kyc-rejection-note p,
.kyc-client-rejection span {
    margin: 0;
    color: #be123c;
    font-size: 13px;
    line-height: 1.55;
}

.kyc-reject-form {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.kyc-reject-form textarea {
    min-height: 36px;
    font-size: 12px;
}

.admin-dashboard-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.financial-dashboard-panel {
    margin-bottom: 18px;
}

.period-switcher {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #f8fafc;
}

.period-switcher button {
    min-height: 30px;
    border-radius: 6px;
    padding: 0 10px;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.period-switcher button.active,
.period-switcher button:hover {
    background: #00a87e;
    color: #03100c;
}

.finance-kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    gap: 10px;
}

.finance-kpi-grid article {
    display: grid;
    gap: 6px;
    min-height: 118px;
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #fbfdff;
}

.finance-kpi-grid span {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.finance-kpi-grid strong {
    color: #0f172a;
    font-size: 20px;
    font-weight: 850;
}

.finance-kpi-grid em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.dashboard-grid {
    margin-bottom: 18px;
}

.bar-chart {
    height: 280px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: 18px;
    align-items: end;
    padding: 18px 8px 0;
    border-bottom: 1px solid var(--line);
}

.bar-group {
    display: grid;
    gap: 10px;
    align-items: end;
    height: 100%;
}

.bar-pair {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 8px;
    height: 220px;
}

.bar {
    width: 18px;
    min-height: 4px;
    border-radius: 8px 8px 0 0;
}

.deposit-bar,
.deposit-dot {
    background: #047857;
}

.withdrawal-bar,
.withdrawal-dot {
    background: #e5484d;
}

.bar-group small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.chart-legend {
    display: flex;
    gap: 18px;
    margin-top: 14px;
    color: var(--muted);
    font-weight: 800;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chart-legend i {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 999px;
}

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

.status-stat-card {
    padding: 16px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #f8fafc;
}

.status-stat-card strong {
    display: block;
    margin-bottom: 12px;
    font-size: 18px;
}

.status-stat-card p {
    display: flex;
    justify-content: space-between;
    margin: 10px 0 0;
    color: var(--muted);
    font-weight: 800;
}

.status-stat-card b {
    color: var(--ink);
}

.stacked-bar {
    height: 16px;
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    background: #e5eaf2;
}

.approved-part {
    background: #047857;
}

.pending-part {
    background: #f59e0b;
}

.review-part {
    background: #3b82f6;
}

.rejected-part {
    background: #e5484d;
}

.leaderboard {
    display: grid;
    gap: 12px;
}

.leaderboard a {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    overflow: hidden;
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #ffffff;
}

.leaderboard a > span,
.leaderboard em {
    position: relative;
    z-index: 1;
}

.leaderboard strong,
.leaderboard small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard small {
    color: var(--muted);
}

.leaderboard em {
    color: #047857;
    font-style: normal;
    font-weight: 900;
}

.leaderboard i {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    background: #00b386;
}

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

.mini-activity-grid h3 {
    margin: 0 0 12px;
}

.mini-activity-grid p {
    display: grid;
    gap: 4px;
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.mini-activity-grid span {
    color: var(--muted);
}

.admin-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
    gap: 18px;
    margin-bottom: 18px;
}

.workbench-main,
.workbench-side {
    margin-bottom: 0;
}

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

.workbench-grid a {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fbff;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.workbench-grid a:hover,
.workbench-list a:hover {
    transform: translateY(-1px);
    border-color: #bfdbfe;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.workbench-grid span {
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.workbench-grid strong {
    color: #111827;
    font-size: 28px;
    font-weight: 750;
}

.workbench-grid em {
    color: #526072;
    font-size: 12px;
    font-style: normal;
    font-weight: 650;
}

.workbench-list {
    display: grid;
    gap: 9px;
}

.workbench-list a {
    display: grid;
    gap: 3px;
    padding: 11px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.workbench-list strong {
    color: #172033;
    font-size: 13px;
    font-weight: 700;
}

.workbench-list span {
    color: #6f7b8e;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.action-list a {
    background: #f8fbff;
}

.notifications-panel {
    display: grid;
    gap: 10px;
}

.notification-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.notification-filter-bar a {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    color: #334155;
    display: inline-flex;
    gap: 8px;
    min-height: 36px;
    padding: 8px 11px;
}

.notification-filter-bar a.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

.notification-filter-bar strong {
    align-items: center;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    justify-content: center;
    min-width: 24px;
    padding: 2px 7px;
}

.notification-filter-bar a.active strong {
    background: rgba(255, 255, 255, 0.18);
}

.notification-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #60a5fa;
    border-radius: 8px;
    background: #ffffff;
}

.notification-item.unread {
    background: #f8fbff;
    border-color: #bfdbfe;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.07);
}

.notification-main {
    align-items: flex-start;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
}

.notification-type-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    justify-content: center;
    min-width: 64px;
    padding: 5px 9px;
}

.notification-type-badge.deposit {
    background: #e0f2fe;
    color: #075985;
}

.notification-type-badge.withdrawal {
    background: #fef3c7;
    color: #92400e;
}

.notification-type-badge.kyc {
    background: #f3e8ff;
    color: #6d28d9;
}

.notification-type-badge.user,
.notification-type-badge.client {
    background: #ecfdf5;
    color: #047857;
}

.notification-type-badge.message {
    background: #ecfeff;
    color: #155e75;
}

.notification-type-badge.error {
    background: #fee2e2;
    color: #b42318;
}

.notification-type-badge.success {
    background: #dcfce7;
    color: #166534;
}

.notification-type-badge.info {
    background: #eef2ff;
    color: #3730a3;
}

.notification-item.success {
    border-left-color: #10b981;
}

.notification-item.error {
    border-left-color: #ef4444;
}

.notification-item.deposit {
    border-left-color: #0ea5e9;
}

.notification-item.withdrawal {
    border-left-color: #f59e0b;
}

.notification-item.kyc {
    border-left-color: #8b5cf6;
}

.notification-item strong {
    color: #172033;
    font-size: 14px;
}

.notification-item p {
    margin: 4px 0;
    color: #526072;
    font-size: 13px;
    line-height: 1.5;
}

.notification-item small {
    color: #7b8796;
    font-size: 11px;
}

.settings-section {
    padding: 0;
    overflow: hidden;
}

.settings-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(18, 24, 39, 0.06);
}

.settings-hero h1,
.settings-hero p {
    margin: 0;
}

.settings-hero h1 {
    margin-bottom: 6px;
}

.settings-health {
    display: grid;
    gap: 4px;
    min-width: 210px;
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #f8fafc;
}

.settings-health span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.settings-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.settings-overview article {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #ffffff;
}

.settings-overview span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.settings-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.settings-index {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #ffffff;
}

.settings-index a {
    padding: 11px 12px;
    border-radius: 6px;
    color: #314158;
    font-weight: 800;
}

.settings-index a:hover {
    background: #eef6f3;
    color: #047857;
}

.settings-index a.active {
    background: #00b386;
    color: #03100c;
}

.settings-content {
    display: grid;
    gap: 18px;
}

.settings-card {
    padding: 0;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(18, 24, 39, 0.05);
    overflow: hidden;
}

.settings-card-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #e6edf6;
    background: #fbfdff;
}

.settings-card-head h2,
.settings-card-head p {
    margin: 0;
}

.settings-card-head p {
    margin-top: 4px;
    color: var(--muted);
}

.settings-card-head > span {
    white-space: nowrap;
    padding: 6px 9px;
    border-radius: 999px;
    background: #eef6f3;
    color: #047857;
    font-size: 12px;
    font-weight: 900;
}

.settings-form {
    display: grid;
    gap: 18px;
    padding: 20px;
}

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

.settings-subsection {
    padding-top: 4px;
    border-top: 1px solid #eef2f6;
}

.settings-subsection h3 {
    margin: 0;
    font-size: 15px;
}

.settings-toggle-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-section-head {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.settings-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.settings-section-head h2 {
    margin: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px 46px;
    padding: 26px 20px;
}

.settings-grid article {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px 14px;
    align-items: start;
}

.settings-grid i {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    background: #f2f5f9;
    color: #24568f;
    font-style: normal;
    font-weight: 900;
}

.settings-grid strong {
    color: #0f3b7a;
}

.settings-grid span {
    grid-column: 2;
    color: #314158;
    font-size: 14px;
}

.settings-grid .active-setting i {
    background: #e8f8f2;
    color: #047857;
}

.settings-manage-grid {
    align-items: start;
}

.settings-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

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

.logo-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 12px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #f8fafc;
}

.logo-preview img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.app-logo-grid {
    margin-bottom: 18px;
}

.app-logo-preview {
    grid-column: span 1;
}

.design-preview-brand img,
.design-preview-brand > span:first-child {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--brand);
    color: #03100c;
    object-fit: contain;
    font-weight: 900;
}

.design-preview-brand img {
    padding: 4px;
    background: #fff;
    border: 1px solid #dce3ee;
}

.settings-tabs > input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tab-switcher {
    display: inline-flex;
    width: fit-content;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.tab-switcher label {
    padding: 9px 13px;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}

#emailTabSend:checked ~ .tab-switcher label[for="emailTabSend"],
#emailTabSmtp:checked ~ .tab-switcher label[for="emailTabSmtp"] {
    background: var(--brand);
    color: #03100c;
}

.tab-panel {
    display: none;
}

#emailTabSend:checked ~ .email-send-panel,
#emailTabSmtp:checked ~ .email-smtp-panel {
    display: grid;
    gap: 14px;
}

button:disabled,
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.payment-method-list {
    display: grid;
    gap: 12px;
}

.payment-method-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #f8fafc;
}

.payment-method-item strong,
.payment-method-item span {
    display: block;
}

.payment-method-item span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.payment-method-item p {
    margin: 10px 0 0;
    color: #314158;
    line-height: 1.5;
}

.method-actions {
    display: flex;
    align-items: start;
    gap: 8px;
}

.payment-help-list {
    display: grid;
    gap: 10px;
}

.method-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.method-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #f8fafc;
}

.method-card-icon {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    background: #e8f8f2;
    color: #047857;
    font-weight: 900;
}

.method-card-icon img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.method-card strong,
.method-card p {
    margin: 0;
}

.method-card p {
    color: var(--muted);
    font-size: 13px;
}

.method-card ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.method-card li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.method-card b {
    color: var(--ink);
}

.payment-help-list article {
    padding: 12px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #f8fafc;
}

.payment-help-list strong {
    color: #0f3b7a;
}

.payment-help-list p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.selected-payment-panel {
    display: grid;
    gap: 14px;
    padding: 15px;
    border: 1px solid #dbe7f3;
    border-radius: 8px;
    background: #f8fbff;
    color: #5f6b7a;
}

.selected-payment-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: start;
}

.selected-payment-head span,
.payment-coordinate-grid span {
    display: block;
    color: #748195;
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.selected-payment-head strong {
    display: block;
    margin-top: 2px;
    color: #172033;
    font-size: 17px;
    font-weight: 700;
}

.selected-payment-head em {
    min-height: 26px;
    display: inline-grid;
    place-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e8f8f2;
    color: #047857;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

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

.payment-coordinate-grid div {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e4ebf4;
    border-radius: 7px;
    background: #ffffff;
}

.payment-coordinate-grid div.wide {
    grid-column: 1 / -1;
}

.payment-coordinate-grid strong {
    display: block;
    margin-top: 4px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.payment-barcode {
    display: inline-grid;
    width: fit-content;
    padding: 10px;
    border: 1px solid #e4ebf4;
    border-radius: 8px;
    background: #ffffff;
}

.payment-barcode img {
    width: 150px;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.selected-payment-panel p {
    margin: 0;
    color: #526072;
    font-size: 13px;
    line-height: 1.6;
}

.payment-summary-box {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
}

.payment-summary-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.payment-summary-head span {
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.payment-summary-head strong {
    color: #14532d;
    font-size: 16px;
}

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

.payment-summary-grid div {
    padding: 10px;
    border: 1px solid #dcfce7;
    border-radius: 7px;
    background: #ffffff;
}

.payment-summary-grid span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.payment-summary-grid strong {
    display: block;
    margin-top: 4px;
    color: #172033;
    font-size: 14px;
    font-weight: 750;
}

.payment-summary-box p {
    margin: 0;
    color: #166534;
    font-size: 13px;
    font-weight: 650;
}

.payment-summary-box p.error {
    color: #be123c;
}

.chat-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.chat-layout.single-chat {
    grid-template-columns: minmax(0, 900px);
}

.conversations-panel {
    max-height: calc(100vh - 120px);
    overflow: auto;
}

.conversation-list {
    display: grid;
    gap: 8px;
}

.conversation-list a {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
}

.conversation-list a.active,
.conversation-list a:hover {
    border-color: #dbeafe;
    background: #eef6ff;
}

.conversation-list strong,
.conversation-list small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-list small {
    color: var(--muted);
}

.conversation-list em {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--danger);
    color: #ffffff;
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}

.chat-panel {
    padding: 0;
    overflow: hidden;
}

.chat-head {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.chat-head h2,
.chat-head p {
    margin: 0;
}

.chat-head .btn {
    margin-left: auto;
}

.chat-thread {
    height: 520px;
    overflow-y: auto;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(244, 247, 251, 0.8), rgba(255, 255, 255, 0.92));
}

.chat-message {
    display: flex;
    margin-bottom: 12px;
}

.chat-message.mine {
    justify-content: flex-end;
}

.chat-message.pending {
    opacity: 0.68;
}

.chat-message.theirs {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: min(620px, 82%);
    padding: 12px 14px;
    border: 1px solid #dce3ee;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(18, 24, 39, 0.04);
}

.chat-message.mine .chat-bubble {
    border-color: rgba(0, 179, 134, 0.35);
    background: #e8f8f2;
}

.chat-bubble strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}

.chat-bubble p {
    margin: 0;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.chat-bubble small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.chat-form textarea {
    min-height: 76px;
}

.empty-chat {
    display: grid;
    min-height: 180px;
    place-items: center;
    color: var(--muted);
    font-weight: 800;
}

/* Global professional polish */
body {
    font-family: "Segoe UI", Inter, Arial, Helvetica, sans-serif;
    color: #172033;
    background: var(--design-surface, #f3f6fb);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
strong {
    letter-spacing: 0;
}

h1 {
    font-weight: 700;
}

h2,
h3 {
    font-weight: 650;
}

p,
small,
span,
td,
th,
label,
input,
select,
textarea,
button,
a {
    letter-spacing: 0;
}

.muted {
    color: #6f7b8e;
    font-weight: 400;
}

.eyebrow {
    color: #00a87e;
    font-size: 11px;
    font-weight: 800;
}

.btn,
.mini,
.table-button,
button {
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn {
    min-height: 40px;
    border-radius: 7px;
    padding: 10px 16px;
    background: #00a87e;
    color: #04130f;
    font-size: 13px;
    font-weight: 750;
    box-shadow: 0 8px 18px rgba(0, 168, 126, 0.18);
}

.btn:hover {
    background: #00936f;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 168, 126, 0.22);
}

.btn.small {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 12px;
}

.btn.danger {
    background: var(--danger);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(229, 72, 77, 0.18);
}

.btn.danger:hover {
    background: #c92f35;
    box-shadow: 0 12px 24px rgba(229, 72, 77, 0.22);
}

.mini {
    min-height: 29px;
    border-radius: 6px;
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.09);
}

.mini:hover,
.table-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 18px rgba(15, 23, 42, 0.13);
}

.mini.approve {
    background: #059669;
}

.mini.reject {
    background: #dc2626;
}

.kyc-document-gallery .mini.reject,
.inline-actions .mini.reject {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    box-shadow: none;
}

.kyc-document-gallery .mini.reject:hover,
.inline-actions .mini.reject:hover {
    background: #ffe4e6;
    border-color: #fda4af;
}

input,
select,
textarea {
    min-height: 41px;
    border-color: #dbe3ee;
    border-radius: 7px;
    padding: 9px 11px;
    color: #172033;
    font-size: 13px;
    background: #ffffff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

label {
    color: #596579;
    font-size: 13px;
    font-weight: 600;
}

.check-row {
    font-weight: 600;
}

.metric,
.panel,
.market-card,
.summary-card,
.auth-card {
    border-color: #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.panel {
    padding: 20px;
}

.panel h2 {
    color: #172033;
    font-size: 18px;
    font-weight: 650;
}

.page-head h1 {
    color: #111827;
    font-size: 30px;
    font-weight: 700;
}

.page-head p {
    color: #6f7b8e;
}

.metric {
    padding: 17px;
}

.metric span {
    color: #6f7b8e;
    font-size: 12px;
    font-weight: 600;
}

.metric strong {
    color: #111827;
    font-size: 24px;
    font-weight: 700;
}

table {
    font-size: 13px;
}

th {
    color: #667085;
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

td {
    color: #243044;
    font-weight: 400;
}

th,
td {
    padding: 12px 10px;
    border-bottom-color: #e8edf4;
}

tbody tr {
    transition: background 0.16s ease;
}

tbody tr:hover {
    background: #f8fbff;
}

.balance-pill,
.status {
    min-height: 27px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 750;
}

.alert {
    border-radius: 7px;
    font-size: 13px;
    font-weight: 650;
}

.side-nav a {
    border-radius: 7px;
    font-size: 13px;
    font-weight: 650;
}

.side-user a,
.form-note a,
.panel-head a,
.table-action,
.kyc-files a,
.kyc-admin-links a {
    font-weight: 700;
}

.kyc-document-gallery figure,
.kyc-current-files,
.kyc-selfie-review,
.kyc-step-card,
.status-stat-card {
    border-radius: 8px;
    border-color: #e2e8f0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.kyc-document-gallery figcaption {
    font-size: 11px;
    font-weight: 750;
}

.notification-detail {
    display: grid;
    gap: 18px;
}

.notification-detail-head {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.notification-detail-head h2 {
    margin: 4px 0 8px;
}

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

.notification-detail-layout {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.notification-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 16px;
}

.notification-info-card.emphasis {
    background: #f8fbff;
    border-color: #bfdbfe;
}

.notification-info-card h3 {
    color: #0f172a;
    font-size: 20px;
    margin: 0;
}

.notification-field-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.notification-field {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

.notification-field.wide {
    grid-column: 1 / -1;
}

.notification-field span {
    color: #64748b;
    display: block;
    font-size: 11px;
    font-weight: 750;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.notification-field strong {
    color: #0f172a;
    display: block;
    font-size: 13px;
    font-weight: 720;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.notification-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.notification-actions .table-button {
    background: #eef6ff;
    border: 1px solid #bfdbfe;
    color: #0f3f74;
    font-weight: 750;
    box-shadow: none;
}

.notification-actions .table-button:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #0b315f;
}

.global-search-panel {
    margin-bottom: 18px;
}

.global-search-large {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.global-search-large label {
    display: grid;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.global-search-large input {
    min-height: 44px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    padding: 0 14px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}

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

.search-result-card {
    display: grid;
    align-content: start;
    gap: 10px;
}

.search-result-card > a {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #e6edf6;
    border-radius: 8px;
    background: #fbfdff;
}

.search-result-card > a:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.search-result-card strong {
    color: #0f172a;
    font-size: 13px;
}

.search-result-card span {
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}

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

.export-link-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #fbfdff;
    color: #0f3f74;
    font-size: 13px;
    font-weight: 850;
}

.export-link-grid a:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
}

.notification-message-preview {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    color: #172033;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    padding: 14px;
}

.email-log-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.email-log-summary article {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
}

.email-log-summary span {
    color: #64748b;
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.email-log-summary strong {
    color: #0f172a;
    display: block;
    font-size: 24px;
    margin-top: 5px;
}

.account-status-hero {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, .55fr) minmax(0, 1fr);
}

.account-status-hero span {
    color: #64748b;
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.account-status-hero strong {
    color: #0f172a;
    display: block;
    font-size: 36px;
    margin: 4px 0 10px;
}

.status-progress {
    background: #e2e8f0;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.status-progress i {
    background: #00b386;
    border-radius: inherit;
    display: block;
    height: 100%;
}

.status-step-row {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-step-row span {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.status-step-row span.done {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.status-step-row span.todo {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

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

.status-card {
    display: grid;
    gap: 12px;
}

.status-card-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.status-card-head h2,
.status-card p {
    margin: 0;
}

.status-card p {
    color: #64748b;
    line-height: 1.5;
}

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

.status-metrics div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
}

.status-metrics span {
    color: #64748b;
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-metrics strong {
    color: #0f172a;
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.status-list,
.next-action-list,
.status-timeline {
    display: grid;
    gap: 10px;
}

.status-list div,
.status-timeline div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 11px;
}

.status-list strong {
    color: #0f172a;
    display: block;
    margin-top: 7px;
}

.next-action-list a {
    background: #eef6ff;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    color: #0f3f74;
    font-weight: 800;
    padding: 12px;
}

.next-action-list a.important {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.status-timeline span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.status-timeline strong {
    color: #0f172a;
    display: block;
    margin-top: 4px;
}

.status-timeline p {
    color: #64748b;
    margin: 4px 0 0;
}

@media (max-width: 1040px) {
    .hero,
    .grid.two,
    .summary-grid.compact,
    .account-status-grid,
    .account-status-hero,
    .admin-workbench,
    .feature-band,
    .metrics,
    .account-summary,
    .market-strip,
    .market-hero,
    .upload-grid,
    .admin-user-layout,
    .admin-summary,
    .admin-dashboard-summary,
    .client-360-grid,
    .detail-grid,
    .form-grid,
    .logo-upload-grid,
    .status-stat-grid,
    .email-log-summary,
    .mini-activity-grid,
    .settings-grid,
    .settings-layout,
    .settings-overview,
    .settings-split,
    .onboarding-list,
    .payment-method-item,
    .payment-coordinate-grid,
    .payment-summary-grid,
    .chat-layout,
    .kyc-filter-bar,
    .kyc-step-grid,
    .kyc-upload-grid,
    .kyc-liveness-steps,
    .kyc-document-gallery,
    .liveness-gallery,
    .workbench-grid,
    .notification-detail-layout,
    .notification-field-grid,
    .finance-kpi-grid,
    .global-results-grid,
    .global-search-large,
    .admin-global-search,
    .export-link-grid,
    .client-premium-hero,
    .client-premium-grid,
    .client-premium-grid.lower,
    .portfolio-spec-hero,
    .portfolio-spec-grid,
    .terminal-head,
    .terminal-layout,
    .market-focus-price,
    .trading-workspace,
    .execution-metrics,
    .risk-strip,
    .chat-layout.single-chat {
        grid-template-columns: 1fr;
    }

    .premium-metrics,
    .compact-checklist,
    .market-chip-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .admin-topbar,
    .content {
        grid-column: 1;
    }

    .admin-topbar {
        padding: 12px 16px 0;
    }

    .settings-index {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .side-user {
        position: static;
        margin-top: 24px;
    }

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

    .admin-profile-card {
        position: static;
    }

    .conversations-panel {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .landing-nav,
    .page-head,
    .hero-actions,
    .settings-hero,
    .settings-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .notification-detail-head {
        align-items: stretch;
        flex-direction: column;
    }

    .landing-nav {
        padding: 18px 0;
        gap: 18px;
    }

    .landing-nav nav {
        width: 100%;
        justify-content: space-between;
    }

    .hero {
        margin-top: 28px;
    }

    .hero h1 {
        font-size: 46px;
    }

    .content {
        padding: 18px;
    }

    .side-nav {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 24px;
    }

    .summary-card {
        padding: 20px;
    }

    .onboarding-list {
        grid-template-columns: 1fr;
    }

    .chat-head,
    .chat-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .chat-head {
        flex-wrap: wrap;
    }

    .chat-head .btn {
        width: 100%;
        margin-left: 0;
    }

    .chat-form {
        display: grid;
    }

    .chat-thread {
        height: 460px;
    }

    .chat-bubble {
        max-width: 94%;
    }

    .bar-chart {
        gap: 10px;
        overflow-x: auto;
    }

    .bar-group {
        min-width: 58px;
    }

    .settings-index {
        grid-template-columns: 1fr;
    }

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

    .tab-switcher {
        width: 100%;
    }

    .tab-switcher label {
        flex: 1;
        text-align: center;
    }

    .status-step-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-premium-hero > div,
    .client-premium-hero > aside,
    .premium-metrics article,
    .premium-action-grid a,
    .portfolio-mini-list div,
    .premium-activity-list a,
    .market-chip-row a {
        padding: 12px;
    }

    .client-premium-hero h1 {
        font-size: 24px;
    }

    .client-premium-hero aside strong {
        font-size: 24px;
    }

    .premium-metrics,
    .premium-action-grid,
    .market-chip-row {
        gap: 8px;
    }

    .premium-metrics strong {
        font-size: 16px;
    }

    .compact-checklist {
        grid-template-columns: 1fr;
    }

    .portfolio-mini-list div,
    .premium-activity-list a {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .portfolio-mini-list small,
    .premium-activity-list em {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    body.app-shell {
        background: var(--design-surface, #f5f7fb);
    }

    .content,
    .markets-content {
        padding: 14px;
    }

    .page-head {
        gap: 10px;
        margin-bottom: 14px;
    }

    .page-head h1 {
        font-size: 24px;
        line-height: 1.15;
    }

    .page-head .balance-pill,
    .page-head .status {
        align-self: flex-start;
    }

    .panel {
        padding: 16px;
    }

    .sidebar {
        border-radius: 0 0 12px 12px;
        padding: 14px;
    }

    .sidebar .brand {
        min-height: 44px;
    }

    .side-nav {
        display: flex;
        gap: 8px;
        margin-top: 14px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .side-nav a {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 9px 11px;
        white-space: nowrap;
    }

    .side-user {
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        margin-top: 12px;
        padding-top: 12px;
    }

    label,
    input,
    select,
    textarea,
    button,
    .btn {
        font-size: 16px;
    }

    input,
    select,
    textarea {
        min-height: 46px;
    }

    textarea {
        line-height: 1.45;
    }

    .btn,
    button.btn {
        width: 100%;
        min-height: 46px;
    }

    .grid.two,
    .account-summary,
    .market-grid,
    .method-card-grid,
    .payment-coordinate-grid,
    .payment-summary-grid,
    .kyc-step-grid,
    .kyc-upload-grid,
    .kyc-liveness-steps,
    .form-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .summary-card {
        min-height: 82px;
        padding: 16px;
    }

    .summary-card strong {
        font-size: 19px;
    }

    .method-card-grid {
        display: grid;
        gap: 10px;
    }

    .method-card,
    .selected-payment-panel,
    .payment-summary-box {
        border-radius: 8px;
        padding: 13px;
    }

    .selected-payment-head,
    .payment-summary-head {
        align-items: stretch;
        flex-direction: column;
    }

    .payment-coordinate-grid strong,
    .payment-summary-grid strong {
        overflow-wrap: anywhere;
    }

    .payment-barcode {
        justify-self: center;
        width: 100%;
    }

    .payment-barcode img {
        width: min(220px, 100%);
        margin: 0 auto;
    }

    .table-wrap {
        margin: 0 -4px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 560px;
    }

    th,
    td {
        padding: 10px 9px;
    }

    .kyc-verification-panel,
    .kyc-step-card {
        padding: 14px;
    }

    .kyc-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .kyc-camera-frame {
        min-height: auto;
        aspect-ratio: 3 / 4;
        border-radius: 10px;
    }

    .kyc-camera-frame video,
    .kyc-camera-frame img {
        min-height: 0;
        height: 100%;
        object-fit: cover;
    }

    .kyc-camera-placeholder {
        padding: 18px;
    }

    .kyc-camera-overlay {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 12px;
    }

    .kyc-camera-overlay strong {
        font-size: 15px;
    }

    .kyc-camera-overlay span {
        font-size: 12px;
    }

    .kyc-camera-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .kyc-camera-actions .btn {
        width: 100%;
    }

    .kyc-liveness-steps {
        gap: 8px;
    }

    .kyc-liveness-steps span {
        min-height: 36px;
        padding: 8px 10px;
    }

    .market-card,
    .order-card,
    .chart-panel {
        min-height: auto;
    }

    .chart-lines.large {
        min-height: 210px;
    }

    .market-item,
    .ticker-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .market-item .btn,
    .ticker-row .btn {
        grid-column: 1 / -1;
    }

    .chat-thread {
        height: min(58vh, 440px);
        padding: 14px;
    }

    .chat-form textarea {
        min-height: 54px;
    }
}

@media (max-width: 420px) {
    .content,
    .markets-content {
        padding: 10px;
    }

    .panel {
        padding: 13px;
    }

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

    .brand strong {
        font-size: 14px;
    }

    .summary-card i {
        display: none;
    }

    .kyc-camera-frame {
        aspect-ratio: 9 / 13;
    }

    .payment-summary-grid div,
    .payment-coordinate-grid div {
        padding: 9px;
    }

    .method-card ul {
        grid-template-columns: 1fr;
    }

    .status-step-row,
    .status-metrics {
        grid-template-columns: 1fr;
    }
}

/* Theme system: strong visual application across admin and client */
body,
body.app-shell,
.app-shell {
    background: var(--design-surface, var(--soft)) !important;
}

.sidebar,
.admin-sidebar,
.design-preview-nav {
    background: var(--design-dark, var(--bg)) !important;
    border-color: color-mix(in srgb, var(--brand) 24%, #223049) !important;
}

.admin-topbar {
    background: linear-gradient(180deg, var(--design-surface, #eef2f7) 0%, color-mix(in srgb, var(--design-surface, #eef2f7) 90%, transparent) 74%, transparent 100%) !important;
}

.btn,
button.btn,
input[type="submit"],
.mini.approve,
.table-button,
.chat-head .btn,
.chat-form .btn,
.kyc-camera-actions .primary-action,
.market-item .btn,
.ticker-row .btn {
    border-color: var(--brand) !important;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%) !important;
    color: #03100c !important;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 24%, transparent) !important;
}

.btn:hover,
button.btn:hover,
.mini.approve:hover,
.table-button:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 86%, #000) 0%, var(--brand-2) 100%) !important;
    transform: translateY(-1px);
}

.btn.secondary,
.mini,
.period-switcher button.active,
.notification-filter-bar a.active,
.order-type-row button.active,
.spec-side-toggle label:has(input:checked),
.theme-card:has(input:checked),
.status.info,
.status.sent,
.status.admin,
.status.client {
    border-color: color-mix(in srgb, var(--brand) 36%, #dce3ee) !important;
    background: color-mix(in srgb, var(--brand) 14%, #ffffff) !important;
    color: color-mix(in srgb, var(--brand) 62%, #0f172a) !important;
}

.side-nav a.active,
.side-nav a:hover,
.settings-index a.active,
.settings-index a:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 88%, #ffffff) 0%, var(--brand-2) 100%) !important;
    color: #03100c !important;
}

.brand span,
.avatar,
.balance-pill,
.nav-badge,
.status.approved,
.status-step-row span.done,
.status-progress i,
.price-line,
.spec-chart-toolbar button.active,
.notification-type-badge.success,
.notification-type-badge.info {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #03100c !important;
}

.panel,
.settings-card,
.status-card,
.status-stat-card,
.notification-detail,
.notification-info-card,
.client-message-item,
.payment-method-item,
.market-card,
.premium-progress-card,
.order-ticket-pro,
.market-focus-price div,
.execution-metrics div,
.spec-preview div {
    border-color: color-mix(in srgb, var(--brand) 18%, #dce3ee) !important;
    box-shadow: 0 14px 34px color-mix(in srgb, var(--brand) 9%, transparent) !important;
}

.settings-card-head,
.panel-head,
.status-card-head,
.notification-detail-head,
.market-focus-panel,
.chat-form,
.client-message-item.admin,
.notification-item.unread {
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, #ffffff) 0%, #ffffff 100%) !important;
}

.alert,
.notification-message-preview,
.kyc-liveness-admin,
.kyc-current-files,
.status-step-row span.todo {
    border-color: color-mix(in srgb, var(--brand) 35%, #dce3ee) !important;
    background: color-mix(in srgb, var(--brand) 12%, #ffffff) !important;
    color: color-mix(in srgb, var(--brand) 55%, #172033) !important;
}

.alert.success,
.notification-item.success {
    border-color: var(--brand) !important;
    background: color-mix(in srgb, var(--brand) 16%, #ffffff) !important;
    color: color-mix(in srgb, var(--brand) 62%, #0f172a) !important;
}

.alert.error,
.notification-item.error,
.kyc-rejection-note,
.kyc-client-rejection {
    border-left: 5px solid var(--brand) !important;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 10%, transparent) !important;
}

.chat-message.mine .chat-bubble,
.client-message-item.client,
.notification-type-badge.deposit,
.notification-type-badge.withdrawal,
.notification-type-badge.kyc,
.notification-type-badge.user,
.notification-type-badge.client,
.notification-type-badge.message {
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, #ffffff), color-mix(in srgb, var(--brand-2) 14%, #ffffff)) !important;
    border-color: color-mix(in srgb, var(--brand) 26%, #dce3ee) !important;
    color: #172033 !important;
}

.form-note a,
.panel-head a,
.table-action,
.permission-editor summary,
.side-user a,
.up,
.positive,
.eyebrow,
.notification-filter-bar a.active strong,
.notification-item strong,
.status-stat-card b {
    color: color-mix(in srgb, var(--brand) 74%, #0f172a) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent) !important;
    outline: none;
}

.permission-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.permission-matrix .check-row {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--brand) 18%, #dce3ee);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 750;
}

.permission-matrix.compact {
    grid-template-columns: 1fr;
    max-height: 260px;
    overflow: auto;
    padding-right: 4px;
}

.ticket-meta-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    align-items: end;
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--brand) 16%, #dce3ee);
    border-radius: 8px;
    background: color-mix(in srgb, var(--brand) 6%, #fff);
}

.ticket-meta-bar label {
    margin: 0;
    font-size: 12px;
}

.client-crm-panel {
    margin-top: 18px;
}

.sensitive-password {
    min-height: 34px;
    max-width: 190px;
    padding: 8px 10px;
    font-size: 12px;
}

.inline-sensitive-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.business-action-row {
    text-decoration: none;
    color: inherit;
}

.business-action-row b {
    min-width: 38px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 14%, #fff);
    color: color-mix(in srgb, var(--brand) 72%, #0f172a);
}

.chart-risk-line {
    border-style: dashed !important;
    opacity: .95;
}

.chart-risk-line.sl {
    border-color: #ef4444 !important;
    color: #991b1b !important;
}

.chart-risk-line.tp {
    border-color: #10b981 !important;
    color: #047857 !important;
}

.compact-check {
    min-width: 92px;
    margin: 0;
}

.position-cockpit-list {
    display: grid;
    gap: 12px;
}

.position-cockpit {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dbe7f3;
    border-left: 4px solid #10b981;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.position-cockpit.sell {
    border-left-color: #ef4444;
}

.position-cockpit-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.position-cockpit-main h3 {
    margin: 3px 0;
    font-size: 17px;
}

.position-cockpit-main h3 small {
    color: #64748b;
    font-size: 12px;
}

.position-cockpit-main p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.position-cockpit-main > strong {
    font-size: 20px;
    white-space: nowrap;
}

.position-market {
    color: var(--brand);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}

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

.position-metrics div {
    padding: 10px;
    border: 1px solid #e2eaf3;
    border-radius: 8px;
    background: #fff;
}

.position-metrics span,
.position-exit-plan span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.position-metrics strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 14px;
}

.position-exit-plan {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--brand) 8%, #fff);
}

.position-exit-plan strong {
    display: block;
    margin-top: 3px;
    color: #0f172a;
    font-size: 13px;
}

.position-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.position-levels span {
    padding: 5px 7px;
    border-radius: 999px;
    background: #eef6ff;
    text-transform: none;
}

.position-levels .danger {
    color: #991b1b;
    background: #fee2e2;
}

.position-levels .success {
    color: #047857;
    background: #d1fae5;
}

.position-close-form {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 760px) {
    .user-accordion-item summary {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .user-accordion-item summary .user-balance {
        grid-column: 2;
    }

    .user-accordion-details {
        grid-template-columns: 1fr;
    }

    .position-cockpit-main,
    .position-exit-plan {
        grid-template-columns: 1fr;
        display: grid;
    }

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

    .position-levels,
    .position-close-form {
        justify-content: stretch;
    }

    .position-close-form .btn {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .admin-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        padding: 12px;
    }

    .app-shell {
        display: block;
    }

    .admin-topbar {
        position: static;
        padding: 10px 12px;
    }

    .admin-global-search {
        grid-template-columns: 1fr;
        width: 100%;
    }

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

    .side-dropdown,
    .side-subnav {
        grid-column: 1 / -1;
    }

    .ticket-meta-bar {
        grid-template-columns: 1fr;
    }

    .permission-matrix {
        grid-template-columns: 1fr;
    }

    .table-wrap {
        overflow-x: auto;
    }

.table-wrap table {
        min-width: 760px;
    }
}

.trade-desk-page {
    display: grid;
    gap: 18px;
}

.text-success {
    color: #059669 !important;
}

.text-danger {
    color: #dc2626 !important;
}

.btn.full {
    width: 100%;
    justify-content: center;
}

.trade-desk-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: stretch;
    padding: 22px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(22, 78, 99, .9)),
        #0f172a;
    color: #fff;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .16);
}

.trade-desk-hero h1 {
    margin: 4px 0 8px;
    color: #fff;
}

.trade-desk-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
}

.trade-desk-balance {
    display: grid;
    gap: 6px;
    align-content: center;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
}

.trade-desk-balance span,
.trade-desk-balance small {
    color: rgba(255, 255, 255, .68);
}

.trade-desk-balance strong {
    font-size: 30px;
    letter-spacing: 0;
}

.trade-desk-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.trade-desk-summary article {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

.trade-desk-summary span {
    color: #64748b;
    font-size: 13px;
}

.trade-desk-summary strong {
    color: #102033;
    font-size: 22px;
}

.trade-desk-shell {
    display: grid;
    grid-template-columns: 260px minmax(520px, 1fr) 320px;
    gap: 14px;
    align-items: stretch;
}

.trade-watchlist,
.trade-chart-panel,
.trade-ticket {
    border: 1px solid #d6e1ed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .09);
}

.trade-watchlist,
.trade-ticket {
    overflow: hidden;
}

.trade-box-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e6edf5;
    background: #f8fafc;
}

.trade-box-head span,
.trade-chart-head span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.trade-box-head strong {
    display: block;
    margin-top: 3px;
    color: #102033;
}

.trade-watch-scroll {
    max-height: 640px;
    overflow: auto;
    padding: 8px;
}

.trade-market-row {
    width: 100%;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #102033;
    text-align: left;
    cursor: pointer;
}

.trade-market-row:hover,
.trade-market-row.active {
    border-color: #bcd4f6;
    background: #eef6ff;
}

.market-logo {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #14b8a6, #2563eb);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.trade-market-row strong,
.trade-market-row small,
.trade-market-row em,
.trade-market-row b {
    display: block;
    font-style: normal;
}

.trade-market-row small {
    color: #64748b;
}

.trade-market-row em {
    color: #102033;
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}

.trade-market-row b.up,
.trade-price-box .up {
    color: #059669;
}

.trade-market-row b.down,
.trade-price-box .down {
    color: #dc2626;
}

.trade-chart-panel {
    display: grid;
    grid-template-rows: auto auto minmax(420px, 1fr) auto;
    overflow: hidden;
}

.trade-chart-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid #e6edf5;
}

.trade-chart-head h2 {
    margin: 4px 0;
    color: #102033;
    font-size: 22px;
}

.trade-chart-head p {
    margin: 0;
    color: #64748b;
}

.trade-price-box {
    display: grid;
    gap: 4px;
    align-content: center;
    justify-items: end;
}

.trade-price-box strong {
    color: #102033;
    font-size: 24px;
}

.trade-price-box small {
    font-weight: 900;
}

.trade-range-buttons {
    display: flex;
    gap: 6px;
    padding: 10px 18px;
    border-bottom: 1px solid #e6edf5;
}

.trade-range-buttons button {
    min-width: 42px;
    padding: 7px 10px;
    border: 1px solid #dbe5f0;
    border-radius: 7px;
    background: #fff;
    color: #475569;
    font-weight: 800;
    cursor: pointer;
}

.trade-range-buttons button.active,
.trade-range-buttons button:hover {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.trade-main-chart {
    position: relative;
    min-height: 500px;
    background: #fbfdff;
    overflow: hidden;
}

.trade-main-chart .candle-chart {
    inset: 36px 72px 84px 28px;
}

.trade-main-chart .volume-bars {
    right: 72px;
    bottom: 20px;
    left: 28px;
}

.trade-grid-lines {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(148, 163, 184, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .12) 1px, transparent 1px);
    background-size: 100% 20%, 12.5% 100%;
}

.trade-chart-footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #e6edf5;
    background: #f8fafc;
}

.trade-chart-footer span {
    padding: 12px 16px;
    color: #64748b;
    font-size: 13px;
}

.trade-chart-footer strong {
    color: #102033;
}

.trade-ticket {
    align-self: start;
}

.trade-ticket form {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.trade-ticket label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.trade-ticket select,
.trade-ticket input[type="number"] {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cfd9e6;
    border-radius: 8px;
    background: #fff;
    color: #102033;
    font-weight: 800;
}

.trade-side-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.trade-side-switch label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #102033;
}

.trade-side-switch input {
    margin-right: 7px;
}

.trade-ticket-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.trade-ticket-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.trade-ticket-preview span {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #e4ebf3;
    border-radius: 8px;
    background: #f8fafc;
}

.trade-ticket-preview small {
    color: #64748b;
    font-size: 12px;
}

.trade-ticket-preview strong {
    color: #102033;
    font-size: 15px;
}

.trade-positions-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 14px;
}

.trade-position-list,
.trade-activity-list {
    display: grid;
    gap: 12px;
}

.trade-position-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.3fr) repeat(3, minmax(110px, 1fr)) auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid #e3ebf5;
    border-radius: 8px;
    background: #fff;
}

.trade-position-row strong,
.trade-position-row b {
    color: #102033;
}

.trade-position-row span,
.trade-position-row small {
    display: block;
    color: #64748b;
}

.trade-activity-list > div:not(.panel-header) {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #edf2f7;
}

@media (max-width: 1240px) {
    .trade-desk-shell,
    .trade-positions-grid {
        grid-template-columns: 1fr;
    }

    .trade-watch-scroll {
        max-height: 280px;
    }
}

@media (max-width: 760px) {
    .trade-desk-hero,
    .trade-desk-summary,
    .trade-chart-footer,
    .trade-ticket-grid,
    .trade-ticket-preview,
    .trade-side-switch {
        grid-template-columns: 1fr;
    }

    .trade-chart-head {
        display: grid;
    }

    .trade-price-box {
        justify-items: start;
    }

    .trade-main-chart {
        min-height: 420px;
    }

    .trade-position-row {
        grid-template-columns: 1fr;
    }
}
