:root {
    color-scheme: dark;
    --bg: #111312;
    --panel: #191c1b;
    --panel-strong: #202522;
    --text: #eef4ef;
    --muted: #a8b3aa;
    --line: #303831;
    --accent: #39d98a;
    --accent-strong: #20b56f;
    --amber: #f4b740;
    --danger: #ff6b6b;
    --info: #68a8ff;
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: #75e6ac;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(17, 19, 18, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(57, 217, 138, 0.45);
    background: #152118;
    color: var(--accent);
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-dropdown {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid transparent;
    color: var(--muted);
    font: inherit;
}

.nav-link:hover {
    border-color: var(--line);
    color: var(--text);
}

.nav-link.is-active {
    border-color: rgba(244, 183, 64, 0.5);
    color: var(--text);
    background: rgba(244, 183, 64, 0.08);
}

.nav-dropdown-trigger {
    cursor: pointer;
    list-style: none;
    gap: 7px;
}

.nav-dropdown-trigger::-webkit-details-marker {
    display: none;
}

.nav-dropdown-trigger::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: 0.75;
}

.nav-dropdown[open] .nav-dropdown-trigger::after {
    transform: rotate(225deg) translate(-1px, -1px);
}

.nav-dropdown-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 24;
    display: grid;
    min-width: 190px;
    gap: 2px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #111927;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.account-dropdown .nav-dropdown-menu {
    right: 0;
    left: auto;
}

.nav-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.nav-menu-link:hover,
.nav-menu-link.is-active {
    border-color: var(--line);
    background: rgba(244, 183, 64, 0.08);
    color: var(--text);
}

.logout-form {
    margin: 0;
}

.nav-menu-logout {
    display: block;
    width: 100%;
}

.nav-menu-logout .nav-menu-link {
    width: 100%;
    background: transparent;
    cursor: pointer;
}

.nav-button {
    cursor: pointer;
    background: transparent;
}

.notification-dropdown {
    position: relative;
}

.notification-trigger {
    cursor: pointer;
    list-style: none;
}

.notification-trigger::-webkit-details-marker {
    display: none;
}

.header-notification-dropdown[open] .notification-trigger {
    border-color: rgba(244, 183, 64, 0.5);
    color: var(--text);
    background: rgba(244, 183, 64, 0.08);
}

.notification-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: 6px;
    border-radius: 999px;
    background: #f4b740;
    color: #111827;
    font-size: 12px;
    font-weight: 800;
}

.notification-count[hidden] {
    display: none;
}

.notification-bell-link {
    position: relative;
    justify-content: center;
    width: 40px;
    padding: 8px;
}

.notification-bell-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-bell-count {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    margin-left: 0;
    padding: 0 5px;
    font-size: 11px;
}

.notification-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 20;
    width: min(360px, calc(100vw - 32px));
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #111927;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
    padding: 8px;
}

.notification-menu-item,
.notification-menu-link {
    display: grid;
    gap: 4px;
    color: var(--text);
    text-decoration: none;
    border-radius: 7px;
    padding: 10px;
}

.notification-menu-item:hover,
.notification-menu-link:hover {
    background: rgba(244, 183, 64, 0.08);
}

.notification-menu-item span,
.notification-menu-item time,
.notification-empty {
    color: var(--muted);
    font-size: 0.85rem;
}

.notification-menu-item time {
    font-size: 0.76rem;
}

.notification-menu-item.is-unread {
    border-left: 3px solid #f4b740;
}

.notification-empty {
    margin: 8px 10px;
}

.demo-banner {
    border-top: 1px solid rgba(244, 183, 64, 0.24);
    background: #20190d;
    color: #ffe0a3;
    padding: 9px 20px;
    text-align: center;
    font-size: 0.92rem;
}

.beta-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    border: 1px solid rgba(244, 183, 64, 0.55);
    border-radius: 999px;
    padding: 2px 8px;
    color: #111312;
    background: var(--amber);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 56px;
}

.auth-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    gap: 38px;
    align-items: start;
}

.auth-copy {
    padding-top: 32px;
}

.eyebrow,
.module-kicker {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0 0 14px;
    line-height: 1.1;
}

h1 {
    max-width: 760px;
    font-size: clamp(2rem, 5vw, 4.25rem);
}

h2 {
    font-size: 1.32rem;
}

p {
    color: var(--muted);
    line-height: 1.65;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-form,
.narrow-panel .card {
    display: grid;
    gap: 13px;
    padding: 26px;
}

.narrow-panel {
    max-width: 620px;
    margin: 0 auto;
}

label {
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 600;
}

input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #101311;
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
    outline: none;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(57, 217, 138, 0.15);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button-primary {
    background: var(--accent);
    color: #06110a;
}

.button-primary:hover {
    background: #75e6ac;
    color: #06110a;
}

.button-secondary {
    background: transparent;
    border-color: var(--line);
    color: var(--text);
}

.button-secondary:hover {
    border-color: var(--accent);
}

.button-danger {
    border-color: rgba(255, 107, 107, 0.38);
    background: rgba(255, 107, 107, 0.08);
    color: #ffb1b1;
}

.button-danger:hover {
    border-color: rgba(255, 107, 107, 0.8);
    color: #ffd1d1;
}

.button-small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.84rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.alert {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: var(--panel-strong);
    color: var(--text);
}

.alert-error {
    border-color: rgba(255, 107, 107, 0.45);
    background: rgba(255, 107, 107, 0.1);
}

.alert-success {
    border-color: rgba(57, 217, 138, 0.45);
    background: rgba(57, 217, 138, 0.1);
}

.alert-warning {
    border-color: rgba(244, 183, 64, 0.5);
    background: rgba(244, 183, 64, 0.1);
}

.form-note,
.field-hint {
    margin: 0;
    font-size: 0.9rem;
}

.field-hint.is-error {
    color: var(--danger);
}

.field-hint.is-ok {
    color: var(--accent);
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 30px 0;
}

.compact-hero {
    align-items: stretch;
    padding: 18px 0 24px;
}

.compact-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.equity-tile {
    display: grid;
    align-content: center;
    min-width: 300px;
    padding: 22px;
    border: 1px solid rgba(57, 217, 138, 0.34);
    border-radius: 8px;
    background: #132017;
    box-shadow: var(--shadow);
}

.equity-tile span,
.metric-card span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.equity-tile strong {
    margin-top: 8px;
    color: var(--text);
    font-size: 2rem;
    line-height: 1.15;
}

.equity-tile small,
.metric-card small {
    margin-top: 8px;
    color: var(--muted);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-card {
    display: grid;
    gap: 7px;
    min-height: 130px;
    padding: 18px;
}

.metric-card strong {
    color: var(--text);
    font-size: 1.28rem;
    line-height: 1.2;
    text-transform: capitalize;
}

.quick-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 20px;
}

.quick-actions p {
    margin: 0;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.stacked-panels {
    display: grid;
    gap: 18px;
}

.placeholder-panel {
    min-height: 180px;
    padding: 22px;
}

.placeholder-panel p:last-child {
    margin-bottom: 0;
}

.notice-strip {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(244, 183, 64, 0.32);
    border-radius: 8px;
    background: #20190d;
    color: #ffe0a3;
}

.notice-strip strong {
    color: #ffe7b6;
}

.wallet-card {
    margin-bottom: 18px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 0;
}

.table-wrap {
    overflow-x: auto;
    padding: 0 22px 22px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

th,
td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.muted {
    padding: 0 22px 22px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.module-card {
    display: block;
    min-height: 176px;
    padding: 22px;
    color: var(--text);
}

.module-card:hover {
    border-color: rgba(57, 217, 138, 0.7);
}

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 22px;
    border-top: 1px solid var(--line);
    padding: 22px 20px;
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-summary,
.legal-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.legal-footer-links a {
    color: var(--muted);
    font-weight: 700;
}

.legal-footer-links a:hover {
    color: var(--accent);
}

.ack-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
    line-height: 1.45;
}

.ack-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.legal-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 18px 0 42px;
}

.legal-page h1 {
    margin: 4px 0 16px;
    font-size: clamp(2rem, 4vw, 3.1rem);
}

.legal-card {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 24px;
}

.legal-card h2 {
    margin: 8px 0 0;
}

.legal-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.legal-boundary-list {
    display: grid;
    gap: 8px;
    margin: 4px 0 12px;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.55;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin: 8px 0 16px;
}

.status-grid div {
    display: grid;
    gap: 5px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
}

.status-grid span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-grid strong {
    color: var(--text);
}

.toast-region {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 30;
    max-width: min(420px, calc(100% - 40px));
    padding: 13px 15px;
    border: 1px solid rgba(244, 183, 64, 0.4);
    border-radius: 8px;
    background: #20190d;
    color: #ffe0a3;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast-region.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.history-hero h1 {
    font-size: clamp(2rem, 4vw, 3.1rem);
}

.history-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.history-card {
    margin-top: 18px;
    overflow: hidden;
}

.history-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--line);
    background: #141816;
}

.history-tab {
    min-height: 44px;
    padding: 11px 14px;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.history-tab:hover,
.history-tab.is-active {
    color: var(--text);
    background: #1d231f;
}

.history-tab.is-active {
    box-shadow: inset 0 -2px 0 var(--amber);
}

.history-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.history-filters label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.history-filters select,
.history-filters input {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #101311;
    color: var(--text);
    padding: 8px 10px;
    font: inherit;
    text-transform: none;
}

.history-search {
    grid-column: span 1;
}

.notification-center,
.settings-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.settings-shell {
    display: grid;
    gap: 18px;
}

.notification-list {
    display: grid;
    gap: 10px;
}

.notification-list.compact {
    gap: 8px;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0e1624;
    padding: 14px;
}

.notification-item.is-unread {
    border-color: rgba(244, 183, 64, 0.45);
}

.notification-item.is-read {
    opacity: 0.72;
}

.notification-main {
    display: grid;
    gap: 6px;
}

.notification-main h3 {
    margin: 0;
    font-size: 1rem;
}

.notification-main p {
    margin: 0;
    color: var(--muted);
}

.notification-main time {
    color: #7f8da5;
    font-size: 0.82rem;
}

.notification-badge {
    width: fit-content;
    border: 1px solid rgba(244, 183, 64, 0.45);
    border-radius: 999px;
    padding: 3px 8px;
    color: #f4b740;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: start;
    justify-content: end;
}

.notification-tabs a {
    text-transform: none;
}

.settings-card {
    padding: 22px;
}

.settings-form {
    display: grid;
    gap: 14px;
}

.kyc-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.kyc-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    border: 1px solid #263755;
    background: #111927;
    border-radius: 8px;
    padding: 22px;
}

.kyc-hero h1 {
    margin: 4px 0 8px;
    font-size: 2rem;
    letter-spacing: 0;
}

.kyc-hero p {
    margin: 0;
    color: #91a0b8;
}

.kyc-card {
    padding: 22px;
}

.kyc-form {
    display: grid;
    gap: 14px;
}

.kyc-form textarea,
.kyc-form input,
.kyc-form select {
    width: 100%;
}

.kyc-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.kyc-summary-grid div {
    border: 1px solid #263755;
    border-radius: 8px;
    background: #0e1624;
    padding: 12px;
}

.kyc-summary-grid span {
    display: block;
    color: #91a0b8;
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.status-pill {
    border: 1px solid #34445f;
    border-radius: 999px;
    padding: 7px 12px;
    background: #141d2e;
    color: #d7e1f3;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-approved {
    border-color: rgba(25, 195, 125, 0.45);
    color: #36d399;
}

.status-rejected {
    border-color: rgba(255, 107, 122, 0.45);
    color: #ff6b7a;
}

.status-pending {
    border-color: rgba(245, 166, 35, 0.55);
    color: #f5a623;
}

.alert.compact {
    padding: 10px 12px;
}

.toast-region.is-error {
    border-color: rgba(255, 107, 122, 0.7);
}

@media (max-width: 760px) {
    .kyc-hero,
    .kyc-summary-grid {
        grid-template-columns: 1fr;
    }

    .kyc-hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

.history-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 22px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.history-tab-note {
    padding: 12px 22px;
    border-bottom: 1px solid rgba(244, 183, 64, 0.22);
    background: #17170f;
    color: #ffe0a3;
    line-height: 1.5;
}

.history-table-wrap {
    padding-top: 0;
}

.history-table {
    min-width: 1080px;
    font-size: 0.9rem;
}

.history-table th,
.history-table td {
    padding: 11px 9px;
    vertical-align: top;
}

.history-note {
    display: inline-block;
    max-width: 420px;
    white-space: normal;
    color: var(--muted);
    line-height: 1.45;
}

.history-positive {
    color: var(--accent);
}

.history-negative {
    color: var(--danger);
}

.history-warning {
    color: var(--amber);
}

.history-section-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid rgba(244, 183, 64, 0.32);
    border-radius: 999px;
    background: rgba(244, 183, 64, 0.08);
    color: #ffe0a3;
    white-space: nowrap;
}

@media (max-width: 820px) {
    .navbar,
    .auth-panel,
    .dashboard-hero,
    .quick-actions {
        display: grid;
    }

    .auth-panel,
    .module-grid,
    .metric-grid,
    .dashboard-grid,
    .history-summary-grid,
    .history-filters {
        grid-template-columns: 1fr;
    }

    .equity-tile {
        min-width: 0;
    }

    .action-row {
        justify-content: stretch;
    }

    .action-row .button {
        width: 100%;
    }

    .nav-links {
        justify-content: start;
    }

    .notification-menu {
        left: 0;
        right: auto;
    }

    .notification-item {
        display: grid;
    }

    .notification-actions {
        justify-content: start;
    }

    h1 {
        font-size: 2.25rem;
    }
}

/* Phase UI-1: cohesive premium demo UI layer */
:root {
    --bg: #080b10;
    --bg-soft: #0d1118;
    --panel: #111722;
    --panel-strong: #161e2b;
    --panel-raised: #1a2331;
    --text: #f4f7fb;
    --muted: #a4afc0;
    --muted-2: #768297;
    --line: #243044;
    --line-soft: rgba(255, 255, 255, 0.07);
    --accent: #f6b73c;
    --accent-strong: #ffca62;
    --accent-soft: rgba(246, 183, 60, 0.12);
    --success: #21c87a;
    --success-soft: rgba(33, 200, 122, 0.12);
    --danger: #ff5f73;
    --danger-soft: rgba(255, 95, 115, 0.12);
    --info: #6ea8fe;
    --info-soft: rgba(110, 168, 254, 0.12);
    --radius-sm: 6px;
    --radius: 8px;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
    --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.22);
    --focus-ring: 0 0 0 3px rgba(246, 183, 60, 0.18);
}

html {
    background: var(--bg);
}

body {
    background:
        linear-gradient(180deg, rgba(18, 24, 35, 0.95) 0%, var(--bg) 280px),
        linear-gradient(90deg, rgba(246, 183, 60, 0.04), transparent 34%, rgba(110, 168, 254, 0.035));
    color: var(--text);
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(246, 183, 60, 0.32);
    color: #fff8e8;
}

body::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.history-table-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.history-table-wrap::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #344157;
}

a {
    color: var(--accent-strong);
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

a:hover {
    color: #ffe0a3;
}

.site-header {
    background: rgba(8, 11, 16, 0.88);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
}

.navbar {
    max-width: 1280px;
    padding: 14px 22px;
}

.brand {
    gap: 12px;
    letter-spacing: 0.01em;
}

.brand-mark {
    border-color: rgba(246, 183, 60, 0.46);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffcc68, #d8911d);
    color: #101217;
    box-shadow: 0 12px 26px rgba(246, 183, 60, 0.18);
}

.nav-links {
    gap: 6px;
}

.nav-link {
    border-radius: var(--radius-sm);
    color: #b2bdcd;
    font-size: 0.93rem;
    font-weight: 700;
}

.nav-link:hover {
    border-color: rgba(246, 183, 60, 0.28);
    background: rgba(246, 183, 60, 0.08);
    color: var(--text);
}

.nav-link.is-active {
    border-color: rgba(246, 183, 60, 0.55);
    background: rgba(246, 183, 60, 0.13);
    color: #ffe1a1;
}

.notification-menu {
    border-color: var(--line);
    background: rgba(13, 17, 24, 0.98);
    box-shadow: var(--shadow);
}

.nav-dropdown-menu {
    border-color: var(--line);
    background: rgba(13, 17, 24, 0.98);
    box-shadow: var(--shadow);
}

.nav-menu-link {
    color: #b2bdcd;
}

.nav-menu-link:hover,
.nav-menu-link.is-active {
    border-color: rgba(246, 183, 60, 0.28);
    background: rgba(246, 183, 60, 0.08);
    color: var(--text);
}

.demo-banner,
.notice-strip,
.history-tab-note {
    border-color: rgba(246, 183, 60, 0.28);
    background: linear-gradient(90deg, rgba(246, 183, 60, 0.12), rgba(246, 183, 60, 0.055));
    color: #ffe6b6;
}

.beta-badge {
    background: linear-gradient(135deg, #ffd06a, #f2a620);
    color: #14100a;
    box-shadow: 0 8px 18px rgba(246, 183, 60, 0.18);
}

.page-shell {
    width: min(1240px, calc(100% - 32px));
    padding-top: 36px;
}

.card,
.auth-form,
.narrow-panel .card,
.metric-card,
.equity-tile,
.wallet-card,
.history-card,
.settings-card,
.kyc-card,
.legal-card,
.notification-item,
.status-grid div {
    border-color: var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(26, 35, 49, 0.96), rgba(15, 20, 29, 0.96));
    box-shadow: var(--shadow-soft);
}

.card:hover,
.module-card:hover {
    border-color: rgba(246, 183, 60, 0.28);
}

.dashboard-grid > .card > h2:first-child {
    padding: 22px 22px 0;
}

.dashboard-grid > .card > p:last-child {
    padding-bottom: 22px;
}

.dashboard-hero {
    align-items: center;
    margin-bottom: 22px;
    padding: 20px 0 28px;
}

.dashboard-hero > div:first-child {
    min-width: 0;
}

.dashboard-hero p {
    max-width: 760px;
}

.auth-panel {
    min-height: calc(100vh - 230px);
    align-items: center;
}

.auth-copy {
    padding: 0;
}

.auth-copy h1,
.dashboard-hero h1,
.legal-page h1 {
    letter-spacing: 0;
}

.auth-form {
    border: 1px solid rgba(246, 183, 60, 0.16);
    padding: 28px;
}

.eyebrow,
.module-kicker {
    color: var(--accent);
}

p {
    color: var(--muted);
}

label {
    color: #dbe3ee;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #0b1018;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input,
select {
    min-height: 44px;
    padding: 10px 12px;
}

textarea {
    padding: 11px 12px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(246, 183, 60, 0.72);
    box-shadow: var(--focus-ring);
    background: #0f1621;
}

input[readonly],
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    min-height: 18px;
    accent-color: var(--accent);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid label {
    display: grid;
    gap: 7px;
}

.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease, opacity 140ms ease;
}

.button:hover,
.btn:hover {
    transform: translateY(-1px);
}

.button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.button-primary,
.btn-primary {
    border-color: rgba(255, 208, 106, 0.45);
    background: linear-gradient(135deg, #ffd06a, #f2a620);
    color: #12100a;
    box-shadow: 0 12px 26px rgba(246, 183, 60, 0.18);
}

.button-primary:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #ffe0a0, #ffc04c);
    color: #12100a;
}

.button-secondary,
.btn-secondary {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.035);
    color: #dce5f2;
}

.button-secondary:hover,
.btn-secondary:hover {
    border-color: rgba(246, 183, 60, 0.42);
    background: rgba(246, 183, 60, 0.09);
    color: #ffe1a1;
}

.button-danger {
    border-color: rgba(255, 95, 115, 0.44);
    background: var(--danger-soft);
    color: #ffb7c0;
}

.button-small {
    min-height: 32px;
    padding: 7px 10px;
}

.alert {
    border-radius: var(--radius);
    background: rgba(26, 35, 49, 0.78);
}

.alert-error {
    border-color: rgba(255, 95, 115, 0.5);
    background: var(--danger-soft);
}

.alert-success {
    border-color: rgba(33, 200, 122, 0.5);
    background: var(--success-soft);
}

.alert-warning {
    border-color: rgba(246, 183, 60, 0.42);
    background: var(--accent-soft);
}

.equity-tile {
    border-color: rgba(246, 183, 60, 0.34);
    background:
        linear-gradient(180deg, rgba(48, 36, 16, 0.74), rgba(21, 25, 32, 0.96));
}

.equity-tile span,
.metric-card span {
    color: var(--muted-2);
}

.equity-tile strong {
    color: #ffe1a1;
}

.metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.72;
}

.metric-card strong {
    color: var(--text);
}

.quick-actions {
    align-items: center;
    background:
        linear-gradient(180deg, rgba(26, 35, 49, 0.94), rgba(13, 17, 24, 0.94));
}

.section-heading {
    align-items: center;
}

.section-heading h2 {
    margin-bottom: 4px;
}

.table-wrap {
    scrollbar-width: thin;
}

table,
.data-table {
    border-spacing: 0;
}

th {
    color: var(--muted-2);
    font-size: 0.76rem;
    letter-spacing: 0;
}

td {
    color: #dce4ee;
}

tbody tr {
    transition: background 130ms ease;
}

tbody tr:hover {
    background: rgba(246, 183, 60, 0.045);
}

.table-actions {
    align-items: center;
}

.muted {
    color: var(--muted);
}

.module-card {
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(26, 35, 49, 0.96), rgba(13, 17, 24, 0.96));
}

.site-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
    background: rgba(8, 11, 16, 0.74);
}

.legal-footer-links a {
    color: #aeb8c9;
}

.history-card {
    overflow: hidden;
}

.history-tabs {
    gap: 6px;
    padding: 8px;
    border-bottom-color: var(--line);
    background: rgba(8, 11, 16, 0.48);
}

.history-tab,
.history-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.history-tab:hover,
.history-tab.is-active,
.history-tabs a:hover,
.history-tabs a.is-active {
    border-color: rgba(246, 183, 60, 0.4);
    background: rgba(246, 183, 60, 0.1);
    color: #ffe0a3;
    box-shadow: none;
}

.history-filters {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    background: rgba(255, 255, 255, 0.018);
}

.history-status-row {
    background: rgba(8, 11, 16, 0.32);
}

.history-table th,
.history-table td {
    padding: 12px 10px;
}

.notification-center,
.settings-shell,
.kyc-shell {
    width: min(1180px, 100%);
}

.notification-item {
    align-items: flex-start;
}

.notification-item.is-unread {
    border-color: rgba(246, 183, 60, 0.48);
    background: linear-gradient(180deg, rgba(40, 34, 20, 0.72), rgba(15, 20, 29, 0.98));
}

.notification-badge,
.history-section-pill,
.status-pill {
    border-color: rgba(246, 183, 60, 0.36);
    background: rgba(246, 183, 60, 0.09);
    color: #ffd88d;
}

.settings-card,
.kyc-card {
    padding: 22px;
}

.settings-card .section-heading,
.kyc-card .section-heading {
    padding: 0 0 14px;
}

.kyc-hero {
    border-color: var(--line);
    background: linear-gradient(180deg, rgba(26, 35, 49, 0.96), rgba(13, 17, 24, 0.96));
}

.kyc-summary-grid div {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.025);
}

.status-approved {
    border-color: rgba(33, 200, 122, 0.45);
    color: #49dfa0;
}

.status-rejected {
    border-color: rgba(255, 95, 115, 0.48);
    color: #ff9cab;
}

.status-pending {
    border-color: rgba(246, 183, 60, 0.5);
    color: #ffd88d;
}

.empty-state {
    border-color: rgba(246, 183, 60, 0.26);
    border-radius: var(--radius);
    background: rgba(246, 183, 60, 0.045);
}

.toast-region {
    border-radius: var(--radius);
    background: #17120b;
    box-shadow: var(--shadow);
}

@media (max-width: 900px) {
    .page-shell {
        width: min(100% - 24px, 1240px);
        padding-top: 24px;
    }

    .navbar {
        align-items: flex-start;
        display: grid;
    }

    .nav-links {
        width: 100%;
    }

    .auth-panel,
    .dashboard-hero,
    .quick-actions,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        min-height: 0;
    }

    .action-row {
        justify-content: stretch;
    }
}

@media (max-width: 560px) {
    .nav-link {
        min-height: 34px;
        padding: 7px 9px;
        font-size: 0.86rem;
    }

    .auth-form,
    .settings-card,
    .kyc-card {
        padding: 18px;
    }

    .section-heading,
    .notification-item {
        display: grid;
    }

    .metric-card {
        min-height: auto;
    }
}

/* Phase UI mood refinement: indigo-violet grid theme */
:root {
    --bg: #050711;
    --bg-soft: #090b18;
    --panel: #111228;
    --panel-strong: #17172f;
    --panel-raised: #1d1a3a;
    --text: #f7f5ff;
    --muted: #b0abc4;
    --muted-2: #7f789d;
    --line: rgba(151, 121, 255, 0.22);
    --line-soft: rgba(202, 173, 255, 0.08);
    --accent: #8b5cf6;
    --accent-strong: #c084fc;
    --accent-soft: rgba(139, 92, 246, 0.15);
    --magenta: #e879f9;
    --magenta-soft: rgba(232, 121, 249, 0.13);
    --success: #2ce6a0;
    --success-soft: rgba(44, 230, 160, 0.12);
    --danger: #ff6f91;
    --danger-soft: rgba(255, 111, 145, 0.13);
    --info: #8ab4ff;
    --info-soft: rgba(138, 180, 255, 0.13);
    --radius-sm: 7px;
    --radius: 8px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.28);
    --focus-ring: 0 0 0 3px rgba(192, 132, 252, 0.2);
}

html,
body {
    background-color: var(--bg);
}

body {
    background:
        repeating-linear-gradient(0deg, rgba(167, 139, 250, 0.055) 0 1px, transparent 1px 42px),
        repeating-linear-gradient(90deg, rgba(167, 139, 250, 0.052) 0 1px, transparent 1px 42px),
        radial-gradient(circle at 12% -8%, rgba(124, 58, 237, 0.26), transparent 34rem),
        radial-gradient(circle at 86% 8%, rgba(232, 121, 249, 0.17), transparent 32rem),
        radial-gradient(circle at 50% 110%, rgba(76, 29, 149, 0.2), transparent 40rem),
        linear-gradient(180deg, #070817 0%, #050711 44%, #060815 100%);
    background-attachment: fixed;
}

a {
    color: #d8b4fe;
}

a:hover {
    color: #f0abfc;
}

.site-header {
    background: rgba(5, 7, 17, 0.86);
    border-bottom-color: rgba(177, 153, 255, 0.16);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.36);
}

.brand-mark {
    border-color: rgba(216, 180, 254, 0.55);
    background: linear-gradient(135deg, #f0abfc, #8b5cf6 58%, #4c1d95);
    color: #090713;
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.32);
}

.nav-link {
    color: #b8b1d2;
}

.nav-link:hover {
    border-color: rgba(216, 180, 254, 0.34);
    background: rgba(139, 92, 246, 0.12);
    color: #f7f5ff;
}

.nav-link.is-active {
    border-color: rgba(232, 121, 249, 0.48);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.2), rgba(76, 29, 149, 0.16));
    color: #f5d0fe;
}

.notification-count,
.beta-badge {
    background: linear-gradient(135deg, #f0abfc, #a78bfa);
    color: #10071a;
    box-shadow: 0 8px 22px rgba(168, 85, 247, 0.25);
}

.notification-menu {
    border-color: rgba(177, 153, 255, 0.22);
    background:
        linear-gradient(180deg, rgba(21, 18, 43, 0.98), rgba(8, 10, 24, 0.98));
}

.demo-banner,
.notice-strip,
.history-tab-note {
    border-color: rgba(232, 121, 249, 0.3);
    background:
        linear-gradient(90deg, rgba(139, 92, 246, 0.22), rgba(232, 121, 249, 0.09), rgba(15, 23, 42, 0.3));
    color: #f5d0fe;
}

.card,
.auth-form,
.narrow-panel .card,
.metric-card,
.equity-tile,
.wallet-card,
.history-card,
.settings-card,
.kyc-card,
.legal-card,
.notification-item,
.status-grid div {
    border-color: rgba(177, 153, 255, 0.2);
    background:
        linear-gradient(180deg, rgba(27, 24, 55, 0.94), rgba(10, 12, 29, 0.96)),
        radial-gradient(circle at 20% 0%, rgba(139, 92, 246, 0.12), transparent 22rem);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 18px 54px rgba(0, 0, 0, 0.32);
}

.card:hover,
.module-card:hover {
    border-color: rgba(216, 180, 254, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 22px 62px rgba(0, 0, 0, 0.36);
}

.auth-form {
    border-color: rgba(232, 121, 249, 0.22);
}

.eyebrow,
.module-kicker {
    color: #d8b4fe;
}

.equity-tile {
    border-color: rgba(232, 121, 249, 0.28);
    background:
        radial-gradient(circle at 20% 0%, rgba(232, 121, 249, 0.18), transparent 18rem),
        linear-gradient(180deg, rgba(35, 25, 71, 0.94), rgba(11, 12, 28, 0.98));
}

.equity-tile strong {
    color: #f5d0fe;
}

.metric-card::before {
    background: linear-gradient(90deg, #f0abfc, #8b5cf6 48%, transparent);
}

.quick-actions,
.module-card,
.kyc-hero {
    background:
        linear-gradient(180deg, rgba(28, 24, 58, 0.94), rgba(9, 11, 27, 0.96));
}

input,
select,
textarea {
    border-color: rgba(151, 121, 255, 0.24);
    background: rgba(5, 8, 20, 0.86);
    color: #f7f5ff;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(192, 132, 252, 0.4);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(232, 121, 249, 0.68);
    box-shadow: var(--focus-ring);
    background: rgba(12, 12, 32, 0.96);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: #a78bfa;
}

.button-primary,
.btn-primary {
    border-color: rgba(232, 121, 249, 0.5);
    background: linear-gradient(135deg, #f0abfc, #a78bfa 48%, #7c3aed);
    color: #11071d;
    box-shadow: 0 14px 34px rgba(139, 92, 246, 0.28);
}

.button-primary:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #f5d0fe, #c084fc 48%, #8b5cf6);
    color: #11071d;
}

.button-secondary,
.btn-secondary {
    border-color: rgba(151, 121, 255, 0.26);
    background: rgba(139, 92, 246, 0.08);
    color: #dfd7ff;
}

.button-secondary:hover,
.btn-secondary:hover {
    border-color: rgba(232, 121, 249, 0.45);
    background: rgba(232, 121, 249, 0.12);
    color: #f5d0fe;
}

.button-danger {
    border-color: rgba(255, 111, 145, 0.44);
    background: var(--danger-soft);
    color: #ffb8c8;
}

.alert {
    border-color: rgba(151, 121, 255, 0.22);
    background: rgba(18, 15, 40, 0.78);
}

.alert-error {
    border-color: rgba(255, 111, 145, 0.48);
    background: rgba(255, 111, 145, 0.12);
}

.alert-success {
    border-color: rgba(44, 230, 160, 0.5);
    background: rgba(44, 230, 160, 0.11);
}

.alert-warning {
    border-color: rgba(232, 121, 249, 0.36);
    background: rgba(139, 92, 246, 0.14);
}

th {
    color: #9891b7;
}

td {
    color: #e5e1f4;
}

tbody tr:hover {
    background: rgba(139, 92, 246, 0.075);
}

.history-tabs {
    background: rgba(8, 8, 24, 0.66);
}

.history-tab,
.history-tabs a {
    color: #aaa3c4;
}

.history-tab:hover,
.history-tab.is-active,
.history-tabs a:hover,
.history-tabs a.is-active {
    border-color: rgba(232, 121, 249, 0.44);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.2), rgba(76, 29, 149, 0.15));
    color: #f5d0fe;
}

.history-filters,
.history-status-row {
    background: rgba(7, 8, 24, 0.52);
}

.notification-item.is-unread {
    border-color: rgba(232, 121, 249, 0.42);
    background:
        linear-gradient(180deg, rgba(48, 26, 79, 0.66), rgba(12, 13, 30, 0.98));
}

.notification-badge,
.history-section-pill,
.status-pill {
    border-color: rgba(232, 121, 249, 0.36);
    background: rgba(139, 92, 246, 0.14);
    color: #f5d0fe;
}

.status-approved,
.history-positive {
    border-color: rgba(44, 230, 160, 0.45);
    color: #5ff0ba;
}

.status-rejected,
.history-negative {
    border-color: rgba(255, 111, 145, 0.48);
    color: #ff9eb4;
}

.status-pending,
.history-warning {
    border-color: rgba(232, 121, 249, 0.5);
    color: #f0abfc;
}

.empty-state {
    border-color: rgba(192, 132, 252, 0.26);
    background: rgba(139, 92, 246, 0.075);
}

.toast-region {
    border-color: rgba(232, 121, 249, 0.42);
    background: #130b23;
    color: #f5d0fe;
}

.site-footer {
    border-top-color: rgba(177, 153, 255, 0.14);
    background: rgba(5, 7, 17, 0.76);
}

.legal-footer-links a {
    color: #b9b0d0;
}

.legal-footer-links a:hover {
    color: #f0abfc;
}

/* Phase 26: mobile-first responsive usability layer */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
canvas,
svg,
video {
    max-width: 100%;
}

.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid rgba(151, 121, 255, 0.28);
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.12);
    color: #f5d0fe;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.mobile-nav-toggle::before {
    content: "";
    width: 18px;
    height: 12px;
    margin-right: 8px;
    background:
        linear-gradient(#f5d0fe, #f5d0fe) 0 0 / 100% 2px no-repeat,
        linear-gradient(#f5d0fe, #f5d0fe) 0 50% / 100% 2px no-repeat,
        linear-gradient(#f5d0fe, #f5d0fe) 0 100% / 100% 2px no-repeat;
}

.mobile-nav-toggle[aria-expanded="true"] {
    border-color: rgba(232, 121, 249, 0.48);
    background: rgba(232, 121, 249, 0.14);
}

.mobile-nav-toggle:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.table-wrap,
.mini-table-wrap,
.history-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-wrap table,
.mini-table-wrap table,
.history-table-wrap table {
    width: max-content;
    min-width: 100%;
}

.page-shell > *,
.card,
.dashboard-grid > *,
.stacked-panels > *,
.metric-grid > *,
.module-grid > *,
.history-card,
.wallet-card,
.settings-card,
.kyc-card,
.legal-card,
.notification-item,
.quick-actions > *,
.section-heading > * {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 60;
    }

    .navbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        padding: 12px;
    }

    .brand {
        min-width: 0;
    }

    .brand span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        grid-column: 1 / -1;
        display: none;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding-top: 8px;
    }

    .nav-links.is-open {
        display: grid;
    }

    .nav-link,
    .nav-button,
    .notification-trigger {
        justify-content: center;
        width: 100%;
        min-height: 44px;
        border-color: rgba(151, 121, 255, 0.18);
        background: rgba(5, 8, 20, 0.62);
    }

    .logout-form {
        display: block;
        width: 100%;
    }

    .notification-dropdown {
        width: 100%;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown[open] {
        grid-column: 1 / -1;
    }

    .nav-dropdown-menu {
        position: static;
        width: 100%;
        min-width: 0;
        margin-top: 6px;
        padding: 8px;
        box-shadow: none;
    }

    .nav-menu-link {
        justify-content: center;
        width: 100%;
        min-height: 44px;
        border-color: rgba(151, 121, 255, 0.18);
        background: rgba(5, 8, 20, 0.62);
        white-space: normal;
    }

    .notification-bell-link {
        width: 100%;
    }

    .notification-bell-count {
        top: 4px;
        right: calc(50% - 23px);
    }

    .notification-menu {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 112px;
        width: auto;
        max-height: min(70vh, 520px);
        overflow-y: auto;
    }

    .demo-banner {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 10px;
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .beta-badge {
        margin-right: 0;
        padding: 2px 7px;
        font-size: 0.66rem;
    }

    .page-shell,
    .notification-center,
    .settings-shell,
    .kyc-shell {
        width: min(100% - 20px, 100%);
        padding-top: 18px;
        padding-bottom: 34px;
    }

    h1 {
        font-size: clamp(1.8rem, 9vw, 2.35rem);
        line-height: 1.08;
    }

    h2 {
        font-size: 1.12rem;
    }

    p {
        line-height: 1.55;
    }

    .auth-panel,
    .dashboard-hero,
    .quick-actions,
    .dashboard-grid,
    .module-grid,
    .metric-grid,
    .history-summary-grid,
    .history-filters,
    .form-grid,
    .kyc-summary-grid,
    .status-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero,
    .quick-actions,
    .section-heading,
    .history-status-row,
    .notification-item,
    .kyc-hero {
        display: grid;
        align-items: start;
    }

    .auth-form,
    .narrow-panel .card,
    .settings-card,
    .kyc-card,
    .legal-card,
    .metric-card,
    .quick-actions,
    .placeholder-panel {
        padding: 16px;
    }

    .equity-tile {
        min-width: 0;
        padding: 18px;
    }

    .equity-tile strong {
        overflow-wrap: anywhere;
        font-size: 1.6rem;
    }

    .action-row,
    .notification-actions,
    .table-actions {
        justify-content: stretch;
    }

    .action-row .button,
    .notification-actions .button,
    .table-actions .button {
        flex: 1 1 150px;
        min-height: 44px;
    }

    input,
    select,
    textarea,
    .button,
    .btn {
        min-height: 44px;
        font-size: 16px;
    }

    .history-tabs,
    .notification-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .history-tab,
    .history-tabs a,
    .notification-tabs a {
        flex: 0 0 auto;
        min-height: 42px;
        white-space: nowrap;
    }

    .history-filters {
        padding: 14px;
    }

    .history-status-row,
    .history-tab-note,
    .history-table-wrap,
    .table-wrap,
    .muted {
        padding-left: 14px;
        padding-right: 14px;
    }

    .history-note {
        max-width: 260px;
    }

    .notification-item {
        gap: 12px;
    }

    .site-footer {
        padding: 18px 12px 24px;
        text-align: center;
    }
}

@media (max-width: 430px) {
    .nav-links {
        grid-template-columns: 1fr;
    }

    .page-shell,
    .notification-center,
    .settings-shell,
    .kyc-shell {
        width: min(100% - 16px, 100%);
    }

    .auth-form,
    .narrow-panel .card,
    .settings-card,
    .kyc-card,
    .legal-card,
    .metric-card,
    .quick-actions,
    .placeholder-panel {
        padding: 14px;
    }

    .table-actions .button,
    .button,
    .btn {
        width: 100%;
    }

    .toast-region {
        right: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
    }
}

/* Demo deposit simulation */
.deposit-hero h1 {
    font-size: clamp(2.1rem, 4.4vw, 3.5rem);
}

.deposit-security-card {
    display: grid;
    align-content: center;
    min-width: 320px;
    padding: 22px;
    border: 1px solid rgba(232, 121, 249, 0.3);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 20% 0%, rgba(232, 121, 249, 0.17), transparent 16rem),
        linear-gradient(180deg, rgba(32, 26, 70, 0.96), rgba(9, 10, 28, 0.98));
    box-shadow: var(--shadow);
}

.deposit-security-card span,
.deposit-rule-list span,
.deposit-network-card span,
.deposit-estimate-card span,
.deposit-bank-row span,
.card-preview-bottom span,
.card-preview-top span {
    color: var(--muted-2);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.deposit-security-card strong {
    margin-top: 8px;
    color: #f5d0fe;
    font-size: 1.8rem;
}

.deposit-security-card small,
.deposit-rule-list small,
.deposit-estimate-card small {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.5;
}

.deposit-notice {
    margin-bottom: 20px;
}

.deposit-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.deposit-main {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.deposit-method-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(177, 153, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(8, 8, 24, 0.64);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.deposit-method-tab {
    flex: 1 1 0;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.deposit-method-tab:hover,
.deposit-method-tab.is-active {
    border-color: rgba(232, 121, 249, 0.45);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.22), rgba(76, 29, 149, 0.16));
    color: #f5d0fe;
}

.deposit-method-tab:hover {
    transform: translateY(-1px);
}

.deposit-panel {
    display: none;
    padding: 0 22px 22px;
    overflow: hidden;
}

.deposit-panel.is-active {
    display: grid;
    gap: 18px;
}

.deposit-panel-heading {
    padding: 22px 0 0;
}

.deposit-status-badge,
.deposit-payment-badges span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(232, 121, 249, 0.34);
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.14);
    color: #f5d0fe;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.deposit-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.deposit-form-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deposit-form-grid label,
.deposit-card-form label,
.deposit-receipt-card label {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.deposit-crypto-layout,
.deposit-card-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 16px;
    align-items: stretch;
}

.deposit-address-card,
.deposit-qr-placeholder,
.deposit-estimate-card,
.deposit-network-card,
.deposit-bank-card,
.deposit-instructions,
.deposit-receipt-card,
.deposit-side-panel,
.card-preview {
    border: 1px solid rgba(177, 153, 255, 0.18);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(22, 20, 48, 0.86), rgba(8, 10, 25, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.deposit-address-card {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.deposit-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.deposit-field-head span {
    color: var(--text);
    font-weight: 800;
}

.deposit-address-placeholder {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 13px;
    border: 1px dashed rgba(232, 121, 249, 0.38);
    border-radius: var(--radius-sm);
    background: rgba(5, 8, 20, 0.74);
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
}

.deposit-qr-placeholder {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    min-height: 210px;
    padding: 16px;
    text-align: center;
}

.deposit-qr-placeholder strong {
    color: var(--text);
}

.deposit-qr-placeholder span {
    color: var(--muted);
    font-size: 0.88rem;
}

.deposit-qr-grid {
    width: 118px;
    aspect-ratio: 1;
    border: 1px solid rgba(232, 121, 249, 0.28);
    border-radius: var(--radius-sm);
    background:
        linear-gradient(90deg, rgba(232, 121, 249, 0.14) 12px, transparent 12px 24px) 0 0 / 24px 24px,
        linear-gradient(rgba(139, 92, 246, 0.14) 12px, transparent 12px 24px) 0 0 / 24px 24px,
        rgba(5, 8, 20, 0.86);
    opacity: 0.7;
}

.deposit-estimate-card {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 14px;
}

.deposit-estimate-card strong {
    color: #f5d0fe;
    font-size: 1.2rem;
}

.deposit-network-card {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
}

.deposit-network-card div,
.deposit-rule-list div {
    display: grid;
    gap: 6px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.018);
}

.deposit-network-card strong,
.deposit-rule-list strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.deposit-warning-list {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(232, 121, 249, 0.28);
    border-radius: var(--radius);
    background: rgba(139, 92, 246, 0.11);
}

.deposit-warning-list p,
.deposit-instructions p {
    margin: 0;
}

.deposit-history-preview {
    border-top: 1px solid rgba(177, 153, 255, 0.16);
    margin-top: 4px;
}

.deposit-empty-row {
    color: var(--muted);
    text-align: center;
}

.deposit-bank-card {
    display: grid;
    overflow: hidden;
}

.deposit-bank-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 58px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(177, 153, 255, 0.12);
}

.deposit-bank-row:last-child {
    border-bottom: 0;
}

.deposit-bank-row strong {
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
}

.deposit-instructions,
.deposit-receipt-card {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.deposit-instructions h3 {
    margin: 0;
}

.deposit-inline-message {
    margin: 0;
}

.deposit-card-layout {
    grid-template-columns: 320px minmax(0, 1fr);
}

.card-preview {
    position: sticky;
    top: 126px;
    display: grid;
    align-content: space-between;
    min-height: 210px;
    padding: 20px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 6%, rgba(240, 171, 252, 0.38), transparent 14rem),
        radial-gradient(circle at 92% 88%, rgba(139, 92, 246, 0.42), transparent 12rem),
        linear-gradient(135deg, #211443, #090a1b 58%, #15081f);
}

.card-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 22px);
    opacity: 0.45;
    pointer-events: none;
}

.card-preview > * {
    position: relative;
    z-index: 1;
}

.card-preview-top,
.card-preview-bottom {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.card-preview-top strong {
    color: #f5d0fe;
}

.card-preview-number {
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.28rem;
    letter-spacing: 0;
}

.card-preview-bottom strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
    font-size: 0.92rem;
}

.deposit-card-form {
    display: grid;
    gap: 14px;
}

.deposit-payment-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.deposit-side-panel {
    display: grid;
    gap: 16px;
    padding: 20px;
    position: sticky;
    top: 112px;
}

.deposit-side-panel h2 {
    margin-bottom: 0;
}

.deposit-rule-list {
    display: grid;
    gap: 8px;
}

.deposit-faq {
    display: grid;
    gap: 8px;
}

.deposit-faq details {
    border: 1px solid rgba(177, 153, 255, 0.18);
    border-radius: var(--radius-sm);
    background: rgba(5, 8, 20, 0.5);
    padding: 11px 12px;
}

.deposit-faq summary {
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
}

.deposit-faq p {
    margin: 8px 0 0;
    font-size: 0.92rem;
}

.deposit-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(3, 4, 14, 0.72);
    backdrop-filter: blur(10px);
}

.deposit-modal[hidden] {
    display: none;
}

.deposit-modal-card {
    width: min(440px, 100%);
    border: 1px solid rgba(232, 121, 249, 0.36);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(27, 24, 55, 0.98), rgba(10, 12, 29, 0.98));
    box-shadow: var(--shadow);
    padding: 24px;
    text-align: center;
}

.deposit-loader,
.deposit-payment-result {
    display: grid;
    justify-items: center;
    gap: 12px;
}

.deposit-loader[hidden],
.deposit-payment-result[hidden] {
    display: none;
}

.deposit-spinner {
    width: 44px;
    aspect-ratio: 1;
    border: 3px solid rgba(232, 121, 249, 0.18);
    border-top-color: #f0abfc;
    border-radius: 999px;
    animation: deposit-spin 900ms linear infinite;
}

.deposit-result-icon {
    display: grid;
    place-items: center;
    width: 48px;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 111, 145, 0.48);
    border-radius: 999px;
    background: rgba(255, 111, 145, 0.13);
    color: #ffb8c8;
    font-weight: 900;
}

/* Demo withdrawal simulation */
.withdraw-security-card strong {
    color: #fecdd3;
}

.withdraw-panel {
    gap: 18px;
}

.withdraw-form {
    display: grid;
    gap: 16px;
}

.withdraw-stepper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.withdraw-stepper span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid rgba(177, 153, 255, 0.18);
    border-radius: var(--radius-sm);
    background: rgba(5, 8, 20, 0.5);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.withdraw-stepper span.is-active {
    border-color: rgba(232, 121, 249, 0.46);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.22), rgba(76, 29, 149, 0.16));
    color: #f5d0fe;
}

.withdraw-balance-card,
.withdraw-review-card {
    border: 1px solid rgba(177, 153, 255, 0.18);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(22, 20, 48, 0.86), rgba(8, 10, 25, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.withdraw-balance-card {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 14px;
}

.withdraw-balance-card span,
.withdraw-summary-grid span,
.withdraw-review-grid span {
    color: var(--muted-2);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.withdraw-balance-card strong {
    color: #f5d0fe;
    font-size: 1.2rem;
}

.withdraw-summary-grid,
.withdraw-review-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(177, 153, 255, 0.18);
    border-radius: var(--radius);
    background: rgba(177, 153, 255, 0.08);
}

.withdraw-summary-grid div,
.withdraw-review-grid div {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 14px;
    background: rgba(8, 10, 25, 0.84);
}

.withdraw-summary-grid strong,
.withdraw-review-grid strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.withdraw-review-card {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.withdraw-review-card[hidden] {
    display: none;
}

.withdraw-action-row,
.withdraw-result-actions {
    justify-content: flex-start;
}

.withdraw-warning-list {
    border-color: rgba(255, 111, 145, 0.34);
    background: rgba(255, 111, 145, 0.08);
}

.withdraw-modal-card {
    width: min(540px, 100%);
}

.withdraw-result-actions {
    width: 100%;
    justify-content: center;
}

/* Demo internal wallet transfer */
.transfer-security-card strong {
    color: #f5d0fe;
}

.transfer-notice {
    margin-bottom: 20px;
}

.transfer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.transfer-card,
.transfer-summary-card {
    padding: 22px;
}

.transfer-form {
    display: grid;
    gap: 16px;
}

.transfer-direction-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(177, 153, 255, 0.18);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 0%, rgba(232, 121, 249, 0.14), transparent 16rem),
        linear-gradient(180deg, rgba(22, 20, 48, 0.86), rgba(8, 10, 25, 0.92));
}

.transfer-direction-card div {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.transfer-direction-card span {
    color: var(--muted-2);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.transfer-direction-card strong {
    color: var(--text);
}

.transfer-direction-card small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.transfer-swap-button {
    min-width: 76px;
}

.transfer-percent-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.transfer-summary-card {
    position: sticky;
    top: 112px;
    display: grid;
    gap: 16px;
}

.transfer-summary-card h2 {
    margin-bottom: 0;
}

.transfer-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.transfer-warning-list {
    border-color: rgba(232, 121, 249, 0.28);
    background: rgba(139, 92, 246, 0.11);
}

.transfer-actions {
    justify-content: flex-start;
}

.transfer-modal-card {
    width: min(520px, 100%);
}

.transfer-result-icon {
    border-color: rgba(25, 195, 125, 0.48);
    background: rgba(25, 195, 125, 0.13);
    color: #9ff6c9;
}

@keyframes deposit-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1024px) {
    .deposit-shell {
        grid-template-columns: 1fr;
    }

    .transfer-shell {
        grid-template-columns: 1fr;
    }

    .deposit-side-panel {
        position: static;
    }

    .transfer-summary-card {
        position: static;
    }

    .deposit-card-layout {
        grid-template-columns: 1fr;
    }

    .card-preview {
        position: relative;
        top: auto;
    }
}

@media (max-width: 768px) {
    .deposit-security-card {
        min-width: 0;
    }

    .deposit-method-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .deposit-method-tab {
        flex: 0 0 auto;
        min-width: 160px;
    }

    .deposit-panel {
        padding: 0 14px 16px;
    }

    .deposit-form-grid,
    .deposit-form-grid.compact,
    .deposit-crypto-layout,
    .deposit-network-card,
    .withdraw-summary-grid,
    .withdraw-review-grid,
    .withdraw-stepper,
    .transfer-direction-card,
    .transfer-summary-grid,
    .transfer-percent-row {
        grid-template-columns: 1fr;
    }

    .deposit-bank-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .deposit-bank-row .button {
        width: 100%;
    }

    .card-preview-number {
        font-size: 1.05rem;
    }
}

/* Phase 35: final shared UI quality pass */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.toast-region {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 140;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 28px));
    max-width: min(420px, calc(100vw - 28px));
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: none;
}

.app-toast {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    min-height: 48px;
    padding: 13px 13px;
    border: 1px solid rgba(192, 132, 252, 0.34);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(28, 23, 55, 0.98), rgba(10, 12, 29, 0.98));
    color: #f5d0fe;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: auto;
    transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.app-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-indicator {
    width: 9px;
    height: 9px;
    margin-top: 6px;
    border-radius: 999px;
    background: #a78bfa;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
}

.app-toast.is-success .toast-indicator {
    background: #21c87a;
    box-shadow: 0 0 0 4px rgba(33, 200, 122, 0.15);
}

.app-toast.is-error {
    border-color: rgba(255, 95, 115, 0.48);
}

.app-toast.is-error .toast-indicator {
    background: #ff6f91;
    box-shadow: 0 0 0 4px rgba(255, 111, 145, 0.15);
}

.app-toast.is-warning .toast-indicator {
    background: #f6b73c;
    box-shadow: 0 0 0 4px rgba(246, 183, 60, 0.15);
}

.toast-message {
    color: #f2edf9;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.toast-close {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    color: #d8b4fe;
    cursor: pointer;
}

.toast-close:hover {
    border-color: rgba(232, 121, 249, 0.36);
    background: rgba(232, 121, 249, 0.12);
}

.empty-state,
.empty-cell,
.terminal-table td[colspan],
.history-table td[colspan] {
    color: #b9b0d0;
}

.empty-state {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(192, 132, 252, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(139, 92, 246, 0.09), rgba(8, 10, 25, 0.34));
}

.empty-state::before {
    content: "";
    width: 34px;
    height: 34px;
    border: 1px solid rgba(232, 121, 249, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(rgba(232, 121, 249, 0.7), rgba(232, 121, 249, 0.7)) 9px 11px / 16px 2px no-repeat,
        linear-gradient(rgba(167, 139, 250, 0.55), rgba(167, 139, 250, 0.55)) 9px 17px / 12px 2px no-repeat,
        rgba(167, 139, 250, 0.09);
}

.empty-state.compact {
    padding: 14px;
}

.empty-state h3,
.empty-state p {
    margin: 0;
}

.empty-state h3 {
    font-size: 1rem;
}

.empty-state p {
    font-size: 0.92rem;
}

.empty-cell,
.terminal-table td[colspan],
.history-table td[colspan] {
    padding: 18px 14px;
    text-align: center;
    background: rgba(139, 92, 246, 0.035);
}

.loading-row td,
.loading-cell {
    padding: 16px;
}

.skeleton-line,
.skeleton-block,
.skeleton-chip {
    display: block;
    overflow: hidden;
    position: relative;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.skeleton-line {
    width: min(320px, 72%);
    height: 12px;
    margin: 0 auto;
}

.skeleton-block {
    min-height: 88px;
    border-radius: 8px;
}

.skeleton-chip {
    width: 96px;
    height: 28px;
}

.skeleton-line::after,
.skeleton-block::after,
.skeleton-chip::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(245, 208, 254, 0.2), transparent);
    animation: skeleton-shimmer 1.35s infinite;
}

@keyframes skeleton-shimmer {
    to {
        transform: translateX(100%);
    }
}

.table-wrap,
.mini-table-wrap,
.history-table-wrap {
    border-radius: 8px;
}

.table-wrap thead th,
.mini-table-wrap thead th,
.history-table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(11, 13, 29, 0.96);
    backdrop-filter: blur(10px);
}

.table-wrap tbody tr,
.mini-table-wrap tbody tr,
.history-table-wrap tbody tr {
    border-bottom: 1px solid rgba(177, 153, 255, 0.08);
}

.table-wrap td,
.table-wrap th,
.mini-table-wrap td,
.mini-table-wrap th,
.history-table-wrap td,
.history-table-wrap th {
    vertical-align: middle;
}

.wallet-market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 18px;
    align-items: start;
}

.wallet-card {
    display: grid;
    gap: 18px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.wallet-card > .section-heading {
    padding: 0;
}

.wallet-market-section {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(177, 153, 255, 0.16);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(12, 16, 34, 0.92), rgba(6, 9, 22, 0.96));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

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

.wallet-market-head h3 {
    margin: 2px 0 0;
}

.wallet-market-description {
    margin: 5px 0 0;
    color: #a9b2c7;
    font-size: 0.86rem;
}

.wallet-section-actions {
    display: flex;
    justify-content: flex-end;
}

.wallet-market-table {
    padding: 0;
}

.wallet-market-table table {
    min-width: 520px;
}

.wallet-market-table th,
.wallet-market-table td {
    padding: 12px 10px;
}

.wallet-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
}

.wallet-page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wallet-page-control {
    min-width: 34px;
    min-height: 32px;
    border: 1px solid rgba(128, 158, 196, 0.24);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
    color: #d8e7f8;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
}

.wallet-page-control:hover:not(:disabled),
.wallet-page-control.is-active {
    border-color: rgba(57, 217, 138, 0.56);
    background: rgba(57, 217, 138, 0.13);
    color: #ffffff;
}

.wallet-page-control:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.wallet-page-ellipsis {
    min-width: 24px;
    color: #8d9bb1;
    font-weight: 900;
    text-align: center;
}

.wallet-asset-code {
    display: inline-flex;
    align-items: center;
    min-width: 54px;
    font-weight: 800;
    color: #f7f0ff;
}

.wallet-table-value {
    color: #d8deef;
    font-variant-numeric: tabular-nums;
}

.has-positive-balance td:first-child {
    color: #f7f0ff;
    font-weight: 800;
}

.has-positive-balance td:first-child::after {
    content: " balance";
    margin-left: 6px;
    color: #70e4a2;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.wallet-action-note,
.terminal-hint {
    color: #a9b2c7;
    font-size: 0.78rem;
    line-height: 1.35;
}

.action-row,
.table-actions,
.notification-actions,
.withdraw-action-row,
.transfer-actions,
.withdraw-result-actions {
    flex-wrap: wrap;
}

.button:disabled,
.btn:disabled,
button:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
}

.deposit-modal-card,
.withdraw-modal-card,
.transfer-modal-card {
    max-height: min(720px, calc(100vh - 32px));
    overflow: auto;
}

@media (max-width: 768px) {
    .toast-region {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
    }

    .app-toast {
        padding: 12px;
    }

    .section-heading,
    .history-status-row {
        display: grid;
        align-items: start;
        gap: 12px;
    }

    .section-heading .button,
    .history-status-row .button {
        width: 100%;
    }

    .table-wrap,
    .mini-table-wrap,
    .history-table-wrap {
        margin-inline: -2px;
    }

    .wallet-market-head {
        display: grid;
        align-items: start;
    }

    .wallet-pagination {
        justify-content: flex-start;
    }

    .wallet-section-actions {
        justify-content: stretch;
    }

    .wallet-section-actions .button {
        width: 100%;
    }

    .deposit-modal,
    .withdraw-modal,
    .transfer-modal {
        padding: 12px;
        align-items: end;
    }

    .deposit-modal-card,
    .withdraw-modal-card,
    .transfer-modal-card {
        width: 100%;
        max-height: calc(100vh - 24px);
        padding: 18px;
    }
}

@media (max-width: 430px) {
    .page-shell {
        width: calc(100% - 18px);
    }

    .empty-state {
        padding: 14px;
    }
}

/* Phase 36: Security Center */
.security-shell {
    display: grid;
    gap: 18px;
    width: min(1180px, 100%);
}

.security-hero {
    align-items: center;
}

.security-score-card {
    display: grid;
    gap: 8px;
    min-width: min(260px, 100%);
    padding: 18px;
    border: 1px solid rgba(167, 139, 250, 0.28);
    border-radius: 8px;
    background: rgba(11, 13, 29, 0.64);
}

.security-score-card span {
    color: #b9b0d0;
    font-size: 0.84rem;
}

.security-score-card strong {
    color: #fff;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.security-score-track {
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.security-score-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8b5cf6, #e879f9);
}

.security-overview-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.security-overview-card,
.security-card {
    border: 1px solid rgba(177, 153, 255, 0.15);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(22, 17, 45, 0.88), rgba(10, 12, 26, 0.94));
}

.security-overview-card {
    display: grid;
    align-content: start;
    gap: 9px;
    min-height: 136px;
    padding: 15px;
}

.security-overview-card span,
.security-detail-list dt,
.security-muted {
    color: #b9b0d0;
}

.security-overview-card strong {
    color: #f7f0ff;
    font-size: 1.02rem;
    overflow-wrap: anywhere;
}

.security-card {
    padding: 22px;
}

.security-grid {
    display: grid;
    gap: 18px;
}

.security-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.security-detail-list {
    display: grid;
    gap: 12px;
    margin: 0 0 16px;
}

.security-detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.security-detail-list dt,
.security-detail-list dd {
    margin: 0;
}

.security-detail-list dd {
    color: #f7f0ff;
    text-align: right;
}

.security-form {
    display: grid;
    gap: 14px;
}

.security-form input {
    width: 100%;
}

.security-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.security-warning-card {
    display: grid;
    gap: 5px;
    margin: 14px 0;
    padding: 13px;
    border: 1px solid rgba(246, 183, 60, 0.28);
    border-radius: 8px;
    background: rgba(246, 183, 60, 0.075);
}

.security-warning-card strong {
    color: #ffd88d;
}

.security-warning-card span {
    color: #d9cde9;
    font-size: 0.92rem;
    line-height: 1.45;
}

.totp-setup-panel,
.totp-enabled-panel {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.totp-setup-panel[hidden],
.totp-enabled-panel[hidden],
[data-recovery-panel][hidden],
[data-totp-disabled-actions][hidden] {
    display: none;
}

.totp-setup-grid {
    display: grid;
    grid-template-columns: minmax(170px, 240px) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.totp-qr {
    display: grid;
    place-items: center;
    min-height: 340px;
    padding: 12px;
    border: 1px solid rgba(177, 153, 255, 0.16);
    border-radius: 8px;
    background: #fff;
}

.totp-qr svg {
    width: min(320px, 100%);
    height: auto;
    background: #ffffff;
    border-radius: 8px;
}

.totp-manual {
    display: grid;
    gap: 10px;
    align-content: center;
    padding: 14px;
    border: 1px solid rgba(177, 153, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.totp-manual span {
    color: #b9b0d0;
    font-size: 0.84rem;
    text-transform: uppercase;
}

.totp-manual code,
.recovery-code-grid code {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(167, 139, 250, 0.24);
    border-radius: 8px;
    background: rgba(5, 7, 17, 0.72);
    color: #f5d0fe;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.totp-manual .totp-uri-code {
    display: block;
    max-width: 100%;
    line-height: 1.45;
    font-size: 0.78rem;
    word-break: break-word;
}

.security-details {
    border: 1px solid rgba(177, 153, 255, 0.14);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.security-details summary {
    cursor: pointer;
    color: #f5d0fe;
    font-weight: 800;
}

.security-details .security-form {
    margin-top: 14px;
}

.recovery-code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.security-table {
    width: 100%;
    min-width: 680px;
}

.security-table th,
.security-table td {
    padding: 12px 10px;
    text-align: left;
}

.security-table td strong {
    display: block;
    margin-bottom: 4px;
}

.security-muted {
    font-size: 0.93rem;
    line-height: 1.55;
}

.status-success {
    border-color: rgba(33, 200, 122, 0.45);
    background: rgba(33, 200, 122, 0.1);
    color: #65f3b4;
}

.status-warning {
    border-color: rgba(246, 183, 60, 0.5);
    background: rgba(246, 183, 60, 0.09);
    color: #ffd88d;
}

.status-error {
    border-color: rgba(255, 95, 115, 0.48);
    background: rgba(255, 95, 115, 0.09);
    color: #ff9cab;
}

.status-neutral {
    border-color: rgba(177, 153, 255, 0.22);
    background: rgba(177, 153, 255, 0.08);
    color: #d8d1ee;
}

@media (max-width: 1100px) {
    .security-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .security-hero {
        display: grid;
        gap: 14px;
    }

    .security-overview-grid,
    .security-grid.two {
        grid-template-columns: 1fr;
    }

    .security-card {
        padding: 18px;
    }

    .security-detail-list div {
        display: grid;
    }

    .security-detail-list dd {
        text-align: left;
    }

    .totp-setup-grid {
        grid-template-columns: 1fr;
    }

    .totp-qr {
        min-height: 300px;
    }
}

/* Phase 37: Support Center */
.support-shell {
    display: grid;
    gap: 18px;
    width: min(1180px, 100%);
}

.support-hero {
    align-items: center;
}

.support-category-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.support-category-card {
    display: grid;
    gap: 8px;
    min-height: 112px;
    padding: 15px;
    border: 1px solid rgba(177, 153, 255, 0.16);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(22, 17, 45, 0.86), rgba(10, 12, 26, 0.94));
    color: #f7f0ff;
    text-align: left;
    cursor: pointer;
}

.support-category-card:hover {
    border-color: rgba(232, 121, 249, 0.38);
    background: linear-gradient(180deg, rgba(55, 38, 93, 0.88), rgba(12, 14, 30, 0.96));
}

.support-category-card span,
.support-note-list span,
.support-detail-list dt,
.support-ticket-actions {
    color: #b9b0d0;
}

.support-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 18px;
}

.support-card {
    padding: 22px;
}

.support-form {
    display: grid;
    gap: 14px;
}

.support-form.compact {
    margin-top: 12px;
}

.support-form input,
.support-form select,
.support-form textarea {
    width: 100%;
}

.support-note-list,
.support-detail-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.support-note-list div,
.support-detail-list div {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.support-detail-list dt,
.support-detail-list dd {
    margin: 0;
}

.support-detail-list dd {
    color: #f7f0ff;
}

.support-table {
    width: 100%;
    min-width: 860px;
}

.support-table th,
.support-table td {
    padding: 12px 10px;
    text-align: left;
}

.support-ticket-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.support-thread-card {
    min-height: 520px;
}

.support-thread {
    display: grid;
    gap: 14px;
}

.support-message {
    max-width: 78%;
    padding: 14px;
    border: 1px solid rgba(177, 153, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.support-message.is-user {
    justify-self: end;
    border-color: rgba(33, 200, 122, 0.25);
    background: rgba(33, 200, 122, 0.08);
}

.support-message.is-admin {
    justify-self: start;
    border-color: rgba(167, 139, 250, 0.3);
    background: rgba(139, 92, 246, 0.1);
}

.support-message.is-system {
    justify-self: center;
    max-width: 92%;
    text-align: center;
    background: rgba(246, 183, 60, 0.08);
}

.support-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #b9b0d0;
    font-size: 0.84rem;
}

.support-message p {
    margin: 10px 0 0;
    color: #f7f0ff;
    line-height: 1.55;
}

@media (max-width: 1100px) {
    .support-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .support-hero,
    .support-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .support-category-grid {
        grid-template-columns: 1fr;
    }

    .support-card {
        padding: 18px;
    }

    .support-message {
        max-width: 100%;
    }
}

/* Phase 38: Referral Center */
.referral-shell {
    display: grid;
    gap: 18px;
    width: min(1180px, 100%);
}

.referral-hero {
    align-items: center;
}

.referral-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.referral-stat-card,
.referral-card {
    border: 1px solid rgba(177, 153, 255, 0.15);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(22, 17, 45, 0.88), rgba(10, 12, 26, 0.94));
}

.referral-stat-card {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.referral-stat-card span,
.referral-card label span,
.referral-table td span {
    color: #b9b0d0;
}

.referral-stat-card strong {
    color: #fff;
    font-size: 1.25rem;
}

.referral-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 18px;
}

.referral-card {
    padding: 22px;
}

.referral-code-card {
    display: grid;
    gap: 14px;
}

.referral-code-display {
    padding: 22px;
    border: 1px solid rgba(232, 121, 249, 0.28);
    border-radius: 8px;
    background: rgba(232, 121, 249, 0.08);
    color: #fff;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    letter-spacing: 0;
    text-align: center;
}

.referral-card input {
    width: 100%;
}

.referral-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.referral-table {
    width: 100%;
    min-width: 760px;
}

.referral-table th,
.referral-table td {
    padding: 12px 10px;
    text-align: left;
}

@media (max-width: 900px) {
    .referral-overview-grid,
    .referral-grid {
        grid-template-columns: 1fr;
    }

    .referral-card {
        padding: 18px;
    }
}

/* Phase 39: Fees / Limits */
.fees-shell {
    display: grid;
    gap: 18px;
    width: min(1180px, 100%);
}

.fees-hero {
    align-items: center;
}

.fees-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-color: rgba(177, 153, 255, 0.18);
    background: linear-gradient(180deg, rgba(22, 17, 45, 0.88), rgba(10, 12, 26, 0.94));
}

.fees-note strong {
    color: #fff;
    white-space: nowrap;
}

.fees-note span,
.fees-muted {
    color: #b9b0d0;
}

.fees-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 18px;
}

.fees-card {
    border: 1px solid rgba(177, 153, 255, 0.15);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(22, 17, 45, 0.88), rgba(10, 12, 26, 0.94));
}

.fees-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.fees-table th,
.fees-table td {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(177, 153, 255, 0.1);
    text-align: left;
    vertical-align: top;
}

.fees-table th {
    color: #b9b0d0;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fees-table td {
    color: #eeeafe;
}

.fees-table tr:last-child td {
    border-bottom: 0;
}

.fees-method-list {
    display: grid;
    gap: 12px;
}

.fees-method-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(177, 153, 255, 0.14);
    border-radius: 8px;
    background: rgba(11, 13, 28, 0.5);
}

.fees-method-row > div {
    display: grid;
    gap: 6px;
}

.fees-method-row > div:last-child {
    justify-items: end;
    min-width: 130px;
}

.fees-method-row strong {
    color: #fff;
}

.fees-method-row span {
    color: #b9b0d0;
}

.fees-faq-grid details {
    padding: 14px 0;
    border-bottom: 1px solid rgba(177, 153, 255, 0.1);
}

.fees-faq-grid details:last-child {
    border-bottom: 0;
}

.fees-faq-grid summary {
    cursor: pointer;
    color: #fff;
    font-weight: 700;
}

.fees-faq-grid p {
    margin: 10px 0 0;
    color: #b9b0d0;
}

@media (max-width: 900px) {
    .fees-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .fees-note,
    .fees-method-row {
        flex-direction: column;
    }

    .fees-note strong {
        white-space: normal;
    }

    .fees-method-row > div:last-child {
        justify-items: start;
    }
}

/* AlteriaFX logo-matched theme */
:root {
    --bg: #050914;
    --bg-soft: #08111f;
    --panel: #0d1728;
    --panel-strong: #111e33;
    --panel-raised: #172840;
    --text: #f4f8ff;
    --muted: #aab8ca;
    --muted-2: #7f8fa5;
    --line: rgba(128, 158, 196, 0.24);
    --line-soft: rgba(198, 211, 229, 0.08);
    --accent: #2f80ed;
    --accent-strong: #75bfff;
    --accent-soft: rgba(47, 128, 237, 0.16);
    --steel: #8fa1b8;
    --silver: #e2e8f0;
    --success: #5ee0c2;
    --success-soft: rgba(94, 224, 194, 0.11);
    --danger: #ff6f86;
    --danger-soft: rgba(255, 111, 134, 0.12);
    --info: #75bfff;
    --info-soft: rgba(117, 191, 255, 0.13);
    --amber: #f6b84c;
    --radius-sm: 7px;
    --radius: 8px;
    --shadow: 0 24px 76px rgba(0, 0, 0, 0.42);
    --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.28);
    --focus-ring: 0 0 0 3px rgba(47, 128, 237, 0.22);
}

html,
body {
    background-color: var(--bg);
}

body {
    background:
        repeating-linear-gradient(0deg, rgba(117, 191, 255, 0.045) 0 1px, transparent 1px 42px),
        repeating-linear-gradient(90deg, rgba(117, 191, 255, 0.035) 0 1px, transparent 1px 42px),
        linear-gradient(130deg, rgba(47, 128, 237, 0.18) 0%, transparent 32%),
        linear-gradient(225deg, rgba(226, 232, 240, 0.08) 0%, transparent 30%),
        linear-gradient(180deg, #071121 0%, #050914 46%, #070d18 100%);
    background-attachment: fixed;
    color: var(--text);
}

a {
    color: var(--accent-strong);
}

a:hover {
    color: #d6ecff;
}

.site-header {
    border-bottom-color: rgba(128, 158, 196, 0.22);
    background: rgba(5, 9, 20, 0.9);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.38);
}

.brand {
    gap: 10px;
    color: var(--text);
}

.brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 36px;
    overflow: hidden;
    border: 1px solid rgba(117, 191, 255, 0.42);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(226, 232, 240, 0.16), rgba(47, 128, 237, 0.18) 48%, rgba(7, 17, 33, 0.78)),
        #08111f;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 10px 26px rgba(47, 128, 237, 0.18);
}

.brand-logo {
    display: block;
    width: auto;
    height: 32px;
    max-width: none;
    object-fit: contain;
}

.brand-mark {
    border-color: rgba(117, 191, 255, 0.5);
    background: linear-gradient(135deg, #e2e8f0, #75bfff 42%, #1d5fc4);
    color: #071121;
    box-shadow: 0 12px 28px rgba(47, 128, 237, 0.24);
}

.nav-link,
.nav-menu-link {
    color: #b6c3d5;
}

.nav-link:hover,
.nav-menu-link:hover,
.nav-menu-link.is-active {
    border-color: rgba(117, 191, 255, 0.34);
    background: rgba(47, 128, 237, 0.12);
    color: var(--text);
}

.nav-link.is-active {
    border-color: rgba(117, 191, 255, 0.52);
    background: linear-gradient(180deg, rgba(47, 128, 237, 0.2), rgba(17, 55, 116, 0.16));
    color: #d6ecff;
}

.nav-dropdown-menu,
.notification-menu {
    border-color: rgba(128, 158, 196, 0.24);
    background:
        linear-gradient(180deg, rgba(13, 23, 40, 0.98), rgba(5, 9, 20, 0.98));
    box-shadow: var(--shadow);
}

.mobile-nav-toggle {
    border-color: rgba(117, 191, 255, 0.34);
    background: rgba(47, 128, 237, 0.12);
    color: #d6ecff;
}

.mobile-nav-toggle::before {
    background:
        linear-gradient(#d6ecff, #d6ecff) 0 0 / 100% 2px no-repeat,
        linear-gradient(#d6ecff, #d6ecff) 0 50% / 100% 2px no-repeat,
        linear-gradient(#d6ecff, #d6ecff) 0 100% / 100% 2px no-repeat;
}

.mobile-nav-toggle[aria-expanded="true"] {
    border-color: rgba(117, 191, 255, 0.56);
    background: rgba(47, 128, 237, 0.18);
}

.notification-count,
.beta-badge {
    background: linear-gradient(135deg, #e2e8f0, #75bfff 44%, #2f80ed);
    color: #06111f;
    box-shadow: 0 8px 22px rgba(47, 128, 237, 0.25);
}

.demo-banner,
.notice-strip,
.history-tab-note {
    border-color: rgba(117, 191, 255, 0.3);
    background:
        linear-gradient(90deg, rgba(47, 128, 237, 0.16), rgba(226, 232, 240, 0.07), rgba(8, 17, 31, 0.36));
    color: #d6ecff;
}

.card,
.auth-form,
.narrow-panel .card,
.metric-card,
.equity-tile,
.wallet-card,
.history-card,
.settings-card,
.kyc-card,
.legal-card,
.notification-item,
.status-grid div {
    border-color: rgba(128, 158, 196, 0.22);
    background:
        linear-gradient(180deg, rgba(14, 25, 43, 0.95), rgba(7, 13, 25, 0.98)),
        linear-gradient(135deg, rgba(117, 191, 255, 0.08), transparent 42%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 18px 54px rgba(0, 0, 0, 0.34);
}

.card:hover,
.module-card:hover {
    border-color: rgba(117, 191, 255, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 22px 62px rgba(0, 0, 0, 0.38);
}

.quick-actions,
.module-card,
.kyc-hero {
    border-color: rgba(128, 158, 196, 0.18);
    background:
        linear-gradient(180deg, rgba(14, 25, 43, 0.9), rgba(7, 13, 25, 0.96));
}

.eyebrow,
.module-kicker,
.equity-tile strong,
.notification-badge,
.history-section-pill,
.status-pill {
    color: #bfe1ff;
}

.metric-card::before {
    background: linear-gradient(90deg, #e2e8f0, #75bfff 34%, #2f80ed 68%, transparent);
}

input,
select,
textarea {
    border-color: rgba(128, 158, 196, 0.28);
    background: rgba(5, 10, 20, 0.9);
    color: var(--text);
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(117, 191, 255, 0.42);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(117, 191, 255, 0.72);
    background: rgba(8, 17, 31, 0.98);
    box-shadow: var(--focus-ring);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--accent);
}

.button-primary,
.btn-primary {
    border-color: rgba(117, 191, 255, 0.54);
    background: linear-gradient(135deg, #e6edf6, #75bfff 38%, #2f80ed);
    color: #06111f;
    box-shadow: 0 14px 34px rgba(47, 128, 237, 0.28);
}

.button-primary:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #f7fbff, #97d1ff 40%, #3f8eff);
    color: #06111f;
}

.button-secondary,
.btn-secondary {
    border-color: rgba(128, 158, 196, 0.28);
    background: rgba(47, 128, 237, 0.09);
    color: #d8e7f8;
}

.button-secondary:hover,
.btn-secondary:hover {
    border-color: rgba(117, 191, 255, 0.45);
    background: rgba(47, 128, 237, 0.14);
    color: #f4f8ff;
}

.button-danger {
    border-color: rgba(255, 111, 134, 0.46);
    background: var(--danger-soft);
    color: #ffc6d0;
}

.alert,
.empty-state {
    border-color: rgba(128, 158, 196, 0.24);
    background: rgba(10, 21, 38, 0.78);
}

.alert-error {
    border-color: rgba(255, 111, 134, 0.48);
    background: rgba(255, 111, 134, 0.12);
}

.alert-success {
    border-color: rgba(94, 224, 194, 0.44);
    background: rgba(94, 224, 194, 0.1);
    color: #a9f4e4;
}

.alert-warning {
    border-color: rgba(246, 184, 76, 0.42);
    background: rgba(246, 184, 76, 0.1);
    color: #ffd991;
}

th,
.history-tab,
.history-tabs a {
    color: #9eacc0;
}

td {
    color: #e7eef8;
}

tbody tr:hover {
    background: rgba(47, 128, 237, 0.075);
}

.history-tab:hover,
.history-tab.is-active,
.history-tabs a:hover,
.history-tabs a.is-active {
    border-color: rgba(117, 191, 255, 0.44);
    background: rgba(47, 128, 237, 0.14);
    color: #f4f8ff;
}

.notification-item.is-unread {
    border-color: rgba(117, 191, 255, 0.42);
    background:
        linear-gradient(180deg, rgba(26, 59, 104, 0.6), rgba(7, 13, 25, 0.98));
}

.notification-badge,
.history-section-pill,
.status-pill {
    border-color: rgba(117, 191, 255, 0.36);
    background: rgba(47, 128, 237, 0.13);
    color: #bfe1ff;
}

.status-approved,
.history-positive,
.status-success {
    border-color: rgba(94, 224, 194, 0.44);
    color: #a9f4e4;
}

.status-rejected,
.history-negative,
.status-error {
    border-color: rgba(255, 111, 134, 0.48);
    color: #ffc6d0;
}

.status-pending,
.history-warning {
    border-color: rgba(117, 191, 255, 0.46);
    color: #bfe1ff;
}

.status-warning {
    color: #ffd991;
}

.toast-region {
    border-color: rgba(117, 191, 255, 0.42);
    background: #091426;
    color: #d6ecff;
}

.site-footer {
    border-top-color: rgba(128, 158, 196, 0.16);
    background: rgba(5, 9, 20, 0.78);
}

.legal-footer-links a {
    color: #aab8ca;
}

.legal-footer-links a:hover {
    color: #d6ecff;
}

.deposit-security-card,
.deposit-address-card,
.deposit-qr-placeholder,
.deposit-estimate-card,
.deposit-network-card,
.deposit-bank-card,
.deposit-instructions,
.deposit-receipt-card,
.deposit-side-panel,
.withdraw-balance-card,
.withdraw-review-card,
.transfer-direction-card,
.security-score-card,
.security-overview-card,
.security-card,
.support-category-card,
.support-card,
.support-message,
.referral-stat-card,
.referral-card,
.fees-note,
.fees-card,
.fees-method-row {
    border-color: rgba(128, 158, 196, 0.2);
    background:
        linear-gradient(180deg, rgba(14, 25, 43, 0.9), rgba(7, 13, 25, 0.96));
}

.deposit-security-card strong,
.deposit-estimate-card strong,
.withdraw-balance-card strong,
.transfer-direction-card strong,
.security-details summary,
.totp-manual code,
.recovery-code-grid code,
.support-detail-list dd,
.support-message p,
.referral-stat-card strong,
.fees-method-row strong {
    color: #d6ecff;
}

.deposit-method-tabs,
.withdraw-summary-grid,
.withdraw-review-grid,
.security-details {
    border-color: rgba(128, 158, 196, 0.2);
    background: rgba(8, 17, 31, 0.6);
}

.deposit-method-tab:hover,
.deposit-method-tab.is-active,
.withdraw-stepper span.is-active,
.support-category-card:hover {
    border-color: rgba(117, 191, 255, 0.44);
    background: linear-gradient(180deg, rgba(47, 128, 237, 0.2), rgba(17, 55, 116, 0.16));
    color: #d6ecff;
}

.deposit-status-badge,
.deposit-payment-badges span,
.status-neutral {
    border-color: rgba(117, 191, 255, 0.34);
    background: rgba(47, 128, 237, 0.12);
    color: #bfe1ff;
}

.deposit-address-placeholder {
    border-color: rgba(117, 191, 255, 0.34);
    background: rgba(5, 10, 20, 0.76);
}

.deposit-qr-grid {
    border-color: rgba(117, 191, 255, 0.3);
    background:
        linear-gradient(90deg, rgba(117, 191, 255, 0.14) 12px, transparent 12px 24px) 0 0 / 24px 24px,
        linear-gradient(rgba(47, 128, 237, 0.14) 12px, transparent 12px 24px) 0 0 / 24px 24px,
        rgba(5, 10, 20, 0.86);
}

.card-preview {
    background:
        linear-gradient(135deg, rgba(226, 232, 240, 0.18), rgba(47, 128, 237, 0.24) 42%, rgba(7, 17, 33, 0.98)),
        #071121;
}

.card-preview-top strong {
    color: #d6ecff;
}

.deposit-modal-card,
.withdraw-modal-card,
.transfer-modal-card {
    border-color: rgba(117, 191, 255, 0.36);
    background:
        linear-gradient(180deg, rgba(13, 23, 40, 0.98), rgba(5, 9, 20, 0.98));
}

.deposit-spinner {
    border-color: rgba(117, 191, 255, 0.18);
    border-top-color: #75bfff;
}

.withdraw-stepper span {
    border-color: rgba(128, 158, 196, 0.2);
    background: rgba(5, 10, 20, 0.56);
}

.transfer-warning-list {
    border-color: rgba(246, 184, 76, 0.38);
    background: rgba(246, 184, 76, 0.1);
    color: #ffd991;
}

.app-toast {
    border-color: rgba(117, 191, 255, 0.38);
    background:
        linear-gradient(180deg, rgba(13, 23, 40, 0.98), rgba(5, 9, 20, 0.98));
    color: #d6ecff;
}

.toast-indicator {
    background: #75bfff;
    box-shadow: 0 0 0 4px rgba(117, 191, 255, 0.15);
}

.toast-message {
    color: #e7eef8;
}

.toast-close {
    border-color: rgba(128, 158, 196, 0.22);
    background: rgba(47, 128, 237, 0.08);
    color: #bfe1ff;
}

.toast-close:hover {
    border-color: rgba(117, 191, 255, 0.38);
    background: rgba(47, 128, 237, 0.14);
}

.empty-cell,
.terminal-table td[colspan],
.history-table td[colspan] {
    background: rgba(47, 128, 237, 0.045);
    color: #9eacc0;
}

.empty-state::before {
    border-color: rgba(117, 191, 255, 0.3);
    background:
        linear-gradient(rgba(117, 191, 255, 0.72), rgba(117, 191, 255, 0.72)) 9px 11px / 16px 2px no-repeat,
        linear-gradient(rgba(226, 232, 240, 0.6), rgba(226, 232, 240, 0.6)) 9px 17px / 12px 2px no-repeat,
        rgba(47, 128, 237, 0.1);
}

.skeleton-line::after,
.skeleton-block::after,
.skeleton-chip::after {
    background: linear-gradient(90deg, transparent, rgba(117, 191, 255, 0.2), transparent);
}

.security-score-track span {
    background: linear-gradient(90deg, #e2e8f0, #75bfff 38%, #2f80ed);
}

.support-message.is-user {
    border-color: rgba(94, 224, 194, 0.3);
    background: rgba(94, 224, 194, 0.08);
}

.support-message.is-admin {
    border-color: rgba(117, 191, 255, 0.32);
    background: rgba(47, 128, 237, 0.1);
}

.support-message.is-system {
    border-color: rgba(246, 184, 76, 0.34);
    background: rgba(246, 184, 76, 0.08);
}

.support-category-card span,
.support-note-list span,
.support-detail-list dt,
.support-ticket-actions,
.support-message-meta,
.referral-stat-card span,
.referral-card label span,
.referral-table td span,
.fees-note span,
.fees-muted,
.fees-table th,
.fees-method-row span,
.security-score-card span,
.security-overview-card span,
.security-detail-list dt,
.security-muted,
.totp-manual span {
    color: #9eacc0;
}

.referral-code-display {
    border-color: rgba(117, 191, 255, 0.36);
    background: rgba(47, 128, 237, 0.1);
    color: #f4f8ff;
}

.fees-table th,
.fees-table td,
.referral-table th,
.referral-table td,
.support-table th,
.support-table td,
.security-table th,
.security-table td {
    border-bottom-color: rgba(128, 158, 196, 0.12);
}

.fees-table td {
    color: #e7eef8;
}

@media (max-width: 640px) {
    .brand {
        gap: 8px;
    }

    .brand-logo-wrap {
        width: 38px;
        height: 32px;
    }

    .brand-logo {
        height: 29px;
    }
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 28px;
    align-items: stretch;
    padding: 54px 0 34px;
}

.landing-hero-copy {
    display: grid;
    align-content: center;
}

.landing-hero-copy h1 {
    max-width: 780px;
    margin-bottom: 18px;
    font-size: clamp(2.6rem, 6vw, 5.4rem);
}

.landing-hero-copy p {
    max-width: 720px;
    margin: 0 0 22px;
    font-size: 1.08rem;
}

.landing-hero-actions,
.landing-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.landing-hero-panel {
    display: grid;
    align-content: end;
    min-height: 330px;
    padding: 26px;
    background: linear-gradient(150deg, rgba(32, 37, 34, 0.98), rgba(15, 20, 18, 0.98));
}

.landing-hero-panel span,
.market-card span,
.account-tier-card span,
.testimonial-card strong {
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.landing-hero-panel strong {
    margin-top: 10px;
    color: var(--text);
    font-size: 2rem;
    line-height: 1.1;
}

.landing-hero-panel p {
    margin: 14px 0 0;
}

.landing-intro {
    margin: 4px 0 46px;
    padding: 22px 24px;
    border: 1px solid rgba(57, 217, 138, 0.24);
    border-radius: 8px;
    background: rgba(57, 217, 138, 0.06);
}

.landing-intro p {
    max-width: 940px;
    margin: 0;
    color: var(--text);
    font-size: 1.02rem;
}

.landing-section {
    margin: 54px 0;
}

.landing-section-heading {
    max-width: 760px;
    margin-bottom: 22px;
}

.landing-section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.landing-section-heading p:last-child {
    margin-bottom: 0;
}

.landing-card-grid,
.account-tier-grid,
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.landing-card,
.testimonial-card,
.account-tier-card {
    padding: 22px;
}

.landing-card h3,
.account-tier-card h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 1.08rem;
    letter-spacing: 0;
}

.landing-card p,
.testimonial-card p,
.account-tier-card p {
    margin: 0;
}

.market-card {
    min-height: 150px;
}

.market-card p {
    margin-top: 12px;
}

.testimonial-card {
    display: grid;
    gap: 18px;
}

.testimonial-card p {
    color: var(--text);
}

.account-tier-card {
    display: grid;
    gap: 12px;
    align-content: start;
}

.account-tier-card .button {
    margin-top: 6px;
    justify-self: start;
}

.landing-pro-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 58px 0;
    padding: 28px;
    border-color: rgba(244, 183, 64, 0.36);
}

.landing-pro-cta h2 {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.landing-pro-cta p:last-child {
    max-width: 780px;
    margin-bottom: 0;
}

.landing-contact-section {
    margin: 58px 0 12px;
}

.landing-contact-form {
    padding: 24px;
}

.landing-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.landing-form-grid label {
    display: grid;
    gap: 8px;
}

.landing-form-grid textarea {
    resize: vertical;
}

.landing-form-wide {
    grid-column: 1 / -1;
}

.landing-form-actions {
    margin-top: 18px;
}

.landing-form-message {
    flex: 1 1 280px;
    margin: 0;
}

@media (max-width: 920px) {
    .landing-hero,
    .landing-card-grid,
    .account-tier-grid,
    .testimonial-grid {
        grid-template-columns: 1fr 1fr;
    }

    .landing-hero {
        padding-top: 34px;
    }

    .landing-hero-copy {
        grid-column: 1 / -1;
    }

    .landing-pro-cta {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .landing-hero,
    .landing-card-grid,
    .account-tier-grid,
    .testimonial-grid,
    .landing-form-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero-panel {
        min-height: 240px;
    }

    .landing-contact-form,
    .landing-card,
    .testimonial-card,
    .account-tier-card,
    .landing-pro-cta {
        padding: 18px;
    }
}

.forex-shell {
    display: grid;
    gap: 22px;
}

.forex-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 18px;
    align-items: stretch;
    padding: 20px 0 8px;
}

.forex-hero h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.forex-hero p {
    max-width: 760px;
}

.forex-provider-card,
.forex-rate-panel,
.forex-chart-panel,
.forex-detail-panel,
.forex-order-panel,
.forex-summary-panel,
.forex-history-panel,
.forex-pair-list {
    border: 1px solid rgba(128, 158, 196, 0.22);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(14, 25, 43, 0.94), rgba(7, 13, 25, 0.98));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.forex-provider-card {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 20px;
}

.forex-provider-card span,
.forex-rate-grid span,
.forex-detail-panel dt {
    color: #9eacc0;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.forex-provider-card strong {
    color: #f4f8ff;
    font-size: 1.7rem;
}

.forex-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid rgba(128, 158, 196, 0.18);
    border-radius: 8px;
    background: rgba(47, 128, 237, 0.055);
}

.forex-toolbar label {
    display: grid;
    flex: 1 1 220px;
    gap: 7px;
    color: #9eacc0;
    font-size: 0.88rem;
}

.forex-toolbar select,
.forex-toolbar input {
    min-height: 42px;
    border: 1px solid rgba(128, 158, 196, 0.28);
    border-radius: 8px;
    background: rgba(5, 10, 20, 0.92);
    color: #f4f8ff;
    padding: 0 12px;
}

.forex-live-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(128, 158, 196, 0.2);
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(47, 128, 237, 0.11), rgba(8, 17, 31, 0.52));
}

.forex-live-strip div {
    display: grid;
    gap: 4px;
}

.forex-live-strip strong {
    color: #f4f8ff;
}

.forex-live-strip small,
.forex-live-meta span {
    color: #9eacc0;
}

.forex-live-meta {
    display: flex !important;
    grid-auto-flow: column;
    align-items: center;
    gap: 12px;
}

.forex-refresh-dot {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 7px;
    color: #a9d6ff;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.forex-refresh-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #70e4a2;
    box-shadow: 0 0 12px rgba(112, 228, 162, 0.5);
}

.forex-refresh-dot.is-refreshing::before {
    background: #75bfff;
    box-shadow: 0 0 12px rgba(117, 191, 255, 0.55);
}

.forex-refresh-dot.is-error::before {
    background: #ff8ba0;
    box-shadow: 0 0 12px rgba(255, 139, 160, 0.45);
}

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

.forex-layout *,
.forex-account-grid *,
.forex-trading-grid * {
    box-sizing: border-box;
}

.forex-pair-list {
    display: grid;
    gap: 12px;
    padding: 14px;
    position: sticky;
    top: 86px;
}

.forex-market-watch {
    align-content: start;
}

.forex-watch-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.forex-watch-head h2 {
    margin: 2px 0 0;
    font-size: 1.12rem;
}

.forex-count-pill {
    flex: 0 0 auto;
    border: 1px solid rgba(117, 191, 255, 0.3);
    border-radius: 999px;
    color: #a9d6ff;
    padding: 5px 8px;
    font-size: 0.76rem;
    font-weight: 800;
}

.forex-watch-control {
    display: grid;
    gap: 7px;
    color: #9eacc0;
    font-size: 0.84rem;
}

.forex-watch-control select,
.forex-watch-control input {
    min-height: 40px;
    border: 1px solid rgba(128, 158, 196, 0.28);
    border-radius: 8px;
    background: rgba(5, 10, 20, 0.92);
    color: #f4f8ff;
    padding: 0 11px;
}

.forex-pair-picker {
    width: 100%;
    max-width: none;
}

.forex-pair-scroll {
    display: grid;
    gap: 8px;
    max-height: 560px;
    overflow: auto;
    padding-right: 3px;
}

.forex-pair-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 54px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: #d8e7f8;
    padding: 10px 12px;
    text-align: left;
}

.forex-pair-button:hover,
.forex-pair-button.is-active {
    border-color: rgba(117, 191, 255, 0.48);
    background: rgba(47, 128, 237, 0.13);
    color: #f4f8ff;
}

.forex-pair-button span,
.forex-pair-button strong {
    overflow-wrap: anywhere;
}

.forex-pair-button small {
    color: #9eacc0;
    font-size: 0.76rem;
}

.forex-pair-metrics {
    display: grid;
    justify-items: end;
    gap: 3px;
}

.forex-pair-metrics strong,
.forex-current-rate-card strong,
.forex-data-table .num {
    font-variant-numeric: tabular-nums;
}

.forex-main-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.72fr);
    grid-template-areas:
        "rate trade"
        "chart trade"
        "detail summary"
        "account account";
    gap: 18px;
    min-width: 0;
}

.forex-rate-panel,
.forex-chart-panel,
.forex-detail-panel,
.forex-order-panel,
.forex-summary-panel,
.forex-history-panel {
    padding: 18px;
}

.forex-rate-panel {
    display: grid;
    gap: 18px;
    grid-area: rate;
}

.forex-rate-hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.58fr);
    gap: 16px;
    align-items: stretch;
}

.forex-current-rate-card {
    display: grid;
    align-content: center;
    gap: 7px;
    min-height: 118px;
    padding: 16px;
    border: 1px solid rgba(117, 191, 255, 0.22);
    border-radius: 8px;
    background: rgba(47, 128, 237, 0.09);
}

.forex-current-rate-card span,
.forex-current-rate-card small {
    color: #9eacc0;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.forex-current-rate-card strong {
    color: #f4f8ff;
    font-size: clamp(1.8rem, 4vw, 2.65rem);
    line-height: 1;
}

.forex-current-rate-card.is-tick-up strong,
.forex-change-value.is-positive,
.forex-side-badge.buy {
    color: #70e4a2;
}

.forex-current-rate-card.is-tick-down strong,
.forex-change-value.is-negative,
.forex-side-badge.sell {
    color: #ff8ba0;
}

.forex-chart-panel {
    grid-area: chart;
}

.forex-detail-panel {
    grid-area: detail;
}

.forex-trading-grid {
    grid-area: trade;
}

.forex-account-grid {
    grid-area: account;
}

.forex-rate-panel h2,
.forex-chart-panel h2,
.forex-detail-panel h2 {
    margin: 0;
    font-size: 1.25rem;
}

.forex-scenario-pill {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    padding: 5px 9px;
    border: 1px solid rgba(117, 191, 255, 0.38);
    border-radius: 999px;
    background: rgba(47, 128, 237, 0.14);
    color: #b9dcff;
    font-size: 0.78rem;
    font-weight: 800;
}

.forex-rate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.forex-rate-grid div {
    display: grid;
    gap: 7px;
    min-height: 78px;
    padding: 12px;
    border: 1px solid rgba(128, 158, 196, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.forex-rate-grid strong {
    color: #f4f8ff;
    overflow-wrap: anywhere;
}

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

.forex-chart-head p {
    margin: 6px 0 0;
    font-size: 0.92rem;
}

.forex-chart-head > span {
    border: 1px solid rgba(117, 191, 255, 0.34);
    border-radius: 999px;
    color: #a9d6ff;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 700;
}

.forex-chart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.forex-range-button {
    min-height: 32px;
    border: 1px solid rgba(128, 158, 196, 0.26);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: #d8e7f8;
    padding: 0 10px;
    font-weight: 800;
}

.forex-range-button:hover,
.forex-range-button.is-active {
    border-color: rgba(117, 191, 255, 0.52);
    background: rgba(47, 128, 237, 0.16);
    color: #ffffff;
}

.forex-chart {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    border: 1px solid rgba(128, 158, 196, 0.18);
    border-radius: 8px;
    background: rgba(3, 7, 14, 0.62);
}

.forex-chart.is-loading {
    display: grid;
    place-items: center;
}

.forex-chart-svg {
    display: block;
    width: 100%;
    min-height: 300px;
}

.forex-chart-svg line {
    stroke: rgba(128, 158, 196, 0.28);
    stroke-width: 1;
}

.forex-chart-svg .forex-chart-area {
    fill: rgba(117, 191, 255, 0.12);
}

.forex-chart-svg polyline {
    fill: none;
    stroke: #75bfff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.forex-chart-svg circle {
    fill: #f7fbff;
    stroke: #2f80ed;
    stroke-width: 2;
}

.forex-chart-scale {
    position: absolute;
    inset: 12px 12px auto auto;
    display: grid;
    gap: 6px;
    color: #9eacc0;
    font-size: 0.8rem;
    text-align: right;
}

.forex-chart-dates {
    position: absolute;
    inset: auto 14px 10px 50px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #9eacc0;
    font-size: 0.78rem;
}

.forex-chart-last-marker {
    position: absolute;
    right: 14px;
    top: 44px;
    display: grid;
    gap: 3px;
    color: #d8e7f8;
    font-size: 0.78rem;
    text-align: right;
}

.forex-detail-panel dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 0;
}

.forex-detail-panel div {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(128, 158, 196, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.forex-detail-panel dd {
    margin: 0;
    color: #f4f8ff;
}

.forex-trading-grid,
.forex-account-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 18px;
}

.forex-main-panel > .forex-trading-grid {
    grid-template-columns: 1fr;
    align-content: start;
    min-width: 0;
    max-width: 100%;
}

.forex-main-panel > .forex-trading-grid > *,
.forex-order-panel {
    min-width: 0;
    max-width: 100%;
}

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

.forex-panel-head h2 {
    margin: 0;
    font-size: 1.18rem;
}

.forex-order-form {
    display: grid;
    gap: 14px;
}

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

.forex-side-button,
.forex-submit-button {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    letter-spacing: 0;
    color: #ffffff;
}

.forex-side-button.buy,
.forex-submit-button.buy {
    background: linear-gradient(180deg, #14b870, #09834d);
    box-shadow: 0 14px 28px rgba(20, 184, 112, 0.22);
}

.forex-side-button.sell,
.forex-submit-button.sell {
    background: linear-gradient(180deg, #ff6b81, #c92f4f);
    box-shadow: 0 14px 28px rgba(255, 107, 129, 0.22);
}

.forex-side-button:not(.is-active) {
    opacity: 0.66;
    filter: grayscale(0.24);
}

.forex-side-explainer {
    margin: 0;
    border: 1px solid rgba(128, 158, 196, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: #d8e7f8;
    padding: 10px 12px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.forex-submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.78;
    color: #ffffff;
}

.forex-submit-button.is-kyc-locked {
    outline: 1px solid rgba(255, 255, 255, 0.28);
}

.forex-input-group {
    display: grid;
    gap: 7px;
    color: #9eacc0;
    font-size: 0.9rem;
}

.forex-input-group input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(128, 158, 196, 0.28);
    border-radius: 8px;
    background: rgba(5, 10, 20, 0.92);
    color: #f4f8ff;
    padding: 0 12px;
    font-size: 1rem;
}

.forex-balance-inline,
.forex-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.forex-preview {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.forex-balance-inline span,
.forex-preview div,
.forex-balance-row,
.forex-mini-row {
    display: grid;
    gap: 5px;
    min-height: 58px;
    padding: 11px;
    border: 1px solid rgba(128, 158, 196, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.forex-preview div span,
.forex-mini-row small,
.forex-balance-inline span {
    color: #9eacc0;
    font-size: 0.82rem;
}

.forex-preview strong,
.forex-balance-row strong,
.forex-mini-row strong {
    color: #f4f8ff;
    overflow-wrap: anywhere;
}

.forex-balance-list,
.forex-mini-table {
    display: grid;
    gap: 9px;
}

.forex-balance-row,
.forex-mini-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.forex-mini-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.forex-mini-row span {
    color: #d8e7f8;
}

.forex-table-wrap {
    max-height: 360px;
    overflow: auto;
    border: 1px solid rgba(128, 158, 196, 0.16);
    border-radius: 8px;
    background: rgba(3, 7, 14, 0.28);
}

.forex-data-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.forex-data-table th,
.forex-data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(128, 158, 196, 0.1);
    color: #d8e7f8;
    font-size: 0.88rem;
    vertical-align: middle;
}

.forex-data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(8, 14, 27, 0.96);
    color: #9eacc0;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.forex-data-table .num {
    text-align: right;
}

.forex-data-table .empty-cell {
    text-align: center;
}

.forex-side-badge {
    display: inline-flex;
    width: fit-content;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 800;
}

@media (max-width: 920px) {
    .forex-hero,
    .forex-layout,
    .forex-main-panel,
    .forex-rate-hero-row,
    .forex-rate-grid,
    .forex-detail-panel dl,
    .forex-trading-grid,
    .forex-account-grid,
    .forex-preview {
        grid-template-columns: minmax(0, 1fr);
    }

    .forex-main-panel {
        grid-template-areas:
            "rate"
            "chart"
            "detail"
            "trade"
            "account";
        width: 100%;
        max-width: 100%;
    }

    .forex-main-panel > .forex-trading-grid,
    .forex-main-panel > .forex-account-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
    }

    .forex-pair-list {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .forex-watch-head,
    .forex-watch-control,
    .forex-pair-picker,
    .forex-pair-scroll,
    .forex-pair-list .terminal-hint {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .forex-pair-list {
        grid-template-columns: 1fr;
    }

    .forex-rate-panel,
    .forex-chart-panel,
    .forex-detail-panel,
    .forex-order-panel,
    .forex-summary-panel,
    .forex-history-panel,
    .forex-provider-card {
        padding: 14px;
    }

    .forex-balance-inline,
    .forex-mini-row {
        grid-template-columns: 1fr;
    }

    .forex-live-strip,
    .forex-live-meta,
    .forex-watch-head,
    .forex-chart-head {
        display: grid !important;
        align-items: start;
    }

    .forex-data-table {
        min-width: 540px;
    }
}

/* Premium Forex terminal redesign */
.forex-shell {
    gap: 18px;
}

.forex-hero {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 16px;
    align-items: stretch;
    padding: 6px 0 0;
}

.forex-hero h1 {
    margin-bottom: 8px;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.forex-hero p {
    max-width: 680px;
    color: #9eacc0;
}

.forex-provider-card {
    padding: 16px;
    min-height: auto;
}

.forex-provider-card strong {
    font-size: 1.22rem;
}

.forex-terminal-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr) minmax(260px, auto);
    gap: 16px;
    align-items: stretch;
    padding: 18px;
    border: 1px solid rgba(128, 158, 196, 0.22);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(47, 128, 237, 0.12), rgba(6, 13, 25, 0.94) 42%, rgba(112, 228, 162, 0.06)),
        rgba(6, 13, 25, 0.94);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
}

.forex-terminal-title,
.forex-terminal-rate,
.forex-terminal-status {
    min-width: 0;
}

.forex-terminal-title {
    display: grid;
    align-content: center;
    gap: 5px;
}

.forex-terminal-title h2 {
    margin: 0;
    color: #f7fbff;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 0.95;
    letter-spacing: 0;
}

.forex-terminal-title p {
    margin: 0;
    max-width: 620px;
    color: #9eacc0;
}

.forex-terminal-rate {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(117, 191, 255, 0.22);
    border-radius: 10px;
    background: rgba(5, 12, 24, 0.74);
}

.forex-terminal-rate span,
.forex-terminal-rate small,
.forex-terminal-status span {
    color: #9eacc0;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.forex-terminal-rate strong {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.forex-terminal-rate.is-tick-up strong,
.forex-current-rate-card.is-tick-up strong {
    color: #70e4a2;
}

.forex-terminal-rate.is-tick-down strong,
.forex-current-rate-card.is-tick-down strong {
    color: #ff8ba0;
}

.forex-terminal-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-content: center;
    align-items: center;
    gap: 9px;
}

.forex-terminal-status > span:not(.forex-scenario-pill):not(.forex-refresh-dot) {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(128, 158, 196, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.forex-terminal-status .btn {
    min-height: 34px;
}

.forex-layout {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(310px, 360px);
    gap: 16px;
    overflow: visible;
}

.forex-market-watch,
.forex-center-column,
.forex-trade-rail,
.forex-bottom-grid {
    min-width: 0;
}

.forex-market-watch {
    align-content: start;
}

.forex-pair-list {
    position: sticky;
    top: 82px;
    padding: 14px;
    border-radius: 10px;
    overflow: visible;
    z-index: 30;
}

.forex-pair-picker {
    position: relative;
    z-index: 80;
}

.forex-pair-picker:focus-within,
.forex-pair-picker.is-open {
    z-index: 160;
}

.forex-pair-picker .pair-search-panel {
    z-index: 180;
    width: min(430px, calc(100vw - 28px));
    max-height: min(430px, calc(100vh - 180px));
    overflow: hidden;
}

.forex-pair-picker.opens-up .pair-search-panel {
    top: auto;
    bottom: calc(100% + 8px);
}

.forex-pair-scroll {
    max-height: 590px;
    scrollbar-width: thin;
    scrollbar-color: rgba(117, 191, 255, 0.34) rgba(3, 7, 14, 0.25);
}

.forex-pair-scroll::-webkit-scrollbar,
.forex-table-wrap::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.forex-pair-scroll::-webkit-scrollbar-thumb,
.forex-table-wrap::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(117, 191, 255, 0.34);
}

.forex-pair-button {
    min-height: 50px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
}

.forex-pair-button.is-active {
    background: linear-gradient(135deg, rgba(47, 128, 237, 0.2), rgba(112, 228, 162, 0.08));
    box-shadow: inset 3px 0 0 #75bfff;
}

.forex-pair-metrics {
    text-align: right;
}

.forex-pair-metrics small:empty {
    display: none;
}

.forex-pair-metrics small.is-positive {
    color: #70e4a2;
}

.forex-pair-metrics small.is-negative {
    color: #ff8ba0;
}

.forex-center-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-content: start;
    isolation: isolate;
    z-index: 1;
}

.forex-center-column > .forex-rate-panel,
.forex-center-column > .forex-chart-panel,
.forex-center-column > .forex-detail-panel {
    grid-area: auto;
    position: relative;
}

.forex-rate-panel,
.forex-chart-panel,
.forex-detail-panel,
.forex-order-panel,
.forex-summary-panel,
.forex-history-panel {
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(16, 28, 47, 0.96), rgba(7, 13, 25, 0.98)),
        #07101f;
}

.forex-rate-panel {
    padding: 14px;
}

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

.forex-rate-grid div {
    min-height: 74px;
    padding: 12px 13px;
}

.forex-rate-grid strong,
.forex-preview strong,
.forex-balance-inline strong,
.forex-data-table .num {
    font-variant-numeric: tabular-nums;
}

.forex-chart-panel {
    padding: 18px;
    display: grid;
    gap: 16px;
    overflow: visible;
    z-index: 1;
}

.forex-chart-head {
    align-items: flex-start;
    margin-bottom: 16px;
}

.forex-chart-head h2 {
    margin: 2px 0 0;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.forex-chart-control-group {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.forex-chart-control-group > span {
    width: fit-content;
    border: 1px solid rgba(117, 191, 255, 0.34);
    border-radius: 999px;
    color: #a9d6ff;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

.forex-chart-actions {
    padding: 4px;
    border: 1px solid rgba(128, 158, 196, 0.18);
    border-radius: 10px;
    background: rgba(3, 7, 14, 0.42);
}

.forex-range-button {
    border-radius: 7px;
    min-width: 42px;
}

.forex-range-button.is-active {
    background: #2f80ed;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(47, 128, 237, 0.26);
}

.forex-chart {
    min-height: 390px;
    width: 100%;
    z-index: 1;
    border-radius: 12px;
    background:
        radial-gradient(circle at 18% 6%, rgba(112, 228, 162, 0.1), transparent 24%),
        radial-gradient(circle at 86% 14%, rgba(117, 191, 255, 0.14), transparent 30%),
        linear-gradient(180deg, rgba(6, 14, 29, 0.9), rgba(3, 7, 14, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), inset 0 -24px 56px rgba(0, 0, 0, 0.18);
    touch-action: pan-y;
}

.forex-chart-svg {
    min-height: 390px;
}

.forex-chart-svg .forex-chart-grid-line {
    stroke: rgba(128, 158, 196, 0.16);
    stroke-width: 1;
    shape-rendering: crispEdges;
    vector-effect: non-scaling-stroke;
}

.forex-chart-svg .forex-chart-grid-vertical {
    stroke: rgba(128, 158, 196, 0.1);
}

.forex-chart-svg .forex-chart-axis-line {
    stroke: rgba(169, 214, 255, 0.3);
    stroke-width: 1.2;
    shape-rendering: crispEdges;
    vector-effect: non-scaling-stroke;
}

.forex-chart-svg .forex-chart-axis-label {
    fill: #8fa1b6;
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
}

.forex-chart-svg .forex-chart-area {
    fill: url(#forexChartGradient);
    opacity: 0.9;
}

.forex-chart-svg .forex-chart-line {
    fill: none;
    stroke: #82c7ff;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 10px rgba(117, 191, 255, 0.32));
}

.forex-chart-svg .forex-chart-last-dot {
    fill: #ffffff;
    stroke: #70e4a2;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 10px rgba(112, 228, 162, 0.42));
}

.forex-chart-last-marker {
    top: 18px;
    right: 18px;
    padding: 8px 10px;
    border: 1px solid rgba(117, 191, 255, 0.22);
    border-radius: 9px;
    background: rgba(3, 7, 14, 0.62);
}

.forex-chart-crosshair,
.forex-chart-hover-point,
.forex-chart-tooltip {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

.forex-chart-crosshair {
    top: 28px;
    bottom: 42px;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(169, 214, 255, 0.82), transparent);
    box-shadow: 0 0 14px rgba(117, 191, 255, 0.2);
}

.forex-chart-hover-point {
    width: 11px;
    height: 11px;
    margin: -5.5px 0 0 -5.5px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #70e4a2;
    box-shadow: 0 0 0 5px rgba(112, 228, 162, 0.14), 0 0 18px rgba(112, 228, 162, 0.38);
}

.forex-chart-tooltip {
    min-width: 158px;
    display: grid;
    gap: 4px;
    padding: 11px 13px;
    border: 1px solid rgba(169, 214, 255, 0.36);
    border-radius: 10px;
    color: #eaf4ff;
    background:
        linear-gradient(180deg, rgba(12, 23, 40, 0.98), rgba(4, 9, 18, 0.98));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.035) inset;
    backdrop-filter: blur(8px);
}

.forex-chart-tooltip strong,
.forex-chart-tooltip b {
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.forex-chart-tooltip span {
    color: #9eacc0;
    font-size: 0.76rem;
}

.forex-chart-tooltip[hidden],
.forex-chart-crosshair[hidden],
.forex-chart-hover-point[hidden] {
    display: none;
}

.forex-detail-panel dl {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
}

.forex-trade-rail {
    display: grid;
    align-content: start;
    gap: 16px;
    position: sticky;
    top: 82px;
}

.forex-order-panel {
    padding: 18px;
}

.forex-panel-head {
    margin-bottom: 16px;
}

.forex-panel-head h2 {
    font-size: 1.12rem;
}

.forex-side-toggle {
    padding: 4px;
    border: 1px solid rgba(128, 158, 196, 0.18);
    border-radius: 12px;
    background: rgba(3, 7, 14, 0.45);
}

.forex-side-button {
    min-height: 44px;
    border-radius: 9px;
}

.forex-side-button:not(.is-active) {
    background: transparent;
    box-shadow: none;
    color: #9eacc0;
    opacity: 1;
    filter: none;
}

.forex-input-group input {
    min-height: 54px;
    border-radius: 10px;
    font-size: 1.08rem;
}

.forex-balance-inline,
.forex-preview {
    grid-template-columns: 1fr;
}

.forex-balance-inline span,
.forex-preview div,
.forex-side-explainer {
    border-radius: 10px;
}

.forex-preview {
    gap: 8px;
}

.forex-preview div {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 48px;
}

.forex-submit-button {
    min-height: 54px;
    border-radius: 10px;
    font-size: 1rem;
}

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

.forex-bottom-grid .forex-summary-panel {
    grid-column: 1 / -1;
}

.forex-table-wrap {
    max-height: 420px;
    border-radius: 10px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(117, 191, 255, 0.34) rgba(3, 7, 14, 0.25);
}

.forex-data-table {
    min-width: 0;
}

.forex-data-table th,
.forex-data-table td {
    padding: 10px 12px;
}

.forex-balance-table,
.forex-position-table,
.forex-orders-table {
    min-width: 620px;
}

@media (max-width: 1180px) {
    .forex-terminal-top {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 0.48fr);
    }

    .forex-terminal-status {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .forex-layout {
        grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    }

    .forex-trade-rail {
        grid-column: 1 / -1;
        position: static;
    }

    .forex-order-form {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        align-items: start;
    }

    .forex-side-toggle,
    .forex-side-explainer,
    .forex-input-group,
    .forex-balance-inline,
    .forex-submit-button,
    .forex-order-form .form-hint {
        grid-column: 1;
    }

    .forex-preview {
        grid-column: 2;
        grid-row: 1 / span 6;
    }
}

@media (max-width: 920px) {
    .forex-hero,
    .forex-terminal-top,
    .forex-layout,
    .forex-rate-grid,
    .forex-detail-panel dl,
    .forex-bottom-grid,
    .forex-order-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .forex-center-column {
        order: 1;
    }

    .forex-trade-rail {
        order: 2;
    }

    .forex-market-watch {
        order: 3;
    }

    .forex-preview,
    .forex-side-toggle,
    .forex-side-explainer,
    .forex-input-group,
    .forex-balance-inline,
    .forex-submit-button,
    .forex-order-form .form-hint {
        grid-column: auto;
        grid-row: auto;
    }

    .forex-pair-list,
    .forex-trade-rail {
        position: static;
    }

    .forex-chart-control-group {
        justify-items: start;
    }
}

@media (max-width: 560px) {
    .forex-terminal-top,
    .forex-rate-panel,
    .forex-chart-panel,
    .forex-detail-panel,
    .forex-order-panel,
    .forex-summary-panel,
    .forex-history-panel,
    .forex-provider-card {
        padding: 14px;
    }

    .forex-terminal-title h2 {
        font-size: 2.25rem;
    }

    .forex-terminal-rate strong {
        font-size: 2rem;
    }

    .forex-terminal-status {
        display: grid;
        justify-content: stretch;
    }

    .forex-terminal-status .btn,
    .forex-terminal-status > span:not(.forex-scenario-pill):not(.forex-refresh-dot) {
        width: 100%;
        justify-content: center;
    }

    .forex-chart {
        min-height: 320px;
    }

    .forex-chart-svg {
        min-height: 320px;
    }

    .forex-chart-dates {
        inset: auto 10px 10px 44px;
        font-size: 0.72rem;
    }

    .forex-table-wrap {
        max-height: none;
    }
}

.not-found-shell {
    display: grid;
    min-height: min(620px, calc(100vh - 260px));
    place-items: center;
    padding: 54px 0;
}

.not-found-card {
    width: min(720px, 100%);
    padding: clamp(26px, 5vw, 44px);
    text-align: center;
}

.not-found-card h1 {
    max-width: none;
    margin-bottom: 14px;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
}

.not-found-card p {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.not-found-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.not-found-helper {
    margin-top: 22px;
    font-size: 0.94rem;
}

@media (max-width: 560px) {
    .not-found-shell {
        min-height: auto;
        padding: 28px 0 44px;
    }

    .not-found-actions .button {
        width: 100%;
    }
}
